From ee5630ecb2e3068b80046c70a2d50f4dddb6bf82 Mon Sep 17 00:00:00 2001 From: simon Date: Fri, 2 Sep 2016 16:27:59 +0100 Subject: [PATCH] Much restyling to add WEFT branding and a wee advertisement. Also in the process updated dependencies. --- README.md | 26 ++++--- project.clj | 11 ++- resources/public/content/Introduction.md | 23 ++++-- .../{_edit-left-bar.md => _edit-side-bar.md} | 0 resources/public/content/_header.md | 2 +- resources/public/content/_left-bar.md | 1 - resources/public/content/_side-bar.md | 3 + resources/public/content/stylesheet.css | 73 ++++++++++-------- resources/public/img/weft.logo.64.png | Bin 0 -> 4414 bytes resources/templates/base.html | 21 +++-- src/smeagol/handler.clj | 21 +++-- src/smeagol/routes/wiki.clj | 24 +++--- 12 files changed, 124 insertions(+), 81 deletions(-) rename resources/public/content/{_edit-left-bar.md => _edit-side-bar.md} (100%) delete mode 100644 resources/public/content/_left-bar.md create mode 100644 resources/public/content/_side-bar.md create mode 100644 resources/public/img/weft.logo.64.png diff --git a/README.md b/README.md index 8eb692f..cdd4e11 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,7 @@ # Welcome to Smeagol! + +![One wiki to rule them all](http://www.weft.scot/images/smeagol.png) + Smeagol is a simple Wiki engine inspired by [Gollum](https://github.com/gollum/gollum/wiki). Gollum is a Wiki engine written in Ruby, which uses a number of simple text formats including [Markdown](http://daringfireball.net/projects/markdown/), and which uses [Git](http://git-scm.com/) to provide versioning and backup. I needed a new Wiki for a project and thought Gollum would be ideal - but unfortunately it doesn't provide user authentication, which I needed, and it was simpler for me to reimplement the bits I did need in Clojure than to modify Gollum. So at this stage Smeagol is a Wiki engine written in Clojure which uses Markdown as its text format, which does have user authentication, and which uses Git as its versioning and backup system. @@ -23,10 +26,9 @@ There's still no mechanism to add a new user to the system through the user inte ## Images Smeagol does not currently have any mechanism to upload images. You can, however, link to images already available on the web, like this: -![](http://vignette3.wikia.nocookie.net/lotr/images/e/e1/Gollum_Render.png/revision/latest?cb=20141218075509) +![Smeagol](http://vignette3.wikia.nocookie.net/lotr/images/e/e1/Gollum_Render.png/revision/latest?cb=20141218075509) ## Todo -* Image (and other media) upload; * Mechanism to add users through the user interface; ## License @@ -35,6 +37,19 @@ version 2.0 or (at your option) any later version. If you wish to incorporate parts of Smeagol into another open source project which uses a less restrictive license, please contact me; I'm open to dual licensing it. +### Phoning home +Smeagol currently requests the WEFT logo in the page footer from my home site. This is mainly so I can get a feel for how many people are using the product. If you object to this, simply edit the file + + resources/templates/base.html + +and replace the line + + The Web Engineering Factory & Toolworks Developed by WEFT + +with the line + + The Web Engineering Factory & Toolworks Developed by WEFT + ## Prerequisites You will need [Leiningen][1] 2.0 or above installed. @@ -45,16 +60,9 @@ To start a web server for the application, run: lein ring server -or more probably - - nohup lein ring server > smeagol.log & - Alternatively, if you want to deploy to a servlet container (which I would strongly recommend), the simplest thing is to run: lein ring uberwar (a command which I'm sure Smeagol would entirely appreciate) and deploy the resulting war file. - -## Editing the framing content -You can edit the [stylesheet](/edit-css?page=stylesheet), the [[\_left-bar]], the [[\_edit-left-bar]], and the [[\_header]]. diff --git a/project.clj b/project.clj index 790df63..4da622c 100644 --- a/project.clj +++ b/project.clj @@ -3,11 +3,18 @@ :url "https://github.com/simon-brooke/smeagol" :dependencies [[org.clojure/clojure "1.7.0"] [org.clojure/core.memoize "0.5.9"] + [com.taoensso/encore "2.80.0"] [lib-noir "0.9.9" :exclusions [org.clojure/tools.reader]] [com.cemerick/url "0.1.1"] [ring-server "0.4.0"] [selmer "1.0.7"] - [com.taoensso/timbre "3.3.1" :exclusions [org.clojure/tools.reader]] + [org.clojure/tools.logging "0.3.1"] + [org.slf4j/slf4j-log4j12 "1.7.21"] + [log4j/log4j "1.2.17" :exclusions [javax.mail/mail + javax.jms/jms + com.sun.jmdk/jmxtools + com.sun.jmx/jmxri]] + [com.taoensso/timbre "4.7.4" :exclusions [org.clojure/tools.reader]] [com.taoensso/tower "3.0.2" :exclusions [com.taoensso/encore]] [markdown-clj "0.9.89" :exclusions [com.keminglabs/cljx]] [crypto-password "0.2.0"] @@ -28,7 +35,7 @@ :ring {:handler smeagol.handler/app :init smeagol.handler/init :destroy smeagol.handler/destroy} - :lein-release {:scm :git} + :lein-release {:scm :git :deploy-via :lein-install} :profiles {:uberjar {:omit-source true :env {:production true} diff --git a/resources/public/content/Introduction.md b/resources/public/content/Introduction.md index 0500e03..27e187a 100644 --- a/resources/public/content/Introduction.md +++ b/resources/public/content/Introduction.md @@ -23,12 +23,27 @@ There's still no mechanism to add a new user to the system through the user inte ## Images Smeagol does not currently have any mechanism to upload images. You can, however, link to images already available on the web, like this: -![](http://vignette3.wikia.nocookie.net/lotr/images/e/e1/Gollum_Render.png/revision/latest?cb=20141218075509) +![Smeagol](http://vignette3.wikia.nocookie.net/lotr/images/e/e1/Gollum_Render.png/revision/latest?cb=20141218075509) ## Todo -* Image (and other media) upload; * Mechanism to add users through the user interface; +## Advertisement +If you like what you see here, I am available for work on open source Clojure projects. Contact me vis [WEFT](http://www.weft.scot/). + +### Phoning home +Smeagol currently requests the WEFT logo in the page footer from my home site. This is mainly so I can get a feel for how many people are using the product. If you object to this, edit the file + + resources/templates/base.html + +and replace the line + + The Web Engineering Factory & Toolworks Developed by WEFT + +with the line + + The Web Engineering Factory & Toolworks Developed by WEFT + ## License Copyright © 2014-2015 Simon Brooke. Licensed under the GNU General Public License, version 2.0 or (at your option) any later version. If you wish to incorporate @@ -45,10 +60,6 @@ To start a web server for the application, run: lein ring server -or more probably - - nohup lein ring server > smeagol.log & - Alternatively, if you want to deploy to a servlet container (which I would strongly recommend), the simplest thing is to run: lein ring uberwar diff --git a/resources/public/content/_edit-left-bar.md b/resources/public/content/_edit-side-bar.md similarity index 100% rename from resources/public/content/_edit-left-bar.md rename to resources/public/content/_edit-side-bar.md diff --git a/resources/public/content/_header.md b/resources/public/content/_header.md index 2165f3a..d50260c 100644 --- a/resources/public/content/_header.md +++ b/resources/public/content/_header.md @@ -1 +1 @@ -This is the header. There isn't yet much in it. You could [edit](edit?page=_header) it to provide internal navigation or branding. +This is the header. There isn't yet much in it. You could [edit](edit?page=_header) it to provide internal navigation or branding. diff --git a/resources/public/content/_left-bar.md b/resources/public/content/_left-bar.md deleted file mode 100644 index 4eb8b93..0000000 --- a/resources/public/content/_left-bar.md +++ /dev/null @@ -1 +0,0 @@ -This is the left bar. There's nothing in it yet. You could [edit](edit?page=_left-bar) it to provide internal navigation or branding. diff --git a/resources/public/content/_side-bar.md b/resources/public/content/_side-bar.md new file mode 100644 index 0000000..321efc1 --- /dev/null +++ b/resources/public/content/_side-bar.md @@ -0,0 +1,3 @@ +This is the side bar. There's nothing in it yet. You could [edit](edit?page=_side-bar) it to provide internal navigation or branding. + +If you don't like it on the left, float it to the right (or do something entirely different) by editing the [stylesheet](/edit-css?page=stylesheet). diff --git a/resources/public/content/stylesheet.css b/resources/public/content/stylesheet.css index 8bac0f1..ef81280 100644 --- a/resources/public/content/stylesheet.css +++ b/resources/public/content/stylesheet.css @@ -28,6 +28,47 @@ body { font-family: sans-serif; } +/* footer of the page - not-editable, provided by Smeagol */ +footer { + border-top: thin solid gray; + clear: both; + font-size: smaller; + text-align: center; + color: gray; + background: rgba(224,224,224,0.95); + width: 100%; + margin: 0; + padding: 0.25em 0; + bottom:0; + position:fixed; + vertical-align: top; + z-index:150; + _position:absolute; + _top:expression(eval(document.documentElement.scrollTop+ + (document.documentElement.clientHeight-this.offsetHeight))); +} + +footer div { + padding: 0.1em; +} + + +/* header for all pages in the Wiki - editable, provided by users. */ +header { + margin-top: 0; + width:100%; + background-color: gray; + color: white; +} + +header h1 { + margin-top: 0; +} + +header img { + float: right; +} + /* ids generally in document order */ /* top-of-page navigation, not editable, provided by Smeagol */ @@ -87,20 +128,8 @@ li.nav-item a:active { background: gray; color: white; } } -/* 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 { +#side-bar { width: 17%; height: 100%; float: left; @@ -151,24 +180,6 @@ li.nav-item a:active { background: gray; color: white; } display: block; } -/* footer of the page - not-editable, provided by Smeagol */ -#footer { - clear: both; - font-size: smaller; - text-align: center; - color:white; - background:rgba(128,128,128,0.95); - width: 100%; - margin: 0; - padding: 0.25em 0; - bottom:0; - position:fixed; - vertical-align: top; - z-index:150; - _position:absolute; - _top:expression(eval(document.documentElement.scrollTop+ - (document.documentElement.clientHeight-this.offsetHeight))); -} .change { diff --git a/resources/public/img/weft.logo.64.png b/resources/public/img/weft.logo.64.png new file mode 100644 index 0000000000000000000000000000000000000000..9df6a1ff168cd25ba6dcbff2f2d012d639067e38 GIT binary patch literal 4414 zcmV-E5y9?>P)R;ctPs8Xd$eF+bJ zXeAy%DpDl`ElZ;UEeI%~0Yh+NK#8+KjMo^)9y{K*8IRZTHshK5f0%2>%lyV;2+5!O zX5ZiM{?0k~obNf`bML@i9BplF^7QG`(rUH7f45}N-;Ix2ES8!J7cP{%^UgZ}L`O$I zdAAH8?&QZtMn<0h?z`_!T)1$7g@uKs|A&W%bL`kLl9G~q$}>7TQ*Jhoo{NeKCNFQ3 z_{n)dMMcGluCA^%|F_%ieDlpWKHsga9h9d|-Jq{;l7xit+a{ClP8uL4CPs6vp`ih@ z*(_K8zoTPRzWZ*I{Pfc{`uZjT7#^PH{P`~VlQY1PBS%D7SeWMgnKNfr{QdFAH{^f+ z`yH*VHe9Y-`nuhcrX~x6gH!S+g#iF{b#?Oe>C>9?4?M7+=;(aTooi=i#_4md($XXj zAI=s(DFXn!{`%{(zrWvyQeZ`PSERM&BPb|{va&Mv?c2BFTVH%pC9A8eHAE1=7QnQ|2ztGa)YK^U?oA;xGgjO+ z4Cw9cm7jn9IohtgaugI4@Z^(EE`6`QzFYq9fA0a)8e&8!F9=);h2-Q&wr#tI`|eA= zZJ{f^@6NyT&O5K#Y_<)&CE2rQ7nzy&(%5LFtlY#-3#!wb@Y%|t}#x%b{g3JUId z#%K(E?XFjX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cMo zR*{y#bpSL%0qCq(K?@fwik=qWCa=MR6_ zC4T<%hY1V}T-9}s0k$LM=2hYZD}JE&x~`N{L`00P;xDERZ{~&!U^d(2XP=pIyZt%* zl<0Kh?AQ^;kt3d)Tsb+pA}?cGkpfV+m(Yp9b3p1H5bNq1Xl!hh-QC@?qM|~! zx3_QD02{g>arJ7SI=xws`i=ubxZM`4)|Kv;m9>+mrWu6^VG6L^KGFMb|+yh!#tg@$P!p9Q&JcL$c$jkB{pmG@Mnr9QXJuW|l-m;CChE)78iI-LcVt7}=Q zES6k3Jlsfda3Q0kI=@b9K!?#7$|H|#CL_ah7x2XwUzAf*QyX^i+}vD_9Xlp|um?;{ zc|T_h4i4b)$MbpYu^fVf7r1q^_7QBh9;9^p2}=VQja^I11C*DSZ&-Pg$;82f z2Vb}?AgHx-fq?;phwCXSDiW!wsXiR7M|p>@VF#`OE%f!>~{N_*bfQ{A~ZCV9XoccxtjZf4GiV&Wz>gv(l zY^9>2O*S+v;B>}n>~sL0djs(-9<~~dp#%llu~-^#x$JAIK8wXdUtgb0PQGH*`zPZv!MIhQAOWAAVwR(7tBQ;c!t?GoW@l9nXpG zoJJ^^iHO)ue!hv~;zSGv$H7ylI?wg=%zD9{DaOaWQ|}!+cHEZBlRE!BAne)f>{x`) z&&p-w$gN?3Y2xB6{Oo5rA|WAML`TO~Wn^sjx|+k`V19m{A9HM|5`6H%&BA0_uLb2+ z%y5&Y5e5d@7#Qf607FAVn)i-%I-O?zzg=U)ZZt43Dc^dlah-~Av92xEdL8Ow;m8Lz4VgY*zXEd&Ikw~ zCntv=d)yZ5_VkQPyWK%xU;uG(p_wr;hMTwObE7ePnU+_Gg0M~@yAKM4b@H>#?t zENJ#i#)22;F@1#us2NJ))T2W*WO8@`>07*qoM6N<$ Eg4>vdtN;K2 literal 0 HcmV?d00001 diff --git a/resources/templates/base.html b/resources/templates/base.html index 7e04acc..76f43ff 100644 --- a/resources/templates/base.html +++ b/resources/templates/base.html @@ -9,8 +9,7 @@ {% endblock %} - - -
- {{left-bar|safe}} + +
@@ -60,15 +59,21 @@ About cookies
-
+