From 4f7cba9738df21d97944868e1f194cbb586d5898 Mon Sep 17 00:00:00 2001 From: benweet Date: Tue, 2 Apr 2013 19:42:47 +0100 Subject: [PATCH] Use require.js --- LICENSE.txt | 12 + README.md | 20 +- cache.manifest | 2 +- css/main.css | 15 +- img/stackedit-64.ico | Bin 2686 -> 0 bytes img/stackedit-promo.png | Bin 6207 -> 3770 bytes img/stackedit-promo.svg | 125 ++ img/stackedit.svg | 115 ++ index.html | 139 +- js/async-runner.js | 25 +- js/base64.js | 176 -- js/config.js | 18 + js/core.js | 280 +++ js/file-manager.js | 339 ++++ js/gdrive.js | 138 +- js/{jquery.jgrowl.js => jgrowl.js} | 0 js/{jquery-ui.custom.js => jquery-ui.js} | 0 js/{jquery.layout.js => layout.js} | 0 js/main.js | 525 +----- js/prod/custo.js | 1 + js/require.js | 2019 ++++++++++++++++++++++ js/synchronizer.js | 54 +- 22 files changed, 3171 insertions(+), 832 deletions(-) create mode 100644 LICENSE.txt delete mode 100644 img/stackedit-64.ico create mode 100644 img/stackedit-promo.svg create mode 100644 img/stackedit.svg delete mode 100644 js/base64.js create mode 100644 js/config.js create mode 100644 js/core.js create mode 100644 js/file-manager.js rename js/{jquery.jgrowl.js => jgrowl.js} (100%) rename js/{jquery-ui.custom.js => jquery-ui.js} (100%) rename js/{jquery.layout.js => layout.js} (100%) create mode 100644 js/prod/custo.js create mode 100644 js/require.js diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 00000000..5f301101 --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,12 @@ +StackEdit - The Markdown editor powered by PageDown. + +Copyright 2013 Benoit Schweblin (http://www.benoitschweblin.com) +Licensed under an Apache License (http://www.apache.org/licenses/LICENSE-2.0) + +Includes: +jQuery - http://jquery.com/ +Bootstrap - http://twitter.github.com/bootstrap/ +RequireJS - http://requirejs.org/ +PageDown - https://code.google.com/p/pagedown/ +UI Layout - http://layout.jquery-dev.net/ +jGrowl - https://github.com/stanlemon/jGrowl/ diff --git a/README.md b/README.md index 09e0103d..af45edfd 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,22 @@ stackedit ========= -The Markdown editor powered by PageDown +StackEdit is a free, open-source Markdown editor based on PageDown, the Markdown library used by Stack Overflow and the other Stack Exchange sites. + +### StackEdit can: + + - Manage multiple Markdown documents locally + - Export your documents in Markdown or HTML format + - Synchronize your Markdown documents in the Cloud + - Edit existing Markdown documents from Google Drive + +### Features: + + - Real-time HTML preview + - WYSIWYG control buttons + - Configurable layout + - Offline editing + +### File synchronization: + + - Google Drive \ No newline at end of file diff --git a/cache.manifest b/cache.manifest index 85bc31cb..9112b544 100644 --- a/cache.manifest +++ b/cache.manifest @@ -1 +1 @@ -CACHE MANIFEST # v5 CACHE: index.html css/bootstrap.css css/jgrowl.css css/main.css js/async-runner.js js/base64.js js/bootstrap.js js/gdrive.js js/jquery.jgrowl.js js/jquery.js js/jquery.layout.js js/jquery-ui.custom.js js/main.js js/Markdown.Converter.js js/Markdown.Editor.js js/Markdown.Sanitizer.js js/synchronizer.js img/ajax-loader.gif img/dropbox.png img/gdrive.png img/glyphicons-halflings.png img/glyphicons-halflings-white.png img/stackedit-16.png img/stackedit-32.ico NETWORK: * \ No newline at end of file +CACHE MANIFEST # v5 CACHE: index.html css/bootstrap.css css/jgrowl.css css/main.css js/prod/custo.js js/async-runner.js js/bootstrap.js js/config.js js/gdrive.js js/jgrowl.js js/jquery.js js/jquery-ui.js js/layout.js js/main.js js/Markdown.Converter.js js/Markdown.Editor.js js/Markdown.Sanitizer.js js/require.js js/synchronizer.js img/ajax-loader.gif img/dropbox.png img/gdrive.png img/glyphicons-halflings.png img/glyphicons-halflings-white.png img/stackedit-16.png img/stackedit-32.ico NETWORK: * \ No newline at end of file diff --git a/css/main.css b/css/main.css index f2cfdbcf..ed410ea3 100644 --- a/css/main.css +++ b/css/main.css @@ -1,3 +1,6 @@ +@import url("bootstrap.css"); +@import url("jgrowl.css"); + body { background-color: #f5f5f5; } @@ -22,10 +25,14 @@ div, span, a, ul, li, textarea, input, button { text-shadow: none !important; } -.btn, .navbar-inner, .ui-layout-east, .ui-layout-south, textarea, input { +.btn, .navbar-inner, .ui-layout-east, .ui-layout-south, textarea, input, .input-append .add-on { border: none !important; } +.border, .dropdown-menu { + border: 1px solid #ddd !important; +} + .navbar-inner .btn { background-color: #ddd; } @@ -61,7 +68,7 @@ div, span, a, ul, li, textarea, input, button { background-color: #777; } -input[disabled], select[disabled], textarea[disabled], input[readonly], select[readonly], textarea[readonly] { +input[disabled], select[disabled], textarea[disabled], input[readonly], select[readonly], textarea[readonly], .input-append .add-on { cursor: not-allowed; background-color: #f5f5f5; } @@ -119,10 +126,6 @@ hr { margin: 4px 5px 0; } -.dropdown-menu { - border-color: #ddd -} - .dropdown-menu i { margin-right: 5px; } diff --git a/img/stackedit-64.ico b/img/stackedit-64.ico deleted file mode 100644 index e1cb2fa6bfa0767ce07708a61e760b333369f742..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2686 zcmZQzU<5)32LT|-!jQqmz#zuJz@P!d4nW)h#2|58AT=q8p&%!RA-ZBJgJ{)129Lfy z3>w{+8Q8o2;?ja5UOvD8#W5q4gDVPP!9ja@K@0%06JbAwv>Ja{?ojj_I1H}u)0+8K;MLLw4^2lZl1Un4{V7dTBI*t1B zm?qL!#25=eb^#V?V`|DHn?+yte*yqj29Qld%x7T0MSlR9{GWjV7mZ6FOdO<-AF3Z4 s4O54U{s7edAFLlM4bg^&1iKrk6&H<1D_9Do55&Ml6QdvG1v2di09B&OasU7T diff --git a/img/stackedit-promo.png b/img/stackedit-promo.png index 7850ae4f4db6f51bec5deb7172f761d968d5d2f3..dce7d88ddd599281f3c7c9a3b8b7360ef316ae4b 100644 GIT binary patch literal 3770 zcmV;r4n^^aP)cnRKr_Au zP+Z~=9tIML1}2j*fCL2@289)o!AA(75QK=x7>veblz@p60=__WF`!{0k3b^f5g-xr z>OFt#bGg;kRrgkR*X`~b&$rfHtNPTbUFTNUK4+hO_C8l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ocut56r8mT@6gn2OyD9^>2K8{q z4~?xj^3q4vOtxNHA@i}wY`I8zUu)T{YB63T5o)ugX*JjT8Q9%YfWaKGw!|mZQzj>_R6fg!~Q0_QEYCMJiQukUoX8W z;~JQk0jJER_g*gjrg4*gC)zP~FaKQRtPF_DJG9v*XT*@He=KJMpKJV1ObfJQAric0 zVZ<@FfaYZ8?6WTPIqyA>YkiQ)jvA&~n?$1VFS-d$gSezkh{+XKs+0LnT1=XUUb{ z;w?%m1pArjbhYn8DHh$*xA!>! diff --git a/img/stackedit-promo.svg b/img/stackedit-promo.svg new file mode 100644 index 00000000..5373f8a0 --- /dev/null +++ b/img/stackedit-promo.svg @@ -0,0 +1,125 @@ + + + + + + + + + + + + image/svg+xml + + + + + + + stackedit + + + + + + + + + + + diff --git a/img/stackedit.svg b/img/stackedit.svg new file mode 100644 index 00000000..2021ab9f --- /dev/null +++ b/img/stackedit.svg @@ -0,0 +1,115 @@ + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + diff --git a/index.html b/index.html index b1c866f9..afe8cc99 100644 --- a/index.html +++ b/index.html @@ -6,24 +6,8 @@ - - - - - - - - - - - - - - - - - +