diff --git a/resources/public/css/standard.css b/resources/public/css/standard.css index d49e464..fb95157 100644 --- a/resources/public/css/standard.css +++ b/resources/public/css/standard.css @@ -51,6 +51,10 @@ body { display: none; } +#nav-menu { + margin: 0; +} + #nav ul li { padding: 0; margin: 0; @@ -71,18 +75,21 @@ li.nav-item a:active { background: gray; color: white; } /* Overall container div, holds all content of page. Yes, I know it shouldn't have fixed width */ #main-container{ - clear: both; -/* width:100%; */ } /* header for all pages in the Wiki - editable, provided by users. Within main-container */ #header { + margin-top: 0; width:100%; background-color: gray; color: white; } +#header h1 { + margin-top: 0; +} + /* left bar for all pages in the Wiki - editable, provided by users. Within main-container */ #left-bar { width: 17%; @@ -130,6 +137,13 @@ li.nav-item a:active { background: gray; color: white; } margin-bottom: 0; } +.minor-controls { + float: right; + padding: 0.1em 2em; + background-color: silver; + font-size: 66%; +} + .wiki { margin: 0; } diff --git a/resources/templates/auth.html b/resources/templates/auth.html index 25594f8..d574911 100644 --- a/resources/templates/auth.html +++ b/resources/templates/auth.html @@ -1,13 +1,6 @@ {% extends "templates/base.html" %} {% block content %} - -
- {{left-bar|safe}} -
-
+
{% if user %}

diff --git a/resources/templates/base.html b/resources/templates/base.html index 77b26e0..5c682c2 100644 --- a/resources/templates/base.html +++ b/resources/templates/base.html @@ -29,7 +29,16 @@

+ +
+ {{left-bar|safe}} +
+
+ {% if message %}

{{message}}

diff --git a/resources/templates/edit.html b/resources/templates/edit.html index bcf477e..16309ec 100644 --- a/resources/templates/edit.html +++ b/resources/templates/edit.html @@ -1,13 +1,6 @@ {% extends "templates/base.html" %} {% block content %} - -
- {{left-bar|safe}} -
-
+
diff --git a/resources/templates/history.html b/resources/templates/history.html index 30a63ad..8679eec 100644 --- a/resources/templates/history.html +++ b/resources/templates/history.html @@ -1,22 +1,12 @@ {% extends "templates/base.html" %} {% block content %} - -
- {{left-bar|safe}} -
-
+
- + {% for entry in history %} - @@ -24,9 +14,13 @@ {{entry.message}} + + {% endfor %}
WhoWhenWhatWhichWhenWhatVersionChanges
- {{entry.author}} - {{entry.time}} - {{entry.id}} + Show version + + What's changed?
{% endblock %} diff --git a/resources/templates/wiki.html b/resources/templates/wiki.html index b2159f2..78dfd80 100644 --- a/resources/templates/wiki.html +++ b/resources/templates/wiki.html @@ -1,13 +1,9 @@ {% extends "templates/base.html" %} {% block content %} - -
- {{left-bar|safe}} -
+
+ History +
{{content|safe}}
{% endblock %} diff --git a/src/smeagol/routes/wiki.clj b/src/smeagol/routes/wiki.clj index b7aa53f..ef73b80 100644 --- a/src/smeagol/routes/wiki.clj +++ b/src/smeagol/routes/wiki.clj @@ -98,15 +98,14 @@ "Render the history for the markdown page specified in this `request`, if any. If none, error?" [request] (let [params (keywordize-keys (:params request)) - content (or (:content params) "Introduction") - file-name (str "/content/" content ".md") - file-path (str (io/resource-path) file-name) - exists? (.exists (clojure.java.io/as-file file-path))] + page (or (:page params) "Introduction") + file-name (str page ".md") + repo-path (str (io/resource-path) "/content/")] (layout/render "history.html" - {:title content + {:title (str "History of " page) :left-bar (local-links (util/md->html "/content/_left-bar.md")) :header (local-links (util/md->html "/content/_header.md")) - :history (hist/find-history (io/resource-path) file-name)}))) + :history (hist/find-history repo-path file-name)}))) (defn auth-page "Render the auth page" @@ -141,6 +140,7 @@ (GET "/" request (wiki-page request)) (GET "/edit" request (route/restricted (edit-page request))) (POST "/edit" request (route/restricted (edit-page request))) + (GET "/history" request (history-page request)) (GET "/auth" request (auth-page request)) (POST "/auth" request (auth-page request)) (GET "/about" [] (about-page)))