Show meta info at the top

This commit is contained in:
Vit Brunner
2015-04-21 20:27:53 +02:00
parent 631df9677c
commit a2a1855302
3 changed files with 12 additions and 3 deletions
+9 -2
View File
@@ -11,12 +11,19 @@
.pick-in
table
tr
th(ng-repeat="attribute in metaKeys" ng-if="attribute != 'Active'" ng-bind-html="attribute")
th(ng-repeat="attribute in metaKeys" ng-bind-html="attribute")
tr(ng-repeat="poem in all" class="switch" ng-class="{disabled: !poem.meta.Active}" ng-click="switchActive(poem)")
td(ng-repeat="attribute in metaKeys" ng-if="attribute != 'Active'" ng-bind-html="poem.meta[attribute]")
td(ng-repeat="attribute in metaKeys" ng-bind-html="poem.meta[attribute]")
// verses
#content
.pure-g-r(du-scrollspy ng-href="#section-meta" id="section-meta")
.version(ng-repeat="poemmeta in meta")
.version-padded
.version-container.version-container-top
p
.text(ng-repeat="key in metaKeys") #[em {{key}}:] {{poemmeta[key]}}
.pure-g-r(du-scrollspy ng-href="#section-{{$index + 1}}" offset="100px" ng-repeat="verse in verses" id="section-{{$index + 1}}")
.version(ng-repeat="version in verse")
.version-padded
+1 -1
View File
@@ -25,7 +25,7 @@ angular.module("sideBySide").service "poems", ->
@getMetaKeys = ->
@all.reduce (all, one) ->
_.uniq all.concat (key for key of one.meta)
_.uniq all.concat (key for key of one.meta when key not in ['$$hashKey', 'Active'])
, []
@
+2
View File
@@ -55,6 +55,8 @@ body
border-top: 1px solid $light
position: relative
padding: 0px 10px
.version-container-top
border-top: 0px
.version-menu
color: $lighter