fonts are loadedsynchronously now
This commit is contained in:
@@ -14,7 +14,6 @@ function md2html(input){
|
|||||||
}
|
}
|
||||||
|
|
||||||
function onLoad() {
|
function onLoad() {
|
||||||
applyTheme();
|
|
||||||
$note = $("note");
|
$note = $("note");
|
||||||
$action = $("action");
|
$action = $("action");
|
||||||
$preview = $("preview");
|
$preview = $("preview");
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ var themes = {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
function applyTheme() {
|
|
||||||
var ui = { theme: "default" };
|
var ui = { theme: "default" };
|
||||||
if (location.search.length > 0) {
|
if (location.search.length > 0) {
|
||||||
location.search.slice(1).split("&").reduce(function(acc, e){
|
location.search.slice(1).split("&").reduce(function(acc, e){
|
||||||
@@ -103,4 +103,3 @@ function applyTheme() {
|
|||||||
document.getElementsByTagName("head")[0].appendChild(fileref)
|
document.getElementsByTagName("head")[0].appendChild(fileref)
|
||||||
|
|
||||||
less.modifyVars(vars);
|
less.modifyVars(vars);
|
||||||
}
|
|
||||||
@@ -32,10 +32,10 @@
|
|||||||
[:link {:rel "stylesheet/less" :type "text/css" :href "/style.less"}]
|
[:link {:rel "stylesheet/less" :type "text/css" :href "/style.less"}]
|
||||||
(html
|
(html
|
||||||
(include-js "/js/less.js")
|
(include-js "/js/less.js")
|
||||||
|
(include-js "/js/themes.js")
|
||||||
(include-js "/js/md5.js")
|
(include-js "/js/md5.js")
|
||||||
(include-js "/js/marked.js")
|
(include-js "/js/marked.js")
|
||||||
(include-js "/js/main.js")
|
(include-js "/js/main.js"))
|
||||||
(include-js "/js/themes.js"))
|
|
||||||
; google analytics code should appear in prod mode only
|
; google analytics code should appear in prod mode only
|
||||||
(if-not (get-setting :dev-mode) (include-js "/js/google-analytics.js"))]
|
(if-not (get-setting :dev-mode) (include-js "/js/google-analytics.js"))]
|
||||||
[:body {:onload "onLoad()"} content]))
|
[:body {:onload "onLoad()"} content]))
|
||||||
|
|||||||
Reference in New Issue
Block a user