From 709cc9347bccce36ffdead3c97ed9af04758fefd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20M=C3=BCller?= Date: Tue, 23 Dec 2014 22:41:34 +0100 Subject: [PATCH] further theming simplification --- resources/public/js/main.js | 1 - resources/public/js/themes.js | 17 +++++------------ resources/public/styles/main.less | 4 ++-- src/notehub/views.clj | 2 +- 4 files changed, 8 insertions(+), 16 deletions(-) diff --git a/resources/public/js/main.js b/resources/public/js/main.js index fabfcf5..5a8d18d 100644 --- a/resources/public/js/main.js +++ b/resources/public/js/main.js @@ -38,5 +38,4 @@ function onLoad() { } if(iosDetected) $note.className += " ui-border"; else $note.focus(); } - showPage(); } diff --git a/resources/public/js/themes.js b/resources/public/js/themes.js index 718855c..14ee149 100644 --- a/resources/public/js/themes.js +++ b/resources/public/js/themes.js @@ -108,15 +108,8 @@ fileref.setAttribute("type", "text/css") fileref.setAttribute("href", fontURL) document.getElementsByTagName("head")[0].appendChild(fileref) -function showPage() { - less = { - modifyVars: vars - }; - var script = document.createElement("script"); - script.type = "text/javascript"; - script.src = "//cdnjs.cloudflare.com/ajax/libs/less.js/2.1.0/less.min.js"; - document.head.appendChild(script); -} - -// for the case if main.js is not loaded -var onLoad = showPage; +var less = { modifyVars: vars }; +var script = document.createElement("script"); +script.type = "text/javascript"; +script.src = "//cdnjs.cloudflare.com/ajax/libs/less.js/2.1.0/less.min.js"; +document.head.appendChild(script); diff --git a/resources/public/styles/main.less b/resources/public/styles/main.less index 4845118..6a5d8af 100644 --- a/resources/public/styles/main.less +++ b/resources/public/styles/main.less @@ -206,8 +206,8 @@ td { } body { - display: flex !important; - display: -webkit-flex !important; + display: flex; + display: -webkit-flex; min-height: 100vh; flex-direction: column; -webkit-flex-direction: column; diff --git a/src/notehub/views.clj b/src/notehub/views.clj index 117c215..6645a72 100644 --- a/src/notehub/views.clj +++ b/src/notehub/views.clj @@ -33,7 +33,7 @@ (include-js "//cdnjs.cloudflare.com/ajax/libs/marked/0.3.2/marked.min.js") (include-js "/js/md5.js") (include-js "/js/main.js")))] - [:body {:style "display: none" :onload "onLoad()"} content])) + [:body {:onload "onLoad()"} content])) (defn- sanitize "Breakes all usages of