mirror of
				https://github.com/Frooodle/Stirling-PDF.git
				synced 2025-11-01 01:21:18 +01:00 
			
		
		
		
	Merge remote-tracking branch 'origin/main' into redesign
This commit is contained in:
		
						commit
						f203e07f55
					
				@ -190,6 +190,7 @@ Stirling PDF currently supports 27!
 | 
			
		||||
| Bulgarian (Български) (bg_BG)               |    |
 | 
			
		||||
| Sebian Latin alphabet (Srpski) (sr_LATN_RS) |    |
 | 
			
		||||
| Ukrainian (Українська) (uk_UA)              |    |
 | 
			
		||||
| Slovakian (Slovensky) (sk_SK)               |    |
 | 
			
		||||
 | 
			
		||||
## Contributing (creating issues, translations, fixing bugs, etc.)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -123,6 +123,11 @@ ignore = [
 | 
			
		||||
    'language.direction',
 | 
			
		||||
]
 | 
			
		||||
 | 
			
		||||
[sk_SK]
 | 
			
		||||
ignore = [
 | 
			
		||||
    'language.direction',
 | 
			
		||||
]
 | 
			
		||||
 | 
			
		||||
[sr_LATN_RS]
 | 
			
		||||
ignore = [
 | 
			
		||||
    'language.direction',
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										1064
									
								
								src/main/resources/messages_sk_SK.properties
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1064
									
								
								src/main/resources/messages_sk_SK.properties
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@ -11,23 +11,6 @@
 | 
			
		||||
  /* Adjust this to your desired max height */
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#searchForm {
 | 
			
		||||
  width: 200px;
 | 
			
		||||
  /* Adjust this value as needed */
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* Style the search results to match the navbar */
 | 
			
		||||
#searchResults {
 | 
			
		||||
  max-height: 200px;
 | 
			
		||||
  /* Adjust this value as needed */
 | 
			
		||||
  overflow-y: auto;
 | 
			
		||||
  width: 100%;
 | 
			
		||||
  max-width: 300px;
 | 
			
		||||
  /* Adjust to your preferred width */
 | 
			
		||||
  transition: height 0.3s ease;
 | 
			
		||||
  /* Smooth height transition */
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#searchResults .dropdown-item {
 | 
			
		||||
  display: flex;
 | 
			
		||||
  align-items: center;
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										9
									
								
								src/main/resources/static/images/flags/sk.svg
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								src/main/resources/static/images/flags/sk.svg
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,9 @@
 | 
			
		||||
<svg xmlns="http://www.w3.org/2000/svg" id="flag-icons-sk" viewBox="0 0 640 480">
 | 
			
		||||
  <path fill="#ee1c25" d="M0 0h640v480H0z"/>
 | 
			
		||||
  <path fill="#0b4ea2" d="M0 0h640v320H0z"/>
 | 
			
		||||
  <path fill="#fff" d="M0 0h640v160H0z"/>
 | 
			
		||||
  <path fill="#fff" d="M233 370.8c-43-20.7-104.6-61.9-104.6-143.2 0-81.4 4-118.4 4-118.4h201.3s3.9 37 3.9 118.4S276 350 233 370.8"/>
 | 
			
		||||
  <path fill="#ee1c25" d="M233 360c-39.5-19-96-56.8-96-131.4s3.6-108.6 3.6-108.6h184.8s3.5 34 3.5 108.6C329 303.3 272.5 341 233 360"/>
 | 
			
		||||
  <path fill="#fff" d="M241.4 209c10.7.2 31.6.6 50.1-5.6 0 0-.4 6.7-.4 14.4s.5 14.4.5 14.4c-17-5.7-38.1-5.8-50.2-5.7v41.2h-16.8v-41.2c-12-.1-33.1 0-50.1 5.7 0 0 .5-6.7.5-14.4 0-7.8-.5-14.4-.5-14.4 18.5 6.2 39.4 5.8 50 5.6v-25.9c-9.7 0-23.7.4-39.6 5.7 0 0 .5-6.6.5-14.4 0-7.7-.5-14.4-.5-14.4 15.9 5.3 29.9 5.8 39.6 5.7-.5-16.4-5.3-37-5.3-37s9.9.7 13.8.7c4 0 13.8-.7 13.8-.7s-4.8 20.6-5.3 37c9.7.1 23.7-.4 39.6-5.7 0 0-.5 6.7-.5 14.4 0 7.8.5 14.4.5 14.4a119 119 0 0 0-39.7-5.7v26z"/>
 | 
			
		||||
  <path fill="#0b4ea2" d="M233 263.3c-19.9 0-30.5 27.5-30.5 27.5s-6-13-22.2-13c-11 0-19 9.7-24.2 18.8 20 31.7 51.9 51.3 76.9 63.4 25-12 57-31.7 76.9-63.4-5.2-9-13.2-18.8-24.2-18.8-16.2 0-22.2 13-22.2 13S253 263.3 233 263.3"/>
 | 
			
		||||
</svg>
 | 
			
		||||
| 
		 After Width: | Height: | Size: 1.2 KiB  | 
@ -1,4 +1,3 @@
 | 
			
		||||
// Toggle search bar when the search icon is clicked
 | 
			
		||||
 | 
			
		||||
window.onload = function () {
 | 
			
		||||
  var items = document.querySelectorAll(".dropdown-item, .nav-link");
 | 
			
		||||
@ -28,43 +27,45 @@ window.onload = function () {
 | 
			
		||||
 | 
			
		||||
// Show search results as user types in search box
 | 
			
		||||
document.querySelector("#navbarSearchInput").addEventListener("input", function (e) {
 | 
			
		||||
  var searchText = e.target.value.toLowerCase();
 | 
			
		||||
  var searchText = e.target.value.trim().toLowerCase(); // Trim whitespace and convert to lowercase
 | 
			
		||||
  var items = document.querySelectorAll(".dropdown-item, .nav-link");
 | 
			
		||||
  var resultsBox = document.querySelector("#searchResults");
 | 
			
		||||
 | 
			
		||||
  // Clear any previous results
 | 
			
		||||
  resultsBox.innerHTML = "";
 | 
			
		||||
 | 
			
		||||
  if (searchText !== "") {
 | 
			
		||||
  items.forEach(function (item) {
 | 
			
		||||
    var titleElement = item.querySelector(".icon-text");
 | 
			
		||||
    var iconElement = item.querySelector(".material-symbols-rounded, .icon");
 | 
			
		||||
    var itemHref = item.getAttribute("href");
 | 
			
		||||
    var tags = item.getAttribute("data-bs-tags") || ""; // If no tags, default to empty string
 | 
			
		||||
 | 
			
		||||
    if (titleElement && iconElement && itemHref !== "#") {
 | 
			
		||||
      var title = titleElement.innerText;
 | 
			
		||||
      if (
 | 
			
		||||
        (title.toLowerCase().indexOf(searchText) !== -1 || tags.toLowerCase().indexOf(searchText) !== -1) &&
 | 
			
		||||
        !resultsBox.querySelector(`a[href="${item.getAttribute("href")}"]`)
 | 
			
		||||
      ) {
 | 
			
		||||
        var result = document.createElement("a");
 | 
			
		||||
        result.href = itemHref;
 | 
			
		||||
        result.classList.add("dropdown-item");
 | 
			
		||||
	
 | 
			
		||||
      if (titleElement && iconElement && itemHref !== "#") {
 | 
			
		||||
        var title = titleElement.innerText;
 | 
			
		||||
        if (
 | 
			
		||||
          (title.toLowerCase().indexOf(searchText) !== -1 || tags.toLowerCase().indexOf(searchText) !== -1) &&
 | 
			
		||||
          !resultsBox.querySelector(`a[href="${itemHref}"]`)
 | 
			
		||||
        ) {
 | 
			
		||||
          var result = document.createElement("a");
 | 
			
		||||
          result.href = itemHref;
 | 
			
		||||
          result.classList.add("dropdown-item");
 | 
			
		||||
 | 
			
		||||
        var resultIcon = document.createElement("span");
 | 
			
		||||
        resultIcon.classList.add("material-symbols-rounded");
 | 
			
		||||
        resultIcon.textContent = iconElement.textContent;
 | 
			
		||||
        result.appendChild(resultIcon);
 | 
			
		||||
 | 
			
		||||
        var resultText = document.createElement("span");
 | 
			
		||||
        resultText.textContent = title;
 | 
			
		||||
        resultText.classList.add("icon-text");
 | 
			
		||||
        result.appendChild(resultText);
 | 
			
		||||
          var resultText = document.createElement("span");
 | 
			
		||||
          resultText.textContent = title;
 | 
			
		||||
          resultText.classList.add("icon-text");
 | 
			
		||||
          result.appendChild(resultText);
 | 
			
		||||
 | 
			
		||||
        resultsBox.appendChild(result);
 | 
			
		||||
          resultsBox.appendChild(result);
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  });
 | 
			
		||||
    });
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  // Set the width of the search results box to the maximum width
 | 
			
		||||
  resultsBox.style.width = window.navItemMaxWidth + "px";
 | 
			
		||||
 | 
			
		||||
@ -17,6 +17,7 @@
 | 
			
		||||
                      <a class="dropdown-item lang_dropdown-item" href="" data-bs-language-code="pt_BR"> <img src="images/flags/pt_br.svg" alt="icon" width="20" height="15"> Português (BR)</a>
 | 
			
		||||
                      <a class="dropdown-item lang_dropdown-item" href="" data-bs-language-code="pt_PT"> <img src="images/flags/pt_pt.svg" alt="icon" width="20" height="15"> Português (PT)</a>
 | 
			
		||||
                      <a class="dropdown-item lang_dropdown-item" href="" data-bs-language-code="ro_RO"> <img src="images/flags/ro.svg" alt="icon" width="20" height="15"> Romanian</a>
 | 
			
		||||
                      <a class="dropdown-item lang_dropdown-item" href="" data-bs-language-code="sk_SK"> <img src="images/flags/sk.svg" alt="icon" width="20" height="15"> Slovensky</a>
 | 
			
		||||
                      <a class="dropdown-item lang_dropdown-item" href="" data-bs-language-code="sv_SE"> <img src="images/flags/se.svg" alt="icon" width="20" height="15"> Svenska</a>
 | 
			
		||||
                      <a class="dropdown-item lang_dropdown-item" href="" data-bs-language-code="tr_TR"> <img src="images/flags/tr.svg" alt="icon" width="20" height="15"> Türkçe</a>
 | 
			
		||||
                      <a class="dropdown-item lang_dropdown-item" href="" data-bs-language-code="ru_RU"> <img src="images/flags/ru.svg" alt="icon" width="20" height="15"> Русский</a>
 | 
			
		||||
 | 
			
		||||
@ -58,7 +58,11 @@
 | 
			
		||||
        console.log("loading pdf");
 | 
			
		||||
 | 
			
		||||
        document.querySelector("#editSection").style.display = "";
 | 
			
		||||
 | 
			
		||||
        
 | 
			
		||||
        const existingPreview = document.getElementById("pdf-preview");
 | 
			
		||||
        if (existingPreview) {
 | 
			
		||||
          existingPreview.remove();
 | 
			
		||||
        }
 | 
			
		||||
        var url = URL.createObjectURL(fileInput.files[0])
 | 
			
		||||
        pdfjsLib.GlobalWorkerOptions.workerSrc = 'pdfjs/pdf.worker.js'
 | 
			
		||||
        const pdf = await pdfjsLib.getDocument(url).promise;
 | 
			
		||||
 | 
			
		||||
@ -185,11 +185,6 @@ See https://github.com/adobe-type-tools/cmap-resources
 | 
			
		||||
        <div id="secondaryToolbar" class="secondaryToolbar hidden doorHangerRight">
 | 
			
		||||
            <div id="secondaryToolbarButtonContainer">
 | 
			
		||||
 | 
			
		||||
                <a id="secondaryBackToHome" class="secondaryToolbarButton visibleLargeView" title="Back to Main Page"
 | 
			
		||||
                   tabindex="50"
 | 
			
		||||
                   data-l10n-id="back_to_home" th:href="@{/}">
 | 
			
		||||
                    <span data-l10n-id="back_to_home_label">Back to Main Page</span>
 | 
			
		||||
                </a>
 | 
			
		||||
                <button id="secondaryOpenFile" class="secondaryToolbarButton visibleLargeView" title="Open File"
 | 
			
		||||
                        tabindex="51"
 | 
			
		||||
                        data-l10n-id="open_file">
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user