From 1a88ce54c9d045ddb402eda944038e02f361b9b8 Mon Sep 17 00:00:00 2001 From: benweet Date: Mon, 2 Dec 2013 23:29:48 +0000 Subject: [PATCH] Prepare release --- public/cache.manifest | 5 +---- public/res-min/main.js | 12 ++++++++---- public/res-min/themes/base.css | 1 + public/res-min/themes/default.css | 1 + public/res-min/themes/gray.css | 1 + public/res-min/themes/night.css | 1 + public/res-min/themes/school.css | 1 + public/res/core.js | 4 ++-- public/res/main.js | 2 +- public/res/storage.js | 16 ++++++++++++++++ public/res/styles/base.less | 11 +++++++++++ 11 files changed, 44 insertions(+), 11 deletions(-) diff --git a/public/cache.manifest b/public/cache.manifest index 8bd159a2..0b48092f 100644 --- a/public/cache.manifest +++ b/public/cache.manifest @@ -1,5 +1,5 @@ CACHE MANIFEST -#Date Mon Dec 02 2013 23:04:50 +#Date Mon Dec 02 2013 23:29:02 CACHE: res/worker.js @@ -41,9 +41,6 @@ res-min/themes/night.css res-min/themes/school.css libs/dictionaries/de_DE.aff.lz libs/dictionaries/de_DE.dic.lz -libs/dictionaries/el_GR.aff -libs/dictionaries/el_GR.dic -libs/dictionaries/el_GR.dic.lz libs/dictionaries/en_US.aff.lz libs/dictionaries/en_US.dic.lz libs/dictionaries/es_ES.aff.lz diff --git a/public/res-min/main.js b/public/res-min/main.js index e18b644a..b1c9ad99 100644 --- a/public/res-min/main.js +++ b/public/res-min/main.js @@ -11614,7 +11614,11 @@ function printStackTrace(e) { i.pdfTemplate && (i.pdfTemplate = i.pdfTemplate.replace("http://benweet.github.io/stackedit/", "https://stackedit.io/")), i.defaultContent && (i.defaultContent = i.defaultContent.replace("http://benweet.github.io/stackedit/", "https://stackedit.io/")), i.commitMsg && (i.commitMsg = i.commitMsg.replace("http://benweet.github.io/stackedit/", "https://stackedit.io/")), - localStorage.settings = JSON.stringify(i)), r = "v11"), localStorage.version = r, + localStorage.settings = JSON.stringify(i)), r = "v11"), "v11" == r && (localStorage.removeItem("theme"), + e.has(localStorage, "settings") && (i = JSON.parse(localStorage.settings), delete i.editorFontFamily, + delete i.editorFontSize, i.template && (i.template = i.template.replace("https://stackedit.io/res-min/themes/default.css", "https://stackedit.io/res-min/themes/base.css")), + i.pdfTemplate && (i.pdfTemplate = i.pdfTemplate.replace("https://stackedit.io/res-min/themes/default.css", "https://stackedit.io/res-min/themes/base.css")), + localStorage.settings = JSON.stringify(i)), r = "v12"), localStorage.version = r, localStorage; }), function(e) { var t; @@ -27122,7 +27126,7 @@ function() { n.template = r.getInputTextValue("#textarea-settings-publish-template", t), n.pdfTemplate = r.getInputTextValue("#textarea-settings-pdf-template", t), n.pdfPageSize = r.getInputValue("#input-settings-pdf-page-size"), n.sshProxy = r.checkUrl(r.getInputTextValue("#input-settings-ssh-proxy", t), !0), c.saveSettings(n), n.extensionSettings = {}, l.onSaveSettings(n.extensionSettings, t), - t.isPropagationStopped() || (e.extend(a, n), s.settings = JSON.stringify(a), s.theme = i); + t.isPropagationStopped() || (e.extend(a, n), s.settings = JSON.stringify(a), s.themeV3 = i); } function C(e) { e === !0 || P.state.north.isClosed ? (N.hide(), O.hide()) : (N.show(), O.show()); @@ -27404,7 +27408,7 @@ function() { t.find(".btn:first").focus(), t.find("button:first").focus(), t.find("input:enabled:visible:first").focus(); }, 50); }).on("hidden.bs.modal", function() { - c = !1, j && j.focus() || X.focus(), n(s.theme); + c = !1, j && j.focus() || X.focus(), n(window.theme); }).keyup(function(t) { 13 != t.which || e(t.target).is("textarea") || e(this).find(".modal-footer a:last").click(); }), e(".collapse-save-as a").click(function() { @@ -29569,7 +29573,7 @@ try { window.viewerMode = /(^| )viewer($| )/.test(document.body.className), window.lightMode = window.viewerMode || /(\?|&)light($|&)/.test(location.search) || function(e) { return /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino|android|ipad|playbook|silk/i.test(e) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substr(0, 4)) ? !0 : void 0; -}(navigator.userAgent || navigator.vendor || window.opera), window.theme = localStorage.theme || "default"; +}(navigator.userAgent || navigator.vendor || window.opera), window.theme = localStorage.themeV3 || "default"; var themeModule = "less!themes/" + window.theme; diff --git a/public/res-min/themes/base.css b/public/res-min/themes/base.css index dda12ebf..fce2623c 100644 --- a/public/res-min/themes/base.css +++ b/public/res-min/themes/base.css @@ -1212,3 +1212,4 @@ ul,ol{margin-bottom:15px}ul ul,ol ul,ul ol,ol ol{margin-bottom:15px} .icon-provider-wordpress{background-position:-108px 0} .icon-provider-ssh{background-position:-126px 0} .icon-provider-gplus{background-position:-144px 0} +body.pdf{font-family:"DejaVu Sans"}body.pdf code,body.pdf pre{font-family:"DejaVu Sans Mono"} diff --git a/public/res-min/themes/default.css b/public/res-min/themes/default.css index 01f28b8c..898c6735 100644 --- a/public/res-min/themes/default.css +++ b/public/res-min/themes/default.css @@ -1227,6 +1227,7 @@ ul,ol{margin-bottom:15px}ul ul,ol ul,ul ol,ol ol{margin-bottom:15px} .icon-provider-wordpress{background-position:-108px 0} .icon-provider-ssh{background-position:-126px 0} .icon-provider-gplus{background-position:-144px 0} +body.pdf{font-family:"DejaVu Sans"}body.pdf code,body.pdf pre{font-family:"DejaVu Sans Mono"} .ace_editor{position:relative;overflow:hidden;font-family:'Monaco','Menlo','Ubuntu Mono','Consolas','source-code-pro',monospace;font-size:12px;line-height:normal;color:black;-ms-user-select:none;-moz-user-select:none;-webkit-user-select:none;user-select:none} .ace_scroller{position:absolute;overflow:hidden;top:0;bottom:0;background-color:inherit} .ace_content{position:absolute;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;cursor:text} diff --git a/public/res-min/themes/gray.css b/public/res-min/themes/gray.css index d0a890c4..90c63441 100644 --- a/public/res-min/themes/gray.css +++ b/public/res-min/themes/gray.css @@ -1227,6 +1227,7 @@ ul,ol{margin-bottom:15px}ul ul,ol ul,ul ol,ol ol{margin-bottom:15px} .icon-provider-wordpress{background-position:-108px 0} .icon-provider-ssh{background-position:-126px 0} .icon-provider-gplus{background-position:-144px 0} +body.pdf{font-family:"DejaVu Sans"}body.pdf code,body.pdf pre{font-family:"DejaVu Sans Mono"} .ace_editor{position:relative;overflow:hidden;font-family:'Monaco','Menlo','Ubuntu Mono','Consolas','source-code-pro',monospace;font-size:12px;line-height:normal;color:black;-ms-user-select:none;-moz-user-select:none;-webkit-user-select:none;user-select:none} .ace_scroller{position:absolute;overflow:hidden;top:0;bottom:0;background-color:inherit} .ace_content{position:absolute;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;cursor:text} diff --git a/public/res-min/themes/night.css b/public/res-min/themes/night.css index cea8fb2a..4d1011b4 100644 --- a/public/res-min/themes/night.css +++ b/public/res-min/themes/night.css @@ -1227,6 +1227,7 @@ ul,ol{margin-bottom:15px}ul ul,ol ul,ul ol,ol ol{margin-bottom:15px} .icon-provider-wordpress{background-position:-108px 0} .icon-provider-ssh{background-position:-126px 0} .icon-provider-gplus{background-position:-144px 0} +body.pdf{font-family:"DejaVu Sans"}body.pdf code,body.pdf pre{font-family:"DejaVu Sans Mono"} .ace_editor{position:relative;overflow:hidden;font-family:'Monaco','Menlo','Ubuntu Mono','Consolas','source-code-pro',monospace;font-size:12px;line-height:normal;color:black;-ms-user-select:none;-moz-user-select:none;-webkit-user-select:none;user-select:none} .ace_scroller{position:absolute;overflow:hidden;top:0;bottom:0;background-color:inherit} .ace_content{position:absolute;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;cursor:text} diff --git a/public/res-min/themes/school.css b/public/res-min/themes/school.css index 77403bb9..dd00fb21 100644 --- a/public/res-min/themes/school.css +++ b/public/res-min/themes/school.css @@ -1227,6 +1227,7 @@ ul,ol{margin-bottom:15px}ul ul,ol ul,ul ol,ol ol{margin-bottom:15px} .icon-provider-wordpress{background-position:-108px 0} .icon-provider-ssh{background-position:-126px 0} .icon-provider-gplus{background-position:-144px 0} +body.pdf{font-family:"DejaVu Sans"}body.pdf code,body.pdf pre{font-family:"DejaVu Sans Mono"} .ace_editor{position:relative;overflow:hidden;font-family:'Monaco','Menlo','Ubuntu Mono','Consolas','source-code-pro',monospace;font-size:12px;line-height:normal;color:black;-ms-user-select:none;-moz-user-select:none;-webkit-user-select:none;user-select:none} .ace_scroller{position:absolute;overflow:hidden;top:0;bottom:0;background-color:inherit} .ace_content{position:absolute;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;cursor:text} diff --git a/public/res/core.js b/public/res/core.js index fdca5373..062b51ad 100644 --- a/public/res/core.js +++ b/public/res/core.js @@ -185,7 +185,7 @@ define([ if(!event.isPropagationStopped()) { $.extend(settings, newSettings); storage.settings = JSON.stringify(settings); - storage.theme = theme; + storage.themeV3 = theme; } } @@ -806,7 +806,7 @@ define([ isModalShown = false; (aceEditor && aceEditor.focus()) || $editorElt.focus(); // Revert to current theme when settings modal is closed - applyTheme(storage.theme); + applyTheme(window.theme); }).keyup(function(e) { // Handle enter key in modals if(e.which == 13 && !$(e.target).is("textarea")) { diff --git a/public/res/main.js b/public/res/main.js index 0d431c60..928e7a3a 100644 --- a/public/res/main.js +++ b/public/res/main.js @@ -131,7 +131,7 @@ window.lightMode = window.viewerMode || /(\?|&)light($|&)/.test(location.search) })(navigator.userAgent || navigator.vendor || window.opera); // Keep the theme in a global variable -window.theme = localStorage.theme || 'default'; +window.theme = localStorage.themeV3 || 'default'; var themeModule = "less!themes/" + window.theme; if (window.baseDir.indexOf('-min') !== -1) { themeModule = "css!themes/" + window.theme; diff --git a/public/res/storage.js b/public/res/storage.js index a78a2079..cafdb1b2 100644 --- a/public/res/storage.js +++ b/public/res/storage.js @@ -194,6 +194,22 @@ define([ version = "v11"; } + // Upgrade from v11 to v12 + if(version == "v11") { + // Force new theme by using themeV3 variable + localStorage.removeItem("theme"); + if(_.has(localStorage, 'settings')) { + settings = JSON.parse(localStorage.settings); + // Force new font + delete settings.editorFontFamily; + delete settings.editorFontSize; + settings.template && (settings.template = settings.template.replace('https://stackedit.io/res-min/themes/default.css', 'https://stackedit.io/res-min/themes/base.css')); + settings.pdfTemplate && (settings.pdfTemplate = settings.pdfTemplate.replace('https://stackedit.io/res-min/themes/default.css', 'https://stackedit.io/res-min/themes/base.css')); + localStorage.settings = JSON.stringify(settings); + } + version = "v12"; + } + localStorage.version = version; return localStorage; }); \ No newline at end of file diff --git a/public/res/styles/base.less b/public/res/styles/base.less index 8b23a56e..7fad9daf 100644 --- a/public/res/styles/base.less +++ b/public/res/styles/base.less @@ -289,3 +289,14 @@ ul,ol { .icon-provider-gplus { background-position: -144px 0; } + +/******************* + * PDF + *******************/ +body.pdf { + font-family: "DejaVu Sans"; + + code, pre { + font-family: "DejaVu Sans Mono"; + } +}