diff --git a/lib/gollum/frontend/public/gollum/livepreview/css/custom.css b/lib/gollum/frontend/public/gollum/livepreview/css/custom.css index f5305e9f..0bcb1358 100644 --- a/lib/gollum/frontend/public/gollum/livepreview/css/custom.css +++ b/lib/gollum/frontend/public/gollum/livepreview/css/custom.css @@ -2,6 +2,10 @@ body { overflow: hidden; } +#editor .ace_sb { + overflow-y: auto !important; +} + #darkness { visibility: hidden; position: absolute; @@ -49,7 +53,7 @@ so editor doesn't display in the background. */ #contentframe { margin: 0 auto; overflow: visible; - width: 80%; + width: 90%; } #previewframe { @@ -63,14 +67,35 @@ so editor doesn't display in the background. */ right: 0; } +.editor_bg { + position: fixed; + top: 0; + margin: 0; + padding: 0; + background: black; + width: 50%; + height: 100%; + z-index: -2; +} + +.toolpanel_bg { + position: fixed; + background: #666; + top: 0; + height: 30px; + width: 100%; + padding: 5px 0; + margin: 0; + z-index: -1; +} + /* -- Start from notepag.es -- */ .toolpanel { position: fixed; background: #666; top: 0; height: 30px; - right: 20px; - width: 80px; + width: 50%; vertical-align: middle; padding: 5px 0; margin: 0; diff --git a/lib/gollum/frontend/public/gollum/livepreview/index.html b/lib/gollum/frontend/public/gollum/livepreview/index.html index 86243d82..828a6317 100644 --- a/lib/gollum/frontend/public/gollum/livepreview/index.html +++ b/lib/gollum/frontend/public/gollum/livepreview/index.html @@ -16,6 +16,9 @@ Toggle left to right +
+
+
Confirm save with comment Cancel save with comment @@ -36,11 +39,11 @@ var require = { ---> diff --git a/lib/gollum/frontend/public/gollum/livepreview/js/livepreview.js b/lib/gollum/frontend/public/gollum/livepreview/js/livepreview.js index 1672f48d..e2b1700b 100644 --- a/lib/gollum/frontend/public/gollum/livepreview/js/livepreview.js +++ b/lib/gollum/frontend/public/gollum/livepreview/js/livepreview.js @@ -397,7 +397,8 @@ var applyTimeout = function () { var heightHalf = height / 2; // height minus 50 so the end of document text doesn't flow off the page. - var editorContainerStyle = 'width:' + widthHalf + 'px;' + + // + 15 for scroll bar + var editorContainerStyle = 'width:' + (widthHalf + 15) + 'px;' + 'height:' + (height - 50) + 'px;' + 'left:' + (leftRight === false ? widthHalf + 'px;' : '0px;') + 'top:' + '40px;'; // use 40px for tool menu @@ -408,12 +409,12 @@ var applyTimeout = function () { var previewStyle = 'width:' + (widthHalf - 2 - 10) + 'px;' + 'height:' + height + 'px;' + 'left:' + (leftRight === false ? '10px;' : widthHalf + 'px;') + - 'top:' + '0px;'; + // preview panel top is equal to height of comment tool panel (40px) + 1 + 'top:41px;'; cssSet( preview, previewStyle ); // Resize tool panel - var toolPanelStyle = 'width:' + widthHalf + 'px;' + - 'left:' + (leftRight === false ? widthHalf + 'px;' : '0px;'); + var toolPanelStyle = 'width:50%;'; cssSet( toolPanel, toolPanelStyle ); // Resize comment related elements. @@ -428,10 +429,12 @@ var applyTimeout = function () { cssSet( commentEditorContainer, commentEditorContainerStyle ); commentEditor.resize(); + var commentToolPanelHeight = height / 4 - 40; + // In top subtract height (40px) of comment tool panel. var commentToolPanelStyle = 'width:' + widthHalf + 'px;' + 'left:' + widthFourth + 'px;' + - 'top:' + (height / 4 - 40) + 'px;' + + 'top:' + commentToolPanelHeight + 'px;' + commentHidden; cssSet( commentToolPanel, commentToolPanelStyle );