From 2aebc91b6eff15ea4beb26c4fb7fa85a4968a7b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20M=C3=BCller?= Date: Sun, 28 Sep 2014 11:53:30 +0200 Subject: [PATCH] landing page simplified --- LANDING.md | 15 +++++---------- resources/public/js/main.js | 2 +- resources/public/js/themes.js | 17 ++++++++--------- resources/public/styles/main.less | 4 ++-- settings | 2 +- src/notehub/views.clj | 4 ++-- 6 files changed, 19 insertions(+), 25 deletions(-) diff --git a/LANDING.md b/LANDING.md index 069bafa..29e04a0 100644 --- a/LANDING.md +++ b/LANDING.md @@ -9,13 +9,8 @@ - **API**: Integrate the publishing functionality into your editor using the official [NoteHub API](/api). ## Changelog - - September 2014: text size setting added ([example](http://localhost:8080/2014/3/31/demo-note?text-font=monospace&header-font=Courier&text-size=0.8)) - - July 2014: - - deprecated all API versions less than 1.4 - - performance improvements - - March 2014: all notes with __less than 30 views after the first 30 days__ will expire. - - February 2014: a simple JS-client for API testing [added](/api-test.html). - - January 2014: - - Mobile friendly styling added. - - NoteHub API [introduced](/api). - - NoteHub 2.0 released: new theme, better performance, extended markdown. + - **2014-09**: text size setting added ([example](http://localhost:8080/2014/3/31/demo-note?text-font=monospace&header-font=Courier&text-size=0.8)) + - **2014-07**: deprecated all API versions less than 1.4 & performance improvements. + - **2014-03**: all notes with less than 30 views after the first 30 days will expire. + - **2014-02**: a simple JS-client for API testing [added](/api-test.html). + - **2014-01**: [NoteHub API](/api), mobile friendly styling and more. diff --git a/resources/public/js/main.js b/resources/public/js/main.js index 55c821a..bec7a81 100644 --- a/resources/public/js/main.js +++ b/resources/public/js/main.js @@ -38,5 +38,5 @@ function onLoad() { } if(iosDetected) $note.className += " ui-border"; else $note.focus(); } - showLinks(); + showFooter(); } diff --git a/resources/public/js/themes.js b/resources/public/js/themes.js index 2805d14..a01198c 100644 --- a/resources/public/js/themes.js +++ b/resources/public/js/themes.js @@ -109,16 +109,15 @@ document.getElementsByTagName("head")[0].appendChild(fileref) less.modifyVars(vars); -function showLinks(){ - var links = $("links"); - if(links){ - if(window.innerHeight * 0.85 >= document.body.clientHeight) { - links.style.position = "fixed"; - links.style.bottom = 0; - } - show(links); +function showFooter(){ + var elem = $("footer"); + if(!elem) return; + if(window.innerHeight * 0.85 >= document.body.clientHeight) { + elem.style.position = "fixed"; + elem.style.bottom = 0; } + show(elem); } // for the case if main.js is not loaded -var onLoad = showLinks; +var onLoad = showFooter; diff --git a/resources/public/styles/main.less b/resources/public/styles/main.less index fac5b49..7c04403 100644 --- a/resources/public/styles/main.less +++ b/resources/public/styles/main.less @@ -82,7 +82,7 @@ a:visited { .landing-button:hover { background: #0b2; } -#links { +#footer { .helvetica; width: 100%; font-size: 0.8em; @@ -92,7 +92,7 @@ a:visited { font-size: 0.4em; } } -#links a { +#footer a { border: none; } html, body { diff --git a/settings b/settings index d8168e9..8b2c54e 100644 --- a/settings +++ b/settings @@ -1,3 +1,3 @@ max-title-length = 40 -prod-domain = http://notehub.org +prod-domain = http://www.notehub.org dev-domain = http://localhost:8080 \ No newline at end of file diff --git a/src/notehub/views.clj b/src/notehub/views.clj index ff01b95..ef343dc 100644 --- a/src/notehub/views.clj +++ b/src/notehub/views.clj @@ -75,7 +75,7 @@ [:article.helvetica.bottom-space {:style "font-size: 1em"} (md-to-html (slurp "LANDING.md"))] - [:div.centered.helvetica (md-to-html (get-message :footer))])) + [:div#footer (md-to-html (get-message :footer))])) (defn statistics-page [resp] @@ -119,4 +119,4 @@ (get-message %)) [:notehub :stats :edit :export :short-url]) links (interpose [:span.middot "·"] links)] - [:div#links links])))) + [:div#footer links]))))