diff --git a/CHANGELOG.md b/CHANGELOG.md index 63b4037..eb943fc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - Hybrid header layout that switches between the hamburger and basic menus at appropriate viewport sizes - Traditional Chinese (Taiwan) translation ([#262](https://github.com/jpanther/congo/pull/262)) - New `list.paginationWidth` parameter to specify how many pagination links are generated before they are truncated +- Site title display can be toggled on or off independently, allowing for it to be displayed alongside the site logo or removed entirely - Tailwind plugin for Prettier to standardise the order of CSS classes ([#268](https://github.com/jpanther/congo/pull/268)) - External links in article content will now open in a new browser tab ([#312](https://github.com/jpanther/congo/pull/312)) - Independent control over the display of taxonomy listings on article and list pages ([#326](https://github.com/jpanther/congo/pull/326)) @@ -19,6 +20,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ### Changed +- ⚠️ The `logo` parameter has moved under the `header` group and is now set using `header.logo` - ⚠️ Simplified Chinese (China) language code has changed from `zh` to `zh-cn` - Site logo is now in its own `logo.html` partial to allow it to be easily overridden ([#322](https://github.com/jpanther/congo/pull/322)) - Upgrade to Chart.js v3.9.1 ([#261](https://github.com/jpanther/congo/pull/261)) diff --git a/assets/css/compiled/main.css b/assets/css/compiled/main.css index 547d748..2989b3f 100644 --- a/assets/css/compiled/main.css +++ b/assets/css/compiled/main.css @@ -1831,6 +1831,10 @@ body:has(#menu-controller:checked) { margin-bottom: 0.25rem; } +.mr-2 { + margin-right: 0.5rem; +} + .mb-2 { margin-bottom: 0.5rem; } @@ -1843,10 +1847,6 @@ body:has(#menu-controller:checked) { margin-left: 0.5rem; } -.mr-2 { - margin-right: 0.5rem; -} - .\!mb-9 { margin-bottom: 2.25rem !important; } @@ -2018,6 +2018,10 @@ body:has(#menu-controller:checked) { flex-wrap: wrap; } +.items-start { + align-items: flex-start; +} + .items-center { align-items: center; } @@ -2882,6 +2886,10 @@ body:has(#menu-controller:checked) { flex-direction: row; } + .sm\:items-center { + align-items: center; + } + .sm\:p-6 { padding: 1.5rem; } diff --git a/config/_default/params.toml b/config/_default/params.toml index 517c490..654127e 100644 --- a/config/_default/params.toml +++ b/config/_default/params.toml @@ -17,6 +17,8 @@ enableCodeCopy = false [header] layout = "basic" # valid options: basic, hamburger, hybrid, custom + # logo = "img/logo.jpg" + showTitle = true [footer] showCopyright = true diff --git a/exampleSite/config/_default/params.toml b/exampleSite/config/_default/params.toml index 63873a2..c894ee3 100644 --- a/exampleSite/config/_default/params.toml +++ b/exampleSite/config/_default/params.toml @@ -17,6 +17,8 @@ mainSections = ["samples"] [header] layout = "basic" # valid options: basic, hamburger, hybrid, custom + # logo = "img/logo.jpg" + showTitle = true [footer] showCopyright = true diff --git a/exampleSite/content/docs/configuration.md b/exampleSite/content/docs/configuration.md index 379db25..0d52cb9 100644 --- a/exampleSite/content/docs/configuration.md +++ b/exampleSite/content/docs/configuration.md @@ -120,10 +120,11 @@ Many of the article defaults here can be overridden on a per article basis by sp |`autoSwitchAppearance`|`true`|Whether the theme appearance automatically switches based upon the visitor's operating system preference. Set to `false` to force the site to always use the `defaultAppearance`.| |`enableSearch`|`false`|Whether site search is enabled. Set to `true` to enable search functionality. Note that the search feature depends on the `outputs.home` setting in the [site configuration](#site-configuration) being set correctly.| |`enableCodeCopy`|`false`|Whether copy-to-clipboard buttons are enabled for `` blocks. The `highlight.noClasses` parameter must be set to `false` for code copy to function correctly. Read more about [other configuration files](#other-configuration-files) below.| -|`logo`|_Not set_|The relative path to the site logo file within the `assets/` folder. The logo file should be provided at 2x resolution and supports any image dimensions.| |`mainSections`|_Not set_|The sections that should be displayed in the recent articles list. If not provided the section with the greatest number of articles is used.| |`robots`|_Not set_|String that indicates how robots should handle your site. If set, it will be output in the page head. Refer to [Google's docs](https://developers.google.com/search/docs/advanced/robots/robots_meta_tag#directives) for valid values.| |`header.layout`|`"basic"`|The layout of the page header and menu. Valid values are `basic`, `hamburger`, `hybrid` or `custom`. When set to `custom`, you must provide your own layout by creating a `/layouts/partials/header/custom.html` file.| +|`header.logo`|_Not set_|The relative path to the site logo file within the `assets/` folder. The logo file should be provided at 2x resolution and supports any image dimensions.| +|`header.showTitle`|`true`|Whether the site title is displayed in the header.| |`footer.showCopyright`|`true`|Whether or not to show the copyright string in the site footer. Note that the string itself can be customised using the `copyright` parameter in the [languages configuration](#language-and-i18n).| |`footer.showThemeAttribution`|`true`|Whether or not to show the "powered by" theme attribution in the site footer. If you choose to disable this message, please consider attributing the theme somewhere else on your site (for example, on your about page).| |`footer.showAppearanceSwitcher`|`false`|Whether or not to show the appearance switcher in the site footer. The browser's local storage is used to persist the visitor's preference.| diff --git a/layouts/partials/functions/warnings.html b/layouts/partials/functions/warnings.html index ecc6db9..9598c61 100644 --- a/layouts/partials/functions/warnings.html +++ b/layouts/partials/functions/warnings.html @@ -4,3 +4,6 @@ {{ if ne .Site.Params.showScrollToTop nil }} {{ warnf "[CONGO] Theme parameter `showScrollToTop` has been renamed to `footer.showScrollToTop`. Please update your site configuration." }} {{ end }} +{{ if ne .Site.Params.logo nil }} + {{ warnf "[CONGO] Theme parameter `logo` has been renamed to `header.logo`. Please update your site configuration." }} +{{ end }} diff --git a/layouts/partials/header/basic.html b/layouts/partials/header/basic.html index a34fc6a..4169683 100644 --- a/layouts/partials/header/basic.html +++ b/layouts/partials/header/basic.html @@ -1,13 +1,13 @@
-