mirror of
https://github.com/Stirling-Tools/Stirling-PDF.git
synced 2025-05-13 17:55:56 +00:00
Auto scale (#3490)
# Description of Changes Please provide a summary of the changes, including: - What was changed - Why the change was made - Any challenges encountered Closes #(issue_number) --- ## Checklist ### General - [x] I have read the [Contribution Guidelines](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/CONTRIBUTING.md) - [x] I have read the [Stirling-PDF Developer Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/DeveloperGuide.md) (if applicable) - [x] I have read the [How to add new languages to Stirling-PDF](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/HowToAddNewLanguage.md) (if applicable) - [x] I have performed a self-review of my own code - [x] My changes generate no new warnings ### Documentation - [ ] I have updated relevant docs on [Stirling-PDF's doc repo](https://github.com/Stirling-Tools/Stirling-Tools.github.io/blob/main/docs/) (if functionality has heavily changed) - [ ] I have read the section [Add New Translation Tags](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/HowToAddNewLanguage.md#add-new-translation-tags) (for new translation tags only) ### UI Changes (if applicable) - [ ] Screenshots or videos demonstrating the UI changes are attached (e.g., as comments or direct attachments in the PR) ### Testing (if applicable) - [ ] I have tested my changes locally. Refer to the [Testing Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/DeveloperGuide.md#6-testing) for more details.
This commit is contained in:
parent
512e9d7236
commit
c4b8df2a1e
@ -1,7 +1,8 @@
|
|||||||
#page-container {
|
#page-container {
|
||||||
min-height: 100vh;
|
height: 100vh;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
overflow-x: clip;
|
||||||
}
|
}
|
||||||
|
|
||||||
#content-wrap {
|
#content-wrap {
|
||||||
|
@ -162,6 +162,7 @@ html[dir="rtl"] .lang-dropdown-item-wrapper {
|
|||||||
text-wrap: wrap;
|
text-wrap: wrap;
|
||||||
word-break: break-word;
|
word-break: break-word;
|
||||||
width: 80%;
|
width: 80%;
|
||||||
|
font-size: large;
|
||||||
}
|
}
|
||||||
|
|
||||||
.close-icon {
|
.close-icon {
|
||||||
@ -476,6 +477,9 @@ html[dir="rtl"] .dropdown-menu[data-bs-popper] {
|
|||||||
display: flex;
|
display: flex;
|
||||||
gap: 30px;
|
gap: 30px;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
width: 140%;
|
||||||
|
position: relative;
|
||||||
|
left: -20%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.feature-group {
|
.feature-group {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<div th:fragment="navbar" class="mx-auto" style="position: sticky; top:0; z-index:10000">
|
<div th:fragment="navbar" class="mx-auto" style="position: sticky; top:0; z-index:10000; width:100%">
|
||||||
<script th:src="@{'/js/languageSelection.js'}"></script>
|
<script th:src="@{'/js/languageSelection.js'}"></script>
|
||||||
<script th:src="@{'/js/navbar.js'}"></script>
|
<script th:src="@{'/js/navbar.js'}"></script>
|
||||||
<script th:src="@{'/js/additionalLanguageCode.js'}"></script>
|
<script th:src="@{'/js/additionalLanguageCode.js'}"></script>
|
||||||
|
@ -8,19 +8,17 @@
|
|||||||
|
|
||||||
<body>
|
<body>
|
||||||
<div id="page-container">
|
<div id="page-container">
|
||||||
<div id="content-wrap">
|
|
||||||
<th:block th:insert="~{fragments/navbar.html :: navbar}"></th:block>
|
<th:block th:insert="~{fragments/navbar.html :: navbar}"></th:block>
|
||||||
|
<div style="transform-origin: top;"
|
||||||
|
id="scale-wrap">
|
||||||
|
|
||||||
<br class="d-md-none">
|
<br class="d-md-none">
|
||||||
<!-- Features -->
|
<!-- Features -->
|
||||||
<script th:src="@{'/js/homecard.js'}"></script>
|
<script th:src="@{'/js/homecard.js'}"></script>
|
||||||
<div style="
|
<div style="
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;">
|
flex-direction: column;"
|
||||||
|
>
|
||||||
<div>
|
<div>
|
||||||
<br>
|
<br>
|
||||||
<div style="justify-content: center; display: flex;">
|
<div style="justify-content: center; display: flex;">
|
||||||
@ -123,9 +121,10 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
</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>
|
||||||
|
|
||||||
|
|
||||||
@ -222,6 +221,20 @@
|
|||||||
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.75})`;
|
||||||
|
}
|
||||||
|
|
||||||
|
window.addEventListener('resize', applyScale);
|
||||||
|
window.addEventListener('load', applyScale);
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user