Przeglądaj źródła

fix display for quote authors

Getty Ritter 1 rok temu
rodzic
commit
48f320cdb1
2 zmienionych plików z 73 dodań i 69 usunięć
  1. 2 1
      main.py
  2. 71 68
      static/main.css

+ 2 - 1
main.py

@@ -131,6 +131,7 @@ def main():
     for uuid in Path.list('quotes'):
         q = Quote.from_file(Path.data('quotes', uuid))
         q.content = markdown.markdown(q.content)
+        q.author = markdown.markdown(q.author)
         quotes.append(q)
         with Path.write('quotes', uuid, 'index.html') as f:
             contents = Template.quote({'quotelist': [q]})
@@ -182,7 +183,7 @@ def main():
             with open(Path.data('works', slug, work, 'metadata.yaml')) as f:
                 meta = yaml.safe_load(f)
             with open(Path.data('works', slug, work, 'text')) as f:
-                text = markdown.markdown(f.read())
+                text = markdown.markdown(f.read(), extensions=['footnotes'])
             w = Work(
                 slug=meta.get('slug', work),
                 category=meta.get('category', slug),

+ 71 - 68
static/main.css

@@ -4,72 +4,72 @@
 }
 
 body {
-	background-color: #eeeeee;
-	font-family: league-spartan, sans-serif;
-	font-size: 14pt;
+    background-color: #eeeeee;
+    font-family: league-spartan, sans-serif;
+    font-size: 14pt;
 }
 
 .header {
-	padding: 20px;
-	text-transform: uppercase;
+    padding: 20px;
+    text-transform: uppercase;
 }
 
 .sitename {
-	margin: 0px;
-	font-size: 24pt;
-	letter-spacing: 4px;
-	padding-left: 40px;
-	color: #ccc;
-	padding-right: 80px;
-	margin-top: -40px;
-	text-align: right;
+    margin: 0px;
+    font-size: 24pt;
+    letter-spacing: 4px;
+    padding-left: 40px;
+    color: #ccc;
+    padding-right: 80px;
+    margin-top: -40px;
+    text-align: right;
 }
 
 .title {
-	margin-left: 40px;
-	margin-top: -40px;
-	letter-spacing: 4px;
+    margin-left: 40px;
+    margin-top: -40px;
+    letter-spacing: 4px;
 }
 
 .contents {
-	text-align: justify;
-	line-height: 1.5;
-	padding: 40px;
-	font-family: "Helvetica", "Arial", sans-serif;
-	margin: 40px;
-	width: 80%;
-	background-color: #e8e8e8;
-	margin-left: auto;
-	margin-right: auto;
+    text-align: justify;
+    line-height: 1.5;
+    padding: 40px;
+    font-family: "Helvetica", "Arial", sans-serif;
+    margin: 40px;
+    width: 80%;
+    background-color: #e8e8e8;
+    margin-left: auto;
+    margin-right: auto;
 }
 
 .menu {
-	text-transform: uppercase;
-	letter-spacing: 2px;
-	text-align: center;
-	border-top-style: solid;
-	border-bottom-style: solid;
-	padding-top: 5px;
-	padding-bottom: 5px;
-	border-width: 1px;
-	width: 60%;
-	margin-left: auto;
-	margin-right: auto;
+    text-transform: uppercase;
+    letter-spacing: 2px;
+    text-align: center;
+    border-top-style: solid;
+    border-bottom-style: solid;
+    padding-top: 5px;
+    padding-bottom: 5px;
+    border-width: 1px;
+    width: 60%;
+    margin-left: auto;
+    margin-right: auto;
 }
 
 a:link {
-	text-decoration: none;
-	color: #cc3366;
+    text-decoration: none;
+    color: #cc3366;
 }
 
 a:visited {
-	color: #993366;
+    color: #993366;
 }
 
 .footer {
-	text-align: center;
-	letter-spacing: 4px;
-	text-transform: uppercase;
+    text-align: center;
+    letter-spacing: 4px;
+    text-transform: uppercase;
 }
 
 pre {
@@ -78,38 +78,41 @@ pre {
 }
 
 .quote {
-	border-top-style: solid;
-	border-bottom-style: solid;
-	border-width: 1px;
-	padding: 20px;
-	margin-top: 20px;
-	margin-bottom: 20px;
-	width: 75%;
-	margin-left: auto;
-	margin-right: auto;
-	background-color: #eee;
+    border-top-style: solid;
+    border-bottom-style: solid;
+    border-width: 1px;
+    padding: 20px;
+    margin-top: 20px;
+    margin-bottom: 20px;
+    width: 75%;
+    margin-left: auto;
+    margin-right: auto;
+    background-color: #eee;
 }
 .quotelink {
-	margin-top: 10px;
-	text-align: right;
-	font-size: 12pt;
+    margin-top: 10px;
+    text-align: right;
+    font-size: 12pt;
 }
 
 .link {
-	border-top-style: solid;
-	border-bottom-style: solid;
-	border-width: 1px;
-	padding: 20px;
-	margin-top: 20px;
-	margin-bottom: 20px;
-	width: 75%;
-	margin-left: auto;
-	margin-right: auto;
-	background-color: #eee;
+    border-top-style: solid;
+    border-bottom-style: solid;
+    border-width: 1px;
+    padding: 20px;
+    margin-top: 20px;
+    margin-bottom: 20px;
+    width: 75%;
+    margin-left: auto;
+    margin-right: auto;
+    background-color: #eee;
 }
 .permalink {
-	margin-top: 10px;
-	text-align: right;
-	font-size: 12pt;
+    margin-top: 10px;
+    text-align: right;
+    font-size: 12pt;
 }
 
+.author p {
+    display: inline;
+}