Browse code

Merge branch 'feat/agpl-footer'

Add AGPL and other text to footer.

Closes #46.

Joseph Weston authored on 08/12/2021 04:33:36
Showing 2 changed files
... ...
@@ -57,6 +57,9 @@
57 57
 
58 58
 (def mono-font ["Source Code Pro" "monospace"])
59 59
 
60
+(defn- content-after [x] [(s/& s/after) {:content (str "'" x "'")}])
61
+(defn- content-before [x] [(s/& s/before) {:content (str "'" x "'")}])
62
+
60 63
 (defglobal defaults
61 64
   [:body
62 65
    {
... ...
@@ -74,7 +77,8 @@
74 77
     {:width :88ch})
75 78
 
76 79
 (defclass footer []
77
-    {:font-size :0.75rem})
80
+    {:font-size :0.75rem}
81
+    [(s/not (s/last-child)) {} (content-after " ยท ")])
78 82
 
79 83
 (defclass history-style []
80 84
   {:list-style-type :none
... ...
@@ -87,9 +91,6 @@
87 91
     :background-color (colorscheme :light0-soft)
88 92
     :margin-bottom :0.4rem}])
89 93
 
90
-(defn- content-after [x] [(s/& s/after) {:content (str "'" x "'")}])
91
-(defn- content-before [x] [(s/& s/before) {:content (str "'" x "'")}])
92
-
93 94
 (def title-style
94 95
   [:h1 {:margin-top :0.2rem
95 96
         :margin-bottom :0.2rem
... ...
@@ -158,7 +159,6 @@
158 159
      :color (colorscheme :light0-hard)}
159 160
     (content-before "Error: "))
160 161
 
161
-
162 162
 (defclass property-list []
163 163
     {:padding-left 0
164 164
      :margin-top :0.5rem
... ...
@@ -285,9 +285,24 @@
285 285
       (for [[index item] (enumerated @history)]
286 286
         ^{:key index} [:li [input (item :input)] [output (item :output)]])]))
287 287
 
288
+(defn- link-to [href & content]
289
+    [:a {:href href} content])
290
+
291
+(def agpl-link
292
+    (link-to
293
+     "https://www.gnu.org/licenses/agpl-3.0.html"
294
+     "GNU Affero Public License"))
295
+
296
+(def uberspace-link
297
+    (link-to
298
+     "https://uberspace.de/"
299
+     "Uberspace"))
300
+
288 301
 (defn footer []
289 302
   [:footer {:class (styles/footer)}
290
-   [:span.version (spaced "version:" config/version)]])
303
+   [:span.license agpl-link]
304
+   [:span.version (spaced "version:" config/version)]
305
+   [:span.host "Hosted by " uberspace-link]])
291 306
 
292 307
 (defn main-panel []
293 308
   [:div {:class (styles/screen)}