Ver código fonte

Navigation Buttons

Steffen Cole Blake 4 anos atrás
pai
commit
c1a7e002ab
3 arquivos alterados com 57 adições e 6 exclusões
  1. 46 1
      layouts/_default/single.html
  2. 3 0
      layouts/partials/footer.html
  3. 8 5
      static/css/site.css

+ 46 - 1
layouts/_default/single.html

@@ -14,9 +14,54 @@
         <h1>{{ .Title }}</h1>
     
         {{ .Content }}
+
+        {{ $.Scratch.Set "pageTitle" .Title }}
+        {{ $.Scratch.Set "site" .Site }}
+        {{ $.Scratch.Set "prev" .PrevInSection }}
+        {{ $.Scratch.Set "next" .NextInSection }}
+
+        {{ with .Section}}
+            
+            {{ range last 1 (where ($.Scratch.Get "site").RegularPages "Section" "catalogue") }}
+                {{ if ne .Title ($.Scratch.Get "pageTitle") }}
+                    <p>
+                        <a href="{{ .Permalink }}"><< Give us that ole classic</a>
+                    </p>
+                {{ end }}
+
+                {{ $.Scratch.Set "firstTitle" .Title }}
+                {{ with ($.Scratch.Get "prev") }}
+                    {{ if ne .Title ($.Scratch.Get "firstTitle") }}
+                        <p>
+                            <a href="{{ .Permalink }}">< Tell us that one from the other day</a>
+                        </p>
+                    {{ end }}
+                {{ end }}
+            {{ end }}
+
+            {{ range first 1 (where ($.Scratch.Get "site").RegularPages "Section" "catalogue") }}
+                {{ $.Scratch.Set "latestTitle" .Title }}
+
+                {{ with ($.Scratch.Get "next") }}
+                    {{ if ne .Title ($.Scratch.Get "latestTitle") }}
+                        <p>
+                            <a href="{{ .Permalink }}">Spin me another tale, keeper ></a>
+                        </p>
+                    {{ end }}
+                {{ end }}
+
+                {{ if ne .Title ($.Scratch.Get "pageTitle") }}
+                    <p>
+                        <a href="{{ .Permalink }}">Give us something new >></a>
+                    </p>
+                {{ end }}
+            {{ end }}
+        {{ end }}
+        
+        {{- partial "footer.html" . -}}
+
     </article>
 
-    {{- partial "footer.html" . -}}
 </div>
 
 {{ end }}

+ 3 - 0
layouts/partials/footer.html

@@ -0,0 +1,3 @@
+<div class="footer">
+    &copy; Steffen Blake 2021
+</div>

+ 8 - 5
static/css/site.css

@@ -112,16 +112,15 @@ a:hover {
 }
 
 .list h1 {
-    font-size: 14vw;
+    font-size: 8vw;
 }
 
 .list p {
-    font-size: max(24px,4vw);
-    width: 100%;
+    font-size: 3vw;
 }
 
 .list li {
-    font-size: max(22px,3.5vw);
+    font-size: 2.5vw;
 }
 
 .page {
@@ -137,7 +136,7 @@ a:hover {
     padding-left: 5%;
     padding-right: 5%;
     padding-top: 2vh;
-    padding-bottom: 10vh;
+    padding-bottom: 3vh;
 }
 
 .page a {
@@ -199,4 +198,8 @@ nav .logo:hover {
 nav .spacer {
     margin-left: 1vw;
     margin-right: 1vw;
+}
+
+.footer {
+    margin-top: 5vh;
 }