Merge remote-tracking branch 'origin/v5.4.9' into v5.4.9

# Conflicts:
#	assets/built/casper.js.map
#	assets/built/screen.css
#	assets/built/screen.css.map
#	assets/css/screen.css
#	assets/js/dropdown.js
#	package.json
This commit is contained in:
Aytac Kirmizi 2023-04-11 11:41:57 +02:00
commit d1595f421a
7 changed files with 90 additions and 99 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -2285,12 +2285,6 @@ html.dark-mode .footer-cta-title {
color: #fff; color: #fff;
} }
@media (max-width: 767px) {
html.dark-mode .gh-head-open #gh-head .gh-head-actions {
background-color: var(--color-darkmode);
}
}
@media (prefers-color-scheme: dark) { @media (prefers-color-scheme: dark) {
html.auto-color body { html.auto-color body {
color: rgba(255, 255, 255, 0.75); color: rgba(255, 255, 255, 0.75);
@ -2475,12 +2469,6 @@ html.dark-mode .footer-cta-title {
html.auto-color .footer-cta-title { html.auto-color .footer-cta-title {
color: #fff; color: #fff;
} }
@media (max-width: 767px) {
html.auto-color .gh-head-open #gh-head .gh-head-actions {
background-color: var(--color-darkmode);
}
}
} }
/* /*

View File

@ -16,6 +16,7 @@
}); });
} }
var windowClickListener;
const makeDropdown = function () { const makeDropdown = function () {
if (mediaQuery.matches) return; if (mediaQuery.matches) return;
const submenuItems = []; const submenuItems = [];
@ -62,11 +63,12 @@
document.body.classList.toggle('is-dropdown-open'); document.body.classList.toggle('is-dropdown-open');
}); });
window.addEventListener('click', function (e) { windowClickListener = function (e) {
if (!toggle.contains(e.target) && document.body.classList.contains('is-dropdown-open')) { if (!toggle.contains(e.target) && document.body.classList.contains('is-dropdown-open')) {
document.body.classList.remove('is-dropdown-open'); document.body.classList.remove('is-dropdown-open');
} }
}); };
window.addEventListener('click', windowClickListener);
} }
imagesLoaded(head, function () { imagesLoaded(head, function () {
@ -75,6 +77,7 @@
window.addEventListener('resize', function () { window.addEventListener('resize', function () {
setTimeout(function () { setTimeout(function () {
window.removeEventListener('click', windowClickListener);
nav.innerHTML = navHTML; nav.innerHTML = navHTML;
makeDropdown(); makeDropdown();
}, 1); }, 1);

View File

@ -2,7 +2,7 @@
"name": "casper-aytac", "name": "casper-aytac",
"description": "A clean, minimal default theme for the Ghost publishing platform with little modifications by Aytac", "description": "A clean, minimal default theme for the Ghost publishing platform with little modifications by Aytac",
"demo": "https://aytac.kirmizi.online", "demo": "https://aytac.kirmizi.online",
"version": "5.4.8", "version": "5.4.9",
"engines": { "engines": {
"ghost": ">=5.0.0" "ghost": ">=5.0.0"
}, },