minimal-music-project 0.0.6 → 0.0.7
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 +4 -4
- data/README.md +9 -3
- data/_data/metaData.yml +12 -2
- data/_includes/cookies.js +46 -18
- data/_layouts/cookies.html +28 -0
- data/_sass/styles/_cookies.scss +24 -16
- data/_sass/styles/_defaults.scss +5 -0
- data/pages/about.html +35 -24
- data/pages/cookies.html +9 -0
- data/pages/privacyPolicy.html +10 -0
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 83c6d910205c9328757cf56b0c2e50df907fedcd650966b0b9898cbd3fb51aaa
|
4
|
+
data.tar.gz: cc1222e1c478d9cb01840d7567b99b354251c5c29c7255446d8463c7293a602d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3c2952ee9d4a34a6e3eabed59790d60a14937e5bbe8d95ca79a573fcd15aa70a84e9999eaa9ff499335fda3b418f8146f7bfb3f9f7ffb747e81761c255fba879
|
7
|
+
data.tar.gz: 99af8f826d34e242fc443712a3396bb7b511c3c405072bba1c2731cf766ddb0a981b9bef7725bd527598a58ebda18439f4943edc2959bcf011f244e8c60ef3e7
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
|
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
3
|
[](https://raw.githubusercontent.com/itsmeaga1n/minimal-music-project/master/LICENSE.txt)
|
4
4
|
[](https://jekyllrb.com/)
|
@@ -10,7 +10,7 @@
|
|
10
10
|
|
11
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/).
|
12
12
|
|
13
|
-

|
13
|
+

|
14
14
|
|
15
15
|
## Installation
|
16
16
|
|
@@ -71,8 +71,14 @@ Structure of `_data/metaData.yml`:
|
|
71
71
|
* enabled: determine if should show cookies pop-up
|
72
72
|
* message: text on cookie pop-up
|
73
73
|
* agreeButtonText: text on agree button
|
74
|
+
* disagreeButtonText: text on disagree button
|
74
75
|
* agreeButtonFnName: function in the `window` scope to execute on cookie agree
|
75
|
-
|
76
|
+
* disagreeButtonFnName: function in the `window` scope to execute on cookie disagree
|
77
|
+
* header: title of the pop-up window
|
78
|
+
* consent: list of objects that will be rendered on a site with "cookies" layout for acceptance. Each object needs to have:
|
79
|
+
* name: bolded on render
|
80
|
+
* description: description of the cookie
|
81
|
+
* cookieName: under what name it will be saved in the local storage (selected checkbox as "true", unselected as "false")
|
76
82
|
|
77
83
|
Structure of `_data/customs.yml`:
|
78
84
|
* custom-css: a list of urls to custom css files
|
data/_data/metaData.yml
CHANGED
@@ -3,5 +3,15 @@ logo: assets/img/band_logo.png
|
|
3
3
|
cookies:
|
4
4
|
enabled: True
|
5
5
|
message: This site might be using cookies! Customize your message or disable cookies in metaData.yml!
|
6
|
-
agreeButtonText:
|
7
|
-
|
6
|
+
agreeButtonText: Yes, I agree
|
7
|
+
disagreeButtonText: No, take me to settings
|
8
|
+
agreeButtonFnName: cookiesAcceptDefaultFn
|
9
|
+
disagreeButtonFnName: cookiesDisagreeDefaultFn
|
10
|
+
header: Ask your users if they agree to cookies
|
11
|
+
consent:
|
12
|
+
- name: Google Analytics
|
13
|
+
description: some description describing the purpose of this consent as well as what it will collect and where send
|
14
|
+
cookieName: GA
|
15
|
+
- name: Some other cookie
|
16
|
+
description: some description describing the purpose of this consent as well as what it will collect and where send
|
17
|
+
cookieName: SA
|
data/_includes/cookies.js
CHANGED
@@ -1,33 +1,61 @@
|
|
1
|
+
|
1
2
|
(function() {
|
2
|
-
const
|
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
|
-
|
6
|
-
|
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(
|
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
|
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
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
cookieParagraph.append(cookieContent);
|
30
|
-
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);
|
31
59
|
cookieContainer.classList.add("cookie-container")
|
32
60
|
document.body.appendChild(cookieContainer);
|
33
61
|
window.setTimeout(() => cookieContainer.classList.remove("hidden"));
|
@@ -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>
|
data/_sass/styles/_cookies.scss
CHANGED
@@ -23,22 +23,30 @@
|
|
23
23
|
opacity: 0;
|
24
24
|
visibility: hidden;
|
25
25
|
}
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
background-color
|
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;
|
data/_sass/styles/_defaults.scss
CHANGED
data/pages/about.html
CHANGED
@@ -3,36 +3,46 @@ 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. This projects repository is located on <a
|
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
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
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>
|
38
|
+
<hr />
|
39
|
+
<a href="/privacy-policy">
|
40
|
+
Privacy Policy
|
41
|
+
</a>
|
42
|
+
/
|
43
|
+
<a href="/cookies">
|
44
|
+
Cookies
|
45
|
+
</a>
|
36
46
|
</div>
|
37
47
|
|
38
48
|
<style>
|
@@ -45,10 +55,11 @@ category: about
|
|
45
55
|
cursor: pointer;
|
46
56
|
color: #290099;
|
47
57
|
}
|
48
|
-
|
58
|
+
|
59
|
+
a:hover {
|
49
60
|
text-decoration-color: #290099;
|
50
61
|
transition: 0.4s;
|
51
62
|
-webkit-text-decoration-color: #290099;
|
52
63
|
-moz-text-decoration-color: #290099;
|
53
|
-
|
64
|
+
}
|
54
65
|
</style>
|
data/pages/cookies.html
ADDED
@@ -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>
|
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
|
+
version: 0.0.7
|
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-
|
11
|
+
date: 2021-09-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
@@ -50,6 +50,7 @@ files:
|
|
50
50
|
- _includes/music-player.html
|
51
51
|
- _includes/pagination-buttons.html
|
52
52
|
- _includes/read-more.html
|
53
|
+
- _layouts/cookies.html
|
53
54
|
- _layouts/default.html
|
54
55
|
- _layouts/discography.html
|
55
56
|
- _layouts/post.html
|
@@ -86,6 +87,8 @@ files:
|
|
86
87
|
- assets/img/z-is-for-zero.png
|
87
88
|
- assets/styles/styles.scss
|
88
89
|
- pages/about.html
|
90
|
+
- pages/cookies.html
|
91
|
+
- pages/privacyPolicy.html
|
89
92
|
homepage: https://github.com/ItsMeaga1n/minimal-music-project
|
90
93
|
licenses:
|
91
94
|
- MIT
|