minimal-music-project 0.0.4 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: acc301b1a7ae647622162c8329af594fa290406c6eb596de5a72e7f0224e1782
4
- data.tar.gz: 2a261e6cc4214a78f0c970473cfd10a098cc0da213f262e5a0cb05c45cd58246
3
+ metadata.gz: edd9c6b971a10e388ca18b42699c6bc9a76948bc90d1a270478f8dbd86d659c2
4
+ data.tar.gz: '096ce7fdcfc914bced72f2c936cbd0a8babe65cc2ce141d9752f143aeb49418b'
5
5
  SHA512:
6
- metadata.gz: 9c72baf29001848d6336be32f6d8646552d1bf37f008e53cdd0d1dcfccc3f82cc4541195b0ae4af20b1c3d2e164e6ef6a53390d0061588c0f6082bd584258082
7
- data.tar.gz: '090e983e75379425b77ad78f69de334647d965533c48bb2da668b6476c05ba256d98bd69687a686cc4fc6bc4a0a396021bc59e51e50583a6c8f73ec1fafc3862'
6
+ metadata.gz: 4baaf80ffac9e6de479ec022ac1aee2774f6297df00907e44ef23503dc7c6345978cf3fca5e9d57546a5b8e9e0c261627312e6aba789f1a18a4a5ef837266779
7
+ data.tar.gz: 0f3beda45e38193f7d90266be68a1174c881eb28bf92535a43beb2d862318bba2a6c635f0606ea4b5fa351cdb01f4402f45dda0d71d7d5833677522688a1b7a9
data/LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2020 Patryk Bieszke
3
+ Copyright (c) 2021 Patryk Bieszke
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -1,40 +1,56 @@
1
- # [minimal-music-project Jekyll theme](https://github.com/ItsMeaga1n/minimal-music-project/)
1
+ <h1><a href="https://github.com/ItsMeaga1n/minimal-music-project/"><img src="https://raw.githubusercontent.com/ItsMeaga1n/minimal-music-project/master/assets/img/favicon.ico" height="21" alt="minimal-categorized logo" /> minimal-music-project Jekyll theme </h1></a>
2
2
 
3
- [![LICENSE](https://img.shields.io/badge/license-MIT-lightgrey.svg)](https://raw.githubusercontent.com/mmistakes/minimal-mistakes/master/LICENSE)
3
+ [![LICENSE](https://img.shields.io/badge/license-MIT-lightgrey.svg)](https://raw.githubusercontent.com/itsmeaga1n/minimal-music-project/master/LICENSE.txt)
4
4
  [![Jekyll](https://img.shields.io/badge/jekyll-%3E%3D%203.9-blue.svg)](https://jekyllrb.com/)
5
5
  [![Gem Version](https://badge.fury.io/rb/minimal-music-project.svg)](https://badge.fury.io/rb/minimal-music-project)
6
+ <a href="https://ko-fi.com/itsmeaga1n">
7
+ <img height="20" src="https://www.ko-fi.com/img/githubbutton_sm.svg"
8
+ alt="Donate (Ko-fi)" />
9
+ </a>
6
10
 
7
- minimal-music-project is a flexible Jekyll theme, designed for sites with content easily aggregated into categories. Demo is available [here](https://itsmeaga1n.github.io/minimal-music-project/).
11
+ minimal-music-project is a flexible, extendable Jekyll theme. With this theme it's plain simple to create a good looking website for a music band with all the required components to list all releases and news. Demo is available [here](https://minimal-music-project.netlify.app/).
8
12
 
9
- ![layout examples](screenshot.png)
13
+ ![layout examples](https://raw.githubusercontent.com/ItsMeaga1n/minimal-music-project/master/screenshot.png)
10
14
 
11
15
  ## Installation
12
16
 
13
- Add this line to your Jekyll site's `Gemfile`:
17
+ There are three ways to install:
14
18
 
15
- ```ruby
16
- gem "minimal-music-project"
17
- ```
19
+ * As a ruby gem theme:
18
20
 
19
- And add this line to your Jekyll site's `_config.yml`:
21
+ Add this line to your Jekyll site's `Gemfile`:
20
22
 
21
- ```yaml
22
- theme: minimal-music-project
23
- ```
23
+ ```ruby
24
+ gem "minimal-categorized"
25
+ ```
24
26
 
25
- And then execute:
27
+ And add this line to your Jekyll site's `_config.yml`:
26
28
 
27
- $ bundle
29
+ ```yaml
30
+ theme: minimal-categorized
31
+ ```
28
32
 
29
- Or install it yourself as:
33
+ And then execute:
30
34
 
31
- $ gem install minimal-music-project
35
+ $ bundle
32
36
 
33
- ## Usage
37
+ Or install it yourself as:
38
+
39
+ $ gem install minimal-categorized
40
+
41
+ * As a remote theme (GitHub Pages compatible)
42
+
43
+ In your Jekyll site's _config.yml remove other themes and add this entry:
44
+ ```
45
+ remote_theme: ItsMeaga1n/minimal-categorized
46
+ ```
34
47
 
35
- This theme is based on separating content into categories, which is later shown on separated sites designated to the specific content type.
48
+ * Forking/directly copying all of the theme files into your project.
49
+
50
+ ## Usage
51
+ This theme uses pager plugin `jekyll-paginate-v2` for pagination and `jekyll-seo-tag` for seo tags. It can be configured in main _config file.
36
52
 
37
- As for now, theme allows to use two main categories that will be displayed on home screen and more categories displayed only in menu to further separate content. Those are defined in `_data/menu.yml`.
53
+ Configuration via .yml files
38
54
 
39
55
  Structure of `_data/menu.yml`:
40
56
  * menu_pages: a list of items in menu. Each item contains information:
@@ -42,19 +58,45 @@ Structure of `_data/menu.yml`:
42
58
  * url: URL for href
43
59
  * category: unique identifier of category. Used to determine which menu item is selected
44
60
  * tooltip: Tooltip for menu item
61
+ * menu_contacts: a list of items to be displayed for a contact section in menu
62
+ * faicon: FavIcon to be displayed in menu
63
+ * url: URL for href
64
+ * target: target value of \<a> tag
65
+
45
66
 
46
67
  Structure of `_data/metaData.yml`:
47
68
  * author: Site Author name
48
- * logo: URL for logo image (displayed on top of menu)
69
+ * logo: relative url to the logo
70
+ * clickToEnlargeImages: boolean value to enable/disable "full-screen" images on click
49
71
  * cookies: customize information about site cookies
50
72
  * enabled: determine if should show cookies pop-up
51
73
  * message: text on cookie pop-up
52
74
  * agreeButtonText: text on agree button
75
+ * disagreeButtonText: text on disagree button
76
+ * agreeButtonFnName: function in the `window` scope to execute on cookie agree
77
+ * disagreeButtonFnName: function in the `window` scope to execute on cookie disagree
78
+ * header: title of the pop-up window
79
+ * consent: list of objects that will be rendered on a site with "cookies" layout for acceptance. Each object needs to have:
80
+ * name: bolded on render
81
+ * description: description of the cookie
82
+ * cookieName: under what name it will be saved in the local storage (selected checkbox as "true", unselected as "false")
53
83
 
54
84
  Structure of `_data/customs.yml`:
55
85
  * custom-css: a list of urls to custom css files
56
86
  * custom-js: a list of urls to custom javascript files
57
87
 
88
+ ## Posts front matter parameters
89
+
90
+ ### Embedding media
91
+ Each post can have it's own associated player. Information on how to embed the player should be described under *embed\_player* parameter. Each player should have at least two parameters: *src* and *type*, where *type* will define on how to fill *src*. Supported types:
92
+
93
+ * soundcloud - src should be full url to song
94
+ * bandcamp - on a "embed song" option on bandcamp, everything after *EmbeddedPlayer/* in generated code should be put to src parameter in front matter
95
+ * spotify - src should be id of the song. It can be acquired via "copy song link", e.g. for url https://open.spotify.com/track/67IdIp2ij8oqTFsSguvy2I?si=f735480b74414902 the src should be 67IdIp2ij8oqTFsSguvy2I
96
+ * youtube - src should be the *v* uri parameter, e.g. for url https://www.youtube.com/watch?v=dfdruxvE9-0 the src should be dfdruxvE9-0
97
+ * anchor.fm - src is the full episode name (e.g. for URL https://anchor.fm/sucias/episodes/Not-All-Men-e15v6dv src should be Not-All-Men-e15v6dv)
98
+ * audio_file - src should be path to file. Additionaly, required properties are name of the song (it will display in player) and boolean value *is\_relative\_url* (for easy access to files served from the same domain)
99
+
58
100
  ## Contributing
59
101
 
60
102
  Bug reports and pull requests are welcome on [GitHub](https://github.com/ItsMeaga1n/minimal-music-project). This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
data/_config.yml CHANGED
@@ -5,7 +5,6 @@ description: >-
5
5
  This website was created as a demonstration for Jekyll custom theme
6
6
  named minimal-music-project. Its main feature is to make it easy to create
7
7
  websites for music projects
8
- baseurl: "/minimal-music-project" # the subpath of your site, e.g. /blog
9
8
  url: "https://itsmeaga1n.github.io" # the base hostname & protocol for your site, e.g. http://example.com
10
9
  author: itsmeaga1n
11
10
  twitter:
data/_data/metaData.yml CHANGED
@@ -1,6 +1,18 @@
1
1
  author: Site Author
2
2
  logo: assets/img/band_logo.png
3
+ clickToEnlargeImages: True
3
4
  cookies:
4
5
  enabled: True
5
6
  message: This site might be using cookies! Customize your message or disable cookies in metaData.yml!
6
- agreeButtonText: Agree
7
+ agreeButtonText: Yes, I agree
8
+ disagreeButtonText: No, take me to settings
9
+ agreeButtonFnName: cookiesAcceptDefaultFn
10
+ disagreeButtonFnName: cookiesDisagreeDefaultFn
11
+ header: Ask your users if they agree to cookies
12
+ consent:
13
+ - name: Google Analytics
14
+ description: some description describing the purpose of this consent as well as what it will collect and where send
15
+ cookieName: GA
16
+ - name: Some other cookie
17
+ description: some description describing the purpose of this consent as well as what it will collect and where send
18
+ cookieName: SA
@@ -18,5 +18,5 @@
18
18
  <!-- feed -->
19
19
  <link rel="alternate" type="application/atom+xml" title="{{ site.title }}" href="{{ "feed.xml" | relative_url }}">
20
20
 
21
- {% include customizations.html %}
21
+ {% include customizationsStyles.html %}
22
22
  {% seo %}
@@ -0,0 +1,63 @@
1
+ (function () {
2
+ window.toggleExpander = function toggleExpander(x) {
3
+ document.getElementsByClassName("menu")[0].classList.toggle("expanded");
4
+ }
5
+ window.addEventListener("load", () => {
6
+ // #region click to enlarge images
7
+ const images = document.querySelectorAll("img[click-to-enlarge]");
8
+ images.forEach(img => {
9
+ {% if site.data.metaData.clickToEnlargeImages %}
10
+ img.addEventListener("click", () => {
11
+ const src = img.attributes.getNamedItem("src");
12
+ const modal = document.createElement("div");
13
+ const removeModal = function() {
14
+ document.body.removeChild(modal);
15
+ };
16
+ modal.classList.add("modal__picture-zoomed");
17
+ modal.style.backgroundImage = `URL("${src.value}")`;
18
+ modal.addEventListener("click", removeModal);
19
+ document.body.append(modal);
20
+ document.body.addEventListener("keyup", e => {
21
+ if (e.key === 'Escape') {
22
+ removeModal();
23
+ }
24
+ }, {once : true})
25
+ });
26
+ {% else %}
27
+ img.removeAttribute("click-to-enlarge");
28
+ {% endif %}
29
+ });
30
+ // #endregion click to enlarge images
31
+ // #region embedded audio players
32
+ const players = document.querySelectorAll("iframe.embedded-player");
33
+ const getParamsByPlayerType = (src, type) => {
34
+ const rt = (src, height) => ({
35
+ src: src,
36
+ height: height
37
+ });
38
+ switch (type.toLocaleLowerCase()) {
39
+ case "soundcloud":
40
+ return rt(`https://w.soundcloud.com/player/?url=${src}`, 125);
41
+ case "bandcamp":
42
+ return rt(`https://bandcamp.com/EmbeddedPlayer/${src}`, 125);
43
+ case "spotify":
44
+ return rt(`https://open.spotify.com/embed/track/${src}`, 80);
45
+ case "youtube":
46
+ return rt(`https://www.youtube.com/embed/${src}`, 350);
47
+ case "anchor.fm":
48
+ return rt(`https://anchor.fm/sucias/embed/episodes/${src}`,102);
49
+ default:
50
+ return rt(src, 125);
51
+ }
52
+ };
53
+ players.forEach(player => {
54
+ const givenSrc = player.getAttribute("givenSrc");
55
+ const type = player.getAttribute("type");
56
+ const { src, height } = getParamsByPlayerType(givenSrc, type);
57
+ player.setAttribute("src", src);
58
+ player.setAttribute("height", height);
59
+ player.classList.remove("hidden");
60
+ });
61
+ // #endregion embedded audio players
62
+ });
63
+ })();
data/_includes/cookies.js CHANGED
@@ -1,27 +1,61 @@
1
+
1
2
  (function() {
2
- const consentPropName = "cookies_consent";
3
+ const interactedWithCookiesBanner = "interacted_with_cookies_banner";
3
4
  const storageType = localStorage;
5
+ const cookieContainerId = "cookieContainer";
6
+
7
+ acceptAllCookieConsent = () => {
8
+ {% for consent in site.data.metaData.cookies.consent %}
9
+ eval("storageType.setItem('{{consent.cookieName}}', true);");
10
+ {% endfor %}
11
+ }
4
12
 
5
- shouldShowCookieConsent = () => !storageType.getItem(consentPropName);
6
- acceptCookieConsent = () => storageType.setItem(consentPropName, true);
13
+ window.cookiesAcceptDefaultFn = () => {
14
+ const cookieContainer = document.getElementById(cookieContainerId);
15
+ cookieContainer.classList.add("hidden");
16
+ window.setTimeout(cookieContainer.remove.bind(cookieContainer), 1000);
17
+ storageType.setItem(interactedWithCookiesBanner, true);
18
+ acceptAllCookieConsent();
19
+ }
20
+ window.cookiesDisagreeDefaultFn = () => {
21
+ const cookieContainer = document.getElementById(cookieContainerId);
22
+ cookieContainer.classList.add("hidden");
23
+ window.setTimeout(cookieContainer.remove.bind(cookieContainer), 1000);
24
+ storageType.setItem(interactedWithCookiesBanner, true);
25
+ window.location = "cookies";
26
+ }
27
+
7
28
  window.addEventListener("load", () => {
8
- if(!shouldShowCookieConsent()) {
29
+ if(storageType.getItem(interactedWithCookiesBanner) === "true" || window.location.href.indexOf("cookies") !== -1) {
9
30
  return;
10
31
  }
11
32
  const cookieContainer = document.createElement("div");
33
+ cookieContainer.setAttribute("id", cookieContainerId);
12
34
  cookieContainer.classList.add("hidden");
35
+
36
+ const cookieHeader = document.createElement("h2");
37
+ const cookieHeaderContent = document.createTextNode("{{ site.data.metaData.cookies.header }}");
38
+
13
39
  const cookieParagraph = document.createElement("p");
14
- const cookieContent = document.createTextNode("{{ site.data.metaData.cookies.message }}");
40
+ const cookieParagraphContent = document.createTextNode("{{ site.data.metaData.cookies.message }}");
41
+
42
+ const cookieButtonsContainer = document.createElement("div");
43
+ cookieButtonsContainer.classList.add("cookie-container--buttons");
44
+
15
45
  const cookieAgreeButton = document.createElement("button");
16
46
  const cookieButtonContent = document.createTextNode("{{ site.data.metaData.cookies.agreeButtonText }}");
17
47
  cookieAgreeButton.appendChild(cookieButtonContent);
18
- cookieAgreeButton.onclick = () => {
19
- acceptCookieConsent();
20
- cookieContainer.classList.add("hidden");
21
- window.setTimeout(cookieContainer.remove.bind(cookieContainer), 1000);
22
- }
23
- cookieParagraph.append(cookieContent);
24
- cookieContainer.append(cookieParagraph, cookieAgreeButton);
48
+ eval("cookieAgreeButton.onclick = {{ site.data.metaData.cookies.agreeButtonFnName }};");
49
+
50
+ const cookieButtonDisagree = document.createElement("button");
51
+ const cookieButtonDisagreeContent = document.createTextNode("{{ site.data.metaData.cookies.disagreeButtonText }}");
52
+ cookieButtonDisagree.append(cookieButtonDisagreeContent);
53
+ eval("cookieButtonDisagree.onclick = {{ site.data.metaData.cookies.disagreeButtonFnName }};");
54
+
55
+ cookieHeader.append(cookieHeaderContent);
56
+ cookieParagraph.append(cookieParagraphContent);
57
+ cookieButtonsContainer.append(cookieAgreeButton, cookieButtonDisagree)
58
+ cookieContainer.append(cookieHeader, cookieParagraph, cookieButtonsContainer);
25
59
  cookieContainer.classList.add("cookie-container")
26
60
  document.body.appendChild(cookieContainer);
27
61
  window.setTimeout(() => cookieContainer.classList.remove("hidden"));
@@ -0,0 +1,7 @@
1
+ {% for javascript in page.custom-js %}
2
+ <script src="{{ javascript | relative_url }}"></script>
3
+ {% endfor %}
4
+
5
+ {% for javascript in site.data.customs.custom-js %}
6
+ <script src="{{ javascript | relative_url }}"></script>
7
+ {% endfor %}
@@ -0,0 +1,7 @@
1
+ {% for css in page.custom-css %}
2
+ <link href="{{ css | relative_url }}" rel="stylesheet">
3
+ {% endfor %}
4
+
5
+ {% for css in site.data.customs.custom-css %}
6
+ <link href="{{ css | relative_url }}" rel="stylesheet">
7
+ {% endfor %}
@@ -59,22 +59,19 @@
59
59
  {% endfor %}
60
60
  </p>
61
61
  {% endif %}
62
- {% if include.currPost.play_here %}
63
- {% include music-player.html audioData=include.currPost.play_here %}
64
- {% endif %}
65
- {% if include.currPost.play_soundcloud_embed %}
66
- <iframe width="100%" height="110" scrolling="no" frameborder="no" allow="autoplay"
67
- src="{{ include.currPost.play_soundcloud_embed.src }}"></iframe>
68
- <div
69
- style="font-size: 10px; color: #cccccc;line-break: anywhere;word-break: normal;overflow: hidden;white-space: nowrap;text-overflow: ellipsis; font-family: Interstate,Lucida Grande,Lucida Sans Unicode,Lucida Sans,Garuda,Verdana,Tahoma,sans-serif;font-weight: 100;">
70
- <a href="{{ include.currPost.play_soundcloud_embed.artist_href }}" title="{{ include.currPost.play_soundcloud_embed.artist_title }}" target="_blank"
71
- style="color: #cccccc; text-decoration: none;">{{ include.currPost.play_soundcloud_embed.artist_title }}</a> · <a
72
- href="{{ include.currPost.play_soundcloud_embed.song_href }}"
73
- title="{{ include.currPost.play_soundcloud_embed.song_title }}" target="_blank"
74
- style="color: #cccccc; text-decoration: none;">{{ include.currPost.play_soundcloud_embed.song_title }}</a></div>
62
+
63
+ {% if include.currPost.embed_player %}
64
+ {% if include.currPost.embed_player.type == "audio_file" %}
65
+ {% include music-player.html audioData=include.currPost.embed_player %}
66
+ {% else %}
67
+ <iframe
68
+ class="embedded-player hidden"
69
+ givenSrc="{{include.currPost.embed_player.src}}"
70
+ type="{{include.currPost.embed_player.type}}"
71
+ allow="encrypted-media; picture-in-picture"
72
+ height="80"
73
+ frameborder="0"
74
+ scrolling="no">
75
+ </iframe>
76
+ {% endif %}
75
77
  {% endif %}
76
- {% if include.currPost.play_bandcamp_embed %}
77
- <iframe style="border: 0; width: 100%; height: 120px;"
78
- src="{{ include.currPost.play_bandcamp_embed.src }}" seamless>
79
- <a href="{{ include.currPost.play_bandcamp_embed.href }}">{{ include.currPost.play_bandcamp_embed.title }}</a></iframe>
80
- {% endif %}
@@ -2,7 +2,7 @@
2
2
  <header>
3
3
  <figure class="discography-album_cover-wrapper">
4
4
  <div class="discography-album_cover">
5
- <img src="{{ include.currPost.image | relative_url }}" alt="{{ page.image_alt }}" />
5
+ <img click-to-enlarge src="{{ include.currPost.image | relative_url }}" alt="{{ page.image_alt }}" />
6
6
  </div>
7
7
  </figure>
8
8
  </header>
data/_includes/menu.html CHANGED
@@ -5,6 +5,11 @@
5
5
  <img src="{{ site.data.metaData.logo | relative_url }}" alt="Logo" onerror="this.style.display='none'">
6
6
  </a>
7
7
  </div>
8
+ <div class="menu-top_expand" onclick="toggleExpander(this)">
9
+ <div class="bar_top"></div>
10
+ <div class="bar_middle"></div>
11
+ <div class="bar_bottom"></div>
12
+ </div>
8
13
  <ul class="navigation">
9
14
  {% for menu_item in site.data.menu.menu_pages %}
10
15
  <li>
@@ -26,6 +26,11 @@
26
26
  </div>
27
27
 
28
28
  <script>
29
+ // Copyright (c) 2021 by EmNudge (https://codepen.io/EmNudge/pen/rRbLJQ)
30
+ // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
31
+ // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
32
+ // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
33
+
29
34
  const audioPlayer = document.getElementById("{{ include.audioData.src }}");
30
35
  const audio = new Audio(
31
36
  {% if include.audioData.is_relative_url %}
@@ -102,11 +107,7 @@
102
107
  volumeEl.classList.add("fa-volume-up");
103
108
  }
104
109
  });
105
-
106
110
 
107
- /**
108
- * turn 128 seconds into 2:08
109
- **/
110
111
  function getTimeCodeFromNum(num) {
111
112
  let seconds = parseInt(num);
112
113
  let minutes = parseInt(seconds / 60);
@@ -3,7 +3,8 @@
3
3
  <a href="{{ include.currPost.external_url | relative_url }}" target="_blank">
4
4
  {% else %}
5
5
  <a href="{{ include.currPost.url | relative_url }}">
6
- {% endif %} {% if include.currPost.external_name %}
6
+ {% endif %}
7
+ {% if include.currPost.external_name %}
7
8
  Read more on {{ include.currPost.external_name }} &rarr;
8
9
  {% else %}
9
10
  More info &rarr;
@@ -0,0 +1,28 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+ <div class="content-container cookies">
5
+ {{ content }}
6
+ <hr />
7
+ <h2>Consents</h2>
8
+ {% for consent in site.data.metaData.cookies.consent %}
9
+ <fieldset>
10
+ <input type="checkbox" id="{{ consent.name }}">
11
+ <label for="{{ consent.name }}">
12
+ <strong>{{ consent.name }}</strong>
13
+ {{ consent.description }}
14
+ </label>
15
+ </fieldset>
16
+ {% endfor %}
17
+ </div>
18
+ <script>
19
+ const storageType = localStorage;
20
+ const consents = eval('{{ site.data.metaData.cookies.consent | jsonify }}');
21
+ consents.forEach(consent => {
22
+ const element = document.getElementById(consent.name);
23
+ element.checked = storageType.getItem(consent.cookieName) === "true";
24
+ element.addEventListener("click", () => {
25
+ storageType.setItem(consent.cookieName, element.checked);
26
+ });
27
+ });
28
+ </script>
@@ -1,11 +1,6 @@
1
1
  <!doctype html>
2
2
  <html>
3
3
  <head>
4
- {% if site.data.metaData.cookies.enabled %}
5
- <script>
6
- {% include cookies.js %}
7
- </script>
8
- {% endif %}
9
4
  {% include common-head.html %}
10
5
  </head>
11
6
  <body>
@@ -14,5 +9,14 @@
14
9
  {{ content }}
15
10
  {% include footer.html %}
16
11
  </main>
12
+ {% if site.data.metaData.cookies.enabled %}
13
+ <script>
14
+ {% include cookies.js %}
15
+ </script>
16
+ {% endif %}
17
+ <script>
18
+ {% include common.js %}
19
+ </script>
20
+ {% include customizationsScripts.html %}
17
21
  </body>
18
22
  </html>
data/_layouts/post.html CHANGED
@@ -10,7 +10,7 @@ layout: default
10
10
  {% if page.image %}
11
11
  <figure class="post-cover">
12
12
  <!-- TODO: Images for diffrent screen size -->
13
- <img src="{{ page.image | relative_url }}" alt="{{ page.image_alt }}" class="post-cover_image" />
13
+ <img click-to-enlarge src="{{ page.image | relative_url }}" alt="{{ page.image_alt }}" class="post-cover_image" />
14
14
  </figure>
15
15
  {% endif %}
16
16
  </header>
@@ -23,13 +23,13 @@ category: home
23
23
  </header>
24
24
  <section>
25
25
  <figure>
26
- <img src="{{ post.image | relative_url }}" alt="{{ page.image_alt }}" class="post-feed_image" />
26
+ <img click-to-enlarge src="{{ post.image | relative_url }}" alt="{{ page.image_alt }}" class="post-feed_image" />
27
27
  </figure>
28
28
  <p>
29
29
  {{ post.description }}
30
30
  </p>
31
31
  </section>
32
- {% include read-more.html currPost=include.currPost %}
32
+ {% include read-more.html currPost=post %}
33
33
  </article>
34
34
  {% else %}
35
35
  <hr>
@@ -8,9 +8,9 @@
8
8
  opacity: 0.95;
9
9
  -webkit-transition: opacity 800ms, visibility 800ms;
10
10
  transition: opacity 800ms, visibility 800ms;
11
- bottom: 30px;
12
- left: 40px;
13
- max-width: 300px;
11
+ bottom: 40px;
12
+ left: 50px;
13
+ max-width: 40vw;
14
14
  border-radius: 3px;
15
15
  border: 3px solid $black;
16
16
 
@@ -23,22 +23,30 @@
23
23
  opacity: 0;
24
24
  visibility: hidden;
25
25
  }
26
- button {
27
- line-height: 1.4;
28
- font-weight: 700;
29
- display: inline-block;
30
- padding: 10px 20px;
31
- background-color: $white;
32
- color: $p_text;
33
- border: 1px solid;
34
- border-radius: 3px;
35
- text-decoration: none;
36
- cursor: pointer;
37
- -webkit-transition: background-color 200ms;
38
- transition: background-color 200ms;
39
- &:hover {
40
- background-color: rgb(168, 168, 168);
41
- }
26
+ &--buttons {
27
+ display: flex;
28
+ button {
29
+ line-height: 1.4;
30
+ font-weight: 700;
31
+ display: inline-block;
32
+ padding: 10px 20px;
33
+ background-color: $white;
34
+ color: $p_text;
35
+ border: 1px solid;
36
+ border-radius: 3px;
37
+ text-decoration: none;
38
+ cursor: pointer;
39
+ -webkit-transition: background-color 200ms;
40
+ transition: background-color 200ms;
41
+ &:hover {
42
+ background-color: rgb(168, 168, 168);
43
+ }
44
+ width: calc(50% - 10px);
45
+ &:last-of-type {
46
+ margin-left: 10px;
47
+ }
48
+ }
49
+
42
50
  }
43
51
  @include mobile {
44
52
  bottom: 0;
@@ -30,7 +30,7 @@ body {
30
30
  }
31
31
  main {
32
32
  .content-container {
33
- margin: 3.5em auto 0 auto;
33
+ margin: 3.5em auto 0 0;
34
34
  width: 90%;
35
35
  padding: 0px 18px 24px;
36
36
  flex-grow: 1;
@@ -46,11 +46,16 @@ main {
46
46
  margin: $gap auto 0 auto;
47
47
  }
48
48
  }
49
+ fieldset {
50
+ border: none;
51
+ padding: 0;
52
+ margin-bottom: 1em;
53
+ }
49
54
  }
50
55
 
51
56
  .pager {
52
- margin-top: 30px;
53
- margin-bottom: 30px;
57
+ margin-top: 40px;
58
+ height: 60px;
54
59
  width: 100%;
55
60
  li {
56
61
  position: absolute;
@@ -65,19 +70,17 @@ main {
65
70
  }
66
71
  & > a {
67
72
  color: $p_text;
68
- &:hover {
69
- text-decoration: underline $black;
70
- }
73
+ @include underline-on-hover($black);
71
74
  }
72
75
  }
73
76
  }
74
77
  }
78
+
75
79
  a {
76
80
  text-decoration-line: none;
77
81
  color: inherit;
78
82
  transition: all 0.4s ease-in-out 0s;
79
83
  }
80
-
81
84
  a, p, li {
82
85
  font-size: 1.1em;
83
86
  }
@@ -98,6 +101,14 @@ img {
98
101
  display: inline-block;
99
102
  margin: 0;
100
103
  vertical-align: top;
104
+ object-fit: cover;
105
+ &[click-to-enlarge] {
106
+ cursor: zoom-in;
107
+ &:hover {
108
+ box-shadow: 0 0 8px $black;
109
+ transition: all 0.4s ease-in-out 0.1s;
110
+ }
111
+ }
101
112
  }
102
113
 
103
114
  @include mobile {
@@ -111,6 +122,7 @@ img {
111
122
  .content-container {
112
123
  width: 100%;
113
124
  padding: 0px 9px 12px;
125
+ margin-top: 0;
114
126
  }
115
127
  }
116
128
  }
@@ -129,8 +141,6 @@ audio {
129
141
  color: #000000;
130
142
  a {
131
143
  font-size: 0.9em;
132
- &:hover {
133
- text-decoration: underline;
134
- }
144
+ @include underline-on-hover($black);
135
145
  }
136
146
  }
@@ -8,6 +8,8 @@
8
8
  width: 20vw;
9
9
  height: 20vw;
10
10
  border: 1px solid #CCC;
11
+ max-width: 500px;
12
+ max-height: 500px;
11
13
  &-wrapper {
12
14
  display: block;
13
15
  margin-right: 0.5em;
@@ -20,8 +22,8 @@
20
22
  padding-bottom: 0.5em;
21
23
  color: $p_text;
22
24
  }
23
- a:hover {
24
- text-decoration: underline $p_text;
25
+ a {
26
+ @include underline-on-hover($p_text);
25
27
  }
26
28
  section {
27
29
  width: 100%;
@@ -31,9 +33,7 @@
31
33
  margin-top: 3vw;
32
34
  font-size: 2em;
33
35
  margin-bottom: 0.6em;
34
- &:hover {
35
- text-decoration: underline;
36
- }
36
+ @include underline-on-hover($p_text);
37
37
  }
38
38
 
39
39
  &_summary {
@@ -0,0 +1,9 @@
1
+ .embedded-player {
2
+ width: 100%;
3
+ max-width: 600px;
4
+ outline: none;
5
+ border: none;
6
+ &.hidden {
7
+ visibility: hidden;
8
+ }
9
+ }
@@ -5,4 +5,6 @@
5
5
  @import './post';
6
6
  @import './cookies';
7
7
  @import './discography';
8
- @import './music-player.scss';
8
+ @import './music-player';
9
+ @import './modal';
10
+ @import './embedded-player';
@@ -13,10 +13,10 @@ main {
13
13
  left: $menu-size;
14
14
  top: 0;
15
15
  @include mobile {
16
- top: $menu-size;
16
+ top: $mobile-menu-height;
17
17
  left: 0;
18
18
  width: 100%;
19
- height: calc(100% - #{$menu-size});
19
+ height: calc(100% - #{$mobile-menu-height});
20
20
  }
21
21
  &.no-menu {
22
22
  width: 100%;
@@ -14,26 +14,84 @@
14
14
  box-sizing: border-box;
15
15
  padding: 8px 0 0 22px;
16
16
  overflow: hidden;
17
-
17
+ @include mobile {
18
+ flex-direction: row;
19
+ width: 100%;
20
+ max-height: $mobile-menu-height;
21
+ }
22
+ &.expanded {
23
+ z-index: 10;
24
+ .menu-top_expand {
25
+ .bar_top {
26
+ -webkit-transform: rotate(-45deg) translate(-8px, 8px);
27
+ transform: rotate(-45deg) translate(-8px, 8px);
28
+ }
29
+
30
+ .bar_middle {opacity: 0;}
31
+
32
+ .bar_bottom {
33
+ -webkit-transform: rotate(45deg) translate(-8px, -8px);
34
+ transform: rotate(45deg) translate(-8px, -8px);
35
+ }
36
+ }
37
+ .navigation {
38
+ @include mobile {
39
+ display: block;
40
+ position: fixed;
41
+ left: 0;
42
+ top: $mobile-menu-height;
43
+ height: calc(100% - #{$mobile-menu-height});
44
+ width: 100%;
45
+ background-color: $white;
46
+ padding-left: 2em;
47
+ }
48
+ }
49
+ .menu-contact {
50
+ display: flex;
51
+ position: fixed;
52
+ bottom: 0.5em;
53
+ left: 1em;
54
+ }
55
+ }
18
56
  &-top {
19
57
  box-sizing: border-box;
20
58
  height: 100%;
21
59
  flex-grow: 1;
22
60
  padding-right: 3px;
23
-
24
61
  &_logo {
25
62
  max-width: 100px;
26
63
  margin-bottom: 1em;
27
64
  a {
28
65
  color: #000000;
29
66
  img {
30
- max-height: 100%;
67
+ max-height: 100px;
68
+ @include mobile {
69
+ max-height: calc(#{$mobile-menu-height} - 15px);
70
+ }
31
71
  width: auto;
32
72
  max-width: 100%;
33
73
  border: 0;
34
74
  }
35
75
  }
36
76
  }
77
+ &_expand {
78
+ display: none;
79
+ @include mobile {
80
+ display: inline-block;
81
+ }
82
+ cursor: pointer;
83
+ flex-grow: 0;
84
+ position: absolute;
85
+ right: 10px;
86
+ top: 15px;
87
+ .bar_top, .bar_middle, .bar_bottom {
88
+ width: 35px;
89
+ height: 5px;
90
+ background-color: #333;
91
+ margin: 6px 0;
92
+ transition: 0.4s;
93
+ }
94
+ }
37
95
  }
38
96
  ul, ol, dl {
39
97
  li, dt {
@@ -51,8 +109,9 @@
51
109
  letter-spacing: 3px;
52
110
  font-size: 1em;
53
111
  &:hover {
54
- color: $black;
55
-
112
+ transition: all 0.3s ease-in-out 0s;
113
+ color: $p_light;
114
+ text-decoration: none;
56
115
  }
57
116
  &.selected {
58
117
  font-weight: 600;
@@ -70,11 +129,20 @@
70
129
  }
71
130
  }
72
131
 
132
+ .navigation {
133
+ @include mobile {
134
+ display: none;
135
+ }
136
+ }
137
+
73
138
  &-contact {
74
139
  display:flex;
75
140
  justify-content:left;
76
141
  margin-bottom: 0.6em;
77
142
  flex-wrap: wrap;
143
+ @include mobile {
144
+ display: none;
145
+ }
78
146
  a {
79
147
  color: $p_text;
80
148
  cursor:pointer;
@@ -89,4 +157,6 @@
89
157
  }
90
158
  }
91
159
  }
160
+
161
+
92
162
  }
@@ -0,0 +1,19 @@
1
+ .modal {
2
+ &__picture-zoomed {
3
+ background-color: RGBA(0,0,0,0.5);
4
+ background-position: center;
5
+ background-repeat: no-repeat;
6
+ background-size: auto;
7
+ width: 100%;
8
+ height: 100%;
9
+ position: fixed;
10
+ z-index: 10000;
11
+ top: 0;
12
+ left: 0;
13
+ cursor: zoom-out;
14
+ transition: all 0.4s ease-in-out 0.2s;
15
+ @include mobile {
16
+ background-size: contain;
17
+ }
18
+ }
19
+ }
@@ -67,9 +67,7 @@
67
67
  }
68
68
  a {
69
69
  color: $p_text;
70
- &:hover {
71
- text-decoration: underline $p_text;
72
- }
70
+ @include underline-on-hover($p_text);
73
71
  }
74
72
  }
75
73
 
@@ -87,7 +85,6 @@
87
85
  }
88
86
 
89
87
  a {
90
- color: #19005e;
91
88
  font-size: 1em;
92
89
  }
93
90
  }
@@ -7,6 +7,13 @@ $image-dim: 192px;
7
7
  justify-content: flex-start;
8
8
  align-items: flex-start;
9
9
  color: $p_text;
10
+ hr {
11
+ @include mobile {
12
+ &:first-of-type {
13
+ margin-top: 0;
14
+ }
15
+ }
16
+ }
10
17
  article {
11
18
  width: 100%;
12
19
  position: relative;
@@ -22,8 +29,15 @@ $image-dim: 192px;
22
29
  }
23
30
  a {
24
31
  line-height: 1.1em;
32
+ text-decoration: underline;
33
+ text-decoration-color: transparent;
34
+ transition: 0.4s;
35
+ -webkit-text-decoration-color: transparent;
36
+ -moz-text-decoration-color: transparent;
25
37
  &:hover {
26
- text-decoration: underline $black;
38
+ text-decoration-color: $black;
39
+ -webkit-text-decoration-color: $black;
40
+ -moz-text-decoration-color: $black;
27
41
  }
28
42
  }
29
43
  .article-date {
@@ -1,4 +1,5 @@
1
1
  $black: #000000;
2
2
  $white: #FFF;
3
- $hyperlink: #4400ff;
3
+ $hyperlink: #290099;
4
4
  $p_text: #000000;
5
+ $p_light: #888888;
@@ -1,6 +1,7 @@
1
1
  $tablet-width: 768px;
2
2
  $desktop-width: 1024px;
3
- $menu-size: 200px;
3
+ $menu-size: 240px;
4
+ $mobile-menu-height: 75px;
4
5
  $minimal-menu-size: 50px;
5
6
  $gap: 30px;
6
7
  $pop-ups-z-1: 100;
@@ -1,3 +1,16 @@
1
+ @mixin underline-on-hover($underline-color) {
2
+ text-decoration: underline;
3
+ text-decoration-color: transparent;
4
+ transition: 0.4s;
5
+ -webkit-text-decoration-color: transparent;
6
+ -moz-text-decoration-color: transparent;
7
+ &:hover {
8
+ text-decoration-color: $underline-color;
9
+ -webkit-text-decoration-color: $underline-color;
10
+ -moz-text-decoration-color: $underline-color;
11
+ }
12
+ }
13
+
1
14
  @mixin tooltip {
2
15
  position: relative;
3
16
  &:hover .tooltip {
@@ -35,13 +48,8 @@
35
48
 
36
49
  @mixin hyperlink-convention {
37
50
  a {
38
- transition: all 300ms ease 0s;
39
51
  cursor: pointer;
40
- text-decoration-line: none;
52
+ @include underline-on-hover($hyperlink);
41
53
  color: $hyperlink;
42
- &:hover {
43
- text-decoration: underline $hyperlink;
44
-
45
- }
46
54
  }
47
55
  }
data/pages/about.html CHANGED
@@ -3,34 +3,63 @@ layout: default
3
3
  title: About
4
4
  permalink: about.html
5
5
  category: about
6
-
7
6
  ---
8
7
  <div class="content-container about">
9
8
  <h1>About</h1>
10
- It's a good place to write something about the project!
9
+ It's a good place to write something about the project. This projects repository is located on <a
10
+ href="https://github.com/ItsMeaga1n/minimal-music-project" target="_blank">GitHub</a>. Since you are here, feel
11
+ free to check out my other stuff either on <a href="https://github.com/ItsMeaga1n" target="_blank">GitHub</a> or on
12
+ my <a href="http://itsmeaga1n.github.io" target="_blank">blog</a>!
11
13
 
12
14
  <hr />
13
15
  <p>
14
16
  Listen and get music from this example project at:
15
- <ul>
16
- <li>
17
- <a>
18
- YouTube
19
- <i class="fab fa-youtube" ></i>
20
- </a>
21
- </li>
22
- <li>
23
- <a>
24
- SoundCloud
25
- <i class="fab fa-soundcloud" ></i>
26
- </a>
27
- </li>
28
- <li>
29
- <a>
30
- BandCamp
31
- <i class="fab fa-bandcamp" ></i>
32
- </a>
33
- </li>
34
- </ul>
17
+ <ul>
18
+ <li>
19
+ <a>
20
+ YouTube
21
+ <i class="fab fa-youtube"></i>
22
+ </a>
23
+ </li>
24
+ <li>
25
+ <a>
26
+ SoundCloud
27
+ <i class="fab fa-soundcloud"></i>
28
+ </a>
29
+ </li>
30
+ <li>
31
+ <a>
32
+ BandCamp
33
+ <i class="fab fa-bandcamp"></i>
34
+ </a>
35
+ </li>
36
+ </ul>
35
37
  </p>
36
- </div>
38
+ <hr />
39
+ <a href="/privacy-policy">
40
+ Privacy Policy
41
+ </a>
42
+ /
43
+ <a href="/cookies">
44
+ Cookies
45
+ </a>
46
+ </div>
47
+
48
+ <style>
49
+ a {
50
+ text-decoration: underline;
51
+ text-decoration-color: transparent;
52
+ transition: 0.4s;
53
+ -webkit-text-decoration-color: transparent;
54
+ -moz-text-decoration-color: transparent;
55
+ cursor: pointer;
56
+ color: #290099;
57
+ }
58
+
59
+ a:hover {
60
+ text-decoration-color: #290099;
61
+ transition: 0.4s;
62
+ -webkit-text-decoration-color: #290099;
63
+ -moz-text-decoration-color: #290099;
64
+ }
65
+ </style>
@@ -0,0 +1,9 @@
1
+ ---
2
+ layout: cookies
3
+ title: Manage your data
4
+ permalink: cookies
5
+ category: about
6
+ ---
7
+ <h1>Manage your data</h1>
8
+ <p>This website uses cookies to provide you with the best user experience.</p>
9
+ <p>Below are checkboxes, that you need to confirm in order to enable/disable specific data collection. Some of them might be needed for specific functionalities on site.</p>
@@ -0,0 +1,10 @@
1
+ ---
2
+ layout: default
3
+ title: Privacy Policy
4
+ permalink: privacy-policy
5
+ category: about
6
+ ---
7
+ <div class="content-container about">
8
+ <h1>Privacy Policy</h1>
9
+ Put your privacy policy here
10
+ </div>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: minimal-music-project
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Patryk Bieszke
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-02-18 00:00:00.000000000 Z
11
+ date: 2021-09-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -39,8 +39,10 @@ files:
39
39
  - _data/menu.yml
40
40
  - _data/metaData.yml
41
41
  - _includes/common-head.html
42
+ - _includes/common.js
42
43
  - _includes/cookies.js
43
- - _includes/customizations.html
44
+ - _includes/customizationsScripts.html
45
+ - _includes/customizationsStyles.html
44
46
  - _includes/discography-entry-metadata.html
45
47
  - _includes/discography-entry.html
46
48
  - _includes/footer.html
@@ -48,6 +50,7 @@ files:
48
50
  - _includes/music-player.html
49
51
  - _includes/pagination-buttons.html
50
52
  - _includes/read-more.html
53
+ - _layouts/cookies.html
51
54
  - _layouts/default.html
52
55
  - _layouts/discography.html
53
56
  - _layouts/post.html
@@ -56,9 +59,11 @@ files:
56
59
  - _sass/styles/_cookies.scss
57
60
  - _sass/styles/_defaults.scss
58
61
  - _sass/styles/_discography.scss
62
+ - _sass/styles/_embedded-player.scss
59
63
  - _sass/styles/_index.scss
60
64
  - _sass/styles/_layout.scss
61
65
  - _sass/styles/_menu.scss
66
+ - _sass/styles/_modal.scss
62
67
  - _sass/styles/_music-player.scss
63
68
  - _sass/styles/_post.scss
64
69
  - _sass/styles/_posts_feed.scss
@@ -84,6 +89,8 @@ files:
84
89
  - assets/img/z-is-for-zero.png
85
90
  - assets/styles/styles.scss
86
91
  - pages/about.html
92
+ - pages/cookies.html
93
+ - pages/privacyPolicy.html
87
94
  homepage: https://github.com/ItsMeaga1n/minimal-music-project
88
95
  licenses:
89
96
  - MIT
@@ -1,15 +0,0 @@
1
- {% for javascript in page.custom-js %}
2
- <script src="{{ javascript | relative_url }}"></script>
3
- {% endfor %}
4
-
5
- {% for javascript in site.data.customs.custom-js %}
6
- <script src="{{ javascript | relative_url }}"></script>
7
- {% endfor %}
8
-
9
- {% for css in page.custom-css %}
10
- <link href="{{ css | relative_url }}" rel="stylesheet">
11
- {% endfor %}
12
-
13
- {% for css in site.data.customs.custom-css %}
14
- <link href="{{ css | relative_url }}" rel="stylesheet">
15
- {% endfor %}