diff --git a/CHANGELOG.md b/CHANGELOG.md index 11f0cdcf..f1a982ba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ### Changed +- Images smaller than the article width are no longer resized to fill the content area and will now simply align centre ([#394](https://github.com/jpanther/congo/pull/394)) - Upgrade to KaTeX v0.16.4 ([#414](https://github.com/jpanther/congo/pull/414)) - Upgrade to Mermaid v9.3.0 ([#419](https://github.com/jpanther/congo/pull/419)) - Upgrade to Chart.js v4.1.2 ([#420](https://github.com/jpanther/congo/pull/420), [#434](https://github.com/jpanther/congo/pull/434)) diff --git a/layouts/_default/_markup/render-image.html b/layouts/_default/_markup/render-image.html index 96f30901..63c27b73 100644 --- a/layouts/_default/_markup/render-image.html +++ b/layouts/_default/_markup/render-image.html @@ -3,8 +3,8 @@ {{ $caption := .Title }} {{ if findRE "^https?" $url.Scheme }}
- {{ $altText }} - {{ with $caption }}
{{ . | markdownify }}
{{ end }} + {{ $altText }} + {{ with $caption }}
{{ . | markdownify }}
{{ end }}
{{ else }} {{ $resource := "" }} @@ -15,30 +15,26 @@ {{ end }} {{ with $resource }}
- {{ if eq .MediaType.SubType "svg" }} - {{ $altText }} - {{ else }} - {{ $altText }} - {{ end }} - {{ with $caption }}
{{ . | markdownify }}
{{ end }} + {{ $altText }} + {{ with $caption }}
{{ . | markdownify }}
{{ end }}
{{ else }}
- {{ $altText }} - {{ with $caption }}
{{ . | markdownify }}
{{ end }} + {{ $altText }} + {{ with $caption }}
{{ . | markdownify }}
{{ end }}
{{ end }} {{ end }} diff --git a/layouts/shortcodes/figure.html b/layouts/shortcodes/figure.html index e8220ca6..bcd105f8 100644 --- a/layouts/shortcodes/figure.html +++ b/layouts/shortcodes/figure.html @@ -8,8 +8,8 @@ {{ $class := .Get "class" }} {{ if findRE "^https?" $url.Scheme }}
- {{ $altText }} - {{ with $caption }}
{{ . | markdownify }}
{{ end }} + {{ $altText }} + {{ with $caption }}
{{ . | markdownify }}
{{ end }}
{{ else }} {{ $resource := "" }} @@ -22,22 +22,26 @@
{{ with $href }}{{ end }} {{ $altText }} {{ if $href }}{{ end }} - {{ with $caption }}
{{ . | markdownify }}
{{ end }} + {{ with $caption }}
{{ . | markdownify }}
{{ end }}
{{ else }}
- {{ $altText }} - {{ with $caption }}
{{ . | markdownify }}
{{ end }} + {{ $altText }} + {{ with $caption }}
{{ . | markdownify }}
{{ end }}
{{ end }} {{ end }}