]> jfr.im git - irc/freenode/web-7.0.git/commitdiff
Improve news archive style. 147/head
authorEd Kellett <redacted>
Wed, 23 Mar 2016 22:05:10 +0000 (22:05 +0000)
committerEd Kellett <redacted>
Wed, 23 Mar 2016 22:07:42 +0000 (22:07 +0000)
close #137

static/css/style.css
templates/article.html
templates/artinfo.html
templates/artlist.html
templates/index.html

index 9a02b71f0bacc02f2c977ef575e54c70b6eeb071..b507d66ab673cd31a30ea8d9549d3055ce90b64e 100644 (file)
@@ -130,7 +130,7 @@ img {
 .main h2,
 .main h3,
 .main h4,
-.main li,
+.main li:not(.artlist *),
 .main pre,
 .main p {
     margin-top: .7em;
@@ -298,8 +298,11 @@ h1 {
     margin: 0;
 }
 
+ul.artlist {
+    list-style-type: none;
+}
+
 .art-info {
-    margin-top: 2.1em;
     display: flex;
     flex-direction: row;
     flex-wrap: wrap;
@@ -328,10 +331,15 @@ h1 {
     padding: 0 0.75em;
 }
 
-.artlist .art-info:not(:first-child) {
+.artlist li:not(:first-child) {
     border-top: 1px solid var(--border-color);
 }
 
+.art-info .art {
+    font-weight: bold;
+    font-size: 120%;
+}
+
 .art-date {
     display: inline-block;
     vertical-align: baseline;
@@ -342,10 +350,15 @@ h1 {
     font-variant-numeric: tabular-nums;
 }
 
+.artlist .art-date {
+    margin-bottom: .5em;
+}
+
 .art-nav {
     display: flex;
     flex-direction: row;
     justify-content: space-between;
+    flex-basis: 30%;
     width: 100%;
 }
 
index db501a6c0d2d765adec1908b746edfcd9aaddafc..aec02758d95d01ce5dd9abce14f35f567a4e1854 100644 (file)
@@ -3,7 +3,9 @@
 {% set title=article.title %}
 {% block content %}
 <div class="main">
-    {{ artinfo.info(article) }}
+    <div class="art-info">
+        {{ artinfo.info(article) }}
+    </div>
     <div class="art-body">
     {{ article.render() }}
     </div>
index e8f10e93906dc3a53a3e21bcbf80851d1edd6fcb..4a66a9baea6e5e18a161d35c6ab388a7707bdcac 100644 (file)
@@ -1,8 +1,6 @@
 {% macro info(article, what="h1") %}
-<div class="art-info">
-    <a href="{{ article.url }}"><{{what}} class="art">{{ article.title }}</{{what}}></a>
-    <span class="art-date">{{ article.author }} on {{ article.datetime.astimezone().date() }}</span>
-</div>
+<a href="{{ article.url }}"><{{what}} class="art">{{ article.title }}</{{what}}></a>
+<span class="art-date">{{ article.author }} on {{ article.datetime.astimezone().date() }}</span>
 {% endmacro %}
 
 {% macro nav(article) %}
index 0bb5e822cc0316e0d1475fe31ff930cc9a5826c0..8686d4093cf1abe55c9521e6a0c8d987d24517b1 100644 (file)
@@ -5,9 +5,9 @@
 <div class="artlist heading">
     <h1>Blog Archive</h1>
 </div>
-<div class="artlist main">
+<ul class="artlist main">
 {% for article in get_module("news").articles|reverse %}
-    {{ artinfo.info(article, "b") }}
+    <li class="art-info">{{ artinfo.info(article, "span") }}</li>
 {% endfor %}
-</div>
+</ul>
 {% endblock content %}
index ae9c3fa46ec7ac2b923551f9d31e65ff2f80a73c..14b7b149263a71485484287ae322a455c0052b84 100644 (file)
@@ -21,7 +21,7 @@
 </div>
 <div class="main">
     {% with article = get_module("news").articles[-1] %}
-    {{ artinfo.info(article) }}
+    <div class="art-info">{{ artinfo.info(article) }}</div>
     <div class="art-body">{{ article.render() }}</div>
     <div class="art-nav">
         <span></span>