readme adjusted; color themes extended by link colors
This commit is contained in:
@@ -1,28 +1,28 @@
|
|||||||
# NoteHub
|
# NoteHub Readme
|
||||||
|
|
||||||
NoteHub is a free and anonymous hosting for markdown pages. It can be used for publishing of markdown-formatted text. For instance, this service might be interesting to people, who want to publish something, but don't want to start a blog.
|
[NoteHub](http://notehub.org) is a free and hassle-free anonymous hosting for markdown pages. It can be used for publishing of markdown-formatted text.
|
||||||
|
|
||||||
## Writing
|
## Writing
|
||||||
|
|
||||||
Once a user started to write, he gets a special draft URL like:
|
A new note can be entered and previewed at [notehub.org/new](http://notehub.org/new).
|
||||||
|
|
||||||
http://notehub.org/draft/4j32j4g23v23v4vnb234mn23jh6b76686
|
|
||||||
|
|
||||||
His changes will be auto-saved every minute, manualy or at a registered page exit. When the same link will be opened again and the page wasn't published yet, the author will be recognized using cookies, or he should enter three non-trivial words from the document, to unlock the draft. The security aspect here is non-critical, since every page will eventually be published on NoteHub anyway. So there is no reason to assume, that a draft contains critical information.
|
|
||||||
|
|
||||||
## Publishing
|
## Publishing
|
||||||
|
|
||||||
Once a page is published, it gets accessible under and URL like:
|
Once a page is published, it gets accessible through an URL of the format:
|
||||||
|
|
||||||
http://notehub.org/%YEAR/%MONTH/%DAY/%TITLE
|
http://notehub.org/%YEAR/%MONTH/%DAY/%TITLE
|
||||||
|
|
||||||
Hence, every date represents a name space.
|
Hence, every date represents a name space.
|
||||||
|
|
||||||
## Features
|
## Exporting & Statistics
|
||||||
|
|
||||||
* Preview (could be used from Vim or any other MD-editor):
|
By appending of `/stat` everyone can see a rudimentary statistics (currently, the number of note views only).
|
||||||
http://notehub.org/preview?t="..."
|
By appending of `/export` the original markdown content will be displayed in plain text format.
|
||||||
* View Control over url, e.g. `http://notehub.org/2012/03/23/My-Thoughts/background/dark` would display the note on a dark background.
|
|
||||||
* Short urls available by:
|
## Displaying
|
||||||
http://notehub.org/2012/03/23/foobar/...any-options.../shorturl -> http://notehub.org/asd3rf
|
|
||||||
* Every page downloadable without any dependencies except of fonts and images (can be improved ?)
|
There are some experimental features, which allow to change via the note URL the design of the note page.
|
||||||
|
E.g., by appending of `&theme=dark` to the URL, the design colors will be inverted.
|
||||||
|
Currently it is also possible to change the header and the article text by appending of the Google Webfont names like this:
|
||||||
|
|
||||||
|
notehub.org/.../title?header-font=Anton&text-font=Cagliostro
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
; Initialize the data base
|
; Initialize the data base
|
||||||
(def db
|
(def db
|
||||||
(redis/init
|
(redis/init
|
||||||
(when dev-mode?
|
(when (dev-mode?)
|
||||||
{:url (get-setting :db-url)})))
|
{:url (get-setting :db-url)})))
|
||||||
|
|
||||||
; DB hierarchy levels
|
; DB hierarchy levels
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
; generating the global CSS
|
; generating the global CSS
|
||||||
[:style {:type "text/css"} (global-css params)]
|
[:style {:type "text/css"} (global-css params)]
|
||||||
; google analytics code should appear in prod mode only
|
; google analytics code should appear in prod mode only
|
||||||
(if-not dev-mode? (include-js "/js/google-analytics.js"))]
|
(if-not (dev-mode?) (include-js "/js/google-analytics.js"))]
|
||||||
[:body content
|
[:body content
|
||||||
; we only need JS during a new note creation, so don't render it otherwise
|
; we only need JS during a new note creation, so don't render it otherwise
|
||||||
(when (params :js)
|
(when (params :js)
|
||||||
|
|||||||
@@ -32,15 +32,21 @@
|
|||||||
:margin-right "auto"))
|
:margin-right "auto"))
|
||||||
|
|
||||||
; Resolves the theme name & tone parameter to a concrete color
|
; Resolves the theme name & tone parameter to a concrete color
|
||||||
(defn- color [theme tone]
|
(defn- color [& keys]
|
||||||
(get-in {:dark {:background :#333
|
(get-in {:dark {:background :#333
|
||||||
:foreground :#ccc
|
:foreground :#ccc
|
||||||
:background-halftone :#444
|
:background-halftone :#444
|
||||||
:foreground-halftone :#bbb }
|
:foreground-halftone :#bbb
|
||||||
|
:link-color {:fresh :#6b8
|
||||||
|
:visited :#496
|
||||||
|
:hover :#7c9 }}
|
||||||
:default {:background :#fff
|
:default {:background :#fff
|
||||||
:foreground :#333
|
:foreground :#333
|
||||||
:background-halftone :#efefef
|
:background-halftone :#efefef
|
||||||
:foreground-halftone :#888 }} [theme tone]))
|
:foreground-halftone :#888
|
||||||
|
:link-color {:fresh :#097
|
||||||
|
:visited :#054
|
||||||
|
:hover :#0a8 }}} keys))
|
||||||
|
|
||||||
(defn global-css
|
(defn global-css
|
||||||
"Generates the entire CSS rules of the app"
|
"Generates the entire CSS rules of the app"
|
||||||
@@ -52,16 +58,19 @@
|
|||||||
background (color theme :background)
|
background (color theme :background)
|
||||||
foreground (color theme :foreground)
|
foreground (color theme :foreground)
|
||||||
background-halftone (color theme :background-halftone)
|
background-halftone (color theme :background-halftone)
|
||||||
foreground-halftone (color theme :foreground-halftone)]
|
foreground-halftone (color theme :foreground-halftone)
|
||||||
|
link-fresh (color theme :link-color :fresh)
|
||||||
|
link-visited (color theme :link-color :visited)
|
||||||
|
link-hover (color theme :link-color :hover)]
|
||||||
(css
|
(css
|
||||||
(rule "a"
|
(rule "a"
|
||||||
:color :#097
|
:color link-fresh
|
||||||
:text-decoration :none
|
:text-decoration :none
|
||||||
:border-bottom [:1px :dotted]
|
:border-bottom [:1px :dotted]
|
||||||
(rule "&:hover"
|
(rule "&:hover"
|
||||||
:color :#0a8)
|
:color link-hover)
|
||||||
(rule "&:visited"
|
(rule "&:visited"
|
||||||
:color :#054))
|
:color link-visited))
|
||||||
(rule ".landing-button"
|
(rule ".landing-button"
|
||||||
:box-shadow [0 :2px :5px :#aaa]
|
:box-shadow [0 :2px :5px :#aaa]
|
||||||
:text-decoration :none
|
:text-decoration :none
|
||||||
|
|||||||
Reference in New Issue
Block a user