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 0000000..9df6a1f Binary files /dev/null and b/resources/public/img/weft.logo.64.png differ 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
- +