mirror of
https://github.com/Frooodle/Stirling-PDF.git
synced 2025-09-08 17:51:20 +02:00
added chevrons and fixed some scaling issues caused by bootstrap
This commit is contained in:
parent
ad52ef641f
commit
bceda80df3
@ -10,7 +10,6 @@ import java.util.Properties;
|
||||
import java.util.function.Predicate;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingClass;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
@ -151,9 +150,8 @@ public class AppConfig {
|
||||
@Bean(name = "activeSecurity")
|
||||
public boolean missingActiveSecurity() {
|
||||
return ClassUtils.isPresent(
|
||||
"stirling.software.proprietary.security.configuration.SecurityConfiguration",
|
||||
this.getClass().getClassLoader()
|
||||
);
|
||||
"stirling.software.proprietary.security.configuration.SecurityConfiguration",
|
||||
this.getClass().getClassLoader());
|
||||
}
|
||||
|
||||
@Bean(name = "directoryFilter")
|
||||
|
@ -453,6 +453,7 @@ html[dir="ltr"] .dropdown-menu {
|
||||
top: auto;
|
||||
left: auto;
|
||||
right: 0;
|
||||
transform: scale(1) !important;
|
||||
}
|
||||
|
||||
html[dir="rtl"] .dropdown-menu {
|
||||
@ -460,6 +461,7 @@ html[dir="rtl"] .dropdown-menu {
|
||||
top: auto;
|
||||
left: 0;
|
||||
right: auto;
|
||||
transform: scale(1) !important;
|
||||
}
|
||||
|
||||
/* Bootstrap Popper positioning overrides removed - dropdowns now position naturally relative to their buttons */
|
||||
@ -484,27 +486,37 @@ html[dir="rtl"] .dropdown-menu {
|
||||
display: inline-flex;
|
||||
}
|
||||
|
||||
@media (min-width:992px) {
|
||||
.dropdown:hover .dropdown-menu {
|
||||
display: block;
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
/* .icon-hide {
|
||||
display: none;
|
||||
} */
|
||||
}
|
||||
|
||||
@media (max-width:1199px) {
|
||||
.icon-hide {
|
||||
display: inline-flex;
|
||||
}
|
||||
.nav-link .chevron-icon {
|
||||
display: inline-flex !important;
|
||||
margin-left: auto;
|
||||
}
|
||||
.dropdown-mega .dropdown-menu.show {
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
left: 0;
|
||||
}
|
||||
.dropdown-mega .dropdown-menu.show .dropdown-menu-wrapper {
|
||||
width: 100%;
|
||||
height: 60vh;
|
||||
overflow-y: auto;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width:1200px) {
|
||||
.dropdown:hover .dropdown-menu {
|
||||
display: block;
|
||||
margin-top: 0;
|
||||
}
|
||||
.icon-hide {
|
||||
display: none;
|
||||
}
|
||||
.nav-link .chevron-icon {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
.go-pro-link {
|
||||
@ -634,19 +646,10 @@ html[dir="rtl"] .dropdown-menu {
|
||||
}
|
||||
|
||||
.update-notice {
|
||||
animation: scale 1s infinite alternate;
|
||||
}
|
||||
|
||||
@keyframes scale {
|
||||
0% {
|
||||
transform: scale(0.96);
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: scale(1);
|
||||
}
|
||||
font-size: 0.8em;
|
||||
animation: Pulse 2s infinite;
|
||||
}
|
||||
|
||||
.hidden {
|
||||
visibility: hidden;
|
||||
display: none !important;
|
||||
}
|
||||
|
@ -42,6 +42,35 @@ function toolsManager() {
|
||||
});
|
||||
}
|
||||
|
||||
function initializeChevrons() {
|
||||
// Find all nav items that have nested content (Tools, Favorites, etc.)
|
||||
document.querySelectorAll('.nav-item').forEach(item => {
|
||||
const nestedContent = item.querySelector('ul, .dropdown-content');
|
||||
if (nestedContent) {
|
||||
// Add has-dropdown class to parent
|
||||
item.classList.add('has-dropdown');
|
||||
|
||||
// Add chevron if it doesn't exist
|
||||
const link = item.querySelector('a');
|
||||
if (link && !item.querySelector('.sidebar-chevron')) {
|
||||
const chevron = document.createElement('i');
|
||||
chevron.className = 'bi bi-chevron-down sidebar-chevron';
|
||||
link.appendChild(chevron);
|
||||
}
|
||||
|
||||
// Toggle chevron and content on click
|
||||
const chevron = item.querySelector('.sidebar-chevron');
|
||||
if (chevron) {
|
||||
item.addEventListener('click', (e) => {
|
||||
const isExpanded = nestedContent.classList.contains('show');
|
||||
chevron.classList.toggle('expanded', !isExpanded);
|
||||
// The actual toggling of the content should be handled by your existing dropdown logic
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
window.tooltipSetup = () => {
|
||||
const tooltipElements = document.querySelectorAll('[title]');
|
||||
|
||||
@ -75,4 +104,5 @@ window.tooltipSetup = () => {
|
||||
};
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
tooltipSetup();
|
||||
initializeChevrons();
|
||||
});
|
||||
|
@ -45,6 +45,7 @@
|
||||
apps
|
||||
</span>
|
||||
<span class="icon-text" th:data-text="#{navbar.allTools}" th:text="#{navbar.allTools}"></span>
|
||||
<span class="material-symbols-rounded chevron-icon">expand_more</span>
|
||||
</a>
|
||||
<div class="dropdown-menu dropdown-menu-tp" aria-labelledby="navbarDropdown-1">
|
||||
<div class="dropdown-menu-wrapper" style="justify-content: center; display:flex">
|
||||
@ -117,6 +118,7 @@
|
||||
star
|
||||
</span>
|
||||
<span class="icon-text icon-hide" th:data-text="#{navbar.favorite}" th:text="#{navbar.favorite}"></span>
|
||||
<span class="material-symbols-rounded chevron-icon">expand_more</span>
|
||||
</a>
|
||||
<div class="dropdown-menu dropdown-menu-tp dropdown-mw-28" aria-labelledby="navbarDropdown-5">
|
||||
<div class="dropdown-menu-wrapper px-xl-2 px-2" id="favoritesDropdown">
|
||||
@ -140,6 +142,7 @@
|
||||
language
|
||||
</span>
|
||||
<span class="icon-text icon-hide" th:data-text="#{navbar.language}" th:text="#{navbar.language}"></span>
|
||||
<span class="material-symbols-rounded chevron-icon">expand_more</span>
|
||||
</a>
|
||||
<div class="dropdown-menu dropdown-menu-tp" aria-labelledby="languageDropdown">
|
||||
<div class="dropdown-menu-wrapper px-xl-2 px-2">
|
||||
@ -157,6 +160,7 @@
|
||||
search
|
||||
</span>
|
||||
<span class="icon-text icon-hide">Search</span>
|
||||
<span class="material-symbols-rounded chevron-icon">expand_more</span>
|
||||
</a>
|
||||
<div class="dropdown-menu dropdown-menu-tp" aria-labelledby="searchDropdown">
|
||||
<div class="dropdown-menu-wrapper px-xl-2 px-2">
|
||||
|
Loading…
Reference in New Issue
Block a user