ADD Image description, REFACTORING

This commit is contained in:
Hoernschen 2022-07-08 17:35:15 +02:00
parent 0ded2e9138
commit 327f17dd39
Signed by: hoernschen
GPG key ID: 37591FAF4E6D3462
13 changed files with 45 additions and 55 deletions

View file

@ -419,7 +419,7 @@ button {
box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
max-width: 350px;
height: 400px;
margin: 5px;
margin: auto;
justify-content: center;
}

View file

@ -1,5 +1,5 @@
{{ define "main" }}
<div class="notfound">
<img class="notfoundimage" src="/images/undraw_page_not_found_su7k.svg">
<img class="notfoundimage" src="/images/undraw_page_not_found_su7k.svg" alt="Not Found Image">
</div>
{{ end }}

View file

@ -1,7 +1,7 @@
{{ define "main" }}
{{ with .Params.image }}
{{ if .url }}
<img class="coverimage" src="{{ .url }}" />
<img class="coverimage" src="{{ .url }}" alt="{{ .alt }}" />
{{ else }}
<img class="coverimage" src="{{ . }}" />
{{ end }}

View file

@ -9,18 +9,20 @@
</article>
<div class="cardList">
{{ range .Pages }}
<a href="{{.Permalink}}">
<div class="card">
<a href="{{.Permalink}}">
<div class="cardContent">
{{ if .Params.image }}
<img class="cardImage" src="{{ .Params.image }}" />
<img class="cardImage {{ if eq .Params.image.cover false }} noCover {{ end }}" alt="{{ .Params.image.alt }}" src="{{ .Params.image.url }}" />
{{ else }}
<img class="cardImage" src="{{ $.Site.Params.defaultimage }}" />
<img class="cardImage" src="{{ .Site.Params.defaultimage }}" alt="Default Image" />
{{ end }}
<div class="cardTitle">{{.Title}}</div>
<div class="cardDescription">{{ .Content | safeHTML | truncate 250 }}</div>
<div class="cardDetail">{{.Date.Format "02.01.2006"}} | {{.ReadingTime}} Minuten</div>
</div>
</a>
</div>
{{ end }}
</div>
</div>

View file

@ -13,7 +13,7 @@
<div class="progress"></div>
<header class="header" id="header">
<div class="header-container">
<a class="home" href="/#"><img id="logo" class="logo" src="{{ .Site.Params.logo }}"></a>
<a class="home" href="/#"><img id="logo" class="logo" src="{{ .Site.Params.logo }}" alt="Logo"></a>
<div class="header-items" id="header-items">
{{- range $links}}
{{ if .links }}

View file

@ -33,20 +33,6 @@
</div>
</a>
</div>
{{/* <a href="{{ .url }}">
<div class="mediumCard">
{{ if .image }}
<img class="cardImage" alt="{{ .image.alt }}" src="{{ .image.url }}" />
{{ else if .icon }}
<div class="cardImage">
<i class="fas fa-{{ .icon }} cardIcon"></i>
</div>
{{ else }}
<img class="cardImage" alt="default image" src="{{ $defaultimage }}" />
{{ end }}
<div class="cardTitle">{{.title}}</div>
</div>
</a> */}}
{{- end}}
</div>
</div>

View file

@ -20,9 +20,9 @@
<a href="{{.Permalink}}">
<div class="cardContent">
{{ if .Params.image }}
<img class="cardImage {{ if eq .Params.image.cover false }} noCover {{ end }}" src="{{ .Params.image.url }}" />
<img class="cardImage {{ if eq .Params.image.cover false }} noCover {{ end }}" alt="{{ .Params.image.alt }}" src="{{ .Params.image.url }}" />
{{ else }}
<img class="cardImage" src="{{ $defaultimage }}" />
<img class="cardImage" src="{{ $defaultimage }}" alt="Defaul Image" />
{{ end }}
<div class="cardTitle">{{.Title}}</div>
<div class="cardDescription">{{ .Content | safeHTML | truncate 250 }}</div>

View file

@ -11,7 +11,7 @@
<div class="section-content services">
{{if and ($service.image) (eq $service.image.direction "left")}}
<div class="service-icon-container col-4">
<img class="service-icon" src="{{ $service.image.url }}">
<img class="service-icon" src="{{ $service.image.url }}" alt="{{ $service.image.alt }}">
</div>
{{end}}
<div class="service-description {{if $service.image}} col-8 {{end}}">
@ -26,7 +26,7 @@
</div>
{{if and ($service.image) (eq $service.image.direction "right")}}
<div class="service-icon-container col-4">
<img class="service-icon" src="{{ $service.image.url }}">
<img class="service-icon" src="{{ $service.image.url }}" alt="{{ $service.image.alt }}">
</div>
{{end}}
</div>

View file

@ -19,9 +19,9 @@
<a href="{{.Permalink}}">
<div class="teammember">
{{ if .Params.image }}
<img class="avatar" src="{{ .Params.image }}" alt="Avatar">
<img class="avatar" src="{{ .Params.image }}" alt="{{ .Params.name }} Avatar">
{{ else }}
<img class="avatar" src="{{ $defaultimage }}" alt="Avatar">
<img class="avatar" src="{{ $defaultimage }}" alt="Default Avatar">
{{ end }}
<h1 class="teammember-title">{{ .Params.name }}</h1>
{{- range .Params.jobs }}

View file

@ -15,9 +15,9 @@
<a href="{{.Permalink}}">
<div class="cardContent">
{{ if .Params.image }}
<img class="cardImage {{ if eq .Params.image.cover false }} noCover {{ end }}" src="{{ .Params.image.url }}" />
<img class="cardImage {{ if eq .Params.image.cover false }} noCover {{ end }}" alt="{{ .Params.image.alt }}" src="{{ .Params.image.url }}" />
{{ else }}
<img class="cardImage" src="{{ .Site.Params.defaultimage }}" />
<img class="cardImage" src="{{ .Site.Params.defaultimage }}" alt="Default Image" />
{{ end }}
<div class="cardTitle">{{.Title}}</div>
<div class="cardDescription">{{ .Content | safeHTML | truncate 250 }}</div>

View file

@ -41,7 +41,7 @@
{{ define "main" }}
{{ with .Params.image }}
<img class="coverimage {{ if eq .cover false }} noCover {{ end }}" src="{{ .url }}" />
<img class="coverimage {{ if eq .cover false }} noCover {{ end }}" alt="{{ .alt }}" src="{{ .url }}" />
{{ with .copyright }}
<div class="image-copyright">© {{ . }}</div>
{{ end }}
@ -67,9 +67,9 @@
<a href="{{.Permalink}}">
<div class="author">
{{ if .Params.image }}
<img class="avatar-small" src="{{ .Params.image }}" alt="Avatar">
<img class="avatar-small" src="{{ .Params.image }}" alt="{{ .Params.name }} Avatar">
{{ else }}
<img class="avatar-small" src="{{ $.Site.Params.defaultimage }}" alt="Avatar">
<img class="avatar-small" src="{{ $.Site.Params.defaultimage }}" alt="Default Avatar">
{{ end }}
<h4 class="author-title">{{ .Params.name }}</h4>
<div class="social-media">

View file

@ -12,9 +12,9 @@
<a href="{{.Permalink}}">
<div class="teammember">
{{ if .Params.image }}
<img class="avatar" src="{{ .Params.image }}" alt="Avatar">
<img class="avatar" src="{{ .Params.image }}" alt="{{ .Params.name }} Avatar">
{{ else }}
<img class="avatar" src="{{ $.Site.Params.defaultimage }}" alt="Avatar">
<img class="avatar" src="{{ $.Site.Params.defaultimage }}" alt="Default Avatar">
{{ end }}
<h1 class="teammember-title">{{ .Params.name }}</h1>
{{- range .Params.jobs }}

View file

@ -26,18 +26,20 @@
{{ with .Site.GetPage "/posts" }}
{{- range .RegularPages -}}
{{if eq .Params.author $name}}
<a href="{{.Permalink}}">
<div class="card">
<a href="{{.Permalink}}">
<div class="cardContent">
{{ if .Params.image }}
<img class="cardImage" src="{{ .Params.image }}" />
<img class="cardImage {{ if eq .Params.image.cover false }} noCover {{ end }}" alt="{{ .Params.image.alt }}" src="{{ .Params.image.url }}" />
{{ else }}
<img class="cardImage" src="{{ $defaultimage }}" />
<img class="cardImage" src="{{ .Site.Params.defaultimage }}" alt="Default Image" />
{{ end }}
<div class="cardTitle">{{.Title}}</div>
<div class="cardDescription">{{ .Content | safeHTML | truncate 250 }}</div>
<div class="cardDetail">{{.Date.Format "02.01.2006"}} | {{.ReadingTime}} Minuten</div>
</div>
</a>
</div>
{{end}}
{{ end }}
{{ end }}