Several fixes for youtube figures
This commit is contained in:
		
							parent
							
								
									27c1a84ee4
								
							
						
					
					
						commit
						ccedb4c2bd
					
				
					 2 changed files with 11 additions and 10 deletions
				
			
		| 
						 | 
					@ -29,6 +29,11 @@
 | 
				
			||||||
    justify-content: center;
 | 
					    justify-content: center;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  &:has(.youtube) {
 | 
				
			||||||
 | 
					    display: block;
 | 
				
			||||||
 | 
					    grid-template-columns: unset;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  > a:has(img:only-child) {
 | 
					  > a:has(img:only-child) {
 | 
				
			||||||
    grid-column: wide-gutter-start / wide-gutter-end;
 | 
					    grid-column: wide-gutter-start / wide-gutter-end;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
| 
						 | 
					@ -70,10 +75,7 @@
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.figure--youtube {
 | 
					.figure .youtube {
 | 
				
			||||||
  grid-column: wide-gutter-start / wide-gutter-end;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  .youtube {
 | 
					 | 
				
			||||||
  width: 100%;
 | 
					  width: 100%;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  iframe {
 | 
					  iframe {
 | 
				
			||||||
| 
						 | 
					@ -82,7 +84,6 @@
 | 
				
			||||||
    width: 100%;
 | 
					    width: 100%;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
figcaption {
 | 
					figcaption {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -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 class="figure--youtube{{ with $class }}  {{ . }}{{ end }}">
 | 
					<figure class="figure{{ with $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