mirror of
https://github.com/nunocoracao/blowfish.git
synced 2025-04-21 08:31:53 +02:00
Merge branch 'dev' of https://github.com/nunocoracao/blowfish into dev
This commit is contained in:
commit
ce175a3c82
12 changed files with 69 additions and 29 deletions
|
@ -4914,6 +4914,10 @@ body:has(#menu-controller:checked) {
|
||||||
|
|
||||||
/* Custom */
|
/* Custom */
|
||||||
|
|
||||||
|
pre {
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
.thumbnail {
|
.thumbnail {
|
||||||
min-width: 300px;
|
min-width: 300px;
|
||||||
height: 180px;
|
height: 180px;
|
||||||
|
|
|
@ -339,6 +339,10 @@ body:has(#menu-controller:checked) {
|
||||||
|
|
||||||
/* Custom */
|
/* Custom */
|
||||||
|
|
||||||
|
pre {
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
.thumbnail {
|
.thumbnail {
|
||||||
min-width: 300px;
|
min-width: 300px;
|
||||||
height: 180px;
|
height: 180px;
|
||||||
|
|
|
@ -15,7 +15,8 @@ enableCodeCopy = false
|
||||||
# mainSections = ["section1", "section2"]
|
# mainSections = ["section1", "section2"]
|
||||||
# robots = ""
|
# robots = ""
|
||||||
|
|
||||||
disableImageOptimization = true
|
disableImageOptimization = false
|
||||||
|
disableTextInHeader = false
|
||||||
|
|
||||||
# defaultBackgroundImage = "IMAGE.jpg" # used as default for background images
|
# defaultBackgroundImage = "IMAGE.jpg" # used as default for background images
|
||||||
# defaultFeaturedImage = "IMAGE.jpg" # used as default for featured images in all articles
|
# defaultFeaturedImage = "IMAGE.jpg" # used as default for featured images in all articles
|
||||||
|
|
|
@ -16,6 +16,7 @@ mainSections = ["docs"]
|
||||||
# robots = ""
|
# robots = ""
|
||||||
|
|
||||||
disableImageOptimization = false
|
disableImageOptimization = false
|
||||||
|
disableTextInHeader = false
|
||||||
|
|
||||||
defaultBackgroundImage = "/img/ocean.jpg"
|
defaultBackgroundImage = "/img/ocean.jpg"
|
||||||
defaultFeaturedImage = "/img/ocean.jpg"
|
defaultFeaturedImage = "/img/ocean.jpg"
|
||||||
|
|
|
@ -167,6 +167,7 @@ Many of the article defaults here can be overridden on a per article basis by sp
|
||||||
| `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. |
|
| `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. |
|
||||||
| `disableImageZoom` | `false` | Disables image zoom feature across all the images in the site. |
|
| `disableImageZoom` | `false` | Disables image zoom feature across all the images in the site. |
|
||||||
| `disableImageOptimization` | `false` | Disables image resize and optimization features across all the images in the site. |
|
| `disableImageOptimization` | `false` | Disables image resize and optimization features across all the images in the site. |
|
||||||
|
| `disableTextInHeader` | `false` | Disables text in header, useful for logo based headers. |
|
||||||
| `defaultBackgroundImage` | _Not set_ | Default background image for both `background` homepage layout and `background` hero style |
|
| `defaultBackgroundImage` | _Not set_ | Default background image for both `background` homepage layout and `background` hero style |
|
||||||
| `defaultFeaturedImage` | _Not set_ | Default background image for all `featured` images across articles, will be overriden by a local `featured` image. |
|
| `defaultFeaturedImage` | _Not set_ | Default background image for all `featured` images across articles, will be overriden by a local `featured` image. |
|
||||||
| `highlightCurrentMenuArea` | _Not set_ | Marks menu entries in the main manu when selected |
|
| `highlightCurrentMenuArea` | _Not set_ | Marks menu entries in the main manu when selected |
|
||||||
|
|
|
@ -17,7 +17,7 @@ In addition to all the [default Hugo shortcodes](https://gohugo.io/content-manag
|
||||||
|
|
||||||
<!-- prettier-ignore-start -->
|
<!-- prettier-ignore-start -->
|
||||||
| Parameter | Description |
|
| Parameter | Description |
|
||||||
| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
| ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| `icon` | **Optional.** the icon to display on the left side.<br>**Default:** `exclaimation triangle icon` (Check out the [icon shortcode](#icon) for more details on using icons.) |
|
| `icon` | **Optional.** the icon to display on the left side.<br>**Default:** `exclaimation triangle icon` (Check out the [icon shortcode](#icon) for more details on using icons.) |
|
||||||
| `iconColor` | **Optional.** the color for the icon in basic CSS style.<br>Can be either hex values (`#FFFFFF`) or color names (`white`)<br>By default chosen based on the current color theme . |
|
| `iconColor` | **Optional.** the color for the icon in basic CSS style.<br>Can be either hex values (`#FFFFFF`) or color names (`white`)<br>By default chosen based on the current color theme . |
|
||||||
| `cardColor` | **Optional.** the color for the card background in basic CSS style.<br>Can be either hex values (`#FFFFFF`) or color names (`white`)<br>By default chosen based on the current color theme . |
|
| `cardColor` | **Optional.** the color for the card background in basic CSS style.<br>Can be either hex values (`#FFFFFF`) or color names (`white`)<br>By default chosen based on the current color theme . |
|
||||||
|
@ -297,7 +297,7 @@ In order to add images to the gallery, use `img` tags for each image and add `cl
|
||||||
|
|
||||||
<!-- prettier-ignore-start -->
|
<!-- prettier-ignore-start -->
|
||||||
| Parameter | Description |
|
| Parameter | Description |
|
||||||
|-----------|-------------------------------------------------------|
|
| --------- | ----------------------------------------------------- |
|
||||||
| `repo` | [String] github repo in the format of `username/repo` |
|
| `repo` | [String] github repo in the format of `username/repo` |
|
||||||
<!-- prettier-ignore-end -->
|
<!-- prettier-ignore-end -->
|
||||||
|
|
||||||
|
@ -320,7 +320,7 @@ Finaly custom GitLab instace URL can be provided, as long as the `api/v4/project
|
||||||
|
|
||||||
<!-- prettier-ignore-start -->
|
<!-- prettier-ignore-start -->
|
||||||
| Parameter | Description |
|
| Parameter | Description |
|
||||||
|-------------|------------------------------------------------------------------------|
|
| ----------- | ---------------------------------------------------------------------- |
|
||||||
| `projectID` | [String] gitlab numeric ProjectID |
|
| `projectID` | [String] gitlab numeric ProjectID |
|
||||||
| `baseURL` | [String] optional gitlab instace URL, default is `https://gitlab.com/` |
|
| `baseURL` | [String] optional gitlab instace URL, default is `https://gitlab.com/` |
|
||||||
<!-- prettier-ignore-end -->
|
<!-- prettier-ignore-end -->
|
||||||
|
@ -401,9 +401,10 @@ When life gives you lemons, make lemonade.
|
||||||
|
|
||||||
<!-- prettier-ignore-start -->
|
<!-- prettier-ignore-start -->
|
||||||
| Parameter | Description |
|
| Parameter | Description |
|
||||||
| --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| `limit` | **Required.** the number of recent articles to display. |
|
| `limit` | **Required.** the number of recent articles to display. |
|
||||||
| `title` | Optional title for the list, default is `Recent` |
|
| `title` | Optional title for the list, default is `Recent` |
|
||||||
|
| `cardView` | Optional card view enabled for the list, default is `false` |
|
||||||
| `where` | The variable to be used for the query of articles e.g. `Type` |
|
| `where` | The variable to be used for the query of articles e.g. `Type` |
|
||||||
| `value` | The value that will need to match the parameter defined in `where` for the query of articles e.g. for `where` == `Type` a valid value could be `sample` |
|
| `value` | The value that will need to match the parameter defined in `where` for the query of articles e.g. for `where` == `Type` a valid value could be `sample` |
|
||||||
|
|
||||||
|
@ -424,10 +425,10 @@ The `where` and `value` values are used in the following query `where .Site.Regu
|
||||||
**Example #2:**
|
**Example #2:**
|
||||||
|
|
||||||
```md
|
```md
|
||||||
{{</* list title="Samples" limit=5 where="Type" value="sample" */>}}
|
{{</* list title="Samples" cardView=true limit=5 where="Type" value="sample" */>}}
|
||||||
```
|
```
|
||||||
|
|
||||||
{{< list title="Samples" limit=5 where="Type" value="sample">}}
|
{{< list title="Samples" cardView=true limit=6 where="Type" value="sample">}}
|
||||||
|
|
||||||
<br/><br/><br/>
|
<br/><br/><br/>
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
<div id="{{ .Anchor | safeURL }}" class="anchor"></div>
|
|
||||||
<h{{ .Level }} class="relative group">{{ .Text | safeHTML }}
|
<h{{ .Level }} class="relative group">{{ .Text | safeHTML }}
|
||||||
{{ if.Page.Params.showHeadingAnchors | default (.Page.Site.Params.article.showHeadingAnchors | default true) }}<span
|
<div id="{{ .Anchor | safeURL }}" class="anchor"></div>
|
||||||
|
{{ if.Page.Params.showHeadingAnchors | default (.Page.Site.Params.article.showHeadingAnchors | default true) }}
|
||||||
|
<span
|
||||||
class="absolute top-0 w-6 transition-opacity opacity-0 ltr:-left-6 rtl:-right-6 not-prose group-hover:opacity-100">
|
class="absolute top-0 w-6 transition-opacity opacity-0 ltr:-left-6 rtl:-right-6 not-prose group-hover:opacity-100">
|
||||||
<a class="group-hover:text-primary-300 dark:group-hover:text-neutral-700"
|
<a class="group-hover:text-primary-300 dark:group-hover:text-neutral-700"
|
||||||
style="text-decoration-line: none !important;" href="#{{ .Anchor | safeURL }}" aria-label="{{ i18n "article.anchor_label" }}">#</a></span>
|
style="text-decoration-line: none !important;" href="#{{ .Anchor | safeURL }}" aria-label="{{ i18n "article.anchor_label" }}">#</a>
|
||||||
|
</span>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</h{{ .Level }}>
|
</h{{ .Level }}>
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
|
||||||
<div class="flex flex-row flex-wrap items-center">
|
<div style="cursor: default;" class="flex flex-row flex-wrap items-center">
|
||||||
{{/* Output partials */}}
|
{{/* Output partials */}}
|
||||||
{{ with ($meta.Get "partials") }}
|
{{ with ($meta.Get "partials") }}
|
||||||
{{ delimit . "<span class=\"px-2 text-primary-500\">·</span>" | safeHTML }}
|
{{ delimit . "<span class=\"px-2 text-primary-500\">·</span>" | safeHTML }}
|
||||||
|
@ -60,7 +60,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{ if .Params.showAuthorsBadges | default (.Site.Params.article.showAuthorsBadges | default false) }}
|
{{ if .Params.showAuthorsBadges | default (.Site.Params.article.showAuthorsBadges | default false) }}
|
||||||
<div class="flex flex-row flex-wrap items-center">
|
<div style="cursor: pointer;" class="flex flex-row flex-wrap items-center">
|
||||||
{{ range $taxonomy, $terms := .Site.Taxonomies }}
|
{{ range $taxonomy, $terms := .Site.Taxonomies }}
|
||||||
{{ if (eq $taxonomy "authors")}}
|
{{ if (eq $taxonomy "authors")}}
|
||||||
{{ if (gt (len ($context.GetTerms $taxonomy)) 0) }}
|
{{ if (gt (len ($context.GetTerms $taxonomy)) 0) }}
|
||||||
|
@ -75,7 +75,7 @@
|
||||||
|
|
||||||
{{/* Output taxonomies */}}
|
{{/* Output taxonomies */}}
|
||||||
{{ if .Params.showTaxonomies | default (.Site.Params.article.showTaxonomies | default false) }}
|
{{ if .Params.showTaxonomies | default (.Site.Params.article.showTaxonomies | default false) }}
|
||||||
<div class="flex flex-row flex-wrap items-center">
|
<div style="cursor: pointer;" class="flex flex-row flex-wrap items-center">
|
||||||
{{ range $taxonomy, $terms := .Site.Taxonomies }}
|
{{ range $taxonomy, $terms := .Site.Taxonomies }}
|
||||||
{{ if and (not (eq $taxonomy "authors")) (not (eq $taxonomy "series"))}}
|
{{ if and (not (eq $taxonomy "authors")) (not (eq $taxonomy "series"))}}
|
||||||
{{ if (gt (len ($context.GetTerms $taxonomy)) 0) }}
|
{{ if (gt (len ($context.GetTerms $taxonomy)) 0) }}
|
||||||
|
|
|
@ -17,10 +17,11 @@
|
||||||
<div class="flex flex-1 items-center justify-between">
|
<div class="flex flex-1 items-center justify-between">
|
||||||
<nav class="flex space-x-3">
|
<nav class="flex space-x-3">
|
||||||
|
|
||||||
|
{{ if not .Site.Params.disableTextInHeader | default true }}
|
||||||
<a href="{{ "" | relLangURL }}" class="text-base font-medium text-gray-500 hover:text-gray-900">{{
|
<a href="{{ "" | relLangURL }}" class="text-base font-medium text-gray-500 hover:text-gray-900">{{
|
||||||
.Site.Title | markdownify
|
.Site.Title | markdownify
|
||||||
| emojify }}</a>
|
| emojify }}</a>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
</nav>
|
</nav>
|
||||||
<nav class="hidden md:flex items-center space-x-5 md:ml-12 h-12">
|
<nav class="hidden md:flex items-center space-x-5 md:ml-12 h-12">
|
||||||
|
@ -88,6 +89,7 @@
|
||||||
|
|
||||||
<label id="menu-button" for="menu-controller" class="block">
|
<label id="menu-button" for="menu-controller" class="block">
|
||||||
<input type="checkbox" id="menu-controller" class="hidden" />
|
<input type="checkbox" id="menu-controller" class="hidden" />
|
||||||
|
{{ if .Site.Menus.main }}
|
||||||
<div class="cursor-pointer hover:text-primary-600 dark:hover:text-primary-400">
|
<div class="cursor-pointer hover:text-primary-600 dark:hover:text-primary-400">
|
||||||
{{ partial "icon.html" "bars" }}
|
{{ partial "icon.html" "bars" }}
|
||||||
</div>
|
</div>
|
||||||
|
@ -104,13 +106,11 @@
|
||||||
"xmark" }}</span>
|
"xmark" }}</span>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
{{ if .Site.Menus.main }}
|
|
||||||
{{ range .Site.Menus.main }}
|
{{ range .Site.Menus.main }}
|
||||||
|
|
||||||
{{ partial "header/header-mobile-option.html" . }}
|
{{ partial "header/header-mobile-option.html" . }}
|
||||||
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
{{ if .Site.Menus.subnavigation }}
|
{{ if .Site.Menus.subnavigation }}
|
||||||
|
@ -137,6 +137,7 @@
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</label>
|
</label>
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
<div class="flex flex-wrap">
|
<div class="flex flex-wrap">
|
||||||
{{ range $links := . }}
|
{{ range $links := . }}
|
||||||
{{ range $name, $url := $links }}
|
{{ range $name, $url := $links }}
|
||||||
<a class="px-2 hover:text-primary-400 text-primary-800 dark:text-primary-200" href="{{ $url }}" target="_blank"
|
<a class="px-1 hover:text-primary-400 text-primary-800 dark:text-primary-200" href="{{ $url }}" target="_blank"
|
||||||
aria-label="{{ $name | title }}" rel="me noopener noreferrer">{{ partial
|
aria-label="{{ $name | title }}" rel="me noopener noreferrer">{{ partial
|
||||||
"icon.html" $name }}</a>
|
"icon.html" $name }}</a>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
<div class="flex flex-wrap">
|
<div class="flex flex-wrap">
|
||||||
{{ range $links := . }}
|
{{ range $links := . }}
|
||||||
{{ range $name, $url := $links }}
|
{{ range $name, $url := $links }}
|
||||||
<a class="px-2 hover:text-primary-400 text-primary-300" href="{{ $url }}" target="_blank"
|
<a class="px-1 hover:text-primary-400 text-primary-300" href="{{ $url }}" target="_blank"
|
||||||
aria-label="{{ $name | title }}" rel="me noopener noreferrer">{{ partial
|
aria-label="{{ $name | title }}" rel="me noopener noreferrer">{{ partial
|
||||||
"icon.html" $name }}</a>
|
"icon.html" $name }}</a>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
|
@ -2,9 +2,32 @@
|
||||||
{{ $limit := .Get "limit" | default 1 }}
|
{{ $limit := .Get "limit" | default 1 }}
|
||||||
{{ $title := .Get "title" | default (i18n "shortcode.recent_articles" | emojify) }}
|
{{ $title := .Get "title" | default (i18n "shortcode.recent_articles" | emojify) }}
|
||||||
{{ $parent := .Page.RelPermalink }}
|
{{ $parent := .Page.RelPermalink }}
|
||||||
|
{{ $cardView := .Get "cardView" }}
|
||||||
{{ $where := .Get "where" }}
|
{{ $where := .Get "where" }}
|
||||||
{{ $value := .Get "value" }}
|
{{ $value := .Get "value" }}
|
||||||
<h2 class="mt-20 text-2xl font-extrabold mb-10">{{ $title }}</h2>
|
<h2 class="mt-20 text-2xl font-extrabold mb-10">{{ $title }}</h2>
|
||||||
|
|
||||||
|
|
||||||
|
{{ if $cardView | default false}}
|
||||||
|
|
||||||
|
<section class="w-full grid gap-4 sm:grid-cols-2 md:grid-cols-3">
|
||||||
|
{{ if $where }}
|
||||||
|
{{ range ( where .Site.RegularPages $where $value | first $limit ) }}
|
||||||
|
{{ if not (eq .RelPermalink $parent) }}
|
||||||
|
{{ partial "article-link/card.html" . }}
|
||||||
|
{{ end }}
|
||||||
|
{{end}}
|
||||||
|
{{ else }}
|
||||||
|
{{ range .Site.RegularPages | first $limit }}
|
||||||
|
{{ if not (eq .RelPermalink $parent) }}
|
||||||
|
{{ partial "article-link/card.html" . }}
|
||||||
|
{{ end }}
|
||||||
|
{{end}}
|
||||||
|
{{ end }}
|
||||||
|
</section>
|
||||||
|
|
||||||
|
{{ else }}
|
||||||
|
|
||||||
<section class="space-y-10 w-full mt-10 mb-10">
|
<section class="space-y-10 w-full mt-10 mb-10">
|
||||||
{{ if $where }}
|
{{ if $where }}
|
||||||
{{ range ( where .Site.RegularPages $where $value | first $limit ) }}
|
{{ range ( where .Site.RegularPages $where $value | first $limit ) }}
|
||||||
|
@ -20,3 +43,5 @@
|
||||||
{{end}}
|
{{end}}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
{{ end }}
|
||||||
|
|
Loading…
Add table
Reference in a new issue