Update Bootstrap 5.2 Theme V0.9

This commit is contained in:
g7sim 2023-07-25 19:35:23 +02:00
parent ba8abed664
commit 832601a0a5
9 changed files with 119 additions and 16 deletions

View file

@ -41,7 +41,9 @@ nav.nav-custom{
--bs-dropdown-link-active-bg: lightgray; /*! #0d6efd; */
}
@media only screen and ( max-width: 990px ) {
ul.navbar-nav{min-width:250px;}
}
/*! ----- search-button -----*/
div.input-group span.input-group-btn{
@ -53,3 +55,8 @@ div.input-group span.input-group-btn{
$footer-bg: $gray-300; /*! Standard */
footer.main-footer {
font-size: 0.875rem;
background: #dee2e6;
color: #212529;
}

View file

@ -39,8 +39,17 @@ nav.nav-custom{ background-image: linear-gradient(#f9fafb, #f8f9fa 60%, #e9eae
--bs-dropdown-link-active-bg: lightgray; /*! #0d6efd; */
}
@media only screen and ( max-width: 990px ) {
ul.navbar-nav{min-width:250px;}
}
/*! --- common footer-styles in _common/footer.scss ----- */
$footer-bg: $gray-300; /*! Standard */
footer.main-footer {
font-size: 0.875rem;
background: #dee2e6;
color: #212529;
}

View file

@ -31,7 +31,7 @@ nav.nav-custom {
color: dimgray;
}
@media only screen and ( min-width: 951px ) {
@media only screen and ( min-width: 991px ) {
nav.nav-custom {
ul:not(.submenu) a{color:white;}
ul.dropdown-menu a, ul.submenu a {color:dimgray;}
@ -40,8 +40,9 @@ nav.nav-custom {
color: white; }
}
@media only screen and ( max-width: 950px ) {
ul.navbar-nav{min-width:250px;}
@media only screen and ( max-width: 990px ) {
ul.navbar-nav{min-width:250px; background-color:white;}
div#offcanvasGp.offcanvas{background-color:#567baf;}
}
@ -64,4 +65,15 @@ div.input-group span.input-group-btn:hover {
}
/*! --- common footer-styles in _common/footer.scss ----- */
$footer-bg: #272727; /*! css - instead Standard */
span.login_link:before{color:white;}
span.sitemap_link a, span.login_link a{color:white;}
footer.main-footer {
font-size: 0.875rem;
background: #272727;
color: white;
}

View file

@ -32,7 +32,7 @@ nav.nav-custom {
color: dimgray;
}
@media only screen and ( min-width: 951px ) {
@media only screen and ( min-width: 991px ) {
nav.nav-custom {
ul:not(.submenu) a{color:white;}
ul.dropdown-menu a, ul.submenu a {color:dimgray;}
@ -41,8 +41,9 @@ nav.nav-custom {
color: white; }
}
@media only screen and ( max-width: 950px ) {
ul.navbar-nav{min-width:250px;}
@media only screen and ( max-width: 990px ) {
ul.navbar-nav{min-width:250px;background-color:white;}
div#offcanvasGp.offcanvas{background-color:#329932;}
}
.dropdown-item.active, .dropdown-item:active {
@ -60,4 +61,18 @@ ul.navbar-nav{min-width:250px;}
div.input-group span.input-group-btn:hover {
background-color: lightgreen;
}
}
/*! --- common footer-styles in _common/footer.scss ----- */
$footer-bg: #090909; /*! css - instead Standard */
span.login_link:before{color:white;}
span.sitemap_link a, span.login_link a{color:white;}
footer.main-footer {
font-size: 0.875rem;
background: #090909;
color: white;
}

View file

@ -1,6 +1,6 @@
Addon_Name = 'Boot5.3-offcan-mult'
;Addon_Unique_ID =
Addon_Version = 0.8
Addon_Version = 0.9
min_gpeasy_version = 5.2
[FrontEndFramework]

View file

@ -47,6 +47,8 @@ span.sitemap_link a, span.login_link a{text-decoration:none;}
ul.navbar-nav{ padding:15px;
border:1px lightgray solid;
border-radius:4px;}
.gpMenu #main-nav ul li{min-width:220px;}
div.gpMenu.gpArea_FullMenu.GPAREA > .navbar-nav{
border: 1px lightgray solid;

View file

@ -2,3 +2,62 @@
function externalLinks() { for(var c = document.getElementsByTagName("a"), a = 0;a < c.length;a++) { var b = c[a];
b.getAttribute("href") && b.hostname !== location.hostname && (b.rel = "nofollow noopener") } } ; externalLinks();
// menu -classes
//$( "div.gpMenu ul.dropdown-menu li a").addClass("dropdown-item");
//$( "div.gpMenu ul.navbar-nav li.nav-item a").addClass("nav-link");
$(document).ready(function() {
$("ul.navbar-nav > li > ul.dropdown-menu > li > ul.dropdown-menu").addClass("submenu");
});
document.addEventListener("DOMContentLoaded", function() {
var dropdownMenus = document.querySelectorAll("ul.navbar-nav > li > ul.dropdown-menu > li > ul.dropdown-menu");
for (var i = 0; i < dropdownMenus.length; i++) {
dropdownMenus[i].classList.add("submenu");
}
});
// Replace div.gpMenu ul.dropdown-menu li a with dropdown-item class
var dropdownItems = document.querySelectorAll("div.gpMenu ul.dropdown-menu li a");
for (var i = 0; i < dropdownItems.length; i++) {
dropdownItems[i].classList.add("dropdown-item");
}
// Replace div.gpMenu ul.navbar-nav li.nav-item a with nav-link class
var navLinks = document.querySelectorAll("div.gpMenu ul.navbar-nav li.nav-item a");
for (var i = 0; i < navLinks.length; i++) {
navLinks[i].classList.add("nav-link");
}
// JavaScript/jQuery code to handle dropdowns
document.addEventListener("DOMContentLoaded", function() {
var dropdownToggle = document.querySelector(".navbar .dropdown-toggle");
if (dropdownToggle) {
dropdownToggle.addEventListener("click", function(e) {
e.preventDefault();
var dropdownMenu = dropdownToggle.nextElementSibling;
if (dropdownMenu.style.display === "block") {
dropdownMenu.style.display = "none";
} else {
dropdownMenu.style.display = "block";
}
});
}
});
// (c) 2020-2022 Written by Simon Köhler in Panama
// github.com/koehlersimon
// simon-koehler.com
document.addEventListener('click',function(e){
// Hamburger menu
if(e.target.classList.contains('hamburger-toggle')){
e.target.children[0].classList.toggle('active');
}
})

View file

@ -21,6 +21,5 @@ $themeDir = dirname($page->theme_path);
//$page->head_js[] = $themeDir.'/assets/js/bootnavbar.js';
$page->head_js[] = $themeDir.'/assets/js/script.js';
$page->head_js[] = $themeDir.'/assets/js/init.js';

View file

@ -42,7 +42,7 @@ $lang = isset($page->lang) ? $page->lang : $config['language'];
</div>
<![endif]-->
<header class="section-header row text-center">
<div class="container col hd1">
<div class="container col p-2 hd1">
<?php echo common::Link('', $config['title'], '', 'class="navbar-brand"'); ?>
</div>
<div class="container col hd2">
@ -64,13 +64,13 @@ $lang = isset($page->lang) ? $page->lang : $config['language'];
<div class = 'offcanvas-header d-flex d-lg-none'>
<h5 class = 'offcanvas-title text-white' id = 'offcanvasLabel'>Navbar</h5>
<a href='#' class = 'text-reset p-0' data-bs-dismiss = 'offcanvas' aria-label = 'close'>
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-x-lg" viewBox="0 0 16 16">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-x-lg" viewBox="0 0 16 16"><style>svg{fill:white}</style>
<path d="M2.146 2.854a.5.5 0 1 1 .708-.708L8 7.293l5.146-5.147a.5.5 0 0 1 .708.708L8.707 8l5.147 5.146a.5.5 0 0 1-.708.708L8 8.707l-5.146 5.147a.5.5 0 0 1-.708-.708L7.293 8 2.146 2.854Z"/>
</svg>
</a> <!-- &#xF659; &#128473; &#10005; &#10006; -->
</div>
<div class="offcanvas-body sidebar pb-3 pb-lg-0" id="main_nav">
<div class="offcanvas-body sidebar pb-2 pb-lg-0" id="main_nav">
<?php
$GP_ARRANGE = false;
$GP_MENU_ELEMENTS = '';
@ -134,7 +134,7 @@ $lang = isset($page->lang) ? $page->lang : $config['language'];
</section>
</main><!-- /.main-content -->
<footer class="main-footer position-absolute bottom-0 mt-auto">
<footer class="main-footer position-absolute bottom-0 mt-auto p-2">
<div class="container">
<div class="row">