forked from BgLUG/bglug.it
Compare commits
No commits in common. "8e873a40f3894356ad018c1bce0faa41f564d1ac" and "b3b53f4f98d76be5644074794643f167372b8980" have entirely different histories.
8e873a40f3
...
b3b53f4f98
@ -38,8 +38,4 @@
|
||||
display: inline-block;
|
||||
padding-right: 1em;
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
#content article img {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
Binary file not shown.
@ -1,22 +0,0 @@
|
||||
{{- $u := urls.Parse .Destination -}}
|
||||
{{- $src := $u.String -}}
|
||||
{{- if not $u.IsAbs -}}
|
||||
{{- $path := strings.TrimPrefix "./" $u.Path }}
|
||||
{{- with or (.PageInner.Resources.Get $path) (resources.Get $path) -}}
|
||||
{{- $src = (.Resize "1400x jpg q50").RelPermalink -}}
|
||||
{{- with $u.RawQuery -}}
|
||||
{{- $src = printf "%s?%s" $src . -}}
|
||||
{{- end -}}
|
||||
{{- with $u.Fragment -}}
|
||||
{{- $src = printf "%s#%s" $src . -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- $attributes := merge .Attributes (dict "alt" .Text "src" $src "title" (.Title | transform.HTMLEscape)) -}}
|
||||
<img
|
||||
{{- range $k, $v := $attributes -}}
|
||||
{{- if $v -}}
|
||||
{{- printf " %s=%q" $k $v | safeHTMLAttr -}}
|
||||
{{- end -}}
|
||||
{{- end -}}>
|
||||
{{- /**/ -}}
|
@ -27,7 +27,7 @@
|
||||
<span class="image featured">
|
||||
{{- if in $rasters $img.MediaType.SubType -}}
|
||||
{{- $img = $img.Resize (printf "x%d" $maxHeight) -}}
|
||||
<img src="{{ $img.RelPermalink }}" alt="{{ .Params.image_alt }}" style="max-height: {{ $maxHeight }}px;" />
|
||||
<img src="{{ $img.RelPermalink }}" alt="{{ .Params.image_alt }}" style="width: {{ $img.Width }}px; max-height: {{ $maxHeight }}px;" />
|
||||
{{ else }}
|
||||
<img src="{{ $img.RelPermalink }}" alt="{{ .Params.image_alt }}" style="max-height: {{ $maxHeight }}px;" />
|
||||
{{ end }}
|
||||
|
Loading…
x
Reference in New Issue
Block a user