Browse Source

stile commenti

boyska 3 years ago
parent
commit
747d744cac
2 changed files with 12 additions and 6 deletions
  1. 1 1
      templates/base.html
  2. 11 5
      templates/news.html

+ 1 - 1
templates/base.html

@@ -9,7 +9,7 @@
     margin: 1em;
     border: 1px solid blue;
 }
-.article > header > div {
+header .meta {
     text-align: right;
     font-style: italic;
 }

+ 11 - 5
templates/news.html

@@ -2,10 +2,12 @@
 {% block content %}
 <article class="article">
     <header> <h1>{{n.title}}</h1>
-        <div class="published">
-        <time> {{n.published_datetime.strftime("%d %b %Y - %H:%M")}}</time>
+        <div class="meta">
+            <div class="published">
+                <time> {{n.published_datetime.strftime("%d %b %Y - %H:%M")}}</time>
+            </div>
+            <div class="author">{{n.author}}</div>
         </div>
-        <div class="author">{{n.author}}</div>
     </header>
     <div class="article-body">
         {{n.body|safe}}
@@ -13,8 +15,12 @@
     <div class="article-comments">
         {% for comm in comments %}
         <div class="article-comment">
-            <div class="author">{{comm.author}}</div>
-            <div class="published"><time>{{comm.published_datetime.strftime("%d %b %Y - %H:%M")}}</time></div>
+            <header>
+                <div class="meta">
+                    <div class="author">{{comm.author}}</div>
+                    <div class="published"><time>{{comm.published_datetime.strftime("%d %b %Y - %H:%M")}}</time></div>
+                </div>
+            </header>
             {{comm.body|safe}}
         </div>
         {% endfor %}