minimal-music-project 0.1.6 → 0.1.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/_includes/common.js +2 -4
- data/_includes/cookies.js +4 -4
- data/_includes/discography-entry.html +2 -1
- data/_includes/music-player.html +82 -81
- data/_includes/read-more.html +1 -1
- data/_layouts/cookies.html +5 -5
- data/_layouts/posts_feed.html +3 -2
- data/_sass/styles/_discography.scss +4 -0
- data/_sass/styles/_post.scss +10 -4
- metadata +5 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c0e93a989b687822bca17e0cb3a009b1e957d9b679372ce7d57329c5e5545599
|
|
4
|
+
data.tar.gz: b30dae066364b814a796feac8959cd7682d47229c619a80b11db5ffe0805df39
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c80304be82068a499b7ff67e06db410358b59edece13b50643ac102fa7be4bb8a3f7e36dbcbf9568e60f4832df3fc020f2f6e6176c1812453e23bda3d5f1fca9
|
|
7
|
+
data.tar.gz: 475a474dd68e2aa3579f850f34a3a155c74ea5234c39a8e9dcfa1e0751f3dbe0238c9663df69a816c6bc939b42693c1dfeb727ba1e056cd2067efc1a95db2585
|
data/_includes/common.js
CHANGED
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
};
|
|
19
19
|
window.addEventListener("load", () => {
|
|
20
20
|
// #region click to enlarge images
|
|
21
|
+
{% if site.data.metaData.clickToEnlargeImages %}
|
|
21
22
|
const imageWrappers = document.querySelectorAll(".click-to-enlarge");
|
|
22
23
|
imageWrappers.forEach(imageWrapper => {
|
|
23
|
-
{% if site.data.metaData.clickToEnlargeImages %}
|
|
24
24
|
imageWrapper.addEventListener("click", () => {
|
|
25
25
|
const img = imageWrapper.getElementsByTagName("img")[0];
|
|
26
26
|
const src = img.attributes.getNamedItem("src");
|
|
@@ -48,10 +48,8 @@
|
|
|
48
48
|
modal.classList.remove("hidden");
|
|
49
49
|
}, 0);
|
|
50
50
|
});
|
|
51
|
-
{% else %}
|
|
52
|
-
img.removeAttribute("click-to-enlarge");
|
|
53
|
-
{% endif %}
|
|
54
51
|
});
|
|
52
|
+
{% endif %}
|
|
55
53
|
// #endregion click to enlarge images
|
|
56
54
|
// #region embedded audio players
|
|
57
55
|
const players = document.querySelectorAll("iframe.embedded-player");
|
data/_includes/cookies.js
CHANGED
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
const storageType = localStorage;
|
|
5
5
|
const cookieContainerId = "cookieContainer";
|
|
6
6
|
|
|
7
|
-
acceptAllCookieConsent = () => {
|
|
7
|
+
const acceptAllCookieConsent = () => {
|
|
8
8
|
{% for consent in site.data.metaData.cookies.consent %}
|
|
9
|
-
|
|
9
|
+
storageType.setItem('{{consent.cookieName}}', true);
|
|
10
10
|
{% endfor %}
|
|
11
11
|
}
|
|
12
12
|
|
|
@@ -45,12 +45,12 @@
|
|
|
45
45
|
const cookieAgreeButton = document.createElement("button");
|
|
46
46
|
const cookieButtonContent = document.createTextNode("{{ site.data.metaData.cookies.agreeButtonText }}");
|
|
47
47
|
cookieAgreeButton.appendChild(cookieButtonContent);
|
|
48
|
-
|
|
48
|
+
cookieAgreeButton.onclick = window["{{ site.data.metaData.cookies.agreeButtonFnName }}"];
|
|
49
49
|
|
|
50
50
|
const cookieButtonDisagree = document.createElement("button");
|
|
51
51
|
const cookieButtonDisagreeContent = document.createTextNode("{{ site.data.metaData.cookies.disagreeButtonText }}");
|
|
52
52
|
cookieButtonDisagree.append(cookieButtonDisagreeContent);
|
|
53
|
-
|
|
53
|
+
cookieButtonDisagree.onclick = window["{{ site.data.metaData.cookies.disagreeButtonFnName }}"];
|
|
54
54
|
|
|
55
55
|
cookieHeader.append(cookieHeaderContent);
|
|
56
56
|
cookieParagraph.append(cookieParagraphContent);
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
{% if include.currPost.image_alt %}
|
|
9
9
|
alt="{{ include.currPost.image_alt }}"
|
|
10
10
|
{% endif %}
|
|
11
|
+
loading="lazy"
|
|
11
12
|
src="{{ include.currPost.image | relative_url }}"
|
|
12
13
|
{% if include.currPost.responsiveImage %}
|
|
13
14
|
srcset="{% for img in include.currPost.responsiveImage %}{{ img.src | relative_url }} {{ img.size }}w{% if forloop.last == false %},{% endif %}{% endfor %}"
|
|
@@ -20,7 +21,7 @@
|
|
|
20
21
|
</header>
|
|
21
22
|
<section>
|
|
22
23
|
{% if include.currPost.external_url %}
|
|
23
|
-
<a href="{{ include.currPost.external_url
|
|
24
|
+
<a href="{{ include.currPost.external_url }}" target="_blank">
|
|
24
25
|
{% else %}
|
|
25
26
|
<a href="{{ include.currPost.url | relative_url }}">
|
|
26
27
|
{% endif %}
|
data/_includes/music-player.html
CHANGED
|
@@ -31,94 +31,95 @@
|
|
|
31
31
|
// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
32
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
33
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
() => {
|
|
46
|
-
audioPlayer.querySelector(".time .length").textContent = getTimeCodeFromNum(
|
|
47
|
-
audio.duration
|
|
48
|
-
);
|
|
49
|
-
audioPlayer.querySelector(".name").textContent = "{{ include.audioData.name }}";
|
|
50
|
-
audio.volume = .75;
|
|
51
|
-
},
|
|
52
|
-
false
|
|
53
|
-
);
|
|
34
|
+
(function () {
|
|
35
|
+
// currentScript keeps each player self-contained, so several players can
|
|
36
|
+
// coexist on one page even when they point at the same audio file.
|
|
37
|
+
const audioPlayer = document.currentScript.previousElementSibling;
|
|
38
|
+
const audio = new Audio(
|
|
39
|
+
{% if include.audioData.is_relative_url %}
|
|
40
|
+
"{{ include.audioData.src | relative_url }}"
|
|
41
|
+
{% else %}
|
|
42
|
+
"{{ include.audioData.src }}"
|
|
43
|
+
{% endif %}
|
|
44
|
+
);
|
|
54
45
|
|
|
46
|
+
audio.addEventListener(
|
|
47
|
+
"loadeddata",
|
|
48
|
+
() => {
|
|
49
|
+
audioPlayer.querySelector(".time .length").textContent = getTimeCodeFromNum(
|
|
50
|
+
audio.duration
|
|
51
|
+
);
|
|
52
|
+
audioPlayer.querySelector(".name").textContent = "{{ include.audioData.name }}";
|
|
53
|
+
audio.volume = .75;
|
|
54
|
+
},
|
|
55
|
+
false
|
|
56
|
+
);
|
|
55
57
|
|
|
56
|
-
//click on timeline to skip around
|
|
57
|
-
const timeline = audioPlayer.querySelector(".timeline");
|
|
58
|
-
timeline.addEventListener("click", e => {
|
|
59
|
-
const timelineWidth = window.getComputedStyle(timeline).width;
|
|
60
|
-
const timeToSeek = e.offsetX / parseInt(timelineWidth) * audio.duration;
|
|
61
|
-
audio.currentTime = timeToSeek;
|
|
62
|
-
}, false);
|
|
63
58
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
}, false)
|
|
59
|
+
//click on timeline to skip around
|
|
60
|
+
const timeline = audioPlayer.querySelector(".timeline");
|
|
61
|
+
timeline.addEventListener("click", e => {
|
|
62
|
+
const timelineWidth = window.getComputedStyle(timeline).width;
|
|
63
|
+
const timeToSeek = e.offsetX / parseInt(timelineWidth) * audio.duration;
|
|
64
|
+
audio.currentTime = timeToSeek;
|
|
65
|
+
}, false);
|
|
72
66
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
} else {
|
|
82
|
-
playBtn.classList.add("fa-play");
|
|
83
|
-
audio.pause();
|
|
84
|
-
}
|
|
85
|
-
},
|
|
86
|
-
false
|
|
87
|
-
);
|
|
67
|
+
//click volume slider to change volume
|
|
68
|
+
const volumeSlider = audioPlayer.querySelector(".controls .volume-slider");
|
|
69
|
+
volumeSlider.addEventListener('click', e => {
|
|
70
|
+
const sliderWidth = window.getComputedStyle(volumeSlider).width;
|
|
71
|
+
const newVolume = e.offsetX / parseInt(sliderWidth);
|
|
72
|
+
audio.volume = newVolume;
|
|
73
|
+
audioPlayer.querySelector(".controls .volume-percentage").style.width = newVolume * 100 + '%';
|
|
74
|
+
}, false)
|
|
88
75
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
76
|
+
const playBtn = audioPlayer.querySelector(".controls .play-controller i");
|
|
77
|
+
playBtn.addEventListener(
|
|
78
|
+
"click",
|
|
79
|
+
() => {
|
|
80
|
+
playBtn.classList = "fas";
|
|
81
|
+
if (audio.paused) {
|
|
82
|
+
playBtn.classList.add("fa-pause");
|
|
83
|
+
audio.play();
|
|
84
|
+
} else {
|
|
85
|
+
playBtn.classList.add("fa-play");
|
|
86
|
+
audio.pause();
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
false
|
|
97
90
|
);
|
|
98
|
-
}, 200);
|
|
99
91
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
}
|
|
107
|
-
volumeEl.classList.add("fa-volume-up");
|
|
108
|
-
}
|
|
109
|
-
});
|
|
92
|
+
audio.addEventListener("timeupdate", () => {
|
|
93
|
+
const progressBar = audioPlayer.querySelector(".progress");
|
|
94
|
+
progressBar.style.width = audio.currentTime / audio.duration * 100 + "%";
|
|
95
|
+
audioPlayer.querySelector(".time .current").textContent = getTimeCodeFromNum(
|
|
96
|
+
audio.currentTime
|
|
97
|
+
);
|
|
98
|
+
});
|
|
110
99
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
100
|
+
audioPlayer.querySelector(".volume-controller").addEventListener("click", () => {
|
|
101
|
+
const volumeEl = audioPlayer.querySelector(".controls .volume-controller i");
|
|
102
|
+
audio.muted = !audio.muted;
|
|
103
|
+
volumeEl.classList = "fas";
|
|
104
|
+
if (audio.muted) {
|
|
105
|
+
volumeEl.classList.add("fa-volume-mute");
|
|
106
|
+
} else {
|
|
107
|
+
volumeEl.classList.add("fa-volume-up");
|
|
108
|
+
}
|
|
109
|
+
});
|
|
117
110
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
seconds
|
|
121
|
-
|
|
122
|
-
|
|
111
|
+
function getTimeCodeFromNum(num) {
|
|
112
|
+
if (!isFinite(num)) return "0:00";
|
|
113
|
+
let seconds = parseInt(num);
|
|
114
|
+
let minutes = parseInt(seconds / 60);
|
|
115
|
+
seconds -= minutes * 60;
|
|
116
|
+
const hours = parseInt(minutes / 60);
|
|
117
|
+
minutes -= hours * 60;
|
|
123
118
|
|
|
124
|
-
|
|
119
|
+
if (hours === 0) return `${minutes}:${String(seconds % 60).padStart(2, 0)}`;
|
|
120
|
+
return `${String(hours).padStart(2, 0)}:${minutes}:${String(
|
|
121
|
+
seconds % 60
|
|
122
|
+
).padStart(2, 0)}`;
|
|
123
|
+
}
|
|
124
|
+
})();
|
|
125
|
+
</script>
|
data/_includes/read-more.html
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<span class="read-more">
|
|
2
2
|
{% if include.currPost.external_url %}
|
|
3
|
-
<a href="{{ include.currPost.external_url
|
|
3
|
+
<a href="{{ include.currPost.external_url }}" target="_blank">
|
|
4
4
|
{% else %}
|
|
5
5
|
<a href="{{ include.currPost.url | relative_url }}">
|
|
6
6
|
{% endif %}
|
data/_layouts/cookies.html
CHANGED
|
@@ -7,8 +7,8 @@ layout: default
|
|
|
7
7
|
<h2>Consents</h2>
|
|
8
8
|
{% for consent in site.data.metaData.cookies.consent %}
|
|
9
9
|
<fieldset>
|
|
10
|
-
<input type="checkbox" id="{{ consent.
|
|
11
|
-
<label for="{{ consent.
|
|
10
|
+
<input type="checkbox" id="consent-{{ consent.cookieName }}">
|
|
11
|
+
<label for="consent-{{ consent.cookieName }}">
|
|
12
12
|
<strong>{{ consent.name }}</strong>
|
|
13
13
|
{{ consent.description }}
|
|
14
14
|
</label>
|
|
@@ -17,14 +17,14 @@ layout: default
|
|
|
17
17
|
</div>
|
|
18
18
|
<script>
|
|
19
19
|
const storageType = localStorage;
|
|
20
|
-
const consents =
|
|
20
|
+
const consents = {{ site.data.metaData.cookies.consent | jsonify }};
|
|
21
21
|
consents.forEach(consent => {
|
|
22
|
-
const element = document.getElementById(consent.
|
|
22
|
+
const element = document.getElementById("consent-" + consent.cookieName);
|
|
23
23
|
element.checked = storageType.getItem(consent.cookieName) === "true" || consent.alwaysAgree;
|
|
24
24
|
element.disabled = consent.alwaysAgree;
|
|
25
25
|
element.addEventListener("click", () => {
|
|
26
26
|
storageType.setItem(consent.cookieName, element.checked);
|
|
27
27
|
});
|
|
28
|
-
storageType.setItem("interacted_with_cookies_banner", true);
|
|
29
28
|
});
|
|
29
|
+
storageType.setItem("interacted_with_cookies_banner", true);
|
|
30
30
|
</script>
|
data/_layouts/posts_feed.html
CHANGED
|
@@ -13,7 +13,7 @@ category: home
|
|
|
13
13
|
<p class="article-date">{{ post.date | date: "%Y-%m-%d" }}</p>
|
|
14
14
|
<h2>
|
|
15
15
|
{% if post.external_url %}
|
|
16
|
-
<a href="{{ post.external_url
|
|
16
|
+
<a href="{{ post.external_url }}" target="_blank">
|
|
17
17
|
{% else %}
|
|
18
18
|
<a href="{{ post.url | relative_url }}">
|
|
19
19
|
{% endif %}
|
|
@@ -30,6 +30,7 @@ category: home
|
|
|
30
30
|
alt="{{ post.image_alt }}"
|
|
31
31
|
{% endif %}
|
|
32
32
|
class="post-feed_image"
|
|
33
|
+
loading="lazy"
|
|
33
34
|
src="{{ post.image | relative_url }}"
|
|
34
35
|
{% if post.responsiveImage %}
|
|
35
36
|
srcset="{% for img in post.responsiveImage %}{{ img.src | relative_url }} {{ img.size }}w{% if forloop.last == false %},{% endif %}{% endfor %}"
|
|
@@ -55,7 +56,7 @@ category: home
|
|
|
55
56
|
<p class="article-date">{{ post.date | date: "%Y-%m-%d" }}</p>
|
|
56
57
|
<h2>
|
|
57
58
|
{% if post.external_url %}
|
|
58
|
-
<a href="{{ post.external_url
|
|
59
|
+
<a href="{{ post.external_url }}" target="_blank">
|
|
59
60
|
{% else %}
|
|
60
61
|
<a href="{{ post.url | relative_url }}">
|
|
61
62
|
{% endif %}
|
data/_sass/styles/_post.scss
CHANGED
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
|
|
44
44
|
& &-content, & &-metadata {
|
|
45
45
|
background: $white;
|
|
46
|
-
padding: 0
|
|
46
|
+
padding: 0 2rem 1rem 2rem;
|
|
47
47
|
border-radius: 10px;
|
|
48
48
|
@include mobile {
|
|
49
49
|
padding: 0.2em 1.2rem 0.6rem 1.2rem;
|
|
@@ -67,8 +67,14 @@
|
|
|
67
67
|
text-align: left;
|
|
68
68
|
p {
|
|
69
69
|
font-size: 1em;
|
|
70
|
-
margin-top:
|
|
71
|
-
margin-bottom:
|
|
70
|
+
margin-top: 0.4em;
|
|
71
|
+
margin-bottom: 0.4em;
|
|
72
|
+
&:first-of-type {
|
|
73
|
+
margin-top: 0;
|
|
74
|
+
}
|
|
75
|
+
&:last-of-type {
|
|
76
|
+
padding-bottom: 1em;
|
|
77
|
+
}
|
|
72
78
|
}
|
|
73
79
|
a {
|
|
74
80
|
color: $p_text;
|
|
@@ -92,4 +98,4 @@
|
|
|
92
98
|
a {
|
|
93
99
|
font-size: 1em;
|
|
94
100
|
}
|
|
95
|
-
}
|
|
101
|
+
}
|
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.1.
|
|
4
|
+
version: 0.1.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:
|
|
11
|
+
date: 2026-07-16 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: jekyll
|
|
@@ -16,14 +16,14 @@ dependencies:
|
|
|
16
16
|
requirements:
|
|
17
17
|
- - "~>"
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: 3.
|
|
19
|
+
version: '3.10'
|
|
20
20
|
type: :runtime
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
24
24
|
- - "~>"
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
|
-
version: 3.
|
|
26
|
+
version: '3.10'
|
|
27
27
|
description:
|
|
28
28
|
email:
|
|
29
29
|
- bieszke.patryk@gmail.com
|
|
@@ -112,7 +112,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
112
112
|
- !ruby/object:Gem::Version
|
|
113
113
|
version: '0'
|
|
114
114
|
requirements: []
|
|
115
|
-
rubygems_version: 3.
|
|
115
|
+
rubygems_version: 3.4.2
|
|
116
116
|
signing_key:
|
|
117
117
|
specification_version: 4
|
|
118
118
|
summary: minimal-music-project is a Jekyll theme for GitHub Pages
|