Allows to publish videos uploaded on to the frontpage of
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

251 lines
6.5 KiB

<!DOCTYPE html>
<html lang="en" class="no-js">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<title> video archive prototype</title>
<meta name="description" content="this page is generated on the basis of a peertube instance">
<meta property="og:title" content=" video archive prototype">
<meta property="og:description" content="this page is generated on the basis of a peertube instance">
<meta property="og:image" content="{{ host }}{{videos[0].preview_path}}">
<meta property="og:image:alt" content="Image description">
<meta property="og:locale" content="en_GB">
<meta property="og:type" content="website">
<meta name="twitter:card" content="summary_large_image">
<meta property="og:url" content="">
<link rel="canonical" href="">
<link rel="icon" href="/favicon.ico">
<link rel="icon" href="/favicon.svg" type="image/svg+xml">
<link rel="apple-touch-icon" href="/apple-touch-icon.png">
<link rel="manifest" href="/my.webmanifest">
<meta name="theme-color" content="#FF00FF">
<style type="text/css">
font-family: "Space Grotesk";
body {font-size:1.3rem;font-family: sans-serif;}
.wrapper {
width: 50%;
margin: auto;
.video-box {
border:2px solid #0e0e22;
box-shadow:1em 1em 0 #d2d1c8;
margin-bottom: 2em;
.video-box img {
max-width: 100%;
.video-box .media {
line-height: 0;
display: flex;
flex-direction: column;
background-color: #fff09d;
border-top: 2px solid #0e0e22;
border-top: 2px solid #0e0e22;
display: flex;
justify-content: space-between;
border-right: 2px solid #0e0e22;
padding-left: 1em;
padding-right: 1em;
padding-top: 0.2em;
display: inline-block;
padding-bottom: 0.2em;
.date {
border-left: 2px solid #0e0e22;
padding-left: 1em;
padding-right: 1em;
padding-top: 0.2em;
display: inline-block;
padding-bottom: 0.2em;
padding: 1em;
display: block;
/*transition: height 0.5s linear;*/
overflow: hidden;
border-top: 2px solid #0e0e22;
.collapsed {
border-top: 0px;
height: 0;
.descr_button {
cursor: pointer;
flex-grow: 1;
text-align: center;
.descr_button a {
text-decoration: inherit;
.descr_button a:before {
vertical-align: sub;
.descr_button:hover {
box-shadow: inset 2px 2px 0px #95948c;
.play-icon {
width: 0;
height: 0;
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%,-50%) scale(.5);
border-top: 13px solid transparent;
border-bottom: 13px solid transparent;
border-left: 18px solid hsla(0,0%,100%,.95);
.video-thumbnail {
position: absolute;
width: 100%;
height: 100%;
top: 0;
.video-thumbnail {
display: flex;
flex-direction: column;
position: relative;
overflow: hidden;
background-color: #ececec;
transition: filter .2s ease;
.video-thumbnail-duration-overlay {
display: inline-block;
background-color: rgb(255, 240, 157);
color: #0e0e22;
font-size: 14px;
line-height: 1.1;
z-index: 10;
position: absolute;
padding: 1px 3px 1px 3px;
right: 5px;
bottom: 5px;
border: 2px solid #0e0e22;
.play-overlay {
transition: all .2s ease;
position: absolute;
right: 0;
bottom: 0;
width: inherit;
height: inherit;
opacity: 0;
background-color: rgba(0,0,0,.3);
.video-thumbnail:hover {
.video-thumbnail:hover .play-overlay {
.video-thumbnail:hover .play-overlay .play-icon {
transform:translate(-50%,-50%) scale(1)
/* @media screen and (min-width: 480px) {
* {
background: silver
<!-- Content -->
<div class='wrapper'>
{% for video in videos %}
<div class='video-box'>
<div class='media' id='media-{{ }}'>
<span class='video-thumbnail' id='thumb-{{ }}' onclick="loadPlayer('{{ }}', '{{ host }}{{ video.embed_path }}')" href="{{ host }}/videos/watch/{{ video.uuid }}">
<img src="{{ host }}{{ video.preview_path }}">
<div class="video-thumbnail-duration-overlay">
{% if video.is_live %}
{% else %}
{{ video.duration | duration }}
{% endif %}
<div class="play-overlay">
<div class="play-icon"></div>
<div class='metadata'>
<div class='title'>{{ }}</div>
<span class="description collapsed" id='meta-{{ }}'> {{ video.description | linebreaks }}</span>
<div class='footer'>
<span class='channel'><a href='{{ }}'> {{ }}</a></span>
<span class='descr_button' id='toggle-button' onclick="toggleDescription('#meta-{{ }}')"> <a href='#'> </a></span>
<span class='date'> <a href='{{ host }}/videos/watch/{{ video.uuid }}'> {{ video.published_at.strftime('%Y-%m-%d') }}</a></span>
{% endfor %}
function toggleDescription(id){
function loadPlayer(id, embed_path){
media = document.querySelector('#media-'+ id)
var iframe = document.createElement('iframe');
iframe.src = embed_path + '?autoplay=1&title=0'
iframe.width = 560;
iframe.height = 315;
iframe.frameBorder = 0;
iframe.sandbox = "allow-same-origin allow-scripts allow-popups"
document.querySelector('#thumb-'+ id).remove()