mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-07-17 11:55:31 -04:00
valid HTML - don't use px in img width and don't put figures in paragraphs
This commit is contained in:
@@ -1,16 +1,14 @@
|
||||
<p>
|
||||
{{ if .Get "caption"}}
|
||||
<figure>
|
||||
<picture>
|
||||
{{ else }}
|
||||
<p>
|
||||
{{ end }}
|
||||
<img
|
||||
src="{{ .Get "src" }}"
|
||||
alt="{{ .Get "alt" }}"
|
||||
{{ if .Get "width"}} width="{{ .Get "width" }}px"{{ end }}
|
||||
{{ if .Get "caption"}} title="{{ .Get "caption"}}"{{ end }}>
|
||||
<img src="{{ .Get "src" }}" alt="{{ .Get "alt" }}"{{ if .Get "width"}} width="{{ .Get "width" }}"{{ end }}{{ if .Get "caption"}} title="{{ .Get "caption"}}"{{ end }}>
|
||||
{{ if .Get "caption"}}
|
||||
</picture>
|
||||
<figcaption>{{ .Get "caption" }}</figcaption>
|
||||
</figure>
|
||||
{{ else }}
|
||||
</p>
|
||||
{{ end }}
|
||||
</p>
|
Reference in New Issue
Block a user