summaryrefslogtreecommitdiff
path: root/templates.fnl
blob: 9d226e4b7a360823af409ed39defe6bd903312c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
(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")}]
    [:meta {:name "description"
            :content (.. "Маленькая уютная чайная для своих: "
                         "Омск, ул. Пушкина, д. 133/9, этаж 2. "
                         "Посещение по предварительной договоренности, "
                         "стоимость 500 рублей с человека.")}]
    [:style {} [:NO-ESCAPE (read-file "static/style.css")]]
    [:link {:rel "icon" :href "https://whitetoad.ru/static/favicon.png"
            :type "image/png"}]]
   [:body {}
    [:main {:class "container"} (table.unpack content)]]])

{: base-template}