Ver Fonte

Tweak post navigation

Track3 há 6 anos atrás
pai
commit
85ac9d115d
2 ficheiros alterados com 9 adições e 8 exclusões
  1. 3 2
      assets/scss/style.scss
  2. 6 6
      layouts/posts/single.html

+ 3 - 2
assets/scss/style.scss

@@ -491,12 +491,13 @@ figure.right {
     border-bottom: transparent;
   }
 
-  .prev-post {text-align: left; padding-right: 5px;}
-  .next-post {text-align: right; padding-left: 5px;}
+  .next-post {text-align: left; padding-right: 5px;}
+  .prev-post {text-align: right; padding-left: 5px;}
 
   .post-nav-label {
     font-size: .8em;
     opacity: .8;
+    text-transform: uppercase;
   }
 }
 

+ 6 - 6
layouts/posts/single.html

@@ -30,14 +30,14 @@
 			</footer>
 		</article>
 		<div class="post-nav thin">
-			{{- with .PrevInSection }}
-			<a class="prev-post" href="{{ .Permalink }}">
-				<span class="post-nav-label"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-left"><line x1="19" y1="12" x2="5" y2="12"></line><polyline points="12 19 5 12 12 5"></polyline></svg>&nbsp;Prev</span><br><span>{{ .Title }}</span>
-			</a>
-			{{- end }}
 			{{- with .NextInSection }}
 			<a class="next-post" href="{{ .Permalink }}">
-				<span class="post-nav-label">Next&nbsp;<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-right"><line x1="5" y1="12" x2="19" y2="12"></line><polyline points="12 5 19 12 12 19"></polyline></svg></span><br><span>{{ .Title }}</span>
+				<span class="post-nav-label"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-left"><line x1="19" y1="12" x2="5" y2="12"></line><polyline points="12 19 5 12 12 5"></polyline></svg>&nbsp;Newer</span><br><span>{{ .Title }}</span>
+			</a>
+			{{- end }}
+			{{- with .PrevInSection }}
+			<a class="prev-post" href="{{ .Permalink }}">
+				<span class="post-nav-label">Older&nbsp;<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-right"><line x1="5" y1="12" x2="19" y2="12"></line><polyline points="12 5 19 12 12 19"></polyline></svg></span><br><span>{{ .Title }}</span>
 			</a>
 			{{- end }}
 		</div>