Merge remote-tracking branch 'origin/v5.4.3' into pre543

# Conflicts:
#	assets/built/casper.js.map
#	assets/built/screen.css
#	assets/built/screen.css.map
#	assets/css/screen.css
#	assets/js/dropdown.js
#	default.hbs
#	package.json
This commit is contained in:
Aytac Kirmizi 2022-12-15 14:54:33 +01:00
commit 28bdf273f3
7 changed files with 2845 additions and 2823 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 it is too large Load Diff

View File

@ -1,81 +1,81 @@
(function () { (function () {
const mediaQuery = window.matchMedia('(max-width: 991px)'); const mediaQuery = window.matchMedia('(max-width: 767px)');
const menu = document.querySelector('.gh-head-menu'); const menu = document.querySelector('.gh-head-menu');
const nav = menu.querySelector('.nav'); const nav = menu.querySelector('.nav');
if (!nav) return; if (!nav) return;
const logo = document.querySelector('.gh-head-logo'); const logo = document.querySelector('.gh-head-logo');
const navHTML = nav.innerHTML; const navHTML = nav.innerHTML;
if (mediaQuery.matches) { if (mediaQuery.matches) {
const items = nav.querySelectorAll('li'); const items = nav.querySelectorAll('li');
items.forEach(function (item, index) { items.forEach(function (item, index) {
item.style.transitionDelay = 0.03 * (index + 1) + 's'; item.style.transitionDelay = 0.03 * (index + 1) + 's';
}); });
} }
const makeDropdown = function () { const makeDropdown = function () {
if (mediaQuery.matches) return; if (mediaQuery.matches) return;
const submenuItems = []; const submenuItems = [];
while ((nav.offsetWidth + 64) > menu.offsetWidth) { while ((nav.offsetWidth + 64) > menu.offsetWidth) {
if (nav.lastElementChild) { if (nav.lastElementChild) {
submenuItems.unshift(nav.lastElementChild); submenuItems.unshift(nav.lastElementChild);
nav.lastElementChild.remove(); nav.lastElementChild.remove();
} else { } else {
return; return;
} }
} }
if (!submenuItems.length) { if (!submenuItems.length) {
document.body.classList.add('is-dropdown-loaded'); document.body.classList.add('is-dropdown-loaded');
return; return;
} }
const toggle = document.createElement('button'); const toggle = document.createElement('button');
toggle.setAttribute('class', 'nav-more-toggle'); toggle.setAttribute('class', 'nav-more-toggle');
toggle.setAttribute('aria-label', 'More'); toggle.setAttribute('aria-label', 'More');
toggle.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" fill="currentColor"><path d="M21.333 16c0-1.473 1.194-2.667 2.667-2.667v0c1.473 0 2.667 1.194 2.667 2.667v0c0 1.473-1.194 2.667-2.667 2.667v0c-1.473 0-2.667-1.194-2.667-2.667v0zM13.333 16c0-1.473 1.194-2.667 2.667-2.667v0c1.473 0 2.667 1.194 2.667 2.667v0c0 1.473-1.194 2.667-2.667 2.667v0c-1.473 0-2.667-1.194-2.667-2.667v0zM5.333 16c0-1.473 1.194-2.667 2.667-2.667v0c1.473 0 2.667 1.194 2.667 2.667v0c0 1.473-1.194 2.667-2.667 2.667v0c-1.473 0-2.667-1.194-2.667-2.667v0z"></path></svg>'; toggle.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" fill="currentColor"><path d="M21.333 16c0-1.473 1.194-2.667 2.667-2.667v0c1.473 0 2.667 1.194 2.667 2.667v0c0 1.473-1.194 2.667-2.667 2.667v0c-1.473 0-2.667-1.194-2.667-2.667v0zM13.333 16c0-1.473 1.194-2.667 2.667-2.667v0c1.473 0 2.667 1.194 2.667 2.667v0c0 1.473-1.194 2.667-2.667 2.667v0c-1.473 0-2.667-1.194-2.667-2.667v0zM5.333 16c0-1.473 1.194-2.667 2.667-2.667v0c1.473 0 2.667 1.194 2.667 2.667v0c0 1.473-1.194 2.667-2.667 2.667v0c-1.473 0-2.667-1.194-2.667-2.667v0z"></path></svg>';
const wrapper = document.createElement('div'); const wrapper = document.createElement('div');
wrapper.setAttribute('class', 'gh-dropdown'); wrapper.setAttribute('class', 'gh-dropdown');
if (submenuItems.length >= 10) { if (submenuItems.length >= 10) {
document.body.classList.add('is-dropdown-mega'); document.body.classList.add('is-dropdown-mega');
wrapper.style.gridTemplateRows = 'repeat(' + Math.ceil(submenuItems.length / 2) + ', 1fr)'; wrapper.style.gridTemplateRows = 'repeat(' + Math.ceil(submenuItems.length / 2) + ', 1fr)';
} else { } else {
document.body.classList.remove('is-dropdown-mega'); document.body.classList.remove('is-dropdown-mega');
} }
submenuItems.forEach(function (child) { submenuItems.forEach(function (child) {
wrapper.appendChild(child); wrapper.appendChild(child);
}); });
toggle.appendChild(wrapper); toggle.appendChild(wrapper);
nav.appendChild(toggle); nav.appendChild(toggle);
document.body.classList.add('is-dropdown-loaded'); document.body.classList.add('is-dropdown-loaded');
toggle.addEventListener('click', function () { toggle.addEventListener('click', function () {
document.body.classList.toggle('is-dropdown-open'); document.body.classList.toggle('is-dropdown-open');
}); });
window.addEventListener('click', function (e) { window.addEventListener('click', 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');
} }
}); });
} }
imagesLoaded(logo, function () { imagesLoaded(logo, function () {
makeDropdown(); makeDropdown();
}); });
window.addEventListener('resize', function () { window.addEventListener('resize', function () {
setTimeout(function () { setTimeout(function () {
nav.innerHTML = navHTML; nav.innerHTML = navHTML;
makeDropdown(); makeDropdown();
}, 1); }, 1);
}); });
})(); })();

View File

@ -1,110 +1,113 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="{{@site.locale}}"{{#match @custom.color_scheme "Dark"}} class="dark-mode"{{else match @custom.color_scheme "Auto"}} class="auto-color"{{/match}}> <html lang="{{@site.locale}}"{{#match @custom.color_scheme "Dark"}} class="dark-mode"{{else match @custom.color_scheme "Auto"}} class="auto-color"{{/match}}>
<head> <head>
{{!-- Basic meta - advanced meta is output with {ghost_head} below --}} {{!-- Basic meta - advanced meta is output with {ghost_head} below --}}
<title>{{meta_title}}</title> <title>{{meta_title}}</title>
<meta charset="utf-8" /> <meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="HandheldFriendly" content="True" /> <meta name="HandheldFriendly" content="True" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
{{!-- Theme assets - use the {asset} helper to reference styles & scripts, {{!-- Theme assets - use the {asset} helper to reference styles & scripts,
this will take care of caching and cache-busting automatically --}} this will take care of caching and cache-busting automatically --}}
<link rel="stylesheet" type="text/css" href="{{asset "built/screen.css"}}" /> <link rel="stylesheet" type="text/css" href="{{asset "built/screen.css"}}" />
{{!-- This tag outputs all your advanced SEO meta, structured data, and other important settings, {{!-- This tag outputs all your advanced SEO meta, structured data, and other important settings,
it should always be the last tag before the closing head tag --}} it should always be the last tag before the closing head tag --}}
{{ghost_head}} {{ghost_head}}
</head> </head>
<body class="{{body_class}} is-head-{{#match @custom.navigation_layout "Logo on cover"}}left-logo{{else match @custom.navigation_layout "Logo in the middle"}}middle-logo{{else}}stacked{{/match}}{{#match @custom.title_font "=" "Elegant serif"}} has-serif-title{{/match}}{{#match @custom.body_font "=" "Modern sans-serif"}} has-sans-body{{/match}}{{#if @custom.show_publication_cover}} has-cover{{/if}}"> <body class="{{body_class}} is-head-{{#match @custom.navigation_layout "Logo on cover"}}left-logo{{else match @custom.navigation_layout "Logo in the middle"}}middle-logo{{else}}stacked{{/match}}{{#match @custom.title_font "=" "Elegant serif"}} has-serif-title{{/match}}{{#match @custom.body_font "=" "Modern sans-serif"}} has-sans-body{{/match}}{{#if @custom.show_publication_cover}} has-cover{{/if}}">
<div class="viewport"> <div class="viewport">
<header id="gh-head" class="gh-head outer"> <header id="gh-head" class="gh-head outer">
<div class="gh-head-inner inner"> <div class="gh-head-inner inner">
<div class="gh-head-brand"> <div class="gh-head-brand">
<a class="gh-head-logo" href="{{@site.url}}"> <a class="gh-head-logo" href="{{@site.url}}">
{{#if @site.logo}} {{#if @site.logo}}
<img src="{{@site.logo}}" alt="{{@site.title}}"> <img src="{{@site.logo}}" alt="{{@site.title}}">
{{else}} {{else}}
{{@site.title}} {{@site.title}}
{{/if}} {{/if}}
</a> </a>
<button class="gh-search gh-icon-btn" data-ghost-search>{{> "icons/search"}}</button> <button class="gh-search gh-icon-btn" data-ghost-search>{{> "icons/search"}}</button>
<button class="gh-burger"></button> <button class="gh-burger"></button>
</div> </div>
<nav class="gh-head-menu"> <nav class="gh-head-menu">
{{navigation}} {{navigation}}
{{#unless @site.members_enabled}} {{#unless @site.members_enabled}}
{{#match @custom.navigation_layout "Stacked"}} {{#match @custom.navigation_layout "Stacked"}}
<button class="gh-search gh-icon-btn" data-ghost-search>{{> "icons/search"}}</button> <button class="gh-search gh-icon-btn" data-ghost-search>{{> "icons/search"}}</button>
{{/match}} {{/match}}
{{/unless}} {{/unless}}
</nav> </nav>
<div class="gh-head-actions"> <div class="gh-head-actions">
{{#unless @site.members_enabled}} {{#unless @site.members_enabled}}
{{^match @custom.navigation_layout "Stacked"}} {{^match @custom.navigation_layout "Stacked"}}
<button class="gh-search gh-icon-btn" data-ghost-search>{{> "icons/search"}}</button> <button class="gh-search gh-icon-btn" data-ghost-search>{{> "icons/search"}}</button>
{{/match}} {{/match}}
{{else}} {{else}}
<button class="gh-search gh-icon-btn" data-ghost-search>{{> "icons/search"}}</button> <button class="gh-search gh-icon-btn" data-ghost-search>{{> "icons/search"}}</button>
{{#unless @member}} <div class="gh-head-members">
{{#unless @site.members_invite_only}} {{#unless @member}}
<a class="gh-head-button" href="#/portal/signup" data-portal="signup">Subscribe</a> {{#unless @site.members_invite_only}}
{{else}} <a class="gh-head-link" href="#/portal/signin" data-portal="signin">Sign in</a>
<a class="gh-head-button" href="#/portal/signin" data-portal="signin">Login</a> <a class="gh-head-button" href="#/portal/signup" data-portal="signup">Subscribe</a>
{{/unless}} {{else}}
{{else}} <a class="gh-head-button" href="#/portal/signin" data-portal="signin">Sign in</a>
<a class="gh-head-button" href="#/portal/account" data-portal="account">Account</a> {{/unless}}
{{/unless}} {{else}}
{{/unless}} <a class="gh-head-button" href="#/portal/account" data-portal="account">Account</a>
</div> {{/unless}}
</div> </div>
</header> {{/unless}}
</div>
<div class="site-content"> </div>
{{!-- All other templates get inserted here, index.hbs, post.hbs, etc --}} </header>
{{{body}}}
</div> <div class="site-content">
{{!-- All other templates get inserted here, index.hbs, post.hbs, etc --}}
{{!-- The global footer at the very bottom of the screen --}} {{{body}}}
<footer class="site-footer outer"> </div>
<div class="inner">
<section class="copyright"><a href="{{@site.url}}">{{@site.title}}</a> &copy; {{date format="YYYY"}}</section> {{!-- The global footer at the very bottom of the screen --}}
<nav class="site-footer-nav"> <footer class="site-footer outer">
{{navigation type="secondary"}} <div class="inner">
</nav> <section class="copyright"><a href="{{@site.url}}">{{@site.title}}</a> &copy; {{date format="YYYY"}}</section>
<div><a href="https://ghost.org/" target="_blank" rel="noopener">Powered by Ghost</a></div> <nav class="site-footer-nav">
</div> {{navigation type="secondary"}}
</footer> </nav>
<div><a href="https://ghost.org/" target="_blank" rel="noopener">Powered by Ghost</a></div>
</div> </div>
{{!-- /.viewport --}} </footer>
</div>
{{!-- Scripts - handle member signups, responsive videos, infinite scroll, floating headers, and galleries --}} {{!-- /.viewport --}}
<script
src="https://code.jquery.com/jquery-3.5.1.min.js"
integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" {{!-- Scripts - handle member signups, responsive videos, infinite scroll, floating headers, and galleries --}}
crossorigin="anonymous"> <script
</script> src="https://code.jquery.com/jquery-3.5.1.min.js"
<script src="{{asset "built/casper.js"}}"></script> integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0="
<script> crossorigin="anonymous">
$(document).ready(function () { </script>
// Mobile Menu Trigger <script src="{{asset "built/casper.js"}}"></script>
$('.gh-burger').click(function () { <script>
$('body').toggleClass('gh-head-open'); $(document).ready(function () {
}); // Mobile Menu Trigger
// FitVids - Makes video embeds responsive $('.gh-burger').click(function () {
$(".gh-content").fitVids(); $('body').toggleClass('gh-head-open');
}); });
</script> // FitVids - Makes video embeds responsive
$(".gh-content").fitVids();
{{!-- Ghost outputs required functional scripts with this tag - it should always be the last thing before the closing body tag --}} });
{{ghost_foot}} </script>
</body> {{!-- Ghost outputs required functional scripts with this tag - it should always be the last thing before the closing body tag --}}
</html> {{ghost_foot}}
</body>
</html>

View File

@ -1,179 +1,179 @@
{ {
"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.2", "version": "5.4.3",
"engines": { "engines": {
"ghost": ">=5.0.0" "ghost": ">=5.0.0"
}, },
"license": "MIT", "license": "MIT",
"screenshots": { "screenshots": {
"desktop": "assets/screenshot-desktop.jpg", "desktop": "assets/screenshot-desktop.jpg",
"mobile": "assets/screenshot-mobile.jpg" "mobile": "assets/screenshot-mobile.jpg"
}, },
"scripts": { "scripts": {
"dev": "gulp", "dev": "gulp",
"zip": "gulp zip", "zip": "gulp zip",
"test": "gscan .", "test": "gscan .",
"test:ci": "gscan --fatal --verbose .", "test:ci": "gscan --fatal --verbose .",
"pretest": "gulp build", "pretest": "gulp build",
"preship": "yarn test", "preship": "yarn test",
"ship": "STATUS=$(git status --porcelain); echo $STATUS; if [ -z \"$STATUS\" ]; then yarn version && git push --follow-tags; else echo \"Uncomitted changes found.\" && exit 1; fi", "ship": "STATUS=$(git status --porcelain); echo $STATUS; if [ -z \"$STATUS\" ]; then yarn version && git push --follow-tags; else echo \"Uncomitted changes found.\" && exit 1; fi",
"postship": "git fetch && gulp release" "postship": "git fetch && gulp release"
}, },
"author": { "author": {
"name": "Ghost Foundation", "name": "Ghost Foundation",
"email": "hello@ghost.org", "email": "hello@ghost.org",
"url": "https://ghost.org/" "url": "https://ghost.org/"
}, },
"gpm": { "gpm": {
"type": "theme", "type": "theme",
"categories": [ "categories": [
"Minimal", "Minimal",
"Magazine" "Magazine"
] ]
}, },
"keywords": [ "keywords": [
"ghost", "ghost",
"theme", "theme",
"ghost-theme" "ghost-theme"
], ],
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/TryGhost/Casper.git" "url": "https://github.com/TryGhost/Casper.git"
}, },
"bugs": "https://github.com/TryGhost/Casper/issues", "bugs": "https://github.com/TryGhost/Casper/issues",
"contributors": "https://github.com/TryGhost/Casper/graphs/contributors", "contributors": "https://github.com/TryGhost/Casper/graphs/contributors",
"devDependencies": { "devDependencies": {
"@tryghost/release-utils": "0.8.1", "@tryghost/release-utils": "0.8.1",
"autoprefixer": "10.4.7", "autoprefixer": "10.4.7",
"beeper": "2.1.0", "beeper": "2.1.0",
"cssnano": "5.1.12", "cssnano": "5.1.12",
"gscan": "4.34.0", "gscan": "4.34.0",
"gulp": "4.0.2", "gulp": "4.0.2",
"gulp-concat": "2.6.1", "gulp-concat": "2.6.1",
"gulp-livereload": "4.0.2", "gulp-livereload": "4.0.2",
"gulp-postcss": "9.0.1", "gulp-postcss": "9.0.1",
"gulp-uglify": "3.0.2", "gulp-uglify": "3.0.2",
"gulp-zip": "5.1.0", "gulp-zip": "5.1.0",
"inquirer": "8.2.4", "inquirer": "8.2.4",
"postcss": "8.2.13", "postcss": "8.2.13",
"postcss-color-mod-function": "3.0.3", "postcss-color-mod-function": "3.0.3",
"postcss-easy-import": "4.0.0", "postcss-easy-import": "4.0.0",
"pump": "3.0.0" "pump": "3.0.0"
}, },
"browserslist": [ "browserslist": [
"defaults" "defaults"
], ],
"config": { "config": {
"posts_per_page": 25, "posts_per_page": 25,
"image_sizes": { "image_sizes": {
"xxs": { "xxs": {
"width": 30 "width": 30
}, },
"xs": { "xs": {
"width": 100 "width": 100
}, },
"s": { "s": {
"width": 300 "width": 300
}, },
"m": { "m": {
"width": 600 "width": 600
}, },
"l": { "l": {
"width": 1000 "width": 1000
}, },
"xl": { "xl": {
"width": 2000 "width": 2000
} }
}, },
"card_assets": true, "card_assets": true,
"custom": { "custom": {
"navigation_layout": { "navigation_layout": {
"type": "select", "type": "select",
"options": [ "options": [
"Logo on cover", "Logo on cover",
"Logo in the middle", "Logo in the middle",
"Stacked" "Stacked"
], ],
"default": "Logo on cover" "default": "Logo on cover"
}, },
"title_font": { "title_font": {
"type": "select", "type": "select",
"options": [ "options": [
"Modern sans-serif", "Modern sans-serif",
"Elegant serif" "Elegant serif"
], ],
"default": "Modern sans-serif" "default": "Modern sans-serif"
}, },
"body_font": { "body_font": {
"type": "select", "type": "select",
"options": [ "options": [
"Modern sans-serif", "Modern sans-serif",
"Elegant serif" "Elegant serif"
], ],
"default": "Elegant serif" "default": "Elegant serif"
}, },
"show_publication_cover": { "show_publication_cover": {
"type": "boolean", "type": "boolean",
"default": true, "default": true,
"group": "homepage" "group": "homepage"
}, },
"header_style": { "header_style": {
"type": "select", "type": "select",
"options": [ "options": [
"Center aligned", "Center aligned",
"Left aligned", "Left aligned",
"Hidden" "Hidden"
], ],
"default": "Center aligned", "default": "Center aligned",
"group": "homepage" "group": "homepage"
}, },
"feed_layout": { "feed_layout": {
"type": "select", "type": "select",
"options": [ "options": [
"Classic", "Classic",
"Grid", "Grid",
"List" "List"
], ],
"default": "Classic", "default": "Classic",
"group": "homepage" "group": "homepage"
}, },
"color_scheme": { "color_scheme": {
"type": "select", "type": "select",
"options": [ "options": [
"Light", "Light",
"Dark", "Dark",
"Auto" "Auto"
], ],
"default": "Light" "default": "Light"
}, },
"post_image_style": { "post_image_style": {
"type": "select", "type": "select",
"options": [ "options": [
"Wide", "Wide",
"Full", "Full",
"Small", "Small",
"Hidden" "Hidden"
], ],
"default": "Wide", "default": "Wide",
"group": "post" "group": "post"
}, },
"email_signup_text": { "email_signup_text": {
"type": "text", "type": "text",
"default": "Sign up for more like this.", "default": "Sign up for more like this.",
"group": "post" "group": "post"
}, },
"show_recent_posts_footer": { "show_recent_posts_footer": {
"type": "boolean", "type": "boolean",
"default": true, "default": true,
"group": "post" "group": "post"
} }
} }
}, },
"renovate": { "renovate": {
"extends": [ "extends": [
"@tryghost:theme" "@tryghost:theme"
] ]
} }
} }