mirror of
https://github.com/wassname/side-by-side.git
synced 2026-09-09 11:34:24 +08:00
Show meta info at the top
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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'])
|
||||
, []
|
||||
|
||||
@
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user