experimenting with background img
Modified:
- layouts/shortcodes/liteyoutube.html
| | |
| | | # this example loads the theme as hugo module |
| | | # comment out line below, and uncomment the line after it if you prefer to load the theme normally |
| | | # theme = ["github.com/onweru/compose"] # edit this if you'ld rather use a fork of this repo |
| | | theme = ["github.com/rwstorer/hugo-theme-compose"] # my fork |
| | | theme = ["github.com/rwstorer/hugo-theme-compose"] # my fork. |
| | | # theme = "compose" |
| | | enableGitInfo = true |
| | | |
| | |
| | | |
| | | require ( |
| | | github.com/onweru/compose v0.0.0-20230530114506-a2ddf2b32939 // indirect |
| | | github.com/rwstorer/hugo-theme-compose v0.0.0-20230611001648-0f1fb40e912e // indirect |
| | | ) |
| | |
| | | github.com/onweru/compose v0.0.0-20230530114506-a2ddf2b32939/go.mod h1:tf1kQIBUcwJ/3mRFU5eiMrMvsDScVTK2IEFsZE3hZOc= |
| | | github.com/rwstorer/hugo-theme-compose v0.0.0-20230611001648-0f1fb40e912e h1:EaCAVi8vhFZzgejGR5pf1MJPl+YC6SY+dgEkckbWyHc= |
| | | github.com/rwstorer/hugo-theme-compose v0.0.0-20230611001648-0f1fb40e912e/go.mod h1:7TS3BoBV/IcLPRT2r7LyTyOqzsS5P5sXKlNpGgxdK/s= |
| | | github.com/rwstorer/hugo-theme-compose v0.0.0-20230611011250-29764d3cdc54 h1:JE41XHF80/O+LqQnc2/GmNpVUxhdnT+QaQP12TeQ4q0= |
| | | github.com/rwstorer/hugo-theme-compose v0.0.0-20230611011250-29764d3cdc54/go.mod h1:7TS3BoBV/IcLPRT2r7LyTyOqzsS5P5sXKlNpGgxdK/s= |
| | |
| | | {{ $videoid := .Get "videoid" }} |
| | | {{ $params := .Get "params" }} <!-- not required. List of params here: https://developers.google.com/youtube/player_parameters --> |
| | | {{ $img := .Get "img"}} <!-- not required. The initial background image instead of a generated one. --> |
| | | <lite-youtube videoid="{{$videoid}}"{{ if $img }} style="background-image: url('/images/{{$img}}`)"{{ end }}{{ if $params }} params="{{$params}}"{{ end }}></lite-youtube> |
| | | <lite-youtube videoid="{{$videoid}}"{{ if $img }} style="background-image: url('{{absURL (printf `images/%s` $img}}`)"{{ end }}{{ if $params }} params="{{$params}}"{{ end }}></lite-youtube> |