Ghost/ghost/admin/app/components/custom-theme-settings/boolean.hbs
Sodbileg Gansukh 7a49183bc8
Custom theme settings improvements (#18101)
no issues

- removed (default) label from the custom theme settings
- the label was redundant especially when multiple select settings are next to each other
- instead, the default value should always be the first option in the select fields
- more consistent spacing between settings with/without description
- less spacing between boolean settings
2023-09-14 10:27:33 +08:00

20 lines
1.1 KiB
Handlebars

<div class="gh-stack-item {{if (eq @index 0) "gh-setting-first" "gh-setting"}} gh-setting-boolean">
<div class="flex-grow-1">
<div class="flex justify-between items-start relative">
<div class="flex flex-column mr5">
<span class="gh-setting-title {{if @setting.description '' 'mb0'}}" for={{this.checkboxId}}>
{{humanize-setting-key @setting.key}}
</span>
{{#if @setting.description}}
<div class="gh-setting-desc">{{truncate @setting.description 100}}</div>
{{/if}}
</div>
<div class="for-switch x-small" style={{html-safe (concat "margin-top: " (unless @setting.description '-6px' '0') ";")}}>
<label for={{this.checkboxId}} class="switch">
<input type="checkbox" class="gh-input" id={{this.checkboxId}} checked={{@setting.value}} {{on "input" this.toggleValue}}>
<span class="input-toggle-component mt1"></span>
</label>
</div>
</div>
</div>
</div>