mirror of
https://github.com/TrezOne/congo-hindi-gujarati.git
synced 2026-06-15 04:52:55 -04:00
@@ -8,6 +8,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
|
- `figure` shortcode would load recursively when using the `default` paramater ([#1074](https://github.com/jpanther/congo/issues/1074))
|
||||||
- Some partials not loading due to incorrect file paths ([#1075](https://github.com/jpanther/congo/pull/1075))
|
- Some partials not loading due to incorrect file paths ([#1075](https://github.com/jpanther/congo/pull/1075))
|
||||||
|
|
||||||
## [2.12.0] - 2025-06-22
|
## [2.12.0] - 2025-06-22
|
||||||
|
|||||||
@@ -1,5 +1,42 @@
|
|||||||
{{ if .Get "default" }}
|
{{ if .Get "default" }}
|
||||||
{{ template "_shortcodes/figure.html" . }}
|
<figure{{ with .Get "class" }} class="{{ . }}"{{ end }}>
|
||||||
|
{{- if .Get "link" -}}
|
||||||
|
<a href="{{ .Get "link" }}"{{ with .Get "target" }} target="{{ . }}"{{ end }}{{ with .Get "rel" }} rel="{{ . }}"{{ end }}>
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- $u := urls.Parse (.Get "src") -}}
|
||||||
|
{{- $src := $u.String -}}
|
||||||
|
{{- if not $u.IsAbs -}}
|
||||||
|
{{- with or (.Page.Resources.Get $u.Path) (resources.Get $u.Path) -}}
|
||||||
|
{{- $src = .RelPermalink -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
<img src="{{ $src }}"
|
||||||
|
{{- if or (.Get "alt") (.Get "caption") }}
|
||||||
|
alt="{{ with .Get "alt" }}{{ . }}{{ else }}{{ .Get "caption" | markdownify| plainify }}{{ end }}"
|
||||||
|
{{- end -}}
|
||||||
|
{{- with .Get "width" }} width="{{ . }}"{{ end -}}
|
||||||
|
{{- with .Get "height" }} height="{{ . }}"{{ end -}}
|
||||||
|
{{- with .Get "loading" }} loading="{{ . }}"{{ end -}}
|
||||||
|
><!-- Closing img tag -->
|
||||||
|
{{- if .Get "link" }}</a>{{ end -}}
|
||||||
|
{{- if or (or (.Get "title") (.Get "caption")) (.Get "attr") -}}
|
||||||
|
<figcaption>
|
||||||
|
{{ with (.Get "title") -}}
|
||||||
|
<h4>{{ . }}</h4>
|
||||||
|
{{- end -}}
|
||||||
|
{{- if or (.Get "caption") (.Get "attr") -}}<p>
|
||||||
|
{{- .Get "caption" | markdownify -}}
|
||||||
|
{{- with .Get "attrlink" }}
|
||||||
|
<a href="{{ . }}">
|
||||||
|
{{- end -}}
|
||||||
|
{{- .Get "attr" | markdownify -}}
|
||||||
|
{{- if .Get "attrlink" }}</a>{{ end }}</p>
|
||||||
|
{{- end }}
|
||||||
|
</figcaption>
|
||||||
|
{{- end }}
|
||||||
|
</figure>
|
||||||
{{ else }}
|
{{ else }}
|
||||||
{{ $url := urls.Parse (.Get "src") }}
|
{{ $url := urls.Parse (.Get "src") }}
|
||||||
{{ $altText := .Get "alt" }}
|
{{ $altText := .Get "alt" }}
|
||||||
|
|||||||
Reference in New Issue
Block a user