better jade syntax

This commit is contained in:
Meutel 2014-07-08 11:26:49 +02:00
parent 9667644cb4
commit 8e04349ef8
3 changed files with 18 additions and 18 deletions

View File

@ -11,30 +11,30 @@ block content
div.page-header
h1
span.glyphicon.glyphicon-user
= ' '+name
| #{name}
h2
span.glyphicon.glyphicon-book
= ' '+t('bouquins.author.books')
| #{t('bouquins.author.books')}
ul
each book in books
li
a(href='/book/'+book.id)
= book.title+' '
| #{book.title}
if book.serie
span.glyphicon.glyphicon-list
a(href='/serie/'+book.serie.id)
= ' '+book.serie.name+' ('+book.series_index+')'
| #{book.serie.name} (#{book.series_index})
if series
h2
span.glyphicon.glyphicon-list
= ' '+t('bouquins.author.series')
| #{t('bouquins.author.series')}
ul
each serie in series
li: a(href='/serie/'+serie.id)= ' '+serie.name
li: a(href='/serie/'+serie.id) #{serie.name}
if coauthors
h2
span.glyphicon.glyphicon-user
= ' '+t('bouquins.author.coauthors')
| #{t('bouquins.author.coauthors')}
ul
each author in coauthors
li: a(href='/author/'+author.id)= author.name

View File

@ -11,32 +11,32 @@ block content
div.page-header
h1
span.glyphicon.glyphicon-book
= ' '+title+' '
| #{title}
a.btn.btn-success(href='/calibre/'+path+'/'+data_name+'.'+format.toLowerCase())
span.glyphicon.glyphicon-download-alt
= ' '+t('bouquins.book.download')+' ' + format
| #{t('bouquins.book.download')} #{format}
div.row
div.col-md-5
h2
span.glyphicon.glyphicon-user
= ' '+t('bouquins.book.authors')
| #{t('bouquins.book.authors')}
ul.list-unstyled
each author in authors
li: a(href='/author/'+author.id)= author.name
if series_name
h2
span.glyphicon.glyphicon-list
= ' '+t('bouquins.book.serie')
| #{t('bouquins.book.serie')}
div
a(href='/serie/'+series_id)= series_name + ' '
a(href='/serie/'+series_id) #{series_name}
span.badge= series_index
h2
span.glyphicon.glyphicon-globe
= ' '+t('bouquins.book.language')
| #{t('bouquins.book.language')}
div= lang_code
h2
span.glyphicon.glyphicon-tags
= ' '+t('bouquins.book.tags')
| #{t('bouquins.book.tags')}
div
each tag in tags
span.label.label-info= tag.name

View File

@ -11,20 +11,20 @@ block content
div.page-header
h1
span.glyphicon.glyphicon-list
= ' '+name
| #{name}
h2
span.glyphicon.glyphicon-book
= ' '+t('bouquins.serie.books')
| #{t('bouquins.serie.books')}
ul
each book in books
li
= book.series_index+'. '
| #{book.series_index}.
a(href='/book/'+book.id)
= book.title
if authors.length > 0
h2
span.glyphicon.glyphicon-user
= ' '+t('bouquins.serie.authors')
| #{t('bouquins.serie.authors')}
ul
each author in authors
li: a(href='/author/'+author.id)= author.name