mirror of
https://github.com/adityatelange/hugo-PaperMod.git
synced 2023-12-21 10:22:58 +01:00
feat: works if no img specified or no img.link specified
This commit is contained in:
parent
f7b26bef73
commit
c2bc65e9c9
@ -6,7 +6,6 @@
|
|||||||
.home-info-container img {
|
.home-info-container img {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
width: 100%;
|
|
||||||
height: auto;
|
height: auto;
|
||||||
max-width: 600px;
|
max-width: 600px;
|
||||||
margin-right: 20px;
|
margin-right: 20px;
|
||||||
@ -14,7 +13,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.home-info-container ul {
|
.home-info-container ul {
|
||||||
padding-left: 20px;
|
|
||||||
list-style-type: none;
|
list-style-type: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,10 +4,17 @@
|
|||||||
<h1>{{ .title | markdownify }}</h1>
|
<h1>{{ .title | markdownify }}</h1>
|
||||||
</header>
|
</header>
|
||||||
<div class="home-info-container">
|
<div class="home-info-container">
|
||||||
<a href="{{ .image.link | absURL }}" target="_blank" rel="noopener">
|
{{- if .image.url}}
|
||||||
<img draggable="false" src="{{ .image.url | absURL }}" alt=" {{ .image.title | default "profile image" }}"
|
{{- if .image.link -}}
|
||||||
title="{{ .image.title }}" height="{{ .image.height | default 150 }}" width="{{ .image.width | default 150 }}" />
|
<a href="{{ .image.link | absURL }}" target="_blank" rel="noopener" style="width: 100%">
|
||||||
</a>
|
<img draggable="false" src="{{ .image.url | absURL }}" alt=" {{ .image.title | default "profile image" }}"
|
||||||
|
title="{{ .image.title }}" height="{{ .image.height | default 150 }}" width="{{ .image.width | default 150 }}" />
|
||||||
|
</a>
|
||||||
|
{{- else }}
|
||||||
|
<img draggable="false" src="{{ .image.url | absURL }}" alt=" {{ .image.title | default "profile image" }}"
|
||||||
|
title="{{ .image.title }}" height="{{ .image.height | default 150 }}" width="{{ .image.width | default 150 }}" />
|
||||||
|
{{- end }}
|
||||||
|
{{- end}}
|
||||||
<div class="entry-content">
|
<div class="entry-content">
|
||||||
{{ .content | markdownify }}
|
{{ .content | markdownify }}
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user