minimal-music-project 0.0.2 → 0.0.3

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: b0b1d1a024bc519ef5fdb0314a3799b58e12239be7da3149eca057d0f94791e1
4
- data.tar.gz: abbfbad511137ee1760800c26b44bdb5747abe281ad46f5ae4a80dd42f416248
3
+ metadata.gz: 7029cd275a130708b0e8907e9cbafafdd4db04d320d360cdd2981df5a1c27816
4
+ data.tar.gz: 3ca7c7261be1e1235f55f9716f403fb935a3be00d9a43940ffd676f4ed83cc2a
5
5
  SHA512:
6
- metadata.gz: 0b1177c34686ba44c9e74b06ce6e1a995d3d34886dadfe10931c694287a78e97af5ea4d0ca3ca28b57d00df74ad9d953fe1932487e7ba31de3b593cc03f5bcb9
7
- data.tar.gz: d635b9d6eedc02d93a48fe4233b3eb064dc61089d46867c52f08601803d38104c3db5d8e7c0818c3c2773fe822fe7fa5003c262c0bbdebad480c2b37518808b2
6
+ metadata.gz: 36fbe1c4792c2837c0c5e3c8830a95e8a699af3a92b42e389d7e6f28956420b2de1ec0ee6afc394bb82462e5854cb99496795c7678e0651b12917fd35bf4b671
7
+ data.tar.gz: aa837c3aab72920f119f45477bfe5f1797044a2e162e2989a6c2fb15b175e1b67d69d133045aef525976572b6a12816bcd13c6593c1fb668e45b718928ec8109
data/README.md CHANGED
@@ -44,8 +44,16 @@ Structure of `_data/menu.yml`:
44
44
  * tooltip: Tooltip for menu item
45
45
 
46
46
  Structure of `_data/metaData.yml`:
47
- author: Site Author name
48
- avatar_url: URL for avatar (for about page)
47
+ * author: Site Author name
48
+ * logo: URL for logo image (displayed on top of menu)
49
+ * cookies: customize information about site cookies
50
+ * enabled: determine if should show cookies pop-up
51
+ * message: text on cookie pop-up
52
+ * agreeButtonText: text on agree button
53
+
54
+ Structure of `_data/customs.yml`:
55
+ * custom-css: a list of urls to custom css files
56
+ * custom-js: a list of urls to custom javascript files
49
57
 
50
58
  ## Contributing
51
59
 
@@ -63,4 +71,4 @@ To add a custom directory to your theme-gem, please edit the regexp in `minimal-
63
71
  ## License
64
72
 
65
73
  The theme is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
66
-
74
+ Custom Volume Slider was developed with the fundaments based on [codepen project](https://codepen.io/EmNudge/pen/rRbLJQ), thus this component is licensed under [Copyright (c) 2021 by EmNudge](https://codepen.io/EmNudge/pen/rRbLJQ).
@@ -1,22 +1,7 @@
1
- # Welcome to Jekyll!
2
- #
3
- # This config file is meant for settings that affect your whole blog, values
4
- # which you are expected to set up once and rarely edit after that. If you find
5
- # yourself editing this file very often, consider using Jekyll's data files
6
- # feature for the data you need to update frequently.
7
- #
8
- # For technical reasons, this file is *NOT* reloaded automatically when you use
9
- # 'bundle exec jekyll serve'. If you change this file, please restart the server process.
10
-
11
- # Site settings
12
- # These are used to personalize your new site. If you look in the HTML files,
13
- # you will see them accessed via {{ site.title }}, {{ site.email }}, and so on.
14
- # You can create any custom variable you would like, and they will be accessible
15
- # in the templates via {{ site.myvariable }}.
16
1
  title: minimal-music-project
17
2
  tagline: A site showing the usage of Jekyll custom theme
18
3
  email: email@example.com
19
- description: >- # this means to ignore newlines until "baseurl:"
4
+ description: >-
20
5
  This website was created as a demonstration for Jekyll custom theme
21
6
  named minimal-music-project. Its main feature is to make it easy to create
22
7
  websites for music projects
@@ -28,7 +13,7 @@ twitter:
28
13
  card: summary
29
14
  plugins:
30
15
  - jekyll-seo-tag
31
-
16
+ - jekyll-feed
32
17
  # Build settings
33
18
  markdown: kramdown
34
19
  remote_theme: ItsMeaga1n/minimal-music-project
@@ -27,4 +27,7 @@ menu_contacts:
27
27
  target: _blank
28
28
  - faicon: fas fa-envelope
29
29
  url:
30
- target:
30
+ target:
31
+ - faicon: fas fa-rss
32
+ url: /feed.xml
33
+ target: _blank
@@ -3,6 +3,8 @@
3
3
  <link rel="stylesheet" href="{{ '/assets/styles/styles.css' | relative_url }}">
4
4
  <link rel="stylesheet" href="https://indestructibletype.com/fonts/Jost.css" type="text/css" charset="utf-8" />
5
5
  <script src="https://kit.fontawesome.com/79c31398dc.js" crossorigin="anonymous"></script>
6
+
7
+ <!-- favicon -->
6
8
  <link rel="apple-touch-icon" sizes="180x180" href="{{ '/assets/img/apple-touch-icon.png' | relative_url }}">
7
9
  <link rel="icon" type="image/png" sizes="32x32" href="{{ '/assets/img/favicon-32x32.png' | relative_url }}">
8
10
  <link rel="icon" type="image/png" sizes="16x16" href="{{ '/assets/img/favicon-16x16.png' | relative_url }}">
@@ -12,5 +14,9 @@
12
14
  <meta name="msapplication-TileColor" content="#da532c">
13
15
  <meta name="msapplication-config" content="{{ '/assets/img/browserconfig.xml' | relative_url }}">
14
16
  <meta name="theme-color" content="#ffffff">
17
+
18
+ <!-- feed -->
19
+ <link rel="alternate" type="application/atom+xml" title="{{ site.title }}" href="{{ "feed.xml" | relative_url }}">
20
+
15
21
  {% include customizations.html %}
16
22
  {% seo %}
@@ -60,13 +60,10 @@
60
60
  </p>
61
61
  {% endif %}
62
62
  {% if include.currPost.play_here %}
63
- <audio controls>
64
- <source src="{{ include.currPost.play_here.src }}" type="{{ include.currPost.play_here.type }}">
65
- Your browser does not support the audio element.
66
- </audio>
63
+ {% include music-player.html audioData=include.currPost.play_here %}
67
64
  {% endif %}
68
65
  {% if include.currPost.play_soundcloud_embed %}
69
- <iframe width="100%" height="166" scrolling="no" frameborder="no" allow="autoplay"
66
+ <iframe width="100%" height="110" scrolling="no" frameborder="no" allow="autoplay"
70
67
  src="{{ include.currPost.play_soundcloud_embed.src }}"></iframe>
71
68
  <div
72
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;">
@@ -77,7 +74,7 @@
77
74
  style="color: #cccccc; text-decoration: none;">{{ include.currPost.play_soundcloud_embed.song_title }}</a></div>
78
75
  {% endif %}
79
76
  {% if include.currPost.play_bandcamp_embed %}
80
- <iframe style="border: 0; width: 100%; height: 42px;"
81
- src="{{ include.currPost.play_bandcamp_embed.src }}"
82
- seamless><a href="{{ include.currPost.play_bandcamp_embed.href }}">{{ include.currPost.play_bandcamp_embed.title }}</a></iframe>
83
- {% endif %}
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 %}
@@ -17,7 +17,7 @@
17
17
  </h2>
18
18
  </a>
19
19
  <p class="discography-album_summary">
20
- {{ include.currPost.summary }}
20
+ {{ include.currPost.description }}
21
21
  </p>
22
22
  {% include discography-entry-metadata.html currPost=include.currPost %}
23
23
  </section>
@@ -0,0 +1,123 @@
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
+ const audioPlayer = document.getElementById("{{ include.audioData.src }}");
30
+ const audio = new Audio(
31
+ {% if include.audioData.is_relative_url %}
32
+ "{{ include.audioData.src | relative_url }}"
33
+ {% else %}
34
+ "{{ include.audioData.src }}"
35
+ {% endif %}
36
+ );
37
+
38
+ audio.addEventListener(
39
+ "loadeddata",
40
+ () => {
41
+ audioPlayer.querySelector(".time .length").textContent = getTimeCodeFromNum(
42
+ audio.duration
43
+ );
44
+ audioPlayer.querySelector(".name").textContent = "{{ include.audioData.name }}";
45
+ audio.volume = .75;
46
+ },
47
+ false
48
+ );
49
+
50
+
51
+ //click on timeline to skip around
52
+ const timeline = audioPlayer.querySelector(".timeline");
53
+ timeline.addEventListener("click", e => {
54
+ const timelineWidth = window.getComputedStyle(timeline).width;
55
+ const timeToSeek = e.offsetX / parseInt(timelineWidth) * audio.duration;
56
+ audio.currentTime = timeToSeek;
57
+ }, false);
58
+
59
+ //click volume slider to change volume
60
+ const volumeSlider = audioPlayer.querySelector(".controls .volume-slider");
61
+ volumeSlider.addEventListener('click', e => {
62
+ const sliderWidth = window.getComputedStyle(volumeSlider).width;
63
+ const newVolume = e.offsetX / parseInt(sliderWidth);
64
+ audio.volume = newVolume;
65
+ audioPlayer.querySelector(".controls .volume-percentage").style.width = newVolume * 100 + '%';
66
+ }, false)
67
+
68
+ const playBtn = audioPlayer.querySelector(".controls .play-controller i");
69
+ playBtn.addEventListener(
70
+ "click",
71
+ () => {
72
+ playBtn.classList = "fas";
73
+ if (audio.paused) {
74
+ playBtn.classList.add("fa-pause");
75
+ audio.play();
76
+ } else {
77
+ playBtn.classList.add("fa-play");
78
+ audio.pause();
79
+ }
80
+ },
81
+ false
82
+ );
83
+
84
+ const intervalId = setInterval(() => {
85
+ if(audio.paused) {
86
+ return;
87
+ }
88
+ const progressBar = audioPlayer.querySelector(".progress");
89
+ progressBar.style.width = audio.currentTime / audio.duration * 100 + "%";
90
+ audioPlayer.querySelector(".time .current").textContent = getTimeCodeFromNum(
91
+ audio.currentTime
92
+ );
93
+ }, 200);
94
+
95
+ audioPlayer.querySelector(".volume-controller").addEventListener("click", () => {
96
+ const volumeEl = audioPlayer.querySelector(".controls .volume-controller i");
97
+ audio.muted = !audio.muted;
98
+ volumeEl.classList = "fas";
99
+ if (audio.muted) {
100
+ volumeEl.classList.add("fa-volume-mute");
101
+ } else {
102
+ volumeEl.classList.add("fa-volume-up");
103
+ }
104
+ });
105
+
106
+
107
+ /**
108
+ * turn 128 seconds into 2:08
109
+ **/
110
+ function getTimeCodeFromNum(num) {
111
+ let seconds = parseInt(num);
112
+ let minutes = parseInt(seconds / 60);
113
+ seconds -= minutes * 60;
114
+ const hours = parseInt(minutes / 60);
115
+ minutes -= hours * 60;
116
+
117
+ if (hours === 0) return `${minutes}:${String(seconds % 60).padStart(2, 0)}`;
118
+ return `${String(hours).padStart(2, 0)}:${minutes}:${String(
119
+ seconds % 60
120
+ ).padStart(2, 0)}`;
121
+ }
122
+
123
+ </script>
@@ -6,6 +6,7 @@ layout: default
6
6
  {{ content }}
7
7
  {% for post in site.posts %}
8
8
  {% if post.categories contains page.category %}
9
+ <hr>
9
10
  {% include discography-entry.html currPost=post %}
10
11
  {% endif %}
11
12
  {% endfor %}
@@ -26,7 +26,7 @@ category: home
26
26
  <img src="{{ post.image | relative_url }}" alt="{{ page.image_alt }}" class="post-feed_image" />
27
27
  </figure>
28
28
  <p>
29
- {{ post.summary }}
29
+ {{ post.description }}
30
30
  </p>
31
31
  </section>
32
32
  {% include read-more.html currPost=include.currPost %}
@@ -2,7 +2,7 @@
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;
@@ -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 {
@@ -94,13 +94,13 @@ audio {
94
94
  .read-more {
95
95
  position: absolute;
96
96
  right: 10px;
97
- bottom: -1em;
98
- font-size: 0.9em;
97
+ bottom: -2em;
99
98
  line-height: 1em;
100
99
  font-weight: 300;
101
100
  padding-bottom: 0.5em;
102
101
  color: #000000;
103
102
  a {
103
+ font-size: 0.9em;
104
104
  &:hover {
105
105
  text-decoration: underline;
106
106
  }
@@ -23,6 +23,9 @@
23
23
  a:hover {
24
24
  text-decoration: underline $p_text;
25
25
  }
26
+ section {
27
+ width: 100%;
28
+ }
26
29
 
27
30
  &_title {
28
31
  margin-top: 3vw;
@@ -4,4 +4,5 @@
4
4
  @import './posts_feed';
5
5
  @import './post';
6
6
  @import './cookies';
7
- @import './discography';
7
+ @import './discography';
8
+ @import './music-player.scss';
@@ -34,8 +34,8 @@
34
34
  }
35
35
  }
36
36
  }
37
- ul {
38
- li {
37
+ ul, ol, dl {
38
+ li, dt {
39
39
  list-style: none;
40
40
  margin-bottom: 8px;
41
41
  margin-top: 8px;
@@ -11,11 +11,6 @@ $image-dim: 192px;
11
11
  width: 100%;
12
12
  position: relative;
13
13
  }
14
- .page-summary {
15
- flex: 0;
16
- width: 100%;
17
- text-align: center;
18
- }
19
14
  h1 {
20
15
  flex: 0;
21
16
  margin: auto;
@@ -0,0 +1,92 @@
1
+
2
+ .audio-player {
3
+ height: 40px;
4
+ width: 100%;
5
+
6
+ color: white;
7
+ font-size: 0.75em;
8
+ overflow: hidden;
9
+ display: grid;
10
+ grid-template-rows: 8px auto;
11
+
12
+ background: linear-gradient( #888, black);
13
+ box-shadow: 0 0 0.5em 0 #666;
14
+ margin-bottom: 1em;
15
+
16
+ .timeline {
17
+ background: rgb(139, 139, 139);
18
+ box-shadow: 0 2px 8px 0 #0008;
19
+ width: 100%;
20
+ position: relative;
21
+ cursor: pointer;
22
+ .progress {
23
+ background: rgb(52, 31, 247);;
24
+ height: 100%;
25
+ width: 0;
26
+ transition: 0.2s;
27
+ }
28
+ }
29
+
30
+ .controls {
31
+ padding: 0 15px;
32
+ display: flex;
33
+ justify-content: space-between;
34
+
35
+ > * {
36
+ display: flex;
37
+ align-items: center;
38
+ }
39
+
40
+ .play-controller {
41
+ font-size: 1.4em;
42
+ &:hover {
43
+ text-shadow: 0 0 20px white;
44
+ }
45
+ }
46
+ .time {
47
+ display: flex;
48
+
49
+ > * {
50
+ padding: 2px;
51
+ }
52
+ }
53
+ .volume-container {
54
+ cursor: pointer;
55
+ .volume-controller {
56
+ height: 26px;
57
+ width: 10px;
58
+ display: flex;
59
+ align-items: center;
60
+ .volume {
61
+ transform: scale(0.7);
62
+ }
63
+ }
64
+
65
+ position: relative;
66
+ z-index: 2;
67
+ .volume-slider {
68
+ position: absolute;
69
+ left: -3px;
70
+ top: 0;
71
+ z-index: -1;
72
+ width: 0;
73
+ height: 100%;
74
+ background: white;
75
+ box-shadow: 0 0 20px #000a;
76
+ transition: .25s;
77
+ .volume-percentage {
78
+ height: 100%;
79
+ width: 75%;
80
+ background: rgb(52, 31, 247);
81
+ }
82
+ }
83
+ &:hover {
84
+ .volume-slider {
85
+ left: -123px;
86
+ width: 120px;
87
+ }
88
+ }
89
+ }
90
+ }
91
+ }
92
+
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.2
4
+ version: 0.0.3
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-01-30 00:00:00.000000000 Z
11
+ date: 2021-01-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -45,6 +45,7 @@ files:
45
45
  - _includes/discography-entry.html
46
46
  - _includes/footer.html
47
47
  - _includes/menu.html
48
+ - _includes/music-player.html
48
49
  - _includes/read-more.html
49
50
  - _layouts/default.html
50
51
  - _layouts/discography.html
@@ -59,6 +60,7 @@ files:
59
60
  - _sass/styles/_menu.scss
60
61
  - _sass/styles/_post.scss
61
62
  - _sass/styles/_posts_feed.scss
63
+ - _sass/styles/music-player.scss
62
64
  - _sass/variables/_colors.scss
63
65
  - _sass/variables/_index.scss
64
66
  - _sass/variables/_layout.scss