Restructure music section, add AOTW
This commit is contained in:
parent
08b54ff328
commit
9109cb2f15
3
content/music/aotw.yaml
Normal file
3
content/music/aotw.yaml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
- year: 1962
|
||||||
|
artist: Booker T. & the M.G.'s
|
||||||
|
title: Green Onions
|
||||||
@ -164,6 +164,10 @@ function getVinyl() {
|
|||||||
return Yaml::parseFile('content/music/vinyl.yaml');
|
return Yaml::parseFile('content/music/vinyl.yaml');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getAOTW() {
|
||||||
|
return Yaml::parseFile('content/music/aotw.yaml');
|
||||||
|
}
|
||||||
|
|
||||||
function getRSS($params) {
|
function getRSS($params) {
|
||||||
header("Content-Type: text/xml");
|
header("Content-Type: text/xml");
|
||||||
$feed = new Feed();
|
$feed = new Feed();
|
||||||
|
|||||||
24
index.php
24
index.php
@ -21,7 +21,9 @@ $router->map('GET', '/notes/[*:slug]', function() {}, 'notes_post');
|
|||||||
$router->map('GET', '/projects', function() {}, 'projects');
|
$router->map('GET', '/projects', function() {}, 'projects');
|
||||||
$router->map('GET', '/projects/[*:slug]', function() {}, 'projects_details');
|
$router->map('GET', '/projects/[*:slug]', function() {}, 'projects_details');
|
||||||
$router->map('GET', '/foss', function() {}, 'foss');
|
$router->map('GET', '/foss', function() {}, 'foss');
|
||||||
|
$router->map('GET', '/music', function() {}, 'music');
|
||||||
$router->map('GET', '/vinyl', function() {}, 'vinyl');
|
$router->map('GET', '/vinyl', function() {}, 'vinyl');
|
||||||
|
$router->map('GET', '/aotw', function() {}, 'aotw');
|
||||||
$router->map('GET', '/pgp', function() {}, 'pgp');
|
$router->map('GET', '/pgp', function() {}, 'pgp');
|
||||||
$router->map('GET', '/contact', function() {}, 'contact');
|
$router->map('GET', '/contact', function() {}, 'contact');
|
||||||
|
|
||||||
@ -134,6 +136,12 @@ if ($match['name'] == 'vinyl') {
|
|||||||
$variables['title'] = 'Vinyl — Yarmo Mackenbach';
|
$variables['title'] = 'Vinyl — Yarmo Mackenbach';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If we are dealing with Albu m Of The Week
|
||||||
|
if ($match['name'] == 'aotw') {
|
||||||
|
$variables['albums'] = getAOTW();
|
||||||
|
$variables['title'] = 'Album Of The Week — Yarmo Mackenbach';
|
||||||
|
}
|
||||||
|
|
||||||
// If we are dealing with the pgp page
|
// If we are dealing with the pgp page
|
||||||
if ($match['name'] == 'pgp') {
|
if ($match['name'] == 'pgp') {
|
||||||
$variables['title'] = 'PGP — Yarmo Mackenbach';
|
$variables['title'] = 'PGP — Yarmo Mackenbach';
|
||||||
@ -198,10 +206,18 @@ if ($environment === 'production') {
|
|||||||
\Phug\Optimizer::call('displayFile', ['foss', $variables], $options);
|
\Phug\Optimizer::call('displayFile', ['foss', $variables], $options);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'music':
|
||||||
|
\Phug\Optimizer::call('displayFile', ['music', $variables], $options);
|
||||||
|
break;
|
||||||
|
|
||||||
case 'vinyl':
|
case 'vinyl':
|
||||||
\Phug\Optimizer::call('displayFile', ['vinyl', $variables], $options);
|
\Phug\Optimizer::call('displayFile', ['vinyl', $variables], $options);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'aotw':
|
||||||
|
\Phug\Optimizer::call('displayFile', ['aotw', $variables], $options);
|
||||||
|
break;
|
||||||
|
|
||||||
case 'contact':
|
case 'contact':
|
||||||
\Phug\Optimizer::call('displayFile', ['contact', $variables], $options);
|
\Phug\Optimizer::call('displayFile', ['contact', $variables], $options);
|
||||||
break;
|
break;
|
||||||
@ -266,10 +282,18 @@ if(is_array($match) && is_callable($match['target'])) {
|
|||||||
Phug::displayFile('foss', $variables, $options);
|
Phug::displayFile('foss', $variables, $options);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'music':
|
||||||
|
Phug::displayFile('music', $variables, $options);
|
||||||
|
break;
|
||||||
|
|
||||||
case 'vinyl':
|
case 'vinyl':
|
||||||
Phug::displayFile('vinyl', $variables, $options);
|
Phug::displayFile('vinyl', $variables, $options);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'aotw':
|
||||||
|
Phug::displayFile('aotw', $variables, $options);
|
||||||
|
break;
|
||||||
|
|
||||||
case 'contact':
|
case 'contact':
|
||||||
Phug::displayFile('contact', $variables, $options);
|
Phug::displayFile('contact', $variables, $options);
|
||||||
break;
|
break;
|
||||||
|
|||||||
14
views/aotw.pug
Normal file
14
views/aotw.pug
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
extends layout
|
||||||
|
|
||||||
|
mixin entry($item)
|
||||||
|
.list__item
|
||||||
|
p !{$item['artist']} - !{$item['title']} (!{$item['year']})
|
||||||
|
|
||||||
|
block content
|
||||||
|
p
|
||||||
|
| Back to:
|
||||||
|
a(href="/") yarmo.eu
|
||||||
|
h1 Yarmo's Album Of The Week
|
||||||
|
.list
|
||||||
|
each $item in $albums
|
||||||
|
+entry($item)
|
||||||
@ -29,7 +29,7 @@ block content
|
|||||||
| |
|
| |
|
||||||
a(href="/projects") projects
|
a(href="/projects") projects
|
||||||
| |
|
| |
|
||||||
a(href="/vinyl") vinyl
|
a(href="/music") music
|
||||||
| |
|
| |
|
||||||
a(href="/pgp") PGP
|
a(href="/pgp") PGP
|
||||||
| |
|
| |
|
||||||
@ -165,39 +165,6 @@ block content
|
|||||||
a(href="/foss") FOSS
|
a(href="/foss") FOSS
|
||||||
|
|
||||||
h2 >> Music
|
h2 >> Music
|
||||||
|
p
|
||||||
h3 Instruments
|
| Go to:
|
||||||
ul
|
a(href="/music") music
|
||||||
li Piano / keyboards
|
|
||||||
li Organs
|
|
||||||
li Synths
|
|
||||||
|
|
||||||
h3 Releases
|
|
||||||
.wrapper-table
|
|
||||||
table.music
|
|
||||||
thead
|
|
||||||
tr
|
|
||||||
th Years
|
|
||||||
th Band
|
|
||||||
th Title
|
|
||||||
tbody
|
|
||||||
tr
|
|
||||||
td 2013
|
|
||||||
td Sir Jupiter
|
|
||||||
td
|
|
||||||
a(href="https://song.link/album/nl/i/979132997") Sir Jupiter
|
|
||||||
tr
|
|
||||||
td 2015
|
|
||||||
td Sir Jupiter
|
|
||||||
td
|
|
||||||
a(href="https://song.link/album/nl/i/1041392608") EP Roots
|
|
||||||
tr
|
|
||||||
td 2016
|
|
||||||
td Sir Jupiter
|
|
||||||
td
|
|
||||||
a(href="https://song.link/album/nl/i/1151887625") EP Wings
|
|
||||||
tr
|
|
||||||
td 2018
|
|
||||||
td Sir Jupiter
|
|
||||||
td
|
|
||||||
a(href="https://song.link/album/nl/i/1454734101") EP Covered In Snow
|
|
||||||
|
|||||||
48
views/music.pug
Normal file
48
views/music.pug
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
extends layout
|
||||||
|
|
||||||
|
block content
|
||||||
|
p
|
||||||
|
| Back to:
|
||||||
|
a(href="/") yarmo.eu
|
||||||
|
h1 Yarmo's music
|
||||||
|
p
|
||||||
|
| Go to:
|
||||||
|
a(href="/vinyl") vinyl
|
||||||
|
| |
|
||||||
|
a(href="/aotw") Album Of The Week
|
||||||
|
|
||||||
|
h3 Instruments
|
||||||
|
ul
|
||||||
|
li Piano / keyboards
|
||||||
|
li Organs
|
||||||
|
li Synths
|
||||||
|
|
||||||
|
h3 Releases
|
||||||
|
.wrapper-table
|
||||||
|
table.music
|
||||||
|
thead
|
||||||
|
tr
|
||||||
|
th Years
|
||||||
|
th Band
|
||||||
|
th Title
|
||||||
|
tbody
|
||||||
|
tr
|
||||||
|
td 2013
|
||||||
|
td Sir Jupiter
|
||||||
|
td
|
||||||
|
a(href="https://song.link/album/nl/i/979132997") Sir Jupiter
|
||||||
|
tr
|
||||||
|
td 2015
|
||||||
|
td Sir Jupiter
|
||||||
|
td
|
||||||
|
a(href="https://song.link/album/nl/i/1041392608") EP Roots
|
||||||
|
tr
|
||||||
|
td 2016
|
||||||
|
td Sir Jupiter
|
||||||
|
td
|
||||||
|
a(href="https://song.link/album/nl/i/1151887625") EP Wings
|
||||||
|
tr
|
||||||
|
td 2018
|
||||||
|
td Sir Jupiter
|
||||||
|
td
|
||||||
|
a(href="https://song.link/album/nl/i/1454734101") EP Covered In Snow
|
||||||
@ -1,7 +1,7 @@
|
|||||||
extends layout
|
extends layout
|
||||||
|
|
||||||
mixin vinyl_album($item)
|
mixin entry($item)
|
||||||
.vinyl_list__item
|
.list__item
|
||||||
p !{$item['artist']} - !{$item['title']} (!{$item['year']})
|
p !{$item['artist']} - !{$item['title']} (!{$item['year']})
|
||||||
|
|
||||||
block content
|
block content
|
||||||
@ -9,6 +9,6 @@ block content
|
|||||||
| Back to:
|
| Back to:
|
||||||
a(href="/") yarmo.eu
|
a(href="/") yarmo.eu
|
||||||
h1 Yarmo's vinyl collection
|
h1 Yarmo's vinyl collection
|
||||||
.vinyl_list
|
.list
|
||||||
each $item in $albums
|
each $item in $albums
|
||||||
+vinyl_album($item)
|
+entry($item)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user