forked from Bunteshaus/bunteshaus.de
small fixes
This commit is contained in:
parent
d22f1f2eb5
commit
0b399cef87
|
@ -1,12 +1,15 @@
|
||||||
article {
|
article {
|
||||||
.article-image {
|
.article_image {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-bottom: 1.5rem;
|
margin-bottom: 1.5rem;
|
||||||
|
width: 80vw;
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
img {
|
img {
|
||||||
width: 65vw;
|
width: 80vw;
|
||||||
}
|
}
|
||||||
&> a {
|
&> a {
|
||||||
display: inherit;
|
display: inherit;
|
||||||
|
@ -75,9 +78,12 @@ article {
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
}
|
}
|
||||||
article {
|
article {
|
||||||
.article-image {
|
.article_image {
|
||||||
|
width: 55vw;
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
img {
|
img {
|
||||||
width: 45vw;
|
width: 55vw;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,8 +21,6 @@
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ if $img_tmp }}
|
{{ if $img_tmp }}
|
||||||
{{- $image := .Page.Resources.GetMatch (printf "%s" ($img_tmp | safeURL)) -}}
|
{{- $image := .Page.Resources.GetMatch (printf "%s" ($img_tmp | safeURL)) -}}
|
||||||
<div class="article-image">
|
|
||||||
<a href="{{- $image.Permalink -}}" class="no_underline">
|
|
||||||
{{- $permalink := "" -}}
|
{{- $permalink := "" -}}
|
||||||
|
|
||||||
{{- if ne $image nil -}}
|
{{- if ne $image nil -}}
|
||||||
|
@ -32,15 +30,15 @@
|
||||||
{{- $permalink = (printf "/%s" (.Destination | safeURL)) -}}
|
{{- $permalink = (printf "/%s" (.Destination | safeURL)) -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
|
<a href="{{- $image.Permalink -}}" class="article_image no_underline">
|
||||||
<img loading="lazy"
|
<img loading="lazy"
|
||||||
src="{{ $permalink }}"
|
src="{{ $permalink }}"
|
||||||
alt="{{ .Text }}"
|
alt="{{ .Text }}"
|
||||||
{{ with .Title}} title="{{ . }}"{{ end }}
|
{{ with .Title}} title="{{ . }}"{{ end }}
|
||||||
width={{ $image.Width }}
|
width={{ $image.Width }}
|
||||||
height="{{ $image.Height }}" />
|
height="{{ $image.Height }}" /><br>
|
||||||
<div>{{ .Text }}</div>
|
{{ .Text }}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
|
@ -46,16 +46,14 @@
|
||||||
{{ range .context.Resources.ByType "image" }}
|
{{ range .context.Resources.ByType "image" }}
|
||||||
{{ $picname := . }}
|
{{ $picname := . }}
|
||||||
{{ if not (or (in $content $picname ) (hasPrefix $picname "banner") )}}
|
{{ if not (or (in $content $picname ) (hasPrefix $picname "banner") )}}
|
||||||
<div class="article-image">
|
<a href="{{- $picname.Permalink -}}" class="article_image no_underline">
|
||||||
<a href="{{- $image.Permalink -}}" class="no_underline">
|
|
||||||
<img loading="lazy"
|
<img loading="lazy"
|
||||||
src="{{ .Permalink }}"
|
src="{{ .Permalink }}"
|
||||||
alt="{{ . }}"
|
alt="{{ . }}"
|
||||||
{{ with .Title}} title="{{ . }}"{{ end }}
|
{{ with .Title}} title="{{ . }}"{{ end }}
|
||||||
width={{ $image.Width }}
|
width={{ $picname.Width }}
|
||||||
height="{{ $image.Height }}" />
|
height="{{ $picname.Height }}" />
|
||||||
</a>
|
</a>
|
||||||
</div>
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
Loading…
Reference in New Issue