mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Content server: Make /mobile a little prettier
This commit is contained in:
parent
678aa014dd
commit
973afc0733
@ -1,5 +1,9 @@
|
|||||||
/* CSS for the mobile version of the content server webpage */
|
/* CSS for the mobile version of the content server webpage */
|
||||||
|
|
||||||
|
.body {
|
||||||
|
font-family: sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
.navigation table.buttons {
|
.navigation table.buttons {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
@ -85,4 +89,17 @@ div.navigation {
|
|||||||
clear: both;
|
clear: both;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.data-container {
|
||||||
|
display: inline-block;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
|
||||||
|
.first-line {
|
||||||
|
font-size: larger;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.second-line {
|
||||||
|
margin-top: 0.75ex;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
@ -112,7 +112,6 @@ def build_index(books, num, search, sort, order, start, total, url_base, CKEYS):
|
|||||||
CLASS('thumbnail'))
|
CLASS('thumbnail'))
|
||||||
|
|
||||||
data = TD()
|
data = TD()
|
||||||
last = None
|
|
||||||
for fmt in book['formats'].split(','):
|
for fmt in book['formats'].split(','):
|
||||||
a = ascii_filename(book['authors'])
|
a = ascii_filename(book['authors'])
|
||||||
t = ascii_filename(book['title'])
|
t = ascii_filename(book['title'])
|
||||||
@ -124,9 +123,11 @@ def build_index(books, num, search, sort, order, start, total, url_base, CKEYS):
|
|||||||
),
|
),
|
||||||
CLASS('button'))
|
CLASS('button'))
|
||||||
s.tail = u''
|
s.tail = u''
|
||||||
last = s
|
|
||||||
data.append(s)
|
data.append(s)
|
||||||
|
|
||||||
|
div = DIV(CLASS('data-container'))
|
||||||
|
data.append(div)
|
||||||
|
|
||||||
series = u'[%s - %s]'%(book['series'], book['series_index']) \
|
series = u'[%s - %s]'%(book['series'], book['series_index']) \
|
||||||
if book['series'] else ''
|
if book['series'] else ''
|
||||||
tags = u'Tags=[%s]'%book['tags'] if book['tags'] else ''
|
tags = u'Tags=[%s]'%book['tags'] if book['tags'] else ''
|
||||||
@ -137,13 +138,13 @@ def build_index(books, num, search, sort, order, start, total, url_base, CKEYS):
|
|||||||
if val:
|
if val:
|
||||||
ctext += '%s=[%s] '%tuple(val.split(':#:'))
|
ctext += '%s=[%s] '%tuple(val.split(':#:'))
|
||||||
|
|
||||||
text = u'\u202f%s %s by %s - %s - %s %s %s' % (book['title'], series,
|
first = SPAN(u'\u202f%s %s by %s' % (book['title'], series,
|
||||||
book['authors'], book['size'], book['timestamp'], tags, ctext)
|
book['authors']), CLASS('first-line'))
|
||||||
|
div.append(first)
|
||||||
if last is None:
|
second = SPAN(u'%s - %s %s %s' % ( book['size'],
|
||||||
data.text = text
|
book['timestamp'],
|
||||||
else:
|
tags, ctext), CLASS('second-line'))
|
||||||
last.tail += text
|
div.append(second)
|
||||||
|
|
||||||
bookt.append(TR(thumbnail, data))
|
bookt.append(TR(thumbnail, data))
|
||||||
# }}}
|
# }}}
|
||||||
@ -229,7 +230,7 @@ class MobileServer(object):
|
|||||||
no_tag_count=True)
|
no_tag_count=True)
|
||||||
book['title'] = record[FM['title']]
|
book['title'] = record[FM['title']]
|
||||||
for x in ('timestamp', 'pubdate'):
|
for x in ('timestamp', 'pubdate'):
|
||||||
book[x] = strftime('%Y/%m/%d %H:%M:%S', record[FM[x]])
|
book[x] = strftime('%b, %Y', record[FM[x]])
|
||||||
book['id'] = record[FM['id']]
|
book['id'] = record[FM['id']]
|
||||||
books.append(book)
|
books.append(book)
|
||||||
for key in CKEYS:
|
for key in CKEYS:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user