img, video are max-width 100% otherwise centered and kept in original dimensions

master
Marcell Mars 1 year ago
parent b6ad4c8b63
commit 306cd0f118
  1. 7
      assets/css/site.css
  2. 4
      layouts/_default/_markup/render-image.html
  3. 2
      static/css/site.min.css

@ -477,8 +477,11 @@ ol li {
list-style-type: decimal;
}
img {
width: 100%;
img, video {
max-width: 100%;
display: block;
margin-left: auto;
margin-right: auto;
}
.supt {

@ -9,12 +9,12 @@
{{- $img_params := (substr .Destination 4) -}}
{{- $img_src := index (split $img_params " ") 0 -}}
{{- $img_attr := index (split $img_params $img_src) 1 -}}
<img src="{{ $img_src }}" {{ $img_attr | safeHTMLAttr }} />
<img class="sandpoints-img" src="{{ $img_src }}" {{ $img_attr | safeHTMLAttr }} />
{{- else if strings.HasPrefix .Destination "vid:" -}}
{{- $vid_params := (substr .Destination 4) -}}
{{- $vid_src := index (split $vid_params " ") 0 -}}
{{- $vid_attr := index (split $vid_params $vid_src) 1 -}}
<video controls src="{{ $vid_src }}" {{ $vid_attr | safeHTMLAttr }}></video>
<video class="sandpoints-vid" controls src="{{ $vid_src }}" {{ $vid_attr | safeHTMLAttr }}></video>
{{- else if strings.HasPrefix .Destination "bib:" -}}
{{- $destination := (substr .Destination 4) -}}
{{- $c_prefix := .Page.Site.Params.sandpointsCatalogPrefix | default "/library/" -}}

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save