From: Oleg Broytman Date: Sat, 7 Apr 2018 23:01:16 +0000 (+0300) Subject: Feat(web): Add style.css X-Git-Tag: 0.1.0~20 X-Git-Url: https://git.phdru.name/?p=m_librarian.git;a=commitdiff_plain;h=340957e73caf64e0835d6dfd1b003ed61df28004 Feat(web): Add style.css --- diff --git a/m_librarian/web/app.py b/m_librarian/web/app.py index 95af5cb..686dafe 100644 --- a/m_librarian/web/app.py +++ b/m_librarian/web/app.py @@ -1,7 +1,9 @@ +import os + from sqlobject.sqlbuilder import CONCAT -from bottle import cheetah_view, redirect, request, route +from bottle import cheetah_view, redirect, request, route, static_file -from m_librarian.db import Author, AuthorBook, Book +from m_librarian.db import Author, Book from m_librarian.search import search_authors @@ -69,3 +71,13 @@ def books_by_author(id): orderBy=['series', 'ser_no', 'title'], ) } + + +@route('/static/') +def send_static(filename): + return static_file( + filename, root=os.path.join( + os.path.dirname(__file__), + 'static' + ) + ) diff --git a/m_librarian/web/static/style.css b/m_librarian/web/static/style.css new file mode 100644 index 0000000..67149dc --- /dev/null +++ b/m_librarian/web/static/style.css @@ -0,0 +1,36 @@ +body { + color: #000000; + font-family: sans-serif; + text-decoration: none; + margin: 8pt; +} + +h1, h2, h3, h4, h5, h6 { font-weight: bold; } +h1 { font-size: 150%; } +h2 { font-size: 140%; } +h3 { font-size: 130%; } +h4 { font-size: 120%; } +h5 { font-size: 110%; } +h6 { font-size: 100%; } + +p { + text-indent: 2em; + margin: 0; +} + +p.head { + margin-top: 1ex; +} + +table { + border: 1px solid black; +} + +td, th { + border: 1px solid black; + text-align: left; +} + +td.numeric { + text-align: right; +} diff --git a/m_librarian/web/views/books_by_author.py b/m_librarian/web/views/books_by_author.py index aa4d96f..ec269e5 100644 --- a/m_librarian/web/views/books_by_author.py +++ b/m_librarian/web/views/books_by_author.py @@ -35,10 +35,10 @@ VFN=valueForName currentTime=time.time __CHEETAH_version__ = '3.1.0' __CHEETAH_versionTuple__ = (3, 1, 0, 'final', 1) -__CHEETAH_genTime__ = 1523136060.80551 -__CHEETAH_genTimestamp__ = 'Sun Apr 8 00:21:00 2018' +__CHEETAH_genTime__ = 1523141375.719046 +__CHEETAH_genTimestamp__ = 'Sun Apr 8 01:49:35 2018' __CHEETAH_src__ = 'books_by_author.tmpl' -__CHEETAH_srcLastModified__ = 'Sun Apr 8 00:20:58 2018' +__CHEETAH_srcLastModified__ = 'Sun Apr 8 01:49:05 2018' __CHEETAH_docstring__ = 'Autogenerated by Cheetah: The Python-Powered Template Engine' if __CHEETAH_versionTuple__ < RequiredCheetahVersionTuple: @@ -113,9 +113,9 @@ class books_by_author(layout): ''') write(u''' - ''') - _v = VFFSL(SL,"book.ser_no",True) # u'$book.ser_no' on line 24, col 35 - if _v is not None: write(_filter(_v, rawExpr=u'$book.ser_no')) # from line 24, col 35. + ''') + _v = VFFSL(SL,"book.ser_no",True) # u'$book.ser_no' on line 24, col 25 + if _v is not None: write(_filter(_v, rawExpr=u'$book.ser_no')) # from line 24, col 25. write(u''' - $book.ser_no + $book.ser_no $book.title #end for diff --git a/m_librarian/web/views/layout.py b/m_librarian/web/views/layout.py index 8bc236e..d7cae1a 100644 --- a/m_librarian/web/views/layout.py +++ b/m_librarian/web/views/layout.py @@ -34,10 +34,10 @@ VFN=valueForName currentTime=time.time __CHEETAH_version__ = '3.1.0' __CHEETAH_versionTuple__ = (3, 1, 0, 'final', 1) -__CHEETAH_genTime__ = 1522960530.67886 -__CHEETAH_genTimestamp__ = 'Thu Apr 5 23:35:30 2018' +__CHEETAH_genTime__ = 1523141278.03866 +__CHEETAH_genTimestamp__ = 'Sun Apr 8 01:47:58 2018' __CHEETAH_src__ = 'layout.tmpl' -__CHEETAH_srcLastModified__ = 'Thu Apr 5 23:35:06 2018' +__CHEETAH_srcLastModified__ = 'Sun Apr 8 01:47:39 2018' __CHEETAH_docstring__ = 'Autogenerated by Cheetah: The Python-Powered Template Engine' if __CHEETAH_versionTuple__ < RequiredCheetahVersionTuple: @@ -99,6 +99,7 @@ class layout(Template): + @@ -109,8 +110,8 @@ class layout(Template): ''') - _v = VFFSL(SL,"body",True) # u'$body' on line 24, col 1 - if _v is not None: write(_filter(_v, rawExpr=u'$body')) # from line 24, col 1. + _v = VFFSL(SL,"body",True) # u'$body' on line 25, col 1 + if _v is not None: write(_filter(_v, rawExpr=u'$body')) # from line 25, col 1. write(u''' diff --git a/m_librarian/web/views/layout.tmpl b/m_librarian/web/views/layout.tmpl index 778cafb..349d07e 100644 --- a/m_librarian/web/views/layout.tmpl +++ b/m_librarian/web/views/layout.tmpl @@ -12,6 +12,7 @@ +