1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-04-27 13:56:22 -04:00

support subtitles via video shortcode

This commit is contained in:
Jake Jarvis 2019-12-20 09:19:17 -05:00
parent 05d0eb225a
commit 70fa8460d2
Signed by: jake
GPG Key ID: 2B0C9CF251E69A39
5 changed files with 14 additions and 12 deletions

View File

@ -12,7 +12,7 @@ main#video {
p {
font-size: 0.85em;
line-height: 1.5em;
line-height: 1.5;
color: #777777;
margin: 1.25em;
}

View File

@ -1,5 +1,5 @@
---
title: "\"No Homo!\"  Still Rap's Motto in 2012?"
title: "\"No Homo!\" Still Rap's Motto in 2012?"
date: 2013-11-22 11:58:20-0400
description: "This essay was written for Professor David Valdes-Greenwood's \"Love & Sexuality\" class at Tufts University in April 2012."
tags:

View File

@ -39,20 +39,19 @@
padding-left: 1em;
}
article {
font-size: 1rem;
line-height: 1.8rem;
line-height: 1.8;
padding: 0 20px;
}
h1.title {
text-align: center;
font-size: 2.2rem;
line-height: 3rem;
margin-top: 1rem;
margin-bottom: 0.25rem;
font-size: 2.2em;
line-height: 1.3;
margin-top: 0.6em;
margin-bottom: 0.25em;
}
p.meta {
text-align: center;
margin: 0.25rem;
margin: 0.25em;
color: #777777;
}
p.meta a {
@ -93,7 +92,7 @@
}
nav a#logo span {
margin-left: 16px;
font-size: 1.5rem;
font-size: 1.5em;
font-weight: 500;
}
nav ul {
@ -114,7 +113,7 @@
padding: 20px;
border-top: 1px solid #bbbbbb;
color: #555;
line-height: 1.5rem;
line-height: 1.8;
}
footer a {
text-decoration: none;
@ -146,7 +145,6 @@
max-width: 100%;
overflow-x: scroll;
object-fit: scale-down;
font-size: 1em;
margin: 1em 0;
}
div.highlight pre {

View File

@ -10,6 +10,8 @@
{{ with .Page.Resources.GetMatch (.Get "mp4") }}<source src="{{ .Permalink }}" type="video/mp4">{{ end }}
{{ with .Page.Resources.GetMatch (.Get "ogg") }}<source src="{{ .Permalink }}" type="video/ogg">{{ end }}
{{ with .Page.Resources.GetMatch (.Get "vtt") }}<track src="{{ .Permalink }}" kind="captions" label="English" srclang="en" default>{{ end }}
<div fallback>
<p>Your browser does not support HTML5 video. {{ with .Page.Resources.GetMatch (.Get "mp4") }}<a href="{{ .Permalink }}">Load the .mp4 video directly.</a>{{ end }}</p>
</div>

View File

@ -9,5 +9,7 @@
{{ with .Page.Resources.GetMatch (.Get "mp4") }}<source src="{{ .Permalink }}" type="video/mp4">{{ end }}
{{ with .Page.Resources.GetMatch (.Get "ogg") }}<source src="{{ .Permalink }}" type="video/ogg">{{ end }}
{{ with .Page.Resources.GetMatch (.Get "vtt") }}<track src="{{ .Permalink }}" kind="captions" label="English" srclang="en" default>{{ end }}
<p>Your browser does not support HTML5 video. {{ with .Page.Resources.GetMatch (.Get "mp4") }}<a href="{{ .Permalink }}">Load the .mp4 video directly.</a>{{ end }}</p>
</video>