summaryrefslogtreecommitdiff
path: root/templates.fnl
diff options
context:
space:
mode:
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}