Fix YouTube figures and add a .content-width CSS class
This commit is contained in:
parent
f7e35417a9
commit
ff72f94b8f
3 changed files with 3 additions and 2 deletions
|
@ -180,7 +180,6 @@
|
||||||
|
|
||||||
figure .youtube {
|
figure .youtube {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
max-width: var(--content-width);
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
@layer utility {
|
@layer utility {
|
||||||
.centered { text-align: center; }
|
.centered { text-align: center; }
|
||||||
|
|
||||||
|
.content-width { grid-column: content-start / content-end; }
|
||||||
|
|
||||||
.float-right {
|
.float-right {
|
||||||
float: right;
|
float: right;
|
||||||
justify-self: end;
|
justify-self: end;
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
{{- $id := .Get "id" | default (.Get 0) -}}
|
{{- $id := .Get "id" | default (.Get 0) -}}
|
||||||
{{- $class := .Get "class" | default (.Get 1) -}}
|
{{- $class := .Get "class" | default (.Get 1) -}}
|
||||||
{{- $title := .Get "title" | default "YouTube Video" }}
|
{{- $title := .Get "title" | default "YouTube Video" }}
|
||||||
<figure>
|
<figure {{ with $class }}class="{{ . }}"{{ end }}>
|
||||||
<div class="youtube">
|
<div class="youtube">
|
||||||
<iframe src="https://{{ $ytHost }}/embed/{{ $id }}{{ with .Get "autoplay" }}{{ if eq . "true" }}?autoplay=1{{ end }}{{ end }}" allowfullscreen frameborder=0 title="{{ $title }}"></iframe>
|
<iframe src="https://{{ $ytHost }}/embed/{{ $id }}{{ with .Get "autoplay" }}{{ if eq . "true" }}?autoplay=1{{ end }}{{ end }}" allowfullscreen frameborder=0 title="{{ $title }}"></iframe>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue