Compare commits

..

No commits in common. "bce395070cca2674d2df752fab7a0d53e3b52952" and "b21e8497e52ee36e129097d1b79997c0c70347be" have entirely different histories.

15 changed files with 44 additions and 59 deletions

View File

@ -34,8 +34,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- Hamburger menu is not dismissed when links are clicked ([#705](https://github.com/jpanther/congo/pull/705)) - Hamburger menu is not dismissed when links are clicked ([#705](https://github.com/jpanther/congo/pull/705))
- KaTeX, table and code elements wider than the page are not formatted correctly ([#753](https://github.com/jpanther/congo/pull/753)) - KaTeX, table and code elements wider than the page are not formatted correctly ([#753](https://github.com/jpanther/congo/pull/753))
- 'ß' character is output at the top of articles ([#764](https://github.com/jpanther/congo/pull/764)) - 'ß' character is output at the top of articles ([#764](https://github.com/jpanther/congo/pull/764))
- Article metadata element is output when there is no metadata to display ([#786](https://github.com/jpanther/congo/pull/786)) - Status bar styling is not applied in Safari on iOS ([#789](https://github.com/jpanther/congo/pull/789))
- Header elements not vertically centered when using locale switcher ([#788](https://github.com/jpanther/congo/pull/788))
### Removed ### Removed

View File

@ -8,9 +8,13 @@ function getCSSValue(varName) {
function setThemeColor() { function setThemeColor() {
var metaThemeColor = document.querySelector("meta[name=theme-color]"); var metaThemeColor = document.querySelector("meta[name=theme-color]");
var metaAppleMobileWebAppStatusBarStyle = document.querySelector("meta[name=apple-mobile-web-app-status-bar-style]");
document.documentElement.classList.contains("dark") document.documentElement.classList.contains("dark")
? metaThemeColor.setAttribute("content", getCSSValue("--color-neutral-800")) ? metaThemeColor.setAttribute("content", getCSSValue("--color-neutral-800"))
: metaThemeColor.setAttribute("content", getCSSValue("--color-neutral")); : metaThemeColor.setAttribute("content", getCSSValue("--color-neutral"));
document.documentElement.classList.contains("dark")
? metaAppleMobileWebAppStatusBarStyle.setAttribute("content", getCSSValue("--color-neutral-800"))
: metaAppleMobileWebAppStatusBarStyle.setAttribute("content", getCSSValue("--color-neutral"));
return true; return true;
} }

View File

@ -66,9 +66,5 @@ La lista a continuación es solo un puñado de sitios web creados con el tema Co
| [yoganath.me](https://yoganath.me) | Personal Site and Blog | | [yoganath.me](https://yoganath.me) | Personal Site and Blog |
| [josh-v.com](https://josh-v.com) | Personal Site and Tech blog | | [josh-v.com](https://josh-v.com) | Personal Site and Tech blog |
| [rshmhrj.io](https://rshmhrj.io/) | Personal Site and Tech blog | | [rshmhrj.io](https://rshmhrj.io/) | Personal Site and Tech blog |
| [jamesjarvis.io](https://jamesjarvis.io) | Personal Site and Blog |
| [jnsgr.uk](https://jnsgr.uk) | Personal site and blog |
| [stupidjoey.net](https://stupidjoey.net) | Personal Site and Tech blog |
| [aminelch.github.io](https://aminelch.github.io) | Personal Site and Blog |
**¿Usuaria de congo?** Para agregar tu sitio a esta lista, [haz un pull request](https://github.com/jpanther/congo/blob/dev/exampleSite/content/users/index.md). **¿Usuaria de congo?** Para agregar tu sitio a esta lista, [haz un pull request](https://github.com/jpanther/congo/blob/dev/exampleSite/content/users/index.md).

View File

@ -66,9 +66,5 @@ Congoを使用して構築された実際のウェブサイト。
| [yoganath.me](https://yoganath.me) | Personal Site and Blog | | [yoganath.me](https://yoganath.me) | Personal Site and Blog |
| [josh-v.com](https://josh-v.com) | Personal Site and Tech blog | | [josh-v.com](https://josh-v.com) | Personal Site and Tech blog |
| [rshmhrj.io](https://rshmhrj.io/) | Personal Site and Tech blog | | [rshmhrj.io](https://rshmhrj.io/) | Personal Site and Tech blog |
| [jamesjarvis.io](https://jamesjarvis.io) | Personal Site and Blog |
| [jnsgr.uk](https://jnsgr.uk) | Personal site and blog |
| [stupidjoey.net](https://stupidjoey.net) | Personal Site and Tech blog |
| [aminelch.github.io](https://aminelch.github.io) | Personal Site and Blog |
**Congoを使っていますか** あなたのウェブサイトを加えるために[Pull Request](https://github.com/jpanther/congo/blob/dev/exampleSite/content/users/index.md)を投げてください。 **Congoを使っていますか** あなたのウェブサイトを加えるために[Pull Request](https://github.com/jpanther/congo/blob/dev/exampleSite/content/users/index.md)を投げてください。

View File

@ -66,9 +66,5 @@ The list below is just a handful of the websites that are built using the Congo
| [yoganath.me](https://yoganath.me) | Personal Site and Blog | | [yoganath.me](https://yoganath.me) | Personal Site and Blog |
| [josh-v.com](https://josh-v.com) | Personal Site and Tech blog | | [josh-v.com](https://josh-v.com) | Personal Site and Tech blog |
| [rshmhrj.io](https://rshmhrj.io/) | Personal Site and Tech blog | | [rshmhrj.io](https://rshmhrj.io/) | Personal Site and Tech blog |
| [jamesjarvis.io](https://jamesjarvis.io) | Personal Site and Blog |
| [jnsgr.uk](https://jnsgr.uk) | Personal site and blog |
| [stupidjoey.net](https://stupidjoey.net) | Personal Site and Tech blog |
| [aminelch.github.io](https://aminelch.github.io) | Personal Site and Blog |
**Congo user?** To add your site to this list, [submit a pull request](https://github.com/jpanther/congo/blob/dev/exampleSite/content/users/index.md). **Congo user?** To add your site to this list, [submit a pull request](https://github.com/jpanther/congo/blob/dev/exampleSite/content/users/index.md).

View File

@ -66,9 +66,5 @@ showEdit: false
| [yoganath.me](https://yoganath.me) | Personal Site and Blog | | [yoganath.me](https://yoganath.me) | Personal Site and Blog |
| [josh-v.com](https://josh-v.com) | Personal Site and Tech blog | | [josh-v.com](https://josh-v.com) | Personal Site and Tech blog |
| [rshmhrj.io](https://rshmhrj.io/) | Personal Site and Tech blog | | [rshmhrj.io](https://rshmhrj.io/) | Personal Site and Tech blog |
| [jamesjarvis.io](https://jamesjarvis.io) | Personal Site and Blog |
| [jnsgr.uk](https://jnsgr.uk) | Personal site and blog |
| [stupidjoey.net](https://stupidjoey.net) | Personal Site and Tech blog |
| [aminelch.github.io](https://aminelch.github.io) | Personal Site and Blog |
**想成为Congo的用户** 要将您的网站添加到此列表中,请提交[Pull Request](https://github.com/jpanther/congo/blob/dev/exampleSite/content/users/index.md)来添加。 **想成为Congo的用户** 要将您的网站添加到此列表中,请提交[Pull Request](https://github.com/jpanther/congo/blob/dev/exampleSite/content/users/index.md)来添加。

View File

@ -20,9 +20,7 @@
<figure> <figure>
{{- with $img -}} {{- with $img -}}
{{ $lazy := $.Page.Site.Params.enableImageLazyLoading | default true }} {{ partial "picture.html" (dict "img" . "alt" $altText "class" $class "x2" $x2) }}
{{ $webp := $.Page.Site.Params.enableImageWebp | default true }}
{{ partial "picture.html" (dict "img" . "alt" $altText "class" $class "x2" $x2 "lazy" $lazy "webp" $webp) }}
{{- else -}} {{- else -}}
<img src="{{ .Destination | safeURL }}" alt="{{ $altText }}" class="{{ $class }}" /> <img src="{{ .Destination | safeURL }}" alt="{{ $altText }}" class="{{ $class }}" />
{{- end -}} {{- end -}}

View File

@ -10,23 +10,14 @@
<h1 class="mt-0 text-4xl font-extrabold text-neutral-900 dark:text-neutral"> <h1 class="mt-0 text-4xl font-extrabold text-neutral-900 dark:text-neutral">
{{ .Title | emojify }} {{ .Title | emojify }}
</h1> </h1>
{{ if or <div class="mb-12 mt-8 text-base text-neutral-500 print:hidden dark:text-neutral-400">
(.Params.showDate | default (.Site.Params.article.showDate | default true)) {{ partial "article-meta.html" (dict "context" . "scope" "single") }}
(and (.Params.showDateUpdated | default (.Site.Params.article.showDateUpdated | default false)) (ne (partial "functions/date.html" .Date) (partial "functions/date.html" .Lastmod))) </div>
(and (.Params.showWordCount | default (.Site.Params.article.showWordCount | default false)) (ne .WordCount 0))
(and (.Params.showReadingTime | default (.Site.Params.article.showReadingTime | default true)) (ne .ReadingTime 0))
(.Params.showEdit | default (.Site.Params.article.showEdit | default false))
}}
<div class="mb-12 mt-8 text-base text-neutral-500 print:hidden dark:text-neutral-400">
{{ partial "article-meta.html" (dict "context" . "scope" "single") }}
</div>
{{ end }}
{{ with $feature }} {{ with $feature }}
<div class="prose"> <div class="prose">
{{ $altText := $.Params.featureAlt | default $.Params.coverAlt | default "" }} {{ $altText := $.Params.featureAlt | default $.Params.coverAlt | default "" }}
{{ $class := "mb-6 -mt-4 rounded-md" }} {{ $class := "mb-6 -mt-4 rounded-md" }}
{{ $webp := $.Page.Site.Params.enableImageWebp | default true }} {{ partial "picture.html" (dict "img" . "alt" $altText "class" $class "lazy" false) }}
{{ partial "picture.html" (dict "img" . "alt" $altText "class" $class "lazy" false "webp" $webp) }}
{{ with $.Params.coverCaption }} {{ with $.Params.coverCaption }}
<figcaption class="-mt-3 mb-6 text-center">{{ . | markdownify }}</figcaption> <figcaption class="-mt-3 mb-6 text-center">{{ . | markdownify }}</figcaption>
{{ end }} {{ end }}

View File

@ -1,12 +1,19 @@
{{ if .Params.showAuthor | default (.Site.Params.article.showAuthor | default true) }} {{ if .Params.showAuthor | default (.Site.Params.article.showAuthor | default true) }}
<div class="flex"> <div class="flex">
{{ $lazy := .Params.enableImageLazyLoading|default .Site.Params.enableImageLazyLoading | default true }}
{{ $altText := ($.Site.Language.Params.Author.name | default "Author") }}
{{ with .Site.Language.Params.Author.image }} {{ with .Site.Language.Params.Author.image }}
{{ $authorImage := resources.Get . }} {{ $authorImage := resources.Get . }}
{{ if $authorImage }} {{ if $authorImage }}
{{ $imgClass := "!mb-0 !mt-0 me-4 w-24 h-auto rounded-full" }} {{ $authorImage := $authorImage.Fill "192x192 Center" }}
{{ partial "picture.html" (dict "img" $authorImage "alt" $altText "class" $imgClass "lazy" $lazy ) }} <img
class="!mb-0 !mt-0 me-4 h-24 w-24 rounded-full"
width="96"
height="96"
alt="{{ $.Site.Language.Params.Author.name | default "Author" }}"
src="{{ $authorImage.RelPermalink }}"
{{ if $.Site.Params.enableImageLazyLoading | default true }}
loading="lazy"
{{ end }}
/>
{{ end }} {{ end }}
{{ end }} {{ end }}
<div class="place-self-center"> <div class="place-self-center">

View File

@ -2,6 +2,7 @@
<meta charset="utf-8" /> <meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="theme-color" content="rgb(255,255,255)" /> <meta name="theme-color" content="rgb(255,255,255)" />
<meta name="apple-mobile-web-app-status-bar-style" content="rgb(255,255,255)" />
{{/* Title */}} {{/* Title */}}
{{ if .IsHome -}} {{ if .IsHome -}}
<title>{{ .Site.Title | emojify }}</title> <title>{{ .Site.Title | emojify }}</title>

View File

@ -4,13 +4,17 @@
{{ end }} flex flex-col items-center justify-center text-center" {{ end }} flex flex-col items-center justify-center text-center"
> >
<header class="mb-3 flex flex-col items-center"> <header class="mb-3 flex flex-col items-center">
{{ $lazy := .Params.enableImageLazyLoading | default .Site.Params.enableImageLazyLoading | default true }}
{{ $altText := ($.Site.Language.Params.Author.name | default "Author") }}
{{ with .Site.Language.Params.Author.image }} {{ with .Site.Language.Params.Author.image }}
{{ $authorImage := resources.Get . }} {{ $authorImage := resources.Get . }}
{{ if $authorImage }} {{ if $authorImage }}
{{ $imgClass := "mb-2 h-auto w-36 rounded-full" }} {{ $authorImage := $authorImage.Fill "288x288 Center" }}
{{ partial "picture.html" (dict "img" $authorImage "alt" $altText "class" $imgClass "lazy" $lazy) }} <img
class="mb-2 h-36 w-36 rounded-full"
width="144"
height="144"
alt="{{ $.Site.Language.Params.Author.name | default "Author" }}"
src="{{ $authorImage.RelPermalink }}"
/>
{{ end }} {{ end }}
{{ end }} {{ end }}
<h1 class="text-4xl font-extrabold"> <h1 class="text-4xl font-extrabold">

View File

@ -1,8 +1,8 @@
{{ $img := .img }} {{ $img := .img }}
{{ $alt := .alt }} {{ $alt := .alt }}
{{ $class := .class }} {{ $class := .class }}
{{ $lazy := .lazy }} {{ $lazy := .lazy | default $.Page.Site.Params.enableImageLazyLoading | default true }}
{{ $webp := .webp }} {{ $webp := .webp | default $.Page.Site.Params.enableImageWebp | default true }}
{{ $lqip := .lqip | default false }} {{ $lqip := .lqip | default false }}
{{ $x2 := .x2 | default false }} {{ $x2 := .x2 | default false }}
@ -57,7 +57,7 @@
<source <source
{{ if lt .Width 660 }} {{ if lt .Width 660 }}
{{ with .Resize (printf "%dx%d webp" .Width .Height) }} {{ with .Resize (printf "%dx%d webp" .Width .Height) }}
srcset="{{ .RelPermalink }}" src="{{ .RelPermalink }}"
{{ end }} {{ end }}
{{ else }} {{ else }}
srcset=" {{- (.Resize "330x webp").RelPermalink }} 330w, srcset=" {{- (.Resize "330x webp").RelPermalink }} 330w,
@ -70,18 +70,19 @@
{{ end }} {{ end }}
{{ end }} {{ end }}
{{ if gt .Width 1320 }} {{ if gt .Width 1320 }}
,{{ (.Resize "1320x webp").RelPermalink }} 1320w ,{{ (.Resize "1320x webp").RelPermalink }} 2x
{{ else }} {{ else }}
{{ with .Resize (printf "%dx%d webp" .Width .Height) }} {{ with .Resize (printf "%dx%d webp" .Width .Height) }}
,{{ .RelPermalink }} {{ .Width }}w ,{{ .RelPermalink }} {{ .Width }}w
{{ end }} {{ end }}
{{ end }}" {{ end }}"
src="{{ (.Resize "660x webp").RelPermalink }}"
{{ end }} {{ end }}
sizes="100vw"
type="image/webp" type="image/webp"
/> />
{{ end }} {{ end }}
<img <img
src="{{ .RelPermalink }}"
width="{{ $width }}" width="{{ $width }}"
height="{{ $height }}" height="{{ $height }}"
{{ with $class }}class="{{ . }}"{{ end }} {{ with $class }}class="{{ . }}"{{ end }}
@ -90,20 +91,20 @@
{{ if lt .Width 660 }} {{ if lt .Width 660 }}
src="{{ .RelPermalink }}" src="{{ .RelPermalink }}"
{{ else }} {{ else }}
src="{{ (.Resize "660x").RelPermalink }}"
srcset=" {{- (.Resize "330x").RelPermalink }} 330w, srcset=" {{- (.Resize "330x").RelPermalink }} 330w,
{{- (.Resize "660x").RelPermalink }} 660w {{- (.Resize "660x").RelPermalink }}
660w
{{ if gt .Width 1024 }} {{ if gt .Width 1024 }}
,{{ (.Resize "1024x").RelPermalink }} 1024w ,{{ (.Resize "1024x").RelPermalink }} 1024w
{{ else }} {{ else }}
,{{ .RelPermalink }} {{ .Width }}w ,{{ .RelPermalink }} {{ .Width }}w
{{ end }} {{ end }}
{{ if gt .Width 1320 }} {{ if gt .Width 1320 }}
,{{ (.Resize "1320x").RelPermalink }} 1320w ,{{ (.Resize "1320x").RelPermalink }} 2x
{{ else }} {{ else }}
,{{ .RelPermalink }} {{ .Width }}w ,{{ .RelPermalink }} {{ .Width }}w
{{ end }}" {{ end }}"
sizes="100vw" src="{{ (.Resize "660x").RelPermalink }}"
{{ end }} {{ end }}
/> />
</picture> </picture>

View File

@ -20,10 +20,10 @@
> >
</button> </button>
{{ if eq $dir "down" }} {{ if eq $dir "down" }}
<div class="invisible w-full bg-transparent group-hover:visible"></div> <div class="invisible h-2 w-full bg-transparent group-hover:visible"></div>
{{ end }} {{ end }}
<div <div
class="{{ if not (eq $dir "down") }} bottom-7 {{ end }} invisible absolute z-50 flex flex-col whitespace-nowrap rounded border border-neutral-300 bg-neutral text-start text-base shadow group-hover:visible ltr:right-0 rtl:left-0 dark:border-neutral-600 dark:bg-neutral-800" class="{{ cond (eq $dir "down") "top-8" "bottom-7" }} invisible absolute z-50 flex flex-col whitespace-nowrap rounded border border-neutral-300 bg-neutral text-start text-base shadow group-hover:visible ltr:right-0 rtl:left-0 dark:border-neutral-600 dark:bg-neutral-800"
> >
{{ $siteLanguages := site.Languages }} {{ $siteLanguages := site.Languages }}
{{ $pageLang := .Page.Lang }} {{ $pageLang := .Page.Lang }}

View File

@ -19,9 +19,7 @@
{{ with $href }}<a href="{{ . }}">{{ end }} {{ with $href }}<a href="{{ . }}">{{ end }}
{{- with $img -}} {{- with $img -}}
{{ $lazy := $.Page.Site.Params.enableImageLazyLoading | default true }} {{ partial "picture.html" (dict "img" . "alt" $altText "class" $class) }}
{{ $webp := $.Page.Site.Params.enableImageWebp | default true }}
{{ partial "picture.html" (dict "img" . "alt" $altText "class" $class "lazy" $lazy "webp" $webp) }}
{{- else -}} {{- else -}}
<img src="{{ $url.String }}" alt="{{ $altText }}" class="{{ $class }}"/> <img src="{{ $url.String }}" alt="{{ $altText }}" class="{{ $class }}"/>
{{- end -}} {{- end -}}

View File

@ -13,9 +13,7 @@
{{ $altText = (.Get "caption") | markdownify | plainify }} {{ $altText = (.Get "caption") | markdownify | plainify }}
{{ end }} {{ end }}
{{ $lazy := $.Page.Site.Params.enableImageLazyLoading | default true }} {{ partial "picture.html" (dict "img" $image "alt" $altText "x2" true) }}
{{ $webp := $.Page.Site.Params.enableImageWebp | default true }}
{{ partial "picture.html" (dict "img" $image "alt" $altText "x2" true "lazy" $lazy "webp" $webp) }}
{{- if .Get "href" }}</a>{{ end -}} {{- if .Get "href" }}</a>{{ end -}}
{{- if .Get "caption" -}} {{- if .Get "caption" -}}