Sfoglia il codice sorgente

Improve presentation of articles published at the same time

jherve 1 anno fa
parent
commit
731c08743c
2 ha cambiato i file con 24 aggiunte e 2 eliminazioni
  1. 17 0
      static/style.css
  2. 7 2
      templates/site_main_article_detail.html

+ 17 - 0
static/style.css

@@ -106,3 +106,20 @@ ul, ol {
     grid-area: absolute;
     justify-self: end;
 }
+
+.articles-same-time > ol {
+    display: flex;
+    flex-direction: column;
+    grid-gap: 0.2em;
+}
+
+.article-same-time {
+    display: grid;
+    grid-template-columns: 1fr auto;
+    grid-gap: 0.5em;
+    align-items: center;
+}
+.article-same-time h2 {
+    font-size: 1rem;
+    font-weight: normal;
+}

+ 7 - 2
templates/site_main_article_detail.html

@@ -34,11 +34,16 @@
     {%- endmacro -%}
 
     {% macro article_same_time(a) -%}
-        {{ article(a) }}
+        <a href="{{ url_to_article_page(a) }}">
+            <div class="article-same-time">
+                {{ ui.logo(a["site_name"]) }}
+                <h2>{{ a["title"] }}</h2>
+            </div>
+        </a>
     {%- endmacro -%}
 
     {% macro articles_list_same_time(a_list, class_) -%}
-        <div class="{{ class_ }}">
+        <div class="articles-same-time {{ class_ }}">
             <ol>
                 {% for a in a_list %}
                     <li>{{ article_same_time(a) }}</li>