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