From 4024ebe4553bde2f7ae9b00046948d00eac23776 Mon Sep 17 00:00:00 2001 From: NorbiPeti Date: Thu, 13 Jun 2019 01:15:12 +0200 Subject: [PATCH] Artist, stream pages, menu, index song listing - Fixed song listing on artist pages - Fixed artist page generation - Sorted artist listing - Added menu and moved displayed titles to the template - Linking songs from artist pages - Added a page for streams and collected the data for it manually - Implemented Popular and Hidden Songs on the index page - Bunch of fixes of URLs and such --- _artists/Artist1.md | 5 - _artists/test.md | 6 -- _config.yml | 4 +- _data/navigation.yml | 8 ++ _data/streams.yml | 117 ++++++++++++++++++++++ _includes/songlist.html | 23 +++-- _layouts/artist.html | 15 ++- _layouts/default.html | 35 ++++--- _layouts/song.html | 2 +- _plugins/expand_nested_variable_filter.rb | 11 ++ artists.html | 8 +- css/main.css | 26 ++++- faq.md | 2 +- index.html | 12 ++- streams.html | 28 ++++++ 15 files changed, 250 insertions(+), 52 deletions(-) delete mode 100644 _artists/Artist1.md delete mode 100644 _artists/test.md create mode 100644 _data/navigation.yml create mode 100644 _data/streams.yml create mode 100644 _plugins/expand_nested_variable_filter.rb create mode 100644 streams.html diff --git a/_artists/Artist1.md b/_artists/Artist1.md deleted file mode 100644 index 8df0cd8..0000000 --- a/_artists/Artist1.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -name: Artist1 -position: Singer ---- -Test artist diff --git a/_artists/test.md b/_artists/test.md deleted file mode 100644 index d038690..0000000 --- a/_artists/test.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -short_name: test -name: Test -position: Producer ---- -Test artist diff --git a/_config.yml b/_config.yml index 02db53e..616b074 100644 --- a/_config.yml +++ b/_config.yml @@ -19,5 +19,5 @@ page_gen: template: song name: sname - data: artists - template: song - name: sid \ No newline at end of file + template: artist + name: sname \ No newline at end of file diff --git a/_data/navigation.yml b/_data/navigation.yml new file mode 100644 index 0000000..eb1c0fb --- /dev/null +++ b/_data/navigation.yml @@ -0,0 +1,8 @@ +- name: Home + link: +- name: Artists + link: artists.html +- name: FAQ + link: faq.html +- name: Streams + link: streams.html \ No newline at end of file diff --git a/_data/streams.yml b/_data/streams.yml new file mode 100644 index 0000000..6fd5c30 --- /dev/null +++ b/_data/streams.yml @@ -0,0 +1,117 @@ +- date: '2019-01-24' + host: 'Voicians' + streamer: 'Anna Yvette' + live: true +- date: '2019-01-31' + host: '!Roundup' + streamer: 'Anna Yvette' +- date: '2019-02-07' + host: '!Throwback' + streamer: 'Anna Yvette' + throwbackHost: 'Sublab' +- date: '2019-02-14' + host: 'Rameses B' + streamer: 'Anna Yvette' +- date: '2019-02-21' + host: '!Throwback' + streamer: 'Approaching Nirvana' + throwbackHost: 'Laura Brehm, Arc North, Rival' +- date: '2019-02-28' + host: '!Roundup' + streamer: 'Approaching Nirvana' +- date: '2019-03-05' + host: '!Chill' + streamer: 'Anna Yvette' +- date: '2019-03-07' + host: 'Approaching Nirvana' + streamer: 'Approaching Nirvana' +- date: '2019-03-12' + host: '!Chill' + streamer: 'Anna Yvette' +- date: '2019-03-14' + host: '!Throwback' + streamer: 'Anna Yvette' + throwbackHost: 'floatinurboat' +- date: '2019-03-19' + host: '!Chill' + streamer: 'Anna Yvette' +- date: '2019-03-21' + host: '!Throwback' + streamer: 'Anna Yvette' + throwbackHost: 'CASHFORGOLD' +- date: '2019-03-26' + host: '!Chill' + streamer: 'Anna Yvette' +- date: '2019-03-28' + host: 'Varien' + streamer: 'Anna Yvette' +- date: '2019-04-02' + host: '!Chill' + streamer: 'Anna Yvette' +- date: '2019-04-04' + host: 'Au5' + streamer: 'Approaching Nirvana' +- date: '2019-04-09' + host: '!Chill' + streamer: 'Anna Yvette' +- date: '2019-04-11' + host: 'Veela' + streamer: 'Approaching Nirvana' +- date: '2019-04-16' + host: '!Chill' + streamer: 'Anna Yvette' +- date: '2019-04-18' + host: 'AK' + streamer: 'Approaching Nirvana' +- date: '2019-04-23' + host: '!Chill' + streamer: 'Anna Yvette' +- date: '2019-04-25' + host: '!Throwback' + streamer: 'Approaching Nirvana' + throwbackHost: 'Arc North' +- date: '2019-04-30' + host: '!Chill' + streamer: 'Anna Yvette' +- date: '2019-05-02' + host: 'Lucy Daydream' + streamer: 'Lucy Daydream' +- date: '2019-05-07' + host: '!Chill' + streamer: 'Anna Yvette' +- date: '2019-05-09' + host: '!Roundup' + streamer: 'Cara Leigh' +- date: '2019-05-14' + host: '!Chill' + streamer: 'Cara Leigh' +- date: '2019-05-16' + host: 'Covex' + streamer: 'Anna Yvette' +- date: '2019-05-21' + host: '!Chill' + streamer: 'Anna Yvette' +- date: '2019-05-23' + host: 'Laura Brehm' + streamer: 'Anna Yvette' +- date: '2019-05-28' + host: '!Chill' + streamer: 'Anna Yvette' +- date: '2019-05-30' + host: 'Zoe Moon' + streamer: 'Anna Yvette' +- date: '2019-06-04' + host: '!Chill' + streamer: 'Anna Yvette' +- date: '2019-06-06' + host: '!Roundup' + streamer: 'Anna Yvette' +- date: '2019-06-11' + host: '!Chill' + streamer: 'Cara Leigh' +- date: '2019-06-13' + host: 'Au5' +- date: '2019-06-20' + host: 'Sublab' +- date: '2019.06.27' + host: 'Miyoki' \ No newline at end of file diff --git a/_includes/songlist.html b/_includes/songlist.html index af2ca50..117f8b2 100644 --- a/_includes/songlist.html +++ b/_includes/songlist.html @@ -2,17 +2,18 @@

{%- assign isFirst = true -%} {%- for artistName in song.artists -%} - {%- if isFirst == true -%} - {%- assign isFirst = false -%} - {%- else -%}, {% comment %} Comma and space to separate artists {% endcomment %} - {%- endif -%} - {%- assign artist = site.artists | where: 'name', artistName | first -%} - {%- if artist -%} - {{ artist.name }} - {%- else -%} - {{ artistName }} - {%- endif -%} + {%- if isFirst == true -%} + {%- assign isFirst = false -%} + {%- else -%} + , {% comment %} Comma and space to separate artists {% endcomment %} + {%- endif -%} + {%- assign artist = site.data.artists | where: 'sname', artistName | first -%} + {%- if artist -%} + {{ artist.sname }} + {%- else -%} + {{ artistName }} + {%- endif -%} {%- endfor -%} - {% comment %} Space needed {% endcomment %} - {{ song.name }} + {% comment %} Space needed {% endcomment %} - {{ song.sname }}

\ No newline at end of file diff --git a/_layouts/artist.html b/_layouts/artist.html index ef16b26..9b16bda 100644 --- a/_layouts/artist.html +++ b/_layouts/artist.html @@ -1,16 +1,21 @@ --- layout: default title: page.name +ptitle: '{{ page.sname }}' --- -

{{ page.name }}

{{ page.position }}

-{{ content }} -

Songs

\ No newline at end of file diff --git a/_layouts/default.html b/_layouts/default.html index b55d605..2234593 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -2,25 +2,36 @@ - - {{ page.title }} - HS Fanpage - - + + {{ page.title }} - HS Fanpage + + - - - + + + - + - +
- +

{{ page.ptitle | flatify }}

+ + {{ content }} diff --git a/_layouts/song.html b/_layouts/song.html index f946c76..4cf203e 100644 --- a/_layouts/song.html +++ b/_layouts/song.html @@ -1,5 +1,5 @@ --- layout: default title: asd +ptitle: '{{ page.artists | join: ", " }} - {{ page.sname }}' --- -

{{ page.artists | join: ", " }} - {{ page.sname }}

diff --git a/_plugins/expand_nested_variable_filter.rb b/_plugins/expand_nested_variable_filter.rb new file mode 100644 index 0000000..a48c55d --- /dev/null +++ b/_plugins/expand_nested_variable_filter.rb @@ -0,0 +1,11 @@ +# http://acegik.net/blog/ruby/jekyll/plugins/howto-nest-liquid-template-variables-inside-yaml-front-matter-block.html + +module Jekyll + module ExpandNestedVariableFilter + def flatify(input) + Liquid::Template.parse(input).render(@context) + end + end +end + +Liquid::Template.register_filter(Jekyll::ExpandNestedVariableFilter) \ No newline at end of file diff --git a/artists.html b/artists.html index 24ff198..cd142b9 100644 --- a/artists.html +++ b/artists.html @@ -1,12 +1,12 @@ --- title: Artists +ptitle: Artists --- -

Artists

-