From 1d87595a64d7e2de12352e4eda69d75ada9dd676 Mon Sep 17 00:00:00 2001 From: simon Date: Fri, 16 Jan 2015 22:07:41 +0000 Subject: [PATCH] Woohoo! Users can now change their own passwords. More work on tidying up stylesheets. --- resources/passwd | 3 +- resources/public/css/standard.css | 35 +++++++-- resources/public/css/tablet.css | 28 +++++++- resources/templates/about.html | 4 -- resources/templates/auth.html | 5 +- resources/templates/base.html | 2 +- resources/templates/edit.html | 2 +- resources/templates/passwd.html | 23 ++++++ src/smeagol/authenticate.clj | 29 ++++++++ src/smeagol/routes/wiki.clj | 113 ++++++++++++++++++------------ 10 files changed, 183 insertions(+), 61 deletions(-) delete mode 100644 resources/templates/about.html create mode 100644 resources/templates/passwd.html diff --git a/resources/passwd b/resources/passwd index fd73249..d7b2afd 100644 --- a/resources/passwd +++ b/resources/passwd @@ -1,2 +1 @@ -{:admin {:password "admin" :email "admin@localhost"}} - +{:admin {:password "admin", :email "admin@localhost"}} diff --git a/resources/public/css/standard.css b/resources/public/css/standard.css index fb95157..0d23bf9 100644 --- a/resources/public/css/standard.css +++ b/resources/public/css/standard.css @@ -43,6 +43,10 @@ body { float: right; padding: 0.1em 0.75em; margin: 0; + color: white; +} + +#user a { color: silver; } @@ -110,13 +114,12 @@ li.nav-item a:active { background: gray; color: white; } #footer { clear: both; font-size: smaller; - padding: 0 2em; text-align: center; color:white; background:rgba(128,128,128,0.95); width: 100%; margin: 0; - padding: 0.1em 10%; +/* padding: 0.1em 10%; */ bottom:0; position:fixed; z-index:150; @@ -135,6 +138,7 @@ li.nav-item a:active { background: gray; color: white; } border: thin solid white; margin-top: 0; margin-bottom: 0; + width: 100%; } .minor-controls { @@ -144,6 +148,10 @@ li.nav-item a:active { background: gray; color: white; } font-size: 66%; } +.message { + border: thin solid red; +} + .wiki { margin: 0; } @@ -156,8 +164,12 @@ form { border: thin solid silver; } -div.content, form, p, pre, ul, ol, dl, menu, h1, h2, h3, h4, h5 { - padding: 0.25em 10%; +div.content, form, p, pre, h1, h2, h3, h4, h5 { + padding: 0.25em 5%; +} + +dl, menu, ol, table, ul { + margin: 0.25em 5%; } input { @@ -179,7 +191,7 @@ input.required:after { } label { - width: 30em; + width: 20%; min-width: 20em; border-right: thin solid gray; } @@ -192,12 +204,23 @@ menu li::before { content: "|| "; } +table { + border: 2px solid black; + border-collapse: collapse; +} + table.music-ruled tr:nth-child(odd) { background-color: silver; } th, td { text-align: left; - padding: 0 0.25em; + vertical-align: top; + padding: 0.15em 1.5em; + border: 1px solid gray; +} + +th { + background-color: silver; } diff --git a/resources/public/css/tablet.css b/resources/public/css/tablet.css index ddcfdd8..9a61600 100644 --- a/resources/public/css/tablet.css +++ b/resources/public/css/tablet.css @@ -126,11 +126,16 @@ h1, h2, h3, h4, h5 { color: white; } -p, pre, ul, ol, dl, h1, h2, h3, h4, h5 { +p, pre, h1, h2, h3, h4, h5 { width: 100%; padding: 0.25em 1em; } +dl, menu, ol, table, ul { + margin: 0.15em 3%; +} + + input { background-color: white; } @@ -165,3 +170,24 @@ menu li::before { content: "|| "; } + +table { + border: 2px solid black; + border-collapse: collapse; +} + +table.music-ruled tr:nth-child(odd) { + background-color: silver; +} + +th, td { + text-align: left; + vertical-align: top; + padding: 0.15em 1.5em; + border: 1px solid gray; +} + +th { + background-color: silver; +} + diff --git a/resources/templates/about.html b/resources/templates/about.html deleted file mode 100644 index 9295dec..0000000 --- a/resources/templates/about.html +++ /dev/null @@ -1,4 +0,0 @@ -{% extends "templates/base.html" %} -{% block content %} -

this is the story of smeagol... work in progress

-{% endblock %} diff --git a/resources/templates/auth.html b/resources/templates/auth.html index 9fec39e..4eb63b0 100644 --- a/resources/templates/auth.html +++ b/resources/templates/auth.html @@ -2,6 +2,7 @@ {% block content %}
+ {% if user %}

@@ -10,11 +11,11 @@ {% else %}

- +

- +

diff --git a/resources/templates/base.html b/resources/templates/base.html index cf48efe..d40b940 100644 --- a/resources/templates/base.html +++ b/resources/templates/base.html @@ -14,7 +14,7 @@