This commit is contained in:
lunaticbum
2024-10-21 17:25:49 +09:00
parent 2caf83af1e
commit c4001848fc
19 changed files with 214 additions and 143 deletions
@@ -4,8 +4,8 @@
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
layout:decorate="~{layout/default_layout}"
>
<head>
<script type="text/javascript" src="https://code.jquery.com/jquery-3.5.1.min.js" crossorigin="anonymous"></script>
<th:block layout:fragment="head" id="head">
<script type="text/javascript" th:src="@{https://code.jquery.com/jquery-3.5.1.min.js}" crossorigin="anonymous"></script>
<script type="text/javascript" th:src="@{/js/toast-ui.js}"></script>
<link th:href="@{/css/blog.css}" rel="stylesheet" />
<link th:href="@{/css/toast-ui.css}" rel="stylesheet" />
@@ -22,7 +22,7 @@
console.log(style.getPropertyValue('--FooterHeight'))
console.log(style.getPropertyValue('--TopHeight'))
var editorHeght = (
document.querySelector('#content').getBoundingClientRect().height -
document.querySelector('#main_layer').getBoundingClientRect().height -
(
Number(style.getPropertyValue('--ButtonHegit').replace("px","") * 3)
+ Number(style.getPropertyValue('--TopHeight').replace("px",""))
@@ -32,7 +32,7 @@
editor = new toastui.Editor({
el: document.querySelector('#editor'),
previewStyle: 'tab',
height: editorHeght+ 'px',
height: editorHeght + 'px',
width:'95%',
theme:'dark',
usageStatistics : false,
@@ -91,18 +91,18 @@
console.log(editor.getHTML())
}
</script>
</head>
<div layout:fragment="content" id="content">
<div class="layer">
<input id="title_layer" />
</th:block>
<th:block layout:fragment="content" id="content">
<div id="main_layer">
<div class="layer">
<input id="title_layer" />
</div>
<div id="editor" ></div>
<div class="layer">
<select > </select>
<input id="hashtag" />
<button id="save" onclick="save()">asdsad</button>
</div>
</div>
<div id="editor" ></div>
<div class="layer">
<select > </select>
<input id="hashtag" />
</div>
<div id="layer" >
<button id="save" onclick="save()">asdsad</button>
</div>
</div>
</th:block>
</html>