Added custom header text setting to Landing and Search styles

This commit is contained in:
Sodbileg Gansukh 2023-09-27 22:10:23 +08:00
parent 3a7af4e16e
commit 43b8a2b4d9
2 changed files with 8 additions and 2 deletions

View File

@ -143,6 +143,12 @@
"default": "Landing", "default": "Landing",
"group": "homepage" "group": "homepage"
}, },
"header_text": {
"type": "text",
"group": "homepage",
"description": "Defaults to site description when empty",
"visibility": "header_style:[Landing, Search]"
},
"background_image": { "background_image": {
"type": "boolean", "type": "boolean",
"default": true, "default": true,

View File

@ -63,13 +63,13 @@
{{!-- Landing layout --}} {{!-- Landing layout --}}
{{#match headerStyle "Landing"}} {{#match headerStyle "Landing"}}
<h1 class="gh-header-title is-title">{{#if @custom.signup_heading}}{{@custom.signup_heading}}{{else}}{{@site.description}}{{/if}}</h1> <h1 class="gh-header-title is-title">{{#if @custom.header_text}}{{@custom.header_text}}{{else}}{{@site.description}}{{/if}}</h1>
{{> "email-subscription"}} {{> "email-subscription"}}
{{/match}} {{/match}}
{{!-- Search layout --}} {{!-- Search layout --}}
{{#match headerStyle "Search"}} {{#match headerStyle "Search"}}
<h1 class="gh-header-title is-title">{{#if @custom.signup_heading}}{{@custom.signup_heading}}{{else}}{{@site.description}}{{/if}}</h1> <h1 class="gh-header-title is-title">{{#if @custom.header_text}}{{@custom.header_text}}{{else}}{{@site.description}}{{/if}}</h1>
<form class="gh-form"> <form class="gh-form">
{{> "icons/search"}} {{> "icons/search"}}
<button class="gh-form-input" data-ghost-search>Search posts, tags and authors</button> <button class="gh-form-input" data-ghost-search>Search posts, tags and authors</button>