mirror of
https://github.com/Frooodle/Stirling-PDF.git
synced 2025-09-12 17:52:13 +02:00
Initial set up
This commit is contained in:
parent
0b57a1920d
commit
9c0b1811cd
@ -20,10 +20,8 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
scale: 0.7;
|
transform-origin: top;"
|
||||||
transform-origin: top;
|
id="scale-wrap">
|
||||||
">
|
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<br>
|
<br>
|
||||||
<div style="justify-content: center; display: flex;">
|
<div style="justify-content: center; display: flex;">
|
||||||
@ -125,8 +123,9 @@
|
|||||||
<th:block th:insert="~{fragments/navElements.html :: navElements}"></th:block>
|
<th:block th:insert="~{fragments/navElements.html :: navElements}"></th:block>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<th:block th:insert="~{fragments/footer.html :: footer}"></th:block>
|
<th:block th:insert="~{fragments/footer.html :: footer}"></th:block>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -225,7 +224,21 @@
|
|||||||
window.showSurvey = /*[[${showSurveyFromDocker}]]*/ true
|
window.showSurvey = /*[[${showSurveyFromDocker}]]*/ true
|
||||||
</script>
|
</script>
|
||||||
<script th:src="@{'/js/pages/home.js'}" th:inline="javascript"></script>
|
<script th:src="@{'/js/pages/home.js'}" th:inline="javascript"></script>
|
||||||
|
<script>
|
||||||
|
function applyScale() {
|
||||||
|
const baseWidth = 1440;
|
||||||
|
const baseHeight = 1000;
|
||||||
|
const scaleX = window.innerWidth / baseWidth;
|
||||||
|
const scaleY = window.innerHeight / baseHeight;
|
||||||
|
const scale = Math.max(0.9, Math.min(scaleX, scaleY)); // keep aspect ratio, honor minScale
|
||||||
|
const ui = document.getElementById('scale-wrap');
|
||||||
|
ui.style.transform = `scale(${scale*0.8})`;
|
||||||
|
}
|
||||||
|
|
||||||
|
window.addEventListener('resize', applyScale);
|
||||||
|
window.addEventListener('load', applyScale);
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user