# HG changeset patch # User David Douard # Date 1535461621 -7200 # Node ID 08c0c0d695e804fd102ffde1c7b43f8d3d2e4eba # Parent 8396e709bde5d8bef8a937cbd17fbde772bab652 [hp34970] replace dailymotion by peertube for embedded video diff -r 8396e709bde5 -r 08c0c0d695e8 content/hp34970a_4.rst --- a/content/hp34970a_4.rst Tue Aug 28 15:05:01 2018 +0200 +++ b/content/hp34970a_4.rst Tue Aug 28 15:07:01 2018 +0200 @@ -133,9 +133,7 @@ dedicated thread, and bingo, I've got now something that begins to work enough to make it usable: -.. dailymotion:: x4tib5s - :width: 270 - :height: 480 +.. peertube:: 2be141c0-64ca-446a-ac65-15014604fb37 What's next diff -r 8396e709bde5 -r 08c0c0d695e8 pelicanconf.py --- a/pelicanconf.py Tue Aug 28 15:05:01 2018 +0200 +++ b/pelicanconf.py Tue Aug 28 15:07:01 2018 +0200 @@ -69,7 +69,7 @@ STATIC_PATHS = ['images', 'pdfs', 'json'] PLUGIN_PATHS = ['pelican-plugins', - 'pelican-plugins/pelican_dailymotion', + 'pelican-plugins/pelican-peertube', ] PLUGINS = ['better_figures_and_images', 'sitemap', @@ -78,7 +78,7 @@ 'series', 'related_posts', 'filetime_from_hg', - 'pelican_dailymotion', + 'pelican_peertube', 'pelican_javascript', 'wavedrom', 'plotly', @@ -108,3 +108,6 @@ 'default': '800w', }, } + +PEERTUBE_URL = "https://peertube.social" + diff -r 8396e709bde5 -r 08c0c0d695e8 theme/static/css/peertube.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/theme/static/css/peertube.css Tue Aug 28 15:07:01 2018 +0200 @@ -0,0 +1,37 @@ +* + * Responsive design style sheet for pelican PeerTube integration. + * Makes the video as wide as possible, keeping a specified aspect ratio + * of the video (e.g. 4:3, 16:9, etc. for width vs height). The video + * will resize and shrink as you resize the browser window. Enjoy! + * + * Integrate these definitions into your project style sheet, and use as + * + *
+ * + *
+ * + * (c) 2018 David Douard , license: MIT + */ + +.peertube-4x3 { + padding-bottom: 75%; /* inverse of 4:3 aspect ratio */ +} +.peertube-16x9 { + padding-bottom: 56.25%; /* inverse of 16:9 aspect ratio */ +} +.peertube-4x3, +.peertube-16x9 { + position: relative; + height: 0; + overflow: hidden; +} +.peertube-4x3 iframe, +.peertube-16x9 iframe { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + margin: 0; + border: 0; +} diff -r 8396e709bde5 -r 08c0c0d695e8 theme/templates/base.html --- a/theme/templates/base.html Tue Aug 28 15:05:01 2018 +0200 +++ b/theme/templates/base.html Tue Aug 28 15:07:01 2018 +0200 @@ -7,6 +7,7 @@ + {% block head %} {% block title %}{{ SITENAME }}{% endblock title %}