repos / starfx

supercharged async flow control library.
git clone https://github.com/neurosnap/starfx.git

commit
27ee28d
parent
31d72aa
author
Eric Bower
date
2024-03-03 16:09:21 +0000 UTC
design: sidebar
3 files changed,  +73, -44
M docs/static/main.css
+26, -2
 1@@ -1,5 +1,15 @@
 2 .sitemap {
 3-  column-count: 3;
 4+  width: 150px;
 5+}
 6+
 7+.post {
 8+  max-width: 700px;
 9+}
10+
11+.post-container {
12+  display: flex;
13+  gap: 1rem;
14+  flex-direction: row-reverse;
15 }
16 
17 .link-alt-adj,
18@@ -102,9 +112,23 @@
19   min-width: 150px;
20 }
21 
22+@media only screen and (max-width: 800px) {
23+  body {
24+    padding: 0 1rem;
25+  }
26+
27+  header {
28+    margin: 0;
29+  }
30+
31+  .post-container {
32+    display: block;
33+  }
34 
35-@media only screen and (max-width: 600px) {
36   .sitemap {
37+    text-align: center;
38+    -moz-column-count: 2;
39     column-count: 2;
40+    width: 100%;
41   }
42 }
M docs/tmpl/post.page.tmpl
+30, -42
 1@@ -4,58 +4,46 @@
 2 
 3 {{define "meta"}}{{end}}
 4 
 5-{{define "attrs"}}class="container-sm"{{end}}
 6+{{define "attrs"}}class="container"{{end}}
 7 
 8 {{define "body"}}
 9 {{template "nav" .}}
10 
11-<main class="post">
12-  <h1 class="text-2xl text-underline-hdr text-hdr inline-block">{{.Data.Title}}</h1>
13-  <h2 class="text-xl">{{.Data.Description}}</h2>
14+<div class="post-container">
15+  <main class="post flex-1">
16+    <h1 class="text-2xl text-underline-hdr text-hdr inline-block">{{.Data.Title}}</h1>
17+    <h2 class="text-xl">{{.Data.Description}}</h2>
18 
19-  <hr />
20+    <hr />
21 
22-  <article class="md">
23-    {{.Data.Html}}
24-  </article>
25+    <article class="md">
26+      {{.Data.Html}}
27+    </article>
28 
29-  <div class="flex justify-between gap-2 my-4">
30-    {{if .Prev}}
31-      <div class="pager max-w-half flex items-center">
32-        <div class="flex flex-col items-start">
33-          <div class="text-sm font-grey-light">&lt;&lt; PREV</div>
34-          <a href="{{.Prev.GenHref}}" class="text-xl link-alt-adj">{{.Prev.Text}}</a>
35+    <div class="flex justify-between gap-2 my-4">
36+      {{if .Prev}}
37+        <div class="pager max-w-half flex items-center">
38+          <div class="flex flex-col items-start">
39+            <div class="text-sm font-grey-light">&lt;&lt; PREV</div>
40+            <a href="{{.Prev.GenHref}}" class="text-xl link-alt-adj">{{.Prev.Text}}</a>
41+          </div>
42         </div>
43-      </div>
44-    {{end}}
45-
46-    {{if .Next}}
47-      <div class="pager max-w-half flex items-center justify-end">
48-        <div class="flex flex-col items-end">
49-          <div class="text-sm font-grey-light">
50-            NEXT &gt;&gt;
51+      {{end}}
52+
53+      {{if .Next}}
54+        <div class="pager max-w-half flex items-center justify-end">
55+          <div class="flex flex-col items-end">
56+            <div class="text-sm font-grey-light">
57+              NEXT &gt;&gt;
58+            </div>
59+            <a href="{{.Next.GenHref}}" class="text-xl align-right link-alt-adj">{{.Next.Text}}</a>
60           </div>
61-          <a href="{{.Next.GenHref}}" class="text-xl align-right link-alt-adj">{{.Next.Text}}</a>
62         </div>
63-      </div>
64-    {{end}}
65-  </div>
66-</main>
67-
68-<div class="sitemap text-sm mb-4 text-center">
69-{{range .Sitemap.Children -}}
70-  <div>
71-  {{- if (and $.Prev (eq $.Prev.GenHref .GenHref)) -}}
72-  <a href="{{.GenHref}}" class="link-alt-adj">{{.Text}}</a>
73-  {{- else if (and $.Next (eq $.Next.GenHref .GenHref)) -}}
74-  <a href="{{.GenHref}}" class="link-alt-adj">{{.Text}}</a>
75-  {{- else if (eq $.Href .GenHref) -}}
76-  <a href="{{.GenHref}}" class="link-alt-hover">{{.Text}}</a>
77-  {{- else -}}
78-  <a href="{{.GenHref}}" class="link-alt">{{.Text}}</a>
79-  {{- end -}}
80-  </div>
81-{{- end}}
82+      {{end}}
83+    </div>
84+  </main>
85+
86+  {{template "sitemap-footer" .}}
87 </div>
88 
89 {{template "footer" .}}
A docs/tmpl/sitemap-footer.partial.tmpl
+17, -0
 1@@ -0,0 +1,17 @@
 2+{{define "sitemap-footer"}}
 3+<div class="sitemap text-sm mb-4">
 4+{{range .Sitemap.Children -}}
 5+  <div>
 6+  {{- if (and $.Prev (eq $.Prev.GenHref .GenHref)) -}}
 7+  <a href="{{.GenHref}}" class="link-alt-adj">{{.Text}}</a>
 8+  {{- else if (and $.Next (eq $.Next.GenHref .GenHref)) -}}
 9+  <a href="{{.GenHref}}" class="link-alt-adj">{{.Text}}</a>
10+  {{- else if (eq $.Href .GenHref) -}}
11+  <a href="{{.GenHref}}" class="link-alt-hover">{{.Text}}</a>
12+  {{- else -}}
13+  <a href="{{.GenHref}}" class="link-alt">{{.Text}}</a>
14+  {{- end -}}
15+  </div>
16+{{- end}}
17+</div>
18+{{end}}