diff --git a/src/main/resources/static/css/blog.css b/src/main/resources/static/css/blog.css index 51c9bfe..cda216b 100644 --- a/src/main/resources/static/css/blog.css +++ b/src/main/resources/static/css/blog.css @@ -34,19 +34,19 @@ line-height: 30px; width: 100%; padding: 0; - margin: 2px; + /*margin: 2px;*/ + margin-top: 5px; + margin-bottom: 5px; align-content: center; top: 0; bottom: 0; color: white; - background: #40404564; + /*background: #40404564;*/ position: relative; - outline-width: thin; - outline-color: #ec914b8f; - border-color: #ec914b8f; - border-style: groove; - border-width: 1px; + border: 1px solid #393b42; height: var(--ButtonHeight); + border-radius: 10px; + background: #00000044; } #title_field { font-size: 20px; @@ -157,4 +157,10 @@ a.btn_layerClose:hover { overflow: hidden; overflow-y: hidden; overflow-x: hidden; +} +#editor { + border: 1px solid #393b42; + padding: 1px; + border-radius: 10px; + background: #00000044; } \ No newline at end of file diff --git a/src/main/resources/static/css/common.css b/src/main/resources/static/css/common.css index 05b495c..2498fb5 100644 --- a/src/main/resources/static/css/common.css +++ b/src/main/resources/static/css/common.css @@ -8,9 +8,10 @@ } html { + background-image: url("data:image/svg+xml,"); margin: 1vh 1vw; - background: var(--DEFAULT_LAYER_BACK); } + #where{ table-layout: fixed; } @@ -22,8 +23,9 @@ body { user-select: none; -webkit-user-select: none; align-content: center; + background: var(--DEFAULT_LAYER_BACK); padding: 1vh 1vw; - background-image: url("data:image/svg+xml,") + border-radius: 10px; } body > *{ @@ -43,7 +45,7 @@ body > *{ header { top: 0; - background: var(--DEFAULT_LAYER_BACK); + /*background: var(--DEFAULT_LAYER_BACK);*/ border-top: #ec914b8f; border-radius: 10px 30px; border-width: 1px; @@ -114,8 +116,7 @@ h2 { position: relative; overflow-y: auto; overflow-x: clip; - height: 68vh; - max-height: 68vh; + height: 78vh; min-height: 8vh; } @@ -132,7 +133,7 @@ footer { display: flex; bottom: 0; border-top: #ec914b8f; - background: var(--DEFAULT_LAYER_BACK); + /*background: var(--DEFAULT_LAYER_BACK);*/ border-radius: 30px 10px; border-width: 1px; height: 5vh; diff --git a/src/main/resources/static/js/blog.js b/src/main/resources/static/js/blog.js index d6b2947..d6e95f1 100644 --- a/src/main/resources/static/js/blog.js +++ b/src/main/resources/static/js/blog.js @@ -60,5 +60,5 @@ function showPosition(position) { } - document.getElementById('location_field').value = "Lat: " + position.coords.latitude + ", Lon: " + position.coords.longitude; + document.getElementById('location_field').textContent = "Lat: " + position.coords.latitude + ", Lon: " + position.coords.longitude; } \ No newline at end of file diff --git a/src/main/resources/templates/content/blog/viewer.html b/src/main/resources/templates/content/blog/viewer.html index 403dfb1..ca896f4 100644 --- a/src/main/resources/templates/content/blog/viewer.html +++ b/src/main/resources/templates/content/blog/viewer.html @@ -14,12 +14,16 @@ let onChange = () => {console.log(editor.getMarkdown())} document.addEventListener("DOMContentLoaded", onLoaded); function onLoaded() { - baseData.title = urldecode([[${srcPost.title}]]); - baseData.content = urldecode([[${srcPost.content}]]); - var h = document.querySelector('#main_layer').getBoundingClientRect().height + 'px' + baseData.title = [[${srcPost.title}]]; + baseData.content = [[${srcPost.content}]]; + baseData.firstPostLon = [[${srcPost.firstPostLon}]]; + baseData.firstPostLat = [[${srcPost.firstPostLat}]]; + document.getElementById('location_field').textContent = "Lat: " + baseData.firstPostLat + ", Lon: " + baseData.firstPostLon; + $('#title_layer').text(baseData.title) + var h = document.querySelector('#main_layer').getBoundingClientRect().height * 0.7 editor = new toastui.Editor({ el: document.querySelector('#editor'), - height: '500px', + height: h+ 'px', width:'100%', viewer: true, usageStatistics : false, @@ -27,21 +31,18 @@ theme:"dark", }); } - function save() { - console.log(editor.getHTML()) - }
- +
-
- - -
-
- +
+
+
+
+
+
diff --git a/src/main/resources/templates/content/blog/write.html b/src/main/resources/templates/content/blog/write.html index 42835de..b721185 100644 --- a/src/main/resources/templates/content/blog/write.html +++ b/src/main/resources/templates/content/blog/write.html @@ -30,11 +30,7 @@ console.log(style.getPropertyValue('--FooterHeight')) console.log(style.getPropertyValue('--TopHeight')) var editorHeght = ( - document.querySelector('#main_layer').getBoundingClientRect().height - - ( - Number(style.getPropertyValue('--ButtonHegit').replace("px","") * 3) - + Number(style.getPropertyValue('--TopHeight').replace("px","")) - ) + document.querySelector('#main_layer').getBoundingClientRect().height * 0.7 ) editor = new toastui.Editor({ @@ -115,8 +111,10 @@
+
- +
+