]> git.phdru.name Git - m_librarian.git/commitdiff
Feat(web): Add style.css
authorOleg Broytman <phd@phdru.name>
Sat, 7 Apr 2018 23:01:16 +0000 (02:01 +0300)
committerOleg Broytman <phd@phdru.name>
Sat, 7 Apr 2018 23:01:16 +0000 (02:01 +0300)
m_librarian/web/app.py
m_librarian/web/static/style.css [new file with mode: 0644]
m_librarian/web/views/books_by_author.py
m_librarian/web/views/books_by_author.tmpl
m_librarian/web/views/layout.py
m_librarian/web/views/layout.tmpl

index 95af5cb5d79e3060b0d7a923f02dc6c25a8013af..686dafedaed5a11eae2a8a158dd07c7735aba73d 100644 (file)
@@ -1,7 +1,9 @@
+import os
+
 from sqlobject.sqlbuilder import CONCAT
 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
 
 
 from m_librarian.search import search_authors
 
 
@@ -69,3 +71,13 @@ def books_by_author(id):
             orderBy=['series', 'ser_no', 'title'],
         )
     }
             orderBy=['series', 'ser_no', 'title'],
         )
     }
+
+
+@route('/static/<filename:path>')
+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 (file)
index 0000000..67149dc
--- /dev/null
@@ -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;
+}
index aa4d96fae4705e4455d980cca9396b4cb3409176..ec269e57f30669d4c9425c9aa954f4463cab7102 100644 (file)
@@ -35,10 +35,10 @@ VFN=valueForName
 currentTime=time.time
 __CHEETAH_version__ = '3.1.0'
 __CHEETAH_versionTuple__ = (3, 1, 0, 'final', 1)
 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_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:
 __CHEETAH_docstring__ = 'Autogenerated by Cheetah: The Python-Powered Template Engine'
 
 if __CHEETAH_versionTuple__ < RequiredCheetahVersionTuple:
@@ -113,9 +113,9 @@ class books_by_author(layout):
   </tr>
 ''')
                 write(u'''  <tr>
   </tr>
 ''')
                 write(u'''  <tr>
-    <td style="text-align: right">''')
-                _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.
+    <td class="numeric">''')
+                _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'''</td>
     <td><a href="/download/''')
                 _v = VFFSL(SL,"book.id",True) # u'$book.id' on line 25, col 28
                 write(u'''</td>
     <td><a href="/download/''')
                 _v = VFFSL(SL,"book.id",True) # u'$book.id' on line 25, col 28
index d093d566bfcb25137b3a9f37a9c5a46efd9e471c..b8e7c588aa5132717cd98ac31d6b7fa28aa82051 100644 (file)
@@ -21,7 +21,7 @@
   #end if
   #end if
   <tr>
   #end if
   #end if
   <tr>
-    <td style="text-align: right">$book.ser_no</td>
+    <td class="numeric">$book.ser_no</td>
     <td><a href="/download/$book.id/">$book.title</a></td>
   </tr>
   #end for
     <td><a href="/download/$book.id/">$book.title</a></td>
   </tr>
   #end for
index 8bc236ee26976fe999e83f2db543e24759a25657..d7cae1afbcc5fc49e13d5f4d697825fd9126dd79 100644 (file)
@@ -34,10 +34,10 @@ VFN=valueForName
 currentTime=time.time
 __CHEETAH_version__ = '3.1.0'
 __CHEETAH_versionTuple__ = (3, 1, 0, 'final', 1)
 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_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:
 __CHEETAH_docstring__ = 'Autogenerated by Cheetah: The Python-Powered Template Engine'
 
 if __CHEETAH_versionTuple__ < RequiredCheetahVersionTuple:
@@ -99,6 +99,7 @@ class layout(Template):
 <link rev="made" href="mailto:phd@phdru.name">
 <meta name="generator" content="CheetahTemplate">
 <meta name="MSSmartTagsPreventParsing" content="TRUE"> <!-- MUST DIE -->
 <link rev="made" href="mailto:phd@phdru.name">
 <meta name="generator" content="CheetahTemplate">
 <meta name="MSSmartTagsPreventParsing" content="TRUE"> <!-- MUST DIE -->
+<link rel="stylesheet" type="text/css" media="screen" href="/static/style.css">
 </head>
 <body bgcolor="#FFFFFF" text="#000000"
       link="#0000bb"  vlink="#551a8b" alink="#ff0000">
 </head>
 <body bgcolor="#FFFFFF" text="#000000"
       link="#0000bb"  vlink="#551a8b" alink="#ff0000">
@@ -109,8 +110,8 @@ class layout(Template):
 </tr>
 </table>
 ''')
 </tr>
 </table>
 ''')
-        _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'''
 </body>
 </html>
         write(u'''
 </body>
 </html>
index 778cafb914f6419a360930afb188fd3d5f5401cf..349d07e511c740304a92d11f0f5f98856f75dbea 100644 (file)
@@ -12,6 +12,7 @@
 <link rev="made" href="mailto:phd@phdru.name">
 <meta name="generator" content="CheetahTemplate">
 <meta name="MSSmartTagsPreventParsing" content="TRUE"> <!-- MUST DIE -->
 <link rev="made" href="mailto:phd@phdru.name">
 <meta name="generator" content="CheetahTemplate">
 <meta name="MSSmartTagsPreventParsing" content="TRUE"> <!-- MUST DIE -->
+<link rel="stylesheet" type="text/css" media="screen" href="/static/style.css">
 </head>
 <body bgcolor="#FFFFFF" text="#000000"
       link="#0000bb"  vlink="#551a8b" alink="#ff0000">
 </head>
 <body bgcolor="#FFFFFF" text="#000000"
       link="#0000bb"  vlink="#551a8b" alink="#ff0000">