diff options
-rw-r--r-- | style.css | 13 | ||||
-rw-r--r-- | xhtml.cr | 24 |
2 files changed, 19 insertions, 18 deletions
diff --git a/style.css b/style.css deleted file mode 100644 index 938af97..0000000 --- a/style.css +++ /dev/null @@ -1,13 +0,0 @@ -html { - margin: auto; - max-width: 72ch; -} -h1, h2, h3, h4, h5, h6 { margin: 1ex 0 } -form { - display: grid; - grid-template-columns: max-content 1fr; -} -form label { margin-right: 1ch } -form label:after { content: ":" } -form input { margin-bottom: 1ex } -.error { color: red } diff --git a/xhtml.cr b/xhtml.cr index 4fd58eb..4f7eca4 100644 --- a/xhtml.cr +++ b/xhtml.cr @@ -18,6 +18,22 @@ require "xml" +CSS = " + html { + margin: auto; + max-width: 72ch; + } + body { margin-bottom: 2rem } + h1, h2, h3, h4, h5, h6 { margin: 1ex 0 } + form { + display: grid; + grid-template-columns: max-content 1fr 0; + } + form label { margin-right: 1ch } + form input { margin-bottom: 1ex } + .error { color: red } + " + def criteria(xml) xml.element "h2" do xml.text "criteria" end xml.element "p" do @@ -37,8 +53,8 @@ def criteria(xml) end end xml.element "p" do - xml.text "Note that the two sites needn't be the same," - xml.text " but represent the same entity (person or organization)." + xml.text "Note that the two sites needn't be the same, as long as" + xml.text " they represent the same entity, e.g. person or organization." xml.text " The clear net site is for serving visitors" xml.text " without OpenNIC access or preferring secure connections." end @@ -96,9 +112,7 @@ def page(errors = {} of String => String, xml.element "meta", name: "viewport", content: "width=device-width,initial-scale=1.0" xml.element "link", rel: "icon", href: "data:," - xml.element "link", rel: "stylesheet", - # FIXME: get base URL from configuration - href: "http://127.0.0.1:42069/style.css" + xml.element "style" do xml.text CSS end xml.element "title" do xml.text "le cercle libre" end end xml.element "body" do |