chore: slim excess theme options

This commit is contained in:
Tom Vines 2025-08-03 18:48:15 +10:00
parent 1c83849899
commit 1f42e05396
Signed by: dragonwocky
SSH Key Fingerprint: SHA256:vCxDSu/DvGebbNiQjCVzOuxKmT8ODOzaLx+dTRtawyk
25 changed files with 52 additions and 133 deletions

View File

@ -1,6 +1,6 @@
{{!< default}}
{{#author}}
<div class="archive-section{{#if profile_image}} is-image{{/if}}{{>partial_mode}}">
<div class="archive-section{{#if profile_image}} is-image{{/if}}">
{{#if profile_image}}
<div class="archive-image global-image">
{{>images/other_image other_image=profile_image alt=name}}

View File

@ -1,7 +1,7 @@
{{!< default}}
{{#post}}
{{#if @member.paid}}
<div class="account-section{{>partial_mode}}">
<div class="account-section">
<div class="account-header archive-section is-image">
<div class="account-image archive-image global-image">
{{>icons/site/user}}
@ -75,7 +75,7 @@
{{/if}}
{{/get}}
{{else if @member}}
<div class="account-section{{>partial_mode}}">
<div class="account-section">
<div class="account-header archive-section is-image">
<div class="account-image archive-image global-image">
{{>icons/site/user}}

View File

@ -1,6 +1,6 @@
{{!< default}}
{{#post}}
<div class="archive-section{{>partial_mode}}">
<div class="archive-section">
<h1 class="global-title">{{title}}</h1>
{{#if custom_excerpt}}
<p class="archive-excerpt global-excerpt">{{custom_excerpt}}</p>

View File

@ -1,6 +1,6 @@
{{!< default-custom}}
{{#post}}
<div class="custom-wrap{{>partial_mode}}">
<div class="custom-wrap">
{{#if feature_image}}
<div class="custom-image global-bg-image" style="background-image: url({{{img_url feature_image size="l" format="webp"}}})"></div>
{{/if}}
@ -11,7 +11,7 @@
</div>
</div>
<div class="custom-content">
<form method="POST" action="{{@custom.contact_form_endpoint}}">
<form method="POST" action="">
<h1 class="custom-title global-title">{{title}}</h1>
<input type="text" name="name" placeholder="{{t "Your name"}}" aria-label="{{t "Your name"}}" required>
<input type="email" name="email" placeholder="{{t "Your email address"}}" aria-label="{{t "Your email address"}}" required>

View File

@ -1,6 +1,6 @@
{{!< default-custom}}
{{#post}}
<div class="custom-wrap{{>partial_mode}}">
<div class="custom-wrap">
{{#if feature_image}}
<div class="custom-image global-bg-image" style="background-image: url({{{img_url feature_image size="l" format="webp"}}})"></div>
{{/if}}

View File

@ -1,6 +1,6 @@
{{!< default-custom}}
{{#post}}
<div class="custom-wrap{{>partial_mode}}">
<div class="custom-wrap">
{{#if feature_image}}
<div class="custom-image global-bg-image" style="background-image: url({{{img_url feature_image size="l" format="webp"}}})"></div>
{{/if}}

View File

@ -1,6 +1,6 @@
{{!< default-custom}}
{{#post}}
<div class="custom-wrap{{>partial_mode}}">
<div class="custom-wrap">
{{#if feature_image}}
<div class="custom-image global-bg-image" style="background-image: url({{{img_url feature_image size="l" format="webp"}}})"></div>
{{/if}}

View File

@ -1,6 +1,6 @@
{{!< default}}
{{#post}}
<div class="archive-section{{>partial_mode}}">
<div class="archive-section">
<h1 class="global-title">{{title}}</h1>
{{#if custom_excerpt}}
<p class="archive-excerpt global-excerpt">{{custom_excerpt}}</p>

View File

@ -1,5 +1,5 @@
<!DOCTYPE html>
<html lang="{{@site.locale}}"{{#match @custom.color_scheme "Dark"}} class="dark-mode"{{else match @custom.color_scheme "Auto: Light/Dark"}} class="auto-dark-mode"{{else match @custom.color_scheme "Partial Dark"}} class="partial-dark-mode"{{else match @custom.color_scheme "Auto: Partial Dark/Dark"}} class="auto-partial-dark-mode"{{/match}}>
<html lang="{{@site.locale}}"{{#match @custom.color_scheme "Dark"}} class="dark-mode"{{else match @custom.color_scheme "Light/Dark"}} class="light-dark-mode"{{/match}}>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
@ -10,11 +10,8 @@
<link rel="stylesheet" type="text/css" href="{{asset "css/screen.css"}}">
{{{block "fonts_css"}}}
{{ghost_head}}
{{#if @custom.global_background_color_in_hex_string}}
<style>:root {--ghost-bg-color: {{@custom.global_background_color_in_hex_string}};}</style>
{{/if}}
</head>
<body class="{{body_class}} custom-page{{#if @custom.accent_color_buttons}} global-accent-color-buttons{{/if}}">
<body class="{{body_class}} custom-page global-accent-color-buttons">
{{{body}}}
{{ghost_foot}}
</body>

View File

@ -1,5 +1,5 @@
<!DOCTYPE html>
<html lang="{{@site.locale}}"{{#match @custom.color_scheme "Dark"}} class="dark-mode"{{else match @custom.color_scheme "Auto: Light/Dark"}} class="auto-dark-mode"{{else match @custom.color_scheme "Partial Dark"}} class="partial-dark-mode"{{else match @custom.color_scheme "Auto: Partial Dark/Dark"}} class="auto-partial-dark-mode"{{/match}}>
<html lang="{{@site.locale}}"{{#match @custom.color_scheme "Dark"}} class="dark-mode"{{else match @custom.color_scheme "Light/Dark"}} class="light-dark-mode"{{/match}}>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
@ -10,11 +10,8 @@
<link rel="stylesheet" type="text/css" href="{{asset "css/screen.css"}}">
{{{block "fonts_css"}}}
{{ghost_head}}
{{#if @custom.global_background_color_in_hex_string}}
<style>:root {--ghost-bg-color: {{@custom.global_background_color_in_hex_string}};}</style>
{{/if}}
</head>
<body class="{{body_class}}{{#if @custom.accent_color_buttons}} global-accent-color-buttons{{/if}}">
<body class="{{body_class}} global-accent-color-buttons">
<div class="global-wrap">
<div class="global-content">
{{>header}}

View File

@ -1,5 +1,5 @@
{{!< default}}
<div class="custom-error custom-wrap{{>partial_mode}}">
<div class="custom-error custom-wrap">
<div class="custom-container">
<div class="custom-error-content custom-content">
<h1>{{statusCode}}</h1>

View File

@ -12,7 +12,7 @@
"ghost-theme"
],
"scripts": {
"build": "rm -f basho-2.6.3+2560.zip && zip -r basho-2.6.3+2560.zip * -x '*.git*' 'documentation*'"
"build": "rm -f basho-2.6.3+2506.zip && zip -r basho-2.6.3+2506.zip * -x '*.git*' 'documentation*'"
},
"config": {
"posts_per_page": 6,
@ -34,85 +34,24 @@
"custom": {
"color_scheme": {
"type": "select",
"options": ["Light", "Dark", "Partial Dark", "Auto: Light/Dark", "Auto: Partial Dark/Dark" ],
"default": "Light"
},
"logo_for_dark_color_scheme": {
"type": "image",
"visibility": "color_scheme:[Dark,'Partial Dark','Auto: Light/Dark','Auto: Partial Dark/Dark']"
},
"global_background_color_in_hex_string": {
"type": "text"
"options": ["Light/Dark", "Light", "Dark" ],
"default": "Light/Dark"
},
"fonts": {
"type": "select",
"options": ["System fonts", "Archivo + System fonts", "Bona Nova + Inter", "EB Garamond + Inter", "Inter", "Lato", "Lora + System fonts", "Nunito", "Oswald + Roboto", "Playfair + System fonts", "Poppins + Inter", "Raleway + System fonts", "Roboto", "Space Grotesk + Inter", "Sora + Inter", "Syne + Inter", "Work Sans + Inter"],
"default": "Inter"
},
"show_author": {
"type": "boolean",
"default": true,
"description": "Set to false if you dont want to display the author in the feed or on the post page"
},
"accent_color_buttons": {
"type": "boolean",
"default": true
},
"feed_images_orientation": {
"feature_image_shape": {
"type": "select",
"options": ["Portrait", "Landscape", "Square", "Natural"],
"default": "Portrait"
},
"special_section_images_orientation": {
"type": "select",
"options": ["Portrait", "Landscape", "Square", "Natural"],
"default": "Portrait"
},
"content_api_key_for_search": {
"type": "text"
},
"contact_form_endpoint": {
"type": "text"
},
"footer_copyright": {
"type": "text"
},
"hero_title_size_and_subscription_form_or_button": {
"type": "select",
"options": ["Large", "Medium", "Small", "Large + Subscription form", "Medium + Subscription form", "Small + Subscription form", "Large + Subscription button", "Medium + Subscription button", "Small + Subscription button"],
"default": "Large",
"group": "homepage"
},
"hero_title_text": {
"type": "text",
"group": "homepage"
},
"slider_size": {
"type": "select",
"options": ["Large", "Small"],
"default": "Small",
"group": "homepage"
},
"slider_images_orientation": {
"type": "select",
"options": ["Portrait", "Landscape", "Square", "Natural"],
"default": "Portrait",
"group": "homepage"
},
"tags_for_special_section": {
"type": "text",
"group": "homepage",
"description": "Provide the tag (or tags) slug you want to display in the section below the 'Load more' button"
},
"feature_image_orientation": {
"type": "select",
"options": ["Portrait", "Landscape", "Square", "Natural"],
"default": "Portrait",
"group": "post"
},
"disqus_shortname": {
"type": "text",
"group": "post"
"content_api_key": {
"type": "text"
}
}
}

View File

@ -1,4 +1,4 @@
<footer class="footer-section global-footer{{>partial_mode}}">
<footer class="footer-section global-footer">
<div class="footer-wrap global-padding">
{{>members/subscribe_form}}
<div class="footer-container">

View File

@ -1,7 +1,7 @@
<header class="header-section{{>partial_mode}}">
<header class="header-section">
<div class="header-wrap global-padding">
<div class="header-logo">{{>logo}}</div>
<div class="header-nav{{#if @custom.accent_color_buttons}} is-button-accent-color{{/if}}">
<div class="header-nav is-button-accent-color">
{{>search is_mobile=true}}
<input id="toggle" class="header-checkbox" type="checkbox">
<label class="header-toggle" for="toggle">

View File

@ -1,7 +1,7 @@
<div class="hero-section{{#get "posts" limit="1" filter="featured:true+feature_image:-null" as |slider|}}{{^if slider}} no-slider{{/if}}{{/get}}{{>partial_mode}}">
<div class="hero-section{{#get "posts" limit="1" filter="featured:true+feature_image:-null" as |slider|}}{{^if slider}} no-slider{{/if}}{{/get}}">
<div class="hero-wrap">
<div class="hero-content global-padding">
<h1 class="hero-title{{#match @custom.hero_title_size_and_subscription_form_or_button "Medium"}} hero-title-medium{{else match @custom.hero_title_size_and_subscription_form_or_button "Small"}} global-title hero-title-small{{else match @custom.hero_title_size_and_subscription_form_or_button "Medium + Subscription form"}} hero-title-medium{{else match @custom.hero_title_size_and_subscription_form_or_button "Small + Subscription form"}} global-title hero-title-small{{else match @custom.hero_title_size_and_subscription_form_or_button "Medium + Subscription button"}} hero-title-medium{{else match @custom.hero_title_size_and_subscription_form_or_button "Small + Subscription button"}} global-title hero-title-small{{else}} hero-title-large{{/match}}">{{#if @custom.hero_title_text}}{{{@custom.hero_title_text}}}{{else}}{{{t "{start-bold}Hey, were {site-title}.{end-bold} See our thoughts, stories and ideas." start-bold="<span>" end-bold="</span>" site-title=@site.title}}}{{/if}}</h1>
{{!-- <h1 class="hero-title{{#match @custom.hero_title_size_and_subscription_form_or_button "Medium"}} hero-title-medium{{else match @custom.hero_title_size_and_subscription_form_or_button "Small"}} global-title hero-title-small{{else match @custom.hero_title_size_and_subscription_form_or_button "Medium + Subscription form"}} hero-title-medium{{else match @custom.hero_title_size_and_subscription_form_or_button "Small + Subscription form"}} global-title hero-title-small{{else match @custom.hero_title_size_and_subscription_form_or_button "Medium + Subscription button"}} hero-title-medium{{else match @custom.hero_title_size_and_subscription_form_or_button "Small + Subscription button"}} global-title hero-title-small{{else}} hero-title-large{{/match}}">{{#if @custom.hero_title_text}}{{{@custom.hero_title_text}}}{{else}}{{{t "{start-bold}Hey, were {site-title}.{end-bold} See our thoughts, stories and ideas." start-bold="<span>" end-bold="</span>" site-title=@site.title}}}{{/if}}</h1>
{{#if @site.members_enabled}}
{{#match @custom.hero_title_size_and_subscription_form_or_button "Large + Subscription form"}}
{{>members/subscribe_form is_hero=true}}
@ -17,7 +17,7 @@
{{>members/subscribe_button}}
{{else match @custom.hero_title_size_and_subscription_form_or_button "Small + Subscription button"}}
{{>members/subscribe_button}}
{{/match}}
{{/match}} --}}
</div>
{{>featured}}
</div>

View File

@ -1,11 +1,11 @@
<article class="item{{#if is_loop}} is-loop{{else if is_featured}} is-featured{{#match @custom.slider_size "Small"}} is-small{{/match}}{{else if is_special}} is-special{{/if}}{{#if feature_image}} is-image{{/if}}">
<article class="item{{#if is_loop}} is-loop{{else if is_featured}} is-featured{{else if is_special}} is-special{{/if}}{{#if feature_image}} is-image{{/if}}">
{{#if feature_image}}
<div class="item-image global-image global-image-orientation global-radius{{#if is_loop}}{{#match @custom.feed_images_orientation "Landscape"}} is-landscape{{else match @custom.feed_images_orientation "Square"}} is-square{{else match @custom.feed_images_orientation "Natural"}} is-natural{{/match}}{{/if}}{{#if is_featured}}{{#match @custom.slider_images_orientation "Landscape"}} is-landscape{{else match @custom.slider_images_orientation "Square"}} is-square{{else match @custom.slider_images_orientation "Natural"}} is-natural{{/match}}{{/if}}{{#if is_special}}{{#match @custom.special_section_images_orientation "Landscape"}} is-landscape{{else match @custom.special_section_images_orientation "Square"}} is-square{{else match @custom.special_section_images_orientation "Natural"}} is-natural{{/match}}{{/if}}">
<div class="item-image global-image global-image-orientation global-radius{{#match @custom.feature_image_shape "Landscape"}} is-landscape{{else match @custom.feature_image_shape "Square"}} is-square{{else match @custom.feature_image_shape "Natural"}} is-natural{{/match}}">
{{#if is_featured}}{{#if @last}}<span class="is-last"></span>{{/if}}{{/if}}
<a href="{{url}}" {{#if is_featured}}tabindex="-1"{{/if}} aria-label="link: {{title}}">
{{>images/loop_image}}
</a>
{{#if @custom.show_author}}
{{!-- {{#if @custom.show_author}}
<div class="item-authors global-authors">
<div>
{{#foreach authors to="5"}}
@ -20,7 +20,7 @@
{{/foreach}}
</div>
</div>
{{/if}}
{{/if}} --}}
</div>
{{/if}}
<div class="item-content">

View File

@ -1,14 +1 @@
{{#if @custom.logo_for_dark_color_scheme}}
{{#match @custom.color_scheme "Dark"}}
<a href="{{@site.url}}" class="is-logo"><img src="{{@custom.logo_for_dark_color_scheme}}" alt="{{@site.title}} home"></a>
{{else match @custom.color_scheme "Partial Dark"}}
<a href="{{@site.url}}" class="is-logo"><img src="{{@custom.logo_for_dark_color_scheme}}" alt="{{@site.title}} home"></a>
{{else match @custom.color_scheme "Auto: Partial Dark/Dark"}}
<a href="{{@site.url}}" class="is-logo"><img src="{{@custom.logo_for_dark_color_scheme}}" alt="{{@site.title}} home"></a>
{{else match @custom.color_scheme "Auto: Light/Dark"}}
<a href="{{@site.url}}" class="is-dark is-logo"><img src="{{@custom.logo_for_dark_color_scheme}}" alt="{{@site.title}} home"></a>
<a href="{{@site.url}}"{{#if @site.logo}} class="is-logo"><img src="{{@site.logo}}" alt="{{@site.title}} home">{{else}} class="is-title">{{@site.title}}{{/if}}</a>
{{/match}}
{{else}}
<a href="{{@site.url}}"{{#if @site.logo}} class="is-logo"><img src="{{@site.logo}}" alt="{{@site.title}} home">{{else}} class="is-title">{{@site.title}}{{/if}}</a>
{{/if}}

View File

@ -2,7 +2,7 @@
<div class="{{#is "tag,author"}}global-subtitle{{else if is_error}}global-subtitle{{else}}loop-subtitle{{/is}}">
<small class="{{#is "tag,author"}}global-subtitle-title{{else if is_error}}global-subtitle-title{{else}}loop-subtitle-title global-title{{/is}}">
{{#is "tag,author"}}{{{t "Check out the {start-bold}latest posts{end-bold}" start-bold="<span>" end-bold="</span>"}}}{{else if is_error}}{{{t "Check out the {start-bold}latest posts{end-bold}" start-bold="<span>" end-bold="</span>"}}}{{else}}{{{t "See what weve {break}{start-bold}written lately{end-bold}" break="<br>" start-bold="<span>" end-bold="</span>"}}}{{/is}}</small>
{{#if @custom.show_author}}
{{!-- {{#if @custom.show_author}}
{{^if is_error}}
{{^is "tag,author"}}
{{#get "authors" limit="6" include="count.posts" order="count.posts desc"}}
@ -28,7 +28,7 @@
{{/get}}
{{/is}}
{{/if}}
{{/if}}
{{/if}} --}}
</div>
<div class="loop-wrap">
{{#foreach posts}}

View File

@ -1 +0,0 @@
{{#match @custom.color_scheme "Partial Dark"}} is-partial-dark{{else match @custom.color_scheme "Auto: Partial Dark/Dark"}} is-partial-dark{{else if @custom.global_background_color_in_hex_string}} is-partial-color{{/match}}

View File

@ -23,7 +23,7 @@
</article>
{{^is "page"}}
{{>post_navigation}}
<div class="comments-section global-padding">
{{!-- <div class="comments-section global-padding">
{{#if access}}
{{#if @custom.disqus_shortname}}
{{>services/disqus}}
@ -41,7 +41,7 @@
</div>
{{/if}}
{{/if}}
</div>
</div> --}}
{{#if primary_tag}}
{{#get "posts" limit="6" filter="tags:{{primary_tag.slug}}+id:-{{id}}+feature_image:-null" include="authors" as |special_posts|}}
{{#if special_posts}}

View File

@ -1,4 +1,4 @@
<div class="post-header{{>partial_mode}}">
<div class="post-header">
<div class="post-header-wrap global-padding{{#if post_center}} is-center{{else if post_classic}} is-classic{{else if membership_page}} is-center{{else unless feature_image}} is-center{{/if}}">
<div class="post-header-container">
<div class="post-header-content">
@ -13,7 +13,7 @@
</div>
{{^is "page"}}
<div class="post-meta">
{{#if @custom.show_author}}
{{!-- {{#if @custom.show_author}}
<div class="post-authors global-authors">
<div>
{{#foreach authors}}
@ -28,9 +28,9 @@
{{/foreach}}
</div>
</div>
{{/if}}
{{/if}} --}}
<div class="post-meta-content">
{{#if @custom.show_author}}
{{!-- {{#if @custom.show_author}}
{{#has author="count:1"}}
{{authors}}
{{else has author="count:2"}}
@ -40,7 +40,7 @@
{{else has author="count:>3"}}
{{authors}}
{{/has}}
{{/if}}
{{/if}} --}}
<time datetime="{{date format="YYYY-MM-DD"}}">{{date published_at format="LL"}}{{reading_time minute=(t "1 minute read") minutes=(t "% minutes read")}}</time>
</div>
</div>
@ -50,7 +50,7 @@
{{#if feature_image}}
<div class="post-header-image">
<figure>
<div class="global-image global-image-orientation global-radius{{#if post_center}} is-natural{{else if post_classic}} is-natural{{else match @custom.feature_image_orientation "Landscape"}} is-landscape{{else match @custom.feature_image_orientation "Square"}} is-square{{else match @custom.feature_image_orientation "Natural"}} is-natural{{/if}}">
<div class="global-image global-image-orientation global-radius{{#if post_center}} is-natural{{else if post_classic}} is-natural{{else match @custom.feature_image_shape "Landscape"}} is-landscape{{else match @custom.feature_image_shape "Square"}} is-square{{else match @custom.feature_image_shape "Natural"}} is-natural{{/if}}">
{{>images/post_image}}
</div>
{{#if feature_image_caption}}

View File

@ -1,8 +1,8 @@
{{#if @custom.content_api_key_for_search}}
{{#if @custom.content_api_key}}
{{#if is_search_core}}
<div class="search-section">
<div class="search-wrap">
<div class="search-content{{>partial_mode}}">
<div class="search-content">
<form class="search-form" onsubmit="return false">
<input class="search-input" type="text" placeholder="{{t "Search"}}">
<div class="search-meta">
@ -22,7 +22,7 @@
{{#contentFor "script_js"}}
<script>
const options = {
api:'{{@site.url}}/ghost/api/content/posts/?key='+"{{@custom.content_api_key_for_search}}"+'&limit=all&fields=url,title,feature_image,published_at,custom_excerpt,visibility,html',
api:'{{@site.url}}/ghost/api/content/posts/?key='+"{{@custom.content_api_key}}"+'&limit=all&fields=url,title,feature_image,published_at,custom_excerpt,visibility,html',
threshold: 0.1,
ignoreLocation: true,
keys: ['title','custom_excerpt','html'],
@ -34,7 +34,7 @@ const options = {
{{/if}}
{{/if}}
{{#if is_mobile}}
<span class="header-search search-open is-mobile"{{^if @custom.content_api_key_for_search}} data-ghost-search{{/if}}>{{>icons/site/search}}</span>
<span class="header-search search-open is-mobile"{{^if @custom.content_api_key}} data-ghost-search{{/if}}>{{>icons/site/search}}</span>
{{else if is_desktop}}
<li class="header-search search-open is-desktop global-button"{{^if @custom.content_api_key_for_search}} data-ghost-search{{/if}}><span>{{>icons/site/search}}{{t "Search"}}</span></li>
<li class="header-search search-open is-desktop global-button"{{^if @custom.content_api_key}} data-ghost-search{{/if}}><span>{{>icons/site/search}}{{t "Search"}}</span></li>
{{/if}}

View File

@ -1,4 +1,4 @@
{{#match @custom.tags_for_special_section}}
{{!-- {{#match @custom.tags_for_special_section}}
{{#get "posts" limit="6" filter="tag:[{{@custom.tags_for_special_section}}]+feature_image:-null" include="authors" as |special_posts|}}
{{#if special_posts}}
{{>related label=(t "{start-bold}Recommended{end-bold}" start-bold="<span>" end-bold="</span>")}}
@ -14,4 +14,4 @@
{{/get}}
{{/if}}
{{/foreach}}
{{/match}}
{{/match}} --}}

View File

@ -1,4 +1,4 @@
<div class="comments-wrap">
{{!-- <div class="comments-wrap">
<div class="comments-content">
<div id="disqus_thread" class="disqus-lazy">
<script>
@ -10,4 +10,4 @@
</script>
</div>
</div>
</div>
</div> --}}

View File

@ -1,6 +1,6 @@
{{!< default}}
{{#tag}}
<div class="archive-section{{#if feature_image}} is-image{{/if}}{{>partial_mode}}">
<div class="archive-section{{#if feature_image}} is-image{{/if}}">
{{#if feature_image}}
<div class="archive-image global-image">
{{>images/other_image other_image=feature_image alt=name}}