diff --git a/.jshintrc b/.jshintrc new file mode 100644 index 00000000..f0b50c4c --- /dev/null +++ b/.jshintrc @@ -0,0 +1,14 @@ +{ + "curly": true, + "browser": true, + "devel": true, + "indent": 4, + "latedef": true, + "undef": true, + "unused": true, + "expr": true, + "globals": { + "define": false, + "require": false + } +} \ No newline at end of file diff --git a/Gruntfile.js b/Gruntfile.js index c83a2471..cae1fd7a 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -15,18 +15,7 @@ module.exports = function(grunt) { pkg: grunt.file.readJSON('package.json'), jshint: { options: { - curly: true, - browser: true, - devel: true, - indent: 4, - latedef: true, - undef: true, - unused: true, - expr: true, - globals: { - "define": false, - "require": false, - }, + jshintrc: true, ignores: [ 'node_modules/**/*.js', 'public/libs/**/*.js', diff --git a/bower.json b/bower.json index 5560045e..a3f0acca 100644 --- a/bower.json +++ b/bower.json @@ -17,7 +17,7 @@ "stacktrace": "~0.5.3", "requirejs-text": "~2.0.10", "bootstrap-tour": "~0.7.1", - "ace": "4bbe5346f2ae5ad35c0c47defa244ab27aedd451", + "ace": "https://github.com/benweet/ace.git#798a03b2f8b1315fa8ba2d867cee242b90960557", "pagedown-ace": "https://github.com/benweet/pagedown-ace.git#84d5e1b7ff233a1c8cafa9716e825228d275120c", "pagedown-extra": "https://github.com/jmcmanus/pagedown-extra.git#bd0870e3e871e15bde1fa5a427e3e10028a09789", "crel": "https://github.com/KoryNunn/crel.git#8dbda04b129fc0aec01a2a080d1cab26816e11c1", diff --git a/public/res/core.js b/public/res/core.js index 93938e8d..2295e41b 100644 --- a/public/res/core.js +++ b/public/res/core.js @@ -704,7 +704,7 @@ define([ screenWidth = screenWidth || 0; //var codeFontSize = settings.editorFontSize; //var codeLineHeight = Math.round(codeFontSize * 20 / 12); - var previewFontSize = Math.round(size * 8 / 7); + var previewFontSize = size * 13 / 12; styleContent += [ '@media (min-width: ' + screenWidth + 'px) {', '#wmd-input, .textarea-helper {', @@ -717,9 +717,9 @@ define([ '}', ].join('\n'); } - applyFont(14); - applyFont(15, 600); - applyFont(16, 1200); + applyFont(15); + applyFont(16, 600); + applyFont(17, 1200); function applyMaxWidth(maxWidth, screenWidth) { styleContent += [ @@ -837,7 +837,14 @@ define([ }); // Editor - if(window.lightMode) { + if(window.preMode) { + // In light mode, we replace ACE with a textarea + $('#wmd-input').addClass('form-control').attr('contenteditable', true); + + // Create UI layout after textarea + createLayout(); + } + else if(window.lightMode) { // In light mode, we replace ACE with a textarea $('#wmd-input').replaceWith(function() { return $('
- NOTE: This will not delete the file on synchronized + Note: This will not delete the file on synchronized locations.@@ -506,7 +507,7 @@
- NOTE: + Note:
- Dropbox file path does not depend on document title.
- The title of your document will not be synchronized.
@@ -541,7 +542,7 @@ @@ -828,19 +829,13 @@Publication
-"" is published on the following location(s):
- - - -- NOTE: Removing a local document will not delete the linked file on Google + Note: Removing a local document will not delete the linked file on Google Drive.diff --git a/public/res/html/partialRenderingSettingsBlock.html b/public/res/html/partialRenderingSettingsBlock.html index d7380596..83b59a81 100644 --- a/public/res/html/partialRenderingSettingsBlock.html +++ b/public/res/html/partialRenderingSettingsBlock.html @@ -1,5 +1,5 @@Renders modified sections only.
- NOTE: Document sections are based on title elements (h1, h2...). Therefore if + Note: Document sections are based on title elements (h1, h2...). Therefore if your document does not contain any title, performance will not be increased.\ No newline at end of file diff --git a/public/res/html/scrollLinkSettingsBlock.html b/public/res/html/scrollLinkSettingsBlock.html index 8aabf587..47d3623c 100644 --- a/public/res/html/scrollLinkSettingsBlock.html +++ b/public/res/html/scrollLinkSettingsBlock.html @@ -1,6 +1,6 @@Binds together editor and preview scrollbars.
- NOTE: The mapping between Markdown and HTML is based on the + Note: The mapping between Markdown and HTML is based on the position of the title elements (h1, h2...) in the page. Therefore if your document does not contain any title, the mapping will be linear and consequently less accurate. diff --git a/public/res/styles/base.less b/public/res/styles/base.less index 22d18822..e58769fa 100644 --- a/public/res/styles/base.less +++ b/public/res/styles/base.less @@ -68,9 +68,34 @@ src: local('Source Code Pro Bold'), local('SourceCodePro-Bold'), url("../font/SourceCodePro-Bold-webfont.woff") format('woff'); } +@font-face { + font-family: 'Anonymous Pro'; + font-style: normal; + font-weight: 400; + src: local('Anonymous Pro'), local('AnonymousPro'), url("../font/AnonymousPro-Regular-webfont.woff") format('woff'); +} +@font-face { + font-family: 'Anonymous Pro'; + font-style: normal; + font-weight: 700; + src: local('Anonymous Pro Bold'), local('AnonymousPro-Bold'), url("../font/AnonymousPro-Bold-webfont.woff") format('woff'); +} +@font-face { + font-family: 'Anonymous Pro'; + font-style: italic; + font-weight: 400; + src: local('Anonymous Pro Italic'), local('AnonymousPro-Italic'), url("../font/AnonymousPro-Italic-webfont.woff") format('woff'); +} +@font-face { + font-family: 'Anonymous Pro'; + font-style: italic; + font-weight: 700; + src: local('Anonymous Pro Bold Italic'), local('AnonymousPro-BoldItalic'), url("../font/AnonymousPro-BoldItalic-webfont.woff") format('woff'); +} + @font-family-sans-serif: "Source Sans Pro", sans-serif; @font-family-monospace: "Source Code Pro", monospace; -@font-family-monospace-letter-spacing: -0.06em; +@font-family-monospace-letter-spacing: -0.02em; body { -webkit-font-smoothing: antialiased; diff --git a/public/res/styles/main.less b/public/res/styles/main.less index 981d89e8..04b1a845 100644 --- a/public/res/styles/main.less +++ b/public/res/styles/main.less @@ -57,7 +57,7 @@ @document-panel-width: 320px; @jgrowl-width: 260px; @resizer-size: 32px; -@editor-line-weight: 1.7; +@editor-line-weight: 1.6; /* Bootstrap */ @body-bg: @secondary-bg-light; @@ -128,6 +128,7 @@ @popover-arrow-color: @secondary-bg; @popover-arrow-outer-color: @secondary-border-color; @popover-title-bg: @transparent; +@alert-border-radius: 0; body { @@ -318,7 +319,12 @@ a { /******************** * Input ********************/ - + +@form-control-inset-shadow: inset 0 1px 1px rgba(0,0,0,.025); +.form-control { + .box-shadow(~"@{form-control-inset-shadow}"); +} + // Fix form-inline broken since Bootstrap v3 .form-inline { .form-control { @@ -344,13 +350,13 @@ a { &:focus { border-color: @input-border; outline: 0; - .box-shadow(~"inset 0 1px 1px rgba(0,0,0,.05), 0 0 12px -1px @{color-rgba}"); + .box-shadow(~"@{form-control-inset-shadow}, 0 0 12px -1px @{color-rgba}"); } } .form-control.error { border-color: @error-border; - .box-shadow(~"inset 0 1px 1px rgba(0,0,0,.05), 0 0 8px rgba(255, 134, 97, 0.6)"); + .box-shadow(~"@{form-control-inset-shadow}, 0 0 8px rgba(255, 134, 97, 0.6)"); } .help-block { @@ -359,7 +365,7 @@ a { // Input add-on .input-group-addon { - .box-shadow(inset 0 1px 1px rgba(0,0,0,.075)); + .box-shadow(~"@{form-control-inset-shadow}"); a& { color: @link-color; } @@ -459,7 +465,7 @@ a { overflow: hidden; height: @input-height-slim; width: 60px; - padding-top: 9px; + padding-top: 8px; .bar { display: inline-block; width: 14px; @@ -553,10 +559,15 @@ a { background-color: @secondary-bg-lighter; .box-shadow(~"inset 1px 0 1px rgba(0,0,0,.1), inset 1px 1px 4px rgba(0,0,0,.025)"); } + .alert { + padding: 15px 0; + } .nav { margin: 20px 0; + > li > * { + padding: 8px 30px; + } > li > a { - padding: 8px 15px 8px 25px; &:hover, &:focus { background-color: @transparent; @@ -1152,7 +1163,7 @@ a { vertical-align: middle; background-color: @secondary-bg-lighter; border-color: @input-border; - .box-shadow(inset 0 1px 1px rgba(0,0,0,.075)); + .box-shadow(~"@{form-control-inset-shadow}"); } .ace_searchbtn { background-image: none; diff --git a/public/res/themes/original.less b/public/res/themes/original.less index 3451b7bb..7560bf00 100644 --- a/public/res/themes/original.less +++ b/public/res/themes/original.less @@ -54,7 +54,7 @@ @panel-button-bg-color: #e0e0e0; @panel-button-box-shadow: ~"0 0 1px rgba(255,255,255,0.75)"; @input-bg: #fff; -@modal-backdrop-bg: #505050; +@modal-backdrop-bg: #606060; @input-color: @secondary-color-darkest; @disabled-color: mix(@secondary-color, @input-bg, 50%); @@ -103,8 +103,9 @@ a.list-group-item, &:hover, &:focus { color: #333; - border-top-color: fade(@secondary, 10%); + border-top-color: fade(@secondary, 15%); border-bottom-color: fade(#fff, 85%); + .box-shadow(inset 1px 1px 4px rgba(0,0,0,.025)) } } @@ -116,7 +117,7 @@ a.list-group-item, color: #606060; border-top-color: fade(@secondary, 10%); border-bottom-color: fade(#fff, 80%); - + .box-shadow(inset 1px 1px 4px rgba(0,0,0,.025)) } }