From b0920d9e2e96eaf921fd7297a70779ee6901ff58 Mon Sep 17 00:00:00 2001 From: Christian Mueller Date: Sun, 28 Sep 2014 11:01:17 +0200 Subject: [PATCH] font-size -> text-size --- LANDING.md | 2 +- README.md | 4 ++-- resources/public/js/themes.js | 2 +- src/notehub/handler.clj | 3 +-- src/notehub/views.clj | 5 ++--- 5 files changed, 7 insertions(+), 9 deletions(-) diff --git a/LANDING.md b/LANDING.md index 737b57a..18a8eab 100644 --- a/LANDING.md +++ b/LANDING.md @@ -1,6 +1,6 @@ ## Features - **Themes**: specify the color scheme in the URL: [default](/2014/3/31/demo-note), [dark](/2014/3/31/demo-note?theme=dark), [solarized light](/2014/3/31/demo-note?theme=solarized-light), [solarized dark](/2014/3/31/demo-note?theme=solarized-dark). -- **Fonts**: specify a font (e.g., [Google Web Fonts](http://www.google.com/webfonts/)) for headers and body text in the URL like [this](/8m4l9) or [this](/2014/3/31/demo-note?text-font=Helvetica&header-font=Courier&font-size=1.3). +- **Fonts**: specify a font (e.g., [Google Web Fonts](http://www.google.com/webfonts/)) for headers and body text in the URL like [this](/8m4l9) or [this](/2014/3/31/demo-note?text-font=monospace&header-font=Courier&font-size=0.8). - **Short URLs**: every page (including theme & font options) has its own short url. - **Editing**: if you set a password during publishing, you can edit your note any time later. - **Statistics**: page view counter, publishing and editing date. diff --git a/README.md b/README.md index 8b23396..d830555 100644 --- a/README.md +++ b/README.md @@ -25,9 +25,9 @@ and for the text itself: notehub.org/.../title?header-font=FONT-NAME&text-font=FONT-NAME2 -Analogously, you can specify you can change the font size by specifying a scale factor: +Analogously, you can specify you can change the text size by specifying a scale factor: - notehub.org/.../title?header-font=FONT-NAME&text-font=FONT-NAME2&font-size=1.5 + notehub.org/.../title?header-font=FONT-NAME&text-font=FONT-NAME2&text-size=1.5 See an example of the font formatting [here](http://notehub.org/2012/6/16/how-notehub-is-built?header-font=Berkshire+Swash&text-font=Swanky+and+Moo+Moo). diff --git a/resources/public/js/themes.js b/resources/public/js/themes.js index 96fdedd..2805d14 100644 --- a/resources/public/js/themes.js +++ b/resources/public/js/themes.js @@ -98,7 +98,7 @@ if(ui["header-font"] || ui["text-font"]) { }, ""); } -if(ui["font-size"]) vars["@font_size"] = ui["font-size"] + "em"; +if(ui["text-size"]) vars["@font_size"] = ui["text-size"] + "em"; fontURL = fontURL.replace(/%s/, injection); var fileref = document.createElement("link") diff --git a/src/notehub/handler.clj b/src/notehub/handler.clj index 102ce18..f1290d1 100644 --- a/src/notehub/handler.clj +++ b/src/notehub/handler.clj @@ -3,8 +3,7 @@ compojure.core iokv.core notehub.views - [clojure.string :rename {replace sreplace} :only [replace]] - [clojure.core.incubator :only [-?>]]) + [clojure.string :rename {replace sreplace} :only [replace]]) (:require [clojure.core.cache :as cache] [hiccup.util :as util] diff --git a/src/notehub/views.clj b/src/notehub/views.clj index 40ba435..ff01b95 100644 --- a/src/notehub/views.clj +++ b/src/notehub/views.clj @@ -2,7 +2,6 @@ (:use iokv.core [clojure.string :rename {replace sreplace} :only [replace]] - [clojure.core.incubator :only [-?>]] [hiccup.form] [hiccup.core] [hiccup.element] @@ -100,9 +99,9 @@ (html (hidden-field :noteID note-id)) (:note (api/get-note {:noteID note-id})) :enter-passwd))) -(defn new-note-page [signature] +(defn new-note-page [session] (input-form "/post-note" :publish - (html (hidden-field :session signature) + (html (hidden-field :session session) (hidden-field {:id :signature} :signature)) (get-message :loading) :set-passwd))