Explorar el Código

Add message for empty page, make pagination less visible.

master
Syfaro hace 1 año
padre
commit
0132f960a0
Se han modificado 2 ficheros con 29 adiciones y 19 borrados
  1. 8
    0
      assets/css/main.css
  2. 21
    19
      index.hbs

+ 8
- 0
assets/css/main.css Ver fichero

@@ -126,6 +126,14 @@ img {
126 126
   border: 5px solid #7f50c3;
127 127
 }
128 128
 
129
+.text-center {
130
+  text-align: center;
131
+}
132
+
133
+nav.pagination {
134
+  color: darkgray;
135
+}
136
+
129 137
 @media (max-width: 767px) {
130 138
   .image-two img {
131 139
     max-width: 90%;

+ 21
- 19
index.hbs Ver fichero

@@ -1,29 +1,31 @@
1 1
 {{!< default }}
2 2
 
3 3
 {{#foreach posts}}
4
-  <article class="{{post_class}}">
5
-    <header class="post-header">
6
-      <h1 class="post-title">
7
-        <a href="{{url}}">{{title}}</a>
8
-      </h1>
4
+<article class="{{post_class}}">
5
+  <header class="post-header">
6
+    <h1 class="post-title">
7
+      <a href="{{url}}">{{title}}</a>
8
+    </h1>
9 9
 
10
-      <section class="post-meta">
11
-        <time class="post-date" datetime="{{date format='YYYY-MM-DD'}}">
12
-          {{date format="DD MMMM YYYY"}}
13
-        </time>
10
+    <section class="post-meta">
11
+      <time class="post-date" datetime="{{date format='YYYY-MM-DD'}}">
12
+        {{date format="DD MMMM YYYY"}}
13
+      </time>
14 14
 
15
-        &middot;
15
+      &middot;
16 16
 
17
-        {{reading_time}}
18
-      </section>
17
+      {{reading_time}}
18
+    </section>
19 19
 
20
-      <section class="post-content">
21
-        {{content}}
22
-      </section>
23
-
24
-      <a href="{{url}}">Read more &hellip;</a>
25
-    </header>
26
-  </article>
20
+    <section class="post-content">
21
+      {{content}}
22
+    </section>
23
+  </header>
24
+</article>
25
+{{else}}
26
+<div class="text-center">
27
+  <h2>No items were found.</h2>
28
+</div>
27 29
 {{/foreach}}
28 30
 
29 31
 {{pagination}}

Loading…
Cancelar
Guardar