Allow for credits in image positions
This commit is contained in:
parent
bd1076113f
commit
acbd51bcd7
@ -760,6 +760,13 @@ h1 {
|
||||
}
|
||||
}
|
||||
|
||||
.tsc-image, .tsc-gallery-img {
|
||||
.credits {
|
||||
font-style: italic;
|
||||
float: right;
|
||||
}
|
||||
}
|
||||
|
||||
.youtube-video {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
@ -24,4 +24,10 @@
|
||||
src="{{ $img.RelPermalink }}"
|
||||
>
|
||||
</a>
|
||||
{{ with .Get "credits" }}
|
||||
<div class="credits">Foto: {{ . }}</div>
|
||||
{{ end }}
|
||||
{{ with .Get "caption" }}
|
||||
<caption>{{ . }}</caption>
|
||||
{{ end }}
|
||||
</figure>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<figure class="tsc-image">
|
||||
<figure class="tsc-image" style="{{- with .Get "width" -}}max-width: min(90%, {{.}}px);{{- end -}}">
|
||||
{{ with .Get "href" }}
|
||||
<a href="{{ . }}">
|
||||
{{ end }}
|
||||
@ -7,16 +7,17 @@
|
||||
{{- $filename := .Get "src" }}
|
||||
{{ $resource := .Page.Resources.Get $filename -}}
|
||||
src="{{ $resource.RelPermalink }}"
|
||||
style="
|
||||
{{- with .Get "width" -}}max-width: min(90%, {{.}}px);{{- end -}}
|
||||
"
|
||||
>
|
||||
{{ with .Get "href" }}
|
||||
</a>
|
||||
{{ end }}
|
||||
{{ with .Get "credits" }}
|
||||
<div class="credits">Foto: {{ . }}</div>
|
||||
{{ end }}
|
||||
{{ with .Get "caption" }}
|
||||
<figcaption>
|
||||
{{ . }}
|
||||
</figcaption>
|
||||
{{ end }}
|
||||
</figure>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user