Separate youtube and figure shortcodes
This commit is contained in:
		| @@ -656,8 +656,6 @@ Parameters: | ||||
|     <dd>Optional. Position 0. String. Video ID.</dd> | ||||
| </dl> | ||||
|  | ||||
| It has the parameters of the `paige/figure` shortcode. | ||||
|  | ||||
| ## Customize | ||||
|  | ||||
| ### Include | ||||
|   | ||||
| @@ -47,6 +47,10 @@ body, html { | ||||
|     margin-bottom: 0; | ||||
| } | ||||
|  | ||||
| .paige-figure .paige-video { | ||||
|     margin-bottom: 0; | ||||
| } | ||||
|  | ||||
| .paige-figure > div > .highlight > pre, .paige-figure > div > :last-child { | ||||
|     margin-bottom: 0; | ||||
| } | ||||
| @@ -79,6 +83,10 @@ body, html { | ||||
|     transition: color 0.15s ease-in-out, opacity 0.15s ease-in-out; | ||||
| } | ||||
|  | ||||
| .paige-video { | ||||
|     margin-bottom: 1rem; | ||||
| } | ||||
|  | ||||
| @media (prefers-reduced-motion: reduce) { | ||||
|     .paige-header-link { | ||||
|         transition: none; | ||||
|   | ||||
| @@ -1,21 +1,15 @@ | ||||
| {{ $autoplay := .Get "autoplay" }} | ||||
| {{ $caption := .Get "caption" }} | ||||
| {{ $controls := .Get "controls" | default true }} | ||||
| {{ $description := .Get "description" | default "YouTube video" }} | ||||
| {{ $end := .Get "end" }} | ||||
| {{ $float := .Get "float" }} | ||||
| {{ $fullscreen := .Get "fullscreen" | default true }} | ||||
| {{ $height := .Get "height" }} | ||||
| {{ $horizontal := .Get "horizontal" }} | ||||
| {{ $list := .Get "list" }} | ||||
| {{ $loop := .Get "loop" }} | ||||
| {{ $maxwidth := .Get "maxwidth" }} | ||||
| {{ $mute := .Get "mute" }} | ||||
| {{ $number := .Get "number" }} | ||||
| {{ $numbered := .Get "numbered" }} | ||||
| {{ $referrerpolicy := .Get "referrerpolicy" | default "no-referrer-when-downgrade" }} | ||||
| {{ $start := .Get "start" }} | ||||
| {{ $vertical := .Get "vertical" }} | ||||
| {{ $video := .Get 0 | default (.Get "video") | default "dQw4w9WgXcQ" }} | ||||
| {{ $width := .Get "width" }} | ||||
|  | ||||
| @@ -71,21 +65,11 @@ | ||||
|     {{ $src = print $src "?" . }} | ||||
| {{ end }} | ||||
|  | ||||
| {{ partial "paige/figure.html" (dict | ||||
|     "caption" $caption | ||||
|     "content" (partial "paige/video.html" (dict | ||||
|         "fullscreen" $fullscreen | ||||
|         "height" $height | ||||
|         "referrerpolicy" $referrerpolicy | ||||
|         "src" $src | ||||
|         "title" $description | ||||
|         "width" $width | ||||
|     )) | ||||
|     "float" $float | ||||
|     "gap" 2 | ||||
|     "horizontal" $horizontal | ||||
|     "maxwidth" $maxwidth | ||||
|     "number" $number | ||||
|     "numbered" $numbered | ||||
|     "vertical" $vertical | ||||
| {{ partial "paige/video.html" (dict | ||||
|     "fullscreen" $fullscreen | ||||
|     "height" $height | ||||
|     "referrerpolicy" $referrerpolicy | ||||
|     "src" $src | ||||
|     "title" $description | ||||
|     "width" $width | ||||
| ) }} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user