summaryrefslogtreecommitdiff
path: root/templates.fnl
blob: f19c2b0265a60e8fab70f8d96c1dcc065b7e551f (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.svg"
            :type "image/svg+xml"}]]
   [:body {}
    [:main {:class "container"} (table.unpack content)]]])

{: base-template}