minimal-music-project 0.0.1 → 0.0.6

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.
Files changed (43) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE.txt +1 -1
  3. data/README.md +51 -20
  4. data/_config.yml +13 -20
  5. data/_data/menu.yml +17 -3
  6. data/_data/metaData.yml +2 -1
  7. data/_includes/common-head.html +8 -2
  8. data/_includes/common.js +5 -0
  9. data/_includes/cookies.js +8 -2
  10. data/_includes/customizationsScripts.html +7 -0
  11. data/_includes/customizationsStyles.html +7 -0
  12. data/_includes/discography-entry-metadata.html +80 -0
  13. data/_includes/discography-entry.html +25 -0
  14. data/_includes/menu.html +18 -18
  15. data/_includes/music-player.html +124 -0
  16. data/_includes/pagination-buttons.html +14 -0
  17. data/_includes/read-more.html +13 -0
  18. data/_layouts/default.html +9 -5
  19. data/_layouts/discography.html +13 -3
  20. data/_layouts/post.html +3 -4
  21. data/_layouts/posts_feed.html +43 -30
  22. data/_sass/styles/_cookies.scss +7 -7
  23. data/_sass/styles/_defaults.scss +58 -6
  24. data/_sass/styles/_discography.scss +43 -0
  25. data/_sass/styles/_index.scss +3 -1
  26. data/_sass/styles/_layout.scss +2 -2
  27. data/_sass/styles/_menu.scss +102 -18
  28. data/_sass/styles/_music-player.scss +92 -0
  29. data/_sass/styles/_post.scss +22 -9
  30. data/_sass/styles/_posts_feed.scss +26 -10
  31. data/_sass/variables/_colors.scss +2 -1
  32. data/_sass/variables/_layout.scss +2 -1
  33. data/_sass/variables/_mixins.scss +15 -7
  34. data/assets/audio/sample_song.mp3 +0 -0
  35. data/assets/img/Experimental-Glitches-Cover.png +0 -0
  36. data/assets/img/YyY-Cover.png +0 -0
  37. data/assets/img/z-is-for-zero.png +0 -0
  38. data/pages/about.html +48 -6
  39. metadata +16 -6
  40. data/_includes/avatar.html +0 -5
  41. data/_includes/customizations.html +0 -15
  42. data/pages/collaborations.html +0 -7
  43. data/pages/discography.html +0 -7
@@ -0,0 +1,124 @@
1
+ <div class="audio-player" id="{{ include.audioData.src }}" >
2
+ <!-- Audio player inspired by https://codepen.io/EmNudge/pen/rRbLJQ -->
3
+ <div class="timeline">
4
+ <div class="progress"></div>
5
+ </div>
6
+ <div class="controls">
7
+ <div class="play-controller">
8
+ <i class="fas fa-play"></i>
9
+ </div>
10
+ <div class="time">
11
+ <div class="current">0:00</div>
12
+ <div class="divider">/</div>
13
+ <div class="length"></div>
14
+ </div>
15
+ <div class="name">Music Song</div>
16
+ <div class="volume-container">
17
+ <div class="volume-controller">
18
+ <i class="fas fa-volume-up"></i>
19
+ </div>
20
+
21
+ <div class="volume-slider">
22
+ <div class="volume-percentage"></div>
23
+ </div>
24
+ </div>
25
+ </div>
26
+ </div>
27
+
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
+
34
+ const audioPlayer = document.getElementById("{{ include.audioData.src }}");
35
+ const audio = new Audio(
36
+ {% if include.audioData.is_relative_url %}
37
+ "{{ include.audioData.src | relative_url }}"
38
+ {% else %}
39
+ "{{ include.audioData.src }}"
40
+ {% endif %}
41
+ );
42
+
43
+ audio.addEventListener(
44
+ "loadeddata",
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
+ );
54
+
55
+
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
+
64
+ //click volume slider to change volume
65
+ const volumeSlider = audioPlayer.querySelector(".controls .volume-slider");
66
+ volumeSlider.addEventListener('click', e => {
67
+ const sliderWidth = window.getComputedStyle(volumeSlider).width;
68
+ const newVolume = e.offsetX / parseInt(sliderWidth);
69
+ audio.volume = newVolume;
70
+ audioPlayer.querySelector(".controls .volume-percentage").style.width = newVolume * 100 + '%';
71
+ }, false)
72
+
73
+ const playBtn = audioPlayer.querySelector(".controls .play-controller i");
74
+ playBtn.addEventListener(
75
+ "click",
76
+ () => {
77
+ playBtn.classList = "fas";
78
+ if (audio.paused) {
79
+ playBtn.classList.add("fa-pause");
80
+ audio.play();
81
+ } else {
82
+ playBtn.classList.add("fa-play");
83
+ audio.pause();
84
+ }
85
+ },
86
+ false
87
+ );
88
+
89
+ const intervalId = setInterval(() => {
90
+ if(audio.paused) {
91
+ return;
92
+ }
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
+ }, 200);
99
+
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
+ });
110
+
111
+ function getTimeCodeFromNum(num) {
112
+ let seconds = parseInt(num);
113
+ let minutes = parseInt(seconds / 60);
114
+ seconds -= minutes * 60;
115
+ const hours = parseInt(minutes / 60);
116
+ minutes -= hours * 60;
117
+
118
+ if (hours === 0) return `${minutes}:${String(seconds % 60).padStart(2, 0)}`;
119
+ return `${String(hours).padStart(2, 0)}:${minutes}:${String(
120
+ seconds % 60
121
+ ).padStart(2, 0)}`;
122
+ }
123
+
124
+ </script>
@@ -0,0 +1,14 @@
1
+ {% if paginator.total_pages > 1 %}
2
+ <ul class="pager">
3
+ {% if paginator.previous_page %}
4
+ <li class="previous">
5
+ <a href="{{ paginator.previous_page_path | relative_url | replace: '//', '/' }}">&larr; Newer Posts</a>
6
+ </li>
7
+ {% endif %}
8
+ {% if paginator.next_page %}
9
+ <li class="next">
10
+ <a href="{{ paginator.next_page_path | relative_url | replace: '//', '/' }}">Older Posts &rarr;</a>
11
+ </li>
12
+ {% endif %}
13
+ </ul>
14
+ {% endif %}
@@ -0,0 +1,13 @@
1
+ <span class="read-more">
2
+ {% if include.currPost.external_url %}
3
+ <a href="{{ include.currPost.external_url | relative_url }}" target="_blank">
4
+ {% else %}
5
+ <a href="{{ include.currPost.url | relative_url }}">
6
+ {% endif %}
7
+ {% if include.currPost.external_name %}
8
+ Read more on {{ include.currPost.external_name }} &rarr;
9
+ {% else %}
10
+ More info &rarr;
11
+ {% endif %}
12
+ </a>
13
+ </span>
@@ -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>
@@ -1,6 +1,16 @@
1
1
  ---
2
2
  layout: default
3
3
  ---
4
- <div class="discography">
5
- <h1>{{ page.title }}</h1>
6
- </div>
4
+ <div class="content-container">
5
+ <div class="discography">
6
+ {{ content }}
7
+ {% for post in paginator.posts %}
8
+ {% if post.categories contains page.category %}
9
+ <hr>
10
+ {% include discography-entry.html currPost=post %}
11
+ {% endif %}
12
+ {% endfor %}
13
+
14
+ {% include pagination-buttons.html %}
15
+ </div>
16
+ </div>
data/_layouts/post.html CHANGED
@@ -13,13 +13,12 @@ layout: default
13
13
  <img src="{{ page.image | relative_url }}" alt="{{ page.image_alt }}" class="post-cover_image" />
14
14
  </figure>
15
15
  {% endif %}
16
- <p class="post-metadata">
17
- {{ page.date | date_to_string }}
18
- </p>
19
-
20
16
  </header>
21
17
  <div class="post-content">
22
18
  {{ content }}
23
19
  </div>
20
+ <div class="post-metadata">
21
+ {% include discography-entry-metadata.html currPost=page %}
22
+ </div>
24
23
  </div>
25
24
  </div>
@@ -4,40 +4,53 @@ category: home
4
4
  ---
5
5
  <div class="content-container">
6
6
  <div class="post-feed">
7
- {% for post in site.posts %}
8
- {% if post.category == page.category %}
9
- <article>
10
- <hr>
11
- <header>
12
- <p class="article-date">{{ post.date | date: "%Y-%m-%d" }}</p>
13
- <h2>
14
- {% if post.external_url %}
15
- <a href="{{ post.external_url | relative_url }}" target="_blank">
16
- {% else %}
17
- <a href="{{ post.url | relative_url }}">
7
+ {{ content }}
8
+ {% for post in paginator.posts %}
9
+ {% if post.categories contains page.category %}
10
+ <hr>
11
+ <article>
12
+ <header>
13
+ <p class="article-date">{{ post.date | date: "%Y-%m-%d" }}</p>
14
+ <h2>
15
+ {% if post.external_url %}
16
+ <a href="{{ post.external_url | relative_url }}" target="_blank">
17
+ {% else %}
18
+ <a href="{{ post.url | relative_url }}">
18
19
  {% endif %}
19
- {{ post.title }}
20
- </a>
21
- </h2>
22
- </header>
23
- <section>
24
- <figure>
25
- <img src="{{ post.image | relative_url }}" alt="{{ page.image_alt }}" class="post-feed_image" />
26
- </figure>
27
- <p>
28
- {{ post.summary }}
29
- </p>
30
- </section>
31
- <span class="article-read">
32
- {% if post.external_url %}
33
- <a href="{{ post.external_url | relative_url }}" target="_blank">
20
+ {{ post.title }}
21
+ </a>
22
+ </h2>
23
+ </header>
24
+ <section>
25
+ <figure>
26
+ <img src="{{ post.image | relative_url }}" alt="{{ page.image_alt }}" class="post-feed_image" />
27
+ </figure>
28
+ <p>
29
+ {{ post.description }}
30
+ </p>
31
+ </section>
32
+ {% include read-more.html currPost=post %}
33
+ </article>
34
+ {% else %}
35
+ <hr>
36
+ <article>
37
+ <header>
38
+ <p class="article-date">{{ post.date | date: "%Y-%m-%d" }}</p>
39
+ <h2>
40
+ {% if post.external_url %}
41
+ <a href="{{ post.external_url | relative_url }}" target="_blank">
34
42
  {% else %}
35
43
  <a href="{{ post.url | relative_url }}">
36
- {% endif %}
44
+ {% endif %}
45
+ New release: {{ post.title }}
37
46
  </a>
38
- </span>
39
- </article>
40
- {% endif %}
47
+ </h2>
48
+ </header>
49
+ {% include discography-entry.html currPost=post %}
50
+ </article>
51
+
52
+ {% endif %}
41
53
  {% endfor %}
54
+ {% include pagination-buttons.html %}
42
55
  </div>
43
56
  </div>
@@ -2,15 +2,15 @@
2
2
  position: fixed;
3
3
  padding: 20px 15px;
4
4
  z-index: $pop-ups-z-1;
5
- background-image: radial-gradient(farthest-corner at 25% 0, $black, $black);
5
+ background-image: radial-gradient(farthest-corner at 25% 0, $white, $white);
6
6
  box-shadow: 0 0 6px 0 $black;
7
7
  text-align: center;
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
 
@@ -28,16 +28,16 @@
28
28
  font-weight: 700;
29
29
  display: inline-block;
30
30
  padding: 10px 20px;
31
- background-color: $black;
31
+ background-color: $white;
32
32
  color: $p_text;
33
- border: none;
33
+ border: 1px solid;
34
34
  border-radius: 3px;
35
35
  text-decoration: none;
36
36
  cursor: pointer;
37
37
  -webkit-transition: background-color 200ms;
38
38
  transition: background-color 200ms;
39
39
  &:hover {
40
- background-color: $black;
40
+ background-color: rgb(168, 168, 168);
41
41
  }
42
42
  }
43
43
  @include mobile {
@@ -9,8 +9,8 @@ h1 {
9
9
  padding: 0.5em;
10
10
  }
11
11
 
12
- h2, h2, h3 a {
13
- font-weight: 600;
12
+ h2, h3 a {
13
+ font-weight: 500;
14
14
  font-size: 1.4em;
15
15
  line-height: 1.4em;
16
16
  color: $black;
@@ -30,12 +30,12 @@ body {
30
30
  }
31
31
  main {
32
32
  .content-container {
33
- margin: 0px auto;
33
+ margin: 3.5em auto 0 0;
34
34
  width: 90%;
35
35
  padding: 0px 18px 24px;
36
36
  flex-grow: 1;
37
37
  position: relative;
38
- p {
38
+ p, li {
39
39
  @include hyperlink-convention();
40
40
  }
41
41
  .content-separator {
@@ -47,23 +47,56 @@ main {
47
47
  }
48
48
  }
49
49
  }
50
+
51
+ .pager {
52
+ margin-top: 40px;
53
+ height: 60px;
54
+ width: 100%;
55
+ li {
56
+ position: absolute;
57
+ display: inline;
58
+ padding: 8px;
59
+ margin: 10px;
60
+ &.previous {
61
+ left: 0;
62
+ }
63
+ &.next {
64
+ right: 0;
65
+ }
66
+ & > a {
67
+ color: $p_text;
68
+ @include underline-on-hover($black);
69
+ }
70
+ }
71
+ }
50
72
  }
73
+
51
74
  a {
52
75
  text-decoration-line: none;
53
76
  color: inherit;
54
77
  transition: all 0.4s ease-in-out 0s;
55
78
  }
56
-
57
79
  a, p, li {
58
80
  font-size: 1.1em;
59
81
  }
60
82
 
83
+ li {
84
+ margin-left: 1em;
85
+ }
86
+
87
+ hr {
88
+ margin-top: 2em;
89
+ margin-bottom: 0.5em;
90
+ width: 100%;
91
+ }
92
+
61
93
  img {
62
94
  max-width: 100%;
63
95
  height: auto;
64
96
  display: inline-block;
65
97
  margin: 0;
66
98
  vertical-align: top;
99
+ object-fit: cover;
67
100
  }
68
101
 
69
102
  @include mobile {
@@ -77,6 +110,25 @@ img {
77
110
  .content-container {
78
111
  width: 100%;
79
112
  padding: 0px 9px 12px;
113
+ margin-top: 0;
80
114
  }
81
115
  }
82
- }
116
+ }
117
+
118
+ audio {
119
+ max-width: 100%;
120
+ }
121
+
122
+ .read-more {
123
+ position: absolute;
124
+ right: 10px;
125
+ bottom: -2em;
126
+ line-height: 1em;
127
+ font-weight: 300;
128
+ padding-bottom: 0.5em;
129
+ color: #000000;
130
+ a {
131
+ font-size: 0.9em;
132
+ @include underline-on-hover($black);
133
+ }
134
+ }