summaryrefslogtreecommitdiff
path: root/templates.fnl
diff options
context:
space:
mode:
authorunwox <me@unwox.com>2024-11-26 15:35:35 +0600
committerunwox <me@unwox.com>2024-11-27 17:33:45 +0600
commitcd8e3249f0e41372a2748ee8554e431d152cea01 (patch)
tree459c4552e673e5c9b4ea39a8c0e6c536424734ad /templates.fnl
init
Diffstat (limited to 'templates.fnl')
-rw-r--r--templates.fnl17
1 files changed, 17 insertions, 0 deletions
diff --git a/templates.fnl b/templates.fnl
new file mode 100644
index 0000000..d981ed1
--- /dev/null
+++ b/templates.fnl
@@ -0,0 +1,17 @@
+(fn read-file [file]
+ (with-open [f (io.open file "r")]
+ (f:read :*all)))
+
+(fn base-template [content]
+ [:html {:lang "ru-RU"}
+ [:head {}
+ [:title {} "Чайная «Белая жаба» — маленькая уютная чайная в Омске"]
+ [:meta {:charset "utf-8"}]
+ [:meta {:name "viewport"
+ :content (.. "width=device-width,initial-scale=1,"
+ "minimum-scale=1.0,maximum-scale=5.0")}]
+ [:style {} [:NO-ESCAPE (read-file "static/style.css")]]]
+ [:body {}
+ [:main {:class "container"} (table.unpack content)]]])
+
+{: base-template}