[SSG] Move common parts from archives, index to base.html

This commit is contained in:
Ceda EI 2020-01-27 03:46:10 +05:30
parent f69d922f32
commit 5041f4c221
3 changed files with 69 additions and 105 deletions

View File

@ -1,50 +1,8 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{ title }} | Redacted Life</title>
<link href="assets/css/index.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="assets/plyr/plyr.css" />
</head>
<body>
<img src="assets/images/cloud.svg" class="clouds" id="cloud1" />
<img src="assets/images/cloud.svg" class="clouds" id="cloud2" />
<div class="top_bg"></div>
<div class="bottom_bg"></div>
<div class="top">
<div class="wrapper">
<div class="content">
<h1>Redacted Life</h1>
<ul>
{% for episode in episodes %}
{% extends "base.html" %}
{% block left_content %}
<h1>Redacted Life</h1>
<ul>
{% for episode in episodes %}
<li><a href="{{ episode.slug }}">{{ episode.title }}</a></li>
{% endfor %}
</div>
</div>
</div>
<div class="bottom">
<div class="wrapper">
<div class="content">
<a class="button" href="feed.xml">Subscribe</a>
<a class="button" href="mailto:hello@redacted.life">Contact</a>
<a class="button" href="archives.html">Archives</a>
</div>
<footer>
Designed by <a href="https://webionite.com">Ceda EI</a><br />
Source available on <a href="https://git.webionite.com/ceda_ei/redacted.life">Webionite</a><br />
Licensed under <a href="https://git.webionite.com/ceda_ei/redacted.life/src/branch/master/LICENSE">MIT</a>
</footer>
</div>
</div>
<script src="assets/plyr/plyr.js"></script>
<script>
const player = new Plyr("#player", {
iconUrl: "assets/plyr/plyr.svg",
});
</script>
</body>
</html>
{% endfor %}
{% endblock %}

48
base.html Normal file
View File

@ -0,0 +1,48 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{ title }} | Redacted Life</title>
<link href="assets/css/index.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="assets/plyr/plyr.css" />
</head>
<body>
<img src="assets/images/cloud.svg" class="clouds" id="cloud1" />
<img src="assets/images/cloud.svg" class="clouds" id="cloud2" />
<div class="top_bg"></div>
<div class="bottom_bg"></div>
<div class="top">
<div class="wrapper">
<div class="content">
{% block left_content %}
<h1>Redacted Life</h1>
{% endblock %}
</div>
</div>
</div>
<div class="bottom">
<div class="wrapper">
<div class="content">
<a class="button" href="feed.xml">Subscribe</a>
<a class="button" href="mailto:hello@redacted.life">Contact</a>
<a class="button" href="archives.html">Archives</a>
</div>
<footer>
Designed by <a href="https://webionite.com">Ceda EI</a><br />
Source available on <a href="https://git.webionite.com/ceda_ei/redacted.life">Webionite</a><br />
Licensed under <a href="https://git.webionite.com/ceda_ei/redacted.life/src/branch/master/LICENSE">MIT</a>
</footer>
</div>
</div>
<script src="assets/plyr/plyr.js"></script>
<script>
const player = new Plyr("#player", {
iconUrl: "assets/plyr/plyr.svg",
});
</script>
</body>
</html>

View File

@ -1,55 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{ title }} | Redacted Life</title>
<link href="assets/css/index.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="assets/plyr/plyr.css" />
</head>
<body>
<img src="assets/images/cloud.svg" class="clouds" id="cloud1" />
<img src="assets/images/cloud.svg" class="clouds" id="cloud2" />
<div class="top_bg"></div>
<div class="bottom_bg"></div>
<div class="top">
<div class="wrapper">
<div class="content">
<h1>Redacted Life</h1>
<div class="player">
{% extends "base.html" %}
{% block left_content %}
<h1>Redacted Life</h1>
<div class="player">
<video id="player" poster="{{ thumbnail_src }}" controls>
<source src="{{ video_src }}" type="video/mp4" />
</video>
</div>
<details class="shownotes">
</div>
<details class="shownotes">
<summary>Show Notes</summary>
{{ show_notes }}
</details>
</div>
</div>
</div>
<div class="bottom">
<div class="wrapper">
<div class="content">
<a class="button" href="feed.xml">Subscribe</a>
<a class="button" href="mailto:hello@redacted.life">Contact</a>
<a class="button" href="archives.html">Archives</a>
</div>
<footer>
Designed by <a href="https://webionite.com">Ceda EI</a><br />
Source available on <a href="https://git.webionite.com/ceda_ei/redacted.life">Webionite</a><br />
Licensed under <a href="https://git.webionite.com/ceda_ei/redacted.life/src/branch/master/LICENSE">MIT</a>
</footer>
</div>
</div>
<script src="assets/plyr/plyr.js"></script>
<script>
const player = new Plyr("#player", {
iconUrl: "assets/plyr/plyr.svg",
});
</script>
</body>
</html>
</details>
{% endblock %}