Browse Source

Rearrange post listing

master
Dylan Baker 3 years ago
parent
commit
b2330f67bf
2 changed files with 13 additions and 16 deletions
  1. 1
    4
      static/style.css
  2. 12
    12
      templates/components.html

+ 1
- 4
static/style.css View File

@@ -116,16 +116,13 @@ a:hover {
116 116
   align-items: center;
117 117
   background: white;
118 118
   border: 1px solid var(--dark-accent);
119
-  display: flex;
120
-  flex-wrap: wrap;
121 119
   font-size: 16px;
122 120
   font-weight: bold;
123
-  justify-content: space-between;
124 121
   padding: 0.5em;
125 122
 }
126 123
 
127 124
 .post__title {
128
-  flex: 1;
125
+  margin-bottom: 0.25em;
129 126
   margin-right: 1em;
130 127
   min-width: 220px;
131 128
 }

+ 12
- 12
templates/components.html View File

@@ -1,20 +1,20 @@
1 1
 {% macro post(post, type) %}
2 2
   <div class="post">
3
-    <h3 class="post__heading">
4
-      <span class="post__title">
5
-        {{ post.title }} <span class="post__date">:: {{ post.date }}</span>
6
-      </span>
7
-      <div class="post__links">
8
-        {% if type == "index" %}
9
-          <a class="post__link" href="/posts/{{ post.id }}">view</a>
10
-        {% endif %}
11
-
3
+    
4
+      <div class="post__heading">
5
+        <div class="post__title">
6
+          <span class="post__date">:: {{ post.date }} //</span>
7
+          <a class="post__link" href="/posts/{{ post.id }}">
8
+            {{ post.title }}
9
+          </a>
10
+        </div>
12 11
         {% if logged_in %}
13
-          <a class="post__link" href="/posts/{{ post.id }}/edit">edit</a>
14
-          <span class="post__link danger" data-delete="{{ post.id }}">delete</span>
12
+          <div class="post__meta">
13
+            <a class="post__link" href="/posts/{{ post.id }}/edit">edit</a>
14
+            <span class="post__link danger" data-delete="{{ post.id }}">delete</span>          
15
+          </div>
15 16
         {% endif %}
16 17
       </div>
17
-    </h3>
18 18
 
19 19
     {% if type != "index" %}
20 20
       <div class="post__body">

Loading…
Cancel
Save