Skip to content

Commit

Permalink
Merge branch 'main' into paging-seal
Browse files Browse the repository at this point in the history
  • Loading branch information
hxlcw authored Aug 14, 2024
2 parents 3b8d726 + 503a1c9 commit 0ae163d
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 14 deletions.
6 changes: 5 additions & 1 deletion src/main/resources/static/css/footer.css
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,8 @@

.footer-icon {
font-size: 2rem;
}
}

.footer-link {
text-decoration: none;
}
14 changes: 7 additions & 7 deletions src/main/resources/templates/fragments/common.html
Original file line number Diff line number Diff line change
Expand Up @@ -81,19 +81,19 @@

// Find the file input within the form
var fileInput = $('input[type="file"]');

// Find the closest enclosing form of the file input
var form = fileInput.closest('form');

// Find the submit button within the form
var submitButton = form.find('button[type="submit"], input[type="submit"]');

const boredWaitingText = /*[[#{bored}]]*/ 'Bored Waiting?';
const downloadCompleteText = /*[[#{downloadComplete}]]*/ 'Download Complete';
window.downloadCompleteText = downloadCompleteText;
// Create the 'show-game-btn' button
var gameButton = $('<button type="button" class="btn btn-primary" id="show-game-btn" style="display:none;">' + boredWaitingText + '</button><br><br>');

// Insert the 'show-game-btn' just above the submit button
submitButton.before(gameButton);

Expand Down Expand Up @@ -147,14 +147,14 @@
<th:block th:fragment="fileSelector(name, multiple)" th:with="accept=${accept} ?: '*/*', inputText=${inputText} ?: #{pdfPrompt}, remoteCall=${remoteCall} ?: true, notRequired=${notRequired} ?: false">
<script th:inline="javascript">
const pdfPasswordPrompt = /*[[#{error.pdfPassword}]]*/ '';
const multiple = [[${multiple}]] || false;
const remoteCall = [[${remoteCall}]] || true;
const multiple = /*[[${multiple}]]*/ false;
const remoteCall = /*[[${remoteCall}]]*/ true;
</script>
<script th:src="@{'/js/downloader.js'}"></script>

<div class="custom-file-chooser" th:attr="data-bs-unique-id=${name}, data-bs-element-id=${name+'-input'}, data-bs-files-selected=#{filesSelected}, data-bs-pdf-prompt=#{pdfPrompt}">
<div class="mb-3">
<input type="file" class="form-control" th:name="${name}" th:id="${name}+'-input'" th:accept="${accept}" multiple th:required="${notRequired} ? null : 'required'">
<input type="file" class="form-control" th:name="${name}" th:id="${name}+'-input'" th:accept="${accept}" th:attr="multiple=${multiple}" th:required="${notRequired} ? null : 'required'">
</div>
<div class="selected-files"></div>
</div>
Expand Down
18 changes: 12 additions & 6 deletions src/main/resources/templates/fragments/footer.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
<footer th:fragment="footer" id="footer" class="text-center py-5">
<div class="footer-center">
<footer th:fragment="footer" id="footer" class="text-center pt-5">
<div class="footer-center pb-4">
<!-- Links section -->
<div class="d-flex justify-content-center">
<ul class="list-unstyled d-flex">
<li><a class="footer-link px-2" id="licenses" target="_blank" th:href="@{'/licenses'}" th:text="#{licenses.nav}">Licenses</a></li>
<li><a class="footer-link px-2" id="survey" target="_blank" href="https://stirlingpdf.info/s/clwzgtfw7000gltkmwz1n212m" th:text="#{survey.nav}">Survey</a></li>
</ul>
</div>

<!-- powered by section -->
<div class="footer-powered-by">
<span th:text="#{poweredBy} + ' Stirling PDF'"></span>
</div>
<a th:href="@{'/licenses'}" id="licenses" target="_blank" class="mx-1" title="" th:text="#{licenses.nav}">Licenses</a>
<a href="https://stirlingpdf.info/s/clwzgtfw7000gltkmwz1n212m" id="survey" target="_blank" class="mx-1" title="" th:text="#{survey.nav}">Survey</a>
</div>
</footer>

</footer>

0 comments on commit 0ae163d

Please sign in to comment.