forked from Lukc/alsace.netlib.re
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtemplate.moon
51 lines (43 loc) · 1.44 KB
/
template.moon
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/usr/bin/env moon
{:render_html} = require "lapis.html"
(opt, content) ->
unless content
content = opt
opt = {}
io.write render_html ->
io.write '<?xml version="1.0" encoding="utf-8"?>\n'
io.write '<?xml-stylesheet href="alsace.netlib.re.css"?>\n'
io.write '<?xml-stylesheet href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"?>\n'
io.write '<!DOCTYPE HTML>\n'
html {
lang: "fr"
"xml:lang": "fr"
xmlns: "http://www.w3.org/1999/xhtml"
}, ->
head ->
if opt.title
title "alsace.netlib.re - #{opt.title}"
else
title "alsace.netlib.re"
body ->
div class: "container", ->
header ->
nav class: "navbar", ->
div class: "navbar-brand", ->
h1 "alsace.netlib.re"
div class: "navbar-menu is-active", ->
div class: "navbar-end", ->
a class: "navbar-item", href: "index.xhtml#description", "Description"
a class: "navbar-item", href: "index.xhtml#events", "Évènements"
a class: "navbar-item", href: "index.xhtml#membres", "Membres"
a class: "navbar-item", href: "index.xhtml#contact", "Contact"
raw content
footer class: "footer", ->
div class: "container", ->
ul ->
li ->
a href: "legal.xhtml", "Mentions légales"
li ->
a href: "technical.xhtml", "Informations techniques"
li ->
p "Écrit avec amour et pour la gloire du Libre."