jlelse
/
Indieroad
Archived
1
Fork 0

Add option for promo message below article

This commit is contained in:
Jan-Lukas Else 2020-04-12 10:24:35 +02:00
parent d29c669422
commit 32a0c2f2bf
7 changed files with 19 additions and 8 deletions

View File

@ -616,6 +616,15 @@ select {
} }
} }
/* Promo */
.promo {
@include subarticle-element;
font-weight: bold;
a {
text-decoration: underline;
}
}
/* Webmentionform */ /* Webmentionform */
.wm-form { .wm-form {
@include subarticle-element; @include subarticle-element;

View File

@ -20,7 +20,7 @@
{{- .Render "summary" }} {{- .Render "summary" }}
{{- end }} {{- end }}
{{- end }} {{- end }}
{{ partialCached "authorbox" . (.Param "authorbox") }} {{ if (.Param "authorbox") }}{{ partialCached "authorbox" . }}{{ end }}
</main> </main>
{{ partial "pagination" . }} {{ partial "pagination" . }}
{{ end }} {{ end }}

View File

@ -28,8 +28,9 @@
</div> </div>
{{ partial "post_tags" . }} {{ partial "post_tags" . }}
</article> </article>
{{ partialCached "authorbox" . (.Param "authorbox") }} {{ if (.Param "authorbox") }}{{ partialCached "authorbox" . }}{{ end }}
</main> </main>
{{ if (and (.Param "promo") .CurrentSection.Parent) }}{{ partialCached "promo" . }}{{ end }}
{{ range $i, $image := .Params.images }} {{ range $i, $image := .Params.images }}
<a href="#_" class="lightbox" id="{{ $image | md5 }}-lightbox"> <a href="#_" class="lightbox" id="{{ $image | md5 }}-lightbox">
<img src="{{ $image | safeURL }}"> <img src="{{ $image | safeURL }}">

View File

@ -10,7 +10,7 @@
{{- range $paginator.Pages }} {{- range $paginator.Pages }}
{{- .Render "summary" }} {{- .Render "summary" }}
{{- end }} {{- end }}
{{ partialCached "authorbox" . (.Param "authorbox") }} {{ if (.Param "authorbox") }}{{ partialCached "authorbox" . }}{{ end }}
</main> </main>
{{ partial "pagination.html" . }} {{ partial "pagination.html" . }}
{{ end }} {{ end }}

View File

@ -1,5 +1,4 @@
{{- if .Param "authorbox" }} {{ with .Site.Author }}
{{- with .Site.Author }}
<div class="authorbox p-author h-card"> <div class="authorbox p-author h-card">
{{ if .avatar }} {{ if .avatar }}
<figure class="author-avatar"> <figure class="author-avatar">
@ -17,5 +16,4 @@
</div> </div>
{{ end }} {{ end }}
</div> </div>
{{- end }} {{ end }}
{{- end }}

View File

@ -0,0 +1,3 @@
<div class="promo">
{{ (.Site.Params.promo) | emojify | markdownify }}
</div>

View File

@ -15,7 +15,7 @@
{{- range $paginator.Pages }} {{- range $paginator.Pages }}
{{- .Render "photosummary" }} {{- .Render "photosummary" }}
{{- end }} {{- end }}
{{ partialCached "authorbox" . (.Param "authorbox") }} {{ if (.Param "authorbox") }}{{ partialCached "authorbox" . }}{{ end }}
</main> </main>
{{ partial "pagination" . }} {{ partial "pagination" . }}
{{ end }} {{ end }}