mirror of
https://github.com/nunocoracao/blowfish.git
synced 2025-02-02 03:22:33 -06:00
💄 added list.constrainItemsWidth to constrain items width
This commit is contained in:
parent
3cc1569fc1
commit
e86df4129b
5 changed files with 131 additions and 115 deletions
|
@ -1589,6 +1589,11 @@ select {
|
|||
max-width: 48rem;
|
||||
}
|
||||
|
||||
.max-w-fit {
|
||||
max-width: -moz-fit-content;
|
||||
max-width: fit-content;
|
||||
}
|
||||
|
||||
.max-w-\[5rem\] {
|
||||
max-width: 5rem;
|
||||
}
|
||||
|
|
|
@ -81,6 +81,7 @@ enableCodeCopy = true
|
|||
groupByYear = true
|
||||
cardView = false
|
||||
cardViewScreenWidth = false
|
||||
constrainItemsWidth = false
|
||||
|
||||
[sitemap]
|
||||
excludedKinds = []
|
||||
|
|
|
@ -76,10 +76,11 @@ defaultBackgroundImage = "/img/iceland.jpg"
|
|||
showViews = true
|
||||
showLikes = true
|
||||
showTableOfContents = true
|
||||
showCards = true
|
||||
showCards = false
|
||||
groupByYear = false
|
||||
cardView = true
|
||||
cardViewScreenWidth = false
|
||||
constrainItemsWidth = false
|
||||
|
||||
[sitemap]
|
||||
excludedKinds = ["taxonomy","term"]
|
||||
|
|
|
@ -147,12 +147,12 @@ Many of the article defaults here can be overridden on a per article basis by sp
|
|||
### Header
|
||||
|
||||
| Name | Default | Description |
|
||||
| -------------------------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| --------------- | --------- | --------------------------------------------------------------------------------- |
|
||||
| `header.layout` | `"basic"` | Defines the header for the entire site, supported values are `basic` and `fixed`. |
|
||||
### Footer
|
||||
|
||||
| Name | Default | Description |
|
||||
| -------------------------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| ------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `footer.showMenu` | `true` | Show/hide the footer menu, which can be configured in the `[[footer]]` section of the `config/_default/menus.en.toml` file. |
|
||||
| `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). |
|
||||
|
@ -161,7 +161,7 @@ Many of the article defaults here can be overridden on a per article basis by sp
|
|||
### Homepage
|
||||
|
||||
| Name | Default | Description |
|
||||
| -------------------------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| ------------------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `homepage.layout` | `"profile"` | The layout of the homepage. Valid values are `page`, `profile`, `hero`, `card`, `background`, or `custom`. When set to `custom`, you must provide your own layout by creating a `/layouts/partials/home/custom.html` file. Refer to the [Homepage Layout]({{< ref "homepage-layout" >}}) section for more details. |
|
||||
| `homepage.homepageImage` | _Not set_ | Image to be used in `hero` and `card` layouts. Refer to the [Homepage Layout]({{< ref "homepage-layout" >}}) section for more details. |
|
||||
| `homepage.showRecent` | `false` | Whether or not to display the recent articles list on the homepage. |
|
||||
|
@ -174,7 +174,7 @@ Many of the article defaults here can be overridden on a per article basis by sp
|
|||
### Article
|
||||
|
||||
| Name | Default | Description |
|
||||
| -------------------------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| ------------------------------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `article.showDate` | `true` | Whether or not article dates are displayed. |
|
||||
| `article.showViews` | `false` | Whether or not article views are displayed. This requires firebase integrations to be enabled, look below. |
|
||||
| `article.showLikes` | `false` | Whether or not article likes are displayed. This requires firebase integrations to be enabled, look below. |
|
||||
|
@ -204,7 +204,7 @@ Many of the article defaults here can be overridden on a per article basis by sp
|
|||
### List
|
||||
|
||||
| Name | Default | Description |
|
||||
| -------------------------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| ---------------------------------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `list.showHero` | `false` | Whether the thumbnail image will be shown as a hero image within each list page. |
|
||||
| `list.heroStyle` | _Not set_ | Style to display the hero image, valid options are: `basic`, `big`, `background`, `thumbAndBackground`. |
|
||||
| `list.showBreadcrumbs` | `false` | Whether or not breadcrumbs are displayed in the header on list pages. |
|
||||
|
@ -218,16 +218,18 @@ Many of the article defaults here can be overridden on a per article basis by sp
|
|||
| `list.groupByYear` | `true` | Whether or not articles are grouped by year on list pages. |
|
||||
| `list.cardView` | `false` | Display lists as a gallery of cards. |
|
||||
| `list.cardViewScreenWidth` | `false` | Enhance the width of card galleries in lists to take the full width available. |
|
||||
| `list.constrainItemsWidth` | `false` | Limit item width to `prose` to increase readability. Useful when no feature images are available. |
|
||||
|
||||
### Sitemap
|
||||
|
||||
| Name | Default | Description |
|
||||
| -------------------------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| ----------------------- | ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `sitemap.excludedKinds` | `["taxonomy", "term"]` | Kinds of content that should be excluded from the generated `/sitemap.xml` file. Refer to the [Hugo docs](https://gohugo.io/templates/section-templates/#page-kinds) for acceptable values. |
|
||||
|
||||
### Taxonomy
|
||||
|
||||
| Name | Default | Description |
|
||||
| -------------------------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| ------------------------------ | --------- | ---------------------------------------------------------------------------------------------------------- |
|
||||
| `taxonomy.showTermCount` | `true` | Whether or not the number of articles within a taxonomy term is displayed on the taxonomy listing. |
|
||||
| `taxonomy.showHero` | `false` | Whether the thumbnail image will be shown as a hero image within each taxonomy page. |
|
||||
| `taxonomy.heroStyle` | _Not set_ | Style to display the hero image, valid options are: `basic`, `big`, `background`, `thumbAndBackground`. |
|
||||
|
@ -239,7 +241,7 @@ Many of the article defaults here can be overridden on a per article basis by sp
|
|||
### Term
|
||||
|
||||
| Name | Default | Description |
|
||||
| -------------------------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| -------------------------- | --------- | ---------------------------------------------------------------------------------------------------------- |
|
||||
| `term.showHero` | `false` | Whether the thumbnail image will be shown as a hero image within each term page. |
|
||||
| `term.heroStyle` | _Not set_ | Style to display the hero image, valid options are: `basic`, `big`, `background`, `thumbAndBackground`. |
|
||||
| `term.showBreadcrumbs` | `false` | Whether or not breadcrumbs are displayed in the term header. |
|
||||
|
@ -252,7 +254,7 @@ Many of the article defaults here can be overridden on a per article basis by sp
|
|||
### Firebase
|
||||
|
||||
| Name | Default | Description |
|
||||
| -------------------------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| ---------------------------- | --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `firebase.apiKey` | _Not set_ | Firebase apiKey, required to integrate against Firebase. Check [this page]({{< ref "firebase-views" >}}) for a guide on how to integrate Firebase into Blowfish. |
|
||||
| `firebase.authDomain` | _Not set_ | Firebase authDomain, required to integrate against Firebase. Check [this page]({{< ref "firebase-views" >}}) for a guide on how to integrate Firebase into Blowfish. |
|
||||
| `firebase.projectId` | _Not set_ | Firebase projectId, required to integrate against Firebase. Check [this page]({{< ref "firebase-views" >}}) for a guide on how to integrate Firebase into Blowfish. |
|
||||
|
@ -264,14 +266,14 @@ Many of the article defaults here can be overridden on a per article basis by sp
|
|||
### Fathom Analytics
|
||||
|
||||
| Name | Default | Description |
|
||||
| -------------------------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| ------------------------ | --------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `fathomAnalytics.site` | _Not set_ | The site code generated by Fathom Analytics for the website. Refer to the [Analytics docs]({{< ref "partials#analytics" >}}) for more details. |
|
||||
| `fathomAnalytics.domain` | _Not set_ | If using a custom domain with Fathom Analytics, provide it here to serve `script.js` from the custom domain. |
|
||||
|
||||
### BuyMeACoffee
|
||||
|
||||
| Name | Default | Description |
|
||||
| -------------------------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| ----------------------------------- | --------- | --------------------------------------------------------------------------- |
|
||||
| `buymeacoffee.identifier` | _Not set_ | The identifier to the target buymeacoffee account. |
|
||||
| `buymeacoffee.globalWidget` | _Not set_ | Activate the global buymeacoffee widget. |
|
||||
| `buymeacoffee.globalWidgetMessage` | _Not set_ | Message what will be displayed the first time a new user lands on the site. |
|
||||
|
@ -280,7 +282,7 @@ Many of the article defaults here can be overridden on a per article basis by sp
|
|||
### Verifications
|
||||
|
||||
| Name | Default | Description |
|
||||
| -------------------------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| ------------------------ | --------- | --------------------------------------------------------------------------------------- |
|
||||
| `verification.google` | _Not set_ | The site verification string provided by Google to be included in the site metadata. |
|
||||
| `verification.bing` | _Not set_ | The site verification string provided by Bing to be included in the site metadata. |
|
||||
| `verification.pinterest` | _Not set_ | The site verification string provided by Pinterest to be included in the site metadata. |
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
{{ $constrainItemsWidth := .Page.Site.Params.list.constrainItemsWidth | default false }}
|
||||
|
||||
{{ $articleClasses := "flex flex-wrap article" }}
|
||||
{{ if .Site.Params.list.showCards }}
|
||||
{{ $articleClasses = delimit (slice $articleClasses "border border-neutral-200 dark:border-neutral-700 border-2 rounded-md backdrop-blur") " " }}
|
||||
|
@ -21,6 +23,11 @@
|
|||
{{ $articleInnerClasses = delimit (slice $articleInnerClasses "mt-3 md:mt-0") " " }}
|
||||
{{ end }}
|
||||
|
||||
{{ if $constrainItemsWidth }}
|
||||
{{ $articleClasses = delimit (slice $articleClasses "max-w-prose") " " }}
|
||||
{{ end }}
|
||||
|
||||
|
||||
{{ with .Params.externalUrl }}
|
||||
<a class="{{ $articleClasses }}" href="{{ . }}" target="_blank" rel="external">
|
||||
{{ else }}
|
||||
|
@ -80,7 +87,7 @@
|
|||
{{ partial "article-meta/basic.html" . }}
|
||||
</div>
|
||||
{{ if .Params.showSummary | default (.Site.Params.list.showSummary | default false) }}
|
||||
<div class="py-1 prose dark:prose-invert">
|
||||
<div class="py-1 max-w-fit prose dark:prose-invert">
|
||||
{{ .Summary | emojify }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
|
Loading…
Reference in a new issue