Add image shortcode
This commit is contained in:
parent
c9f720e77d
commit
8e2e37eece
|
@ -0,0 +1,3 @@
|
|||
{{ if .Get "src" }}
|
||||
<img src="{{ .Get "src" | safeURL }}" {{ with .Get "alt" }} alt="{{ . | plainify }}" {{ end }} class="{{ with .Get "position"}}{{ . }}{{ else -}} left {{- end }}" {{ with .Get "style" }} style="{{ . | safeCSS }}" {{ end }} />
|
||||
{{ end }}
|
|
@ -79,6 +79,19 @@ a {
|
|||
img {
|
||||
display: block;
|
||||
max-width: 100%;
|
||||
|
||||
&.left {
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
&.center {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
&.right {
|
||||
margin-left: auto;
|
||||
}
|
||||
}
|
||||
|
||||
code {
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue