monomulder 0.1.7 → 0.1.8
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/footer.html +2 -0
- data/_layouts/default.html +56 -0
- data/_sass/theme.scss +45 -10
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f3fef0f2fa5dcb36c402e4efe8f9d82f8a4e4420441fe5d25e8563bc66bd19e2
|
4
|
+
data.tar.gz: aecd434da728c9001e8fcc38827bd46268e922094e8da34a05ccf44b47579181
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cc693daea86dec60db9f9c8e3a76761ab615f64477b0cb89b15313ca769777a7c883ebb99224920577bbe31cdcea7ea17ec7ee361e60c7b40ef682e55ba77229
|
7
|
+
data.tar.gz: 5c42b1a057323e4725fbc6199b9e7fb10de2df402c5f4e993ab681a1173a095e321f51f01454dda6436d17127ebe83b805ec504b0461b941d2fe79a34ece33bb
|
data/_includes/footer.html
CHANGED
data/_layouts/default.html
CHANGED
@@ -9,6 +9,62 @@
|
|
9
9
|
|
10
10
|
{% include footer.html %}
|
11
11
|
|
12
|
+
<script>
|
13
|
+
|
14
|
+
const colors = ['green', 'amber'];
|
15
|
+
|
16
|
+
let randomColor = (colors) => {
|
17
|
+
return colors[Math.floor(Math.random()*colors.length)]
|
18
|
+
};
|
19
|
+
|
20
|
+
let saveColor = (color) => {
|
21
|
+
localStorage.setItem("monitor", color);
|
22
|
+
}
|
23
|
+
|
24
|
+
let savedColor = localStorage.getItem("monitor");
|
25
|
+
document.body.className = savedColor ? savedColor : randomColor(colors);
|
26
|
+
|
27
|
+
saveColor(document.body.className);
|
28
|
+
|
29
|
+
let toggleColor = (colors, currentColor) => {
|
30
|
+
return colors.find(color => color !== currentColor);
|
31
|
+
};
|
32
|
+
let colorChanger = () => {
|
33
|
+
let p = document.createElement('p');
|
34
|
+
let a = document.createElement('a');
|
35
|
+
let t = document.createTextNode('change color');
|
36
|
+
p.appendChild(a);
|
37
|
+
a.appendChild(t);
|
38
|
+
a.addEventListener("click", () => {
|
39
|
+
beep(100, 1000, 0.5);
|
40
|
+
let color = toggleColor(colors, localStorage.getItem("monitor"));
|
41
|
+
saveColor(color);
|
42
|
+
document.body.className = color;
|
43
|
+
});
|
44
|
+
return p;
|
45
|
+
};
|
46
|
+
|
47
|
+
document.querySelector('div.footer').appendChild(colorChanger());
|
48
|
+
|
49
|
+
var audioCtx = new (window.AudioContext || window.webkitAudioContext || window.audioContext);
|
50
|
+
|
51
|
+
function beep(duration, frequency, volume, type, callback) {
|
52
|
+
var oscillator = audioCtx.createOscillator();
|
53
|
+
var gainNode = audioCtx.createGain();
|
54
|
+
|
55
|
+
oscillator.connect(gainNode);
|
56
|
+
gainNode.connect(audioCtx.destination);
|
57
|
+
|
58
|
+
if (volume){gainNode.gain.value = volume;};
|
59
|
+
if (frequency){oscillator.frequency.value = frequency;}
|
60
|
+
if (type){oscillator.type = type;}
|
61
|
+
if (callback){oscillator.onended = callback;}
|
62
|
+
|
63
|
+
oscillator.start();
|
64
|
+
oscillator.stop(audioCtx.currentTime + duration/1000);
|
65
|
+
};
|
66
|
+
|
67
|
+
</script>
|
12
68
|
</body>
|
13
69
|
|
14
70
|
</html>
|
data/_sass/theme.scss
CHANGED
@@ -1,17 +1,57 @@
|
|
1
|
+
$green: rgb(51,255,51);
|
2
|
+
$amber: rgb(255,176,0);
|
3
|
+
$black: rgb(15,15,15);
|
4
|
+
$black: rgb(10,10,10);
|
5
|
+
$white: rgb(255,255,255);
|
6
|
+
|
1
7
|
body {
|
2
|
-
background: black;
|
8
|
+
background: $black;
|
9
|
+
//background: black;
|
3
10
|
margin: 0;
|
4
11
|
font-family: Consolas, Menlo, Monaco, Lucida Console, Courier New, Courier, monospaced;
|
5
12
|
}
|
6
13
|
|
7
|
-
body
|
8
|
-
|
14
|
+
body {
|
15
|
+
color: $white;
|
16
|
+
|
17
|
+
a {
|
18
|
+
color: $white;
|
19
|
+
}
|
20
|
+
|
21
|
+
}
|
22
|
+
|
23
|
+
.footer {
|
24
|
+
position: fixed;
|
25
|
+
left: 0;
|
26
|
+
bottom: 0;
|
27
|
+
width: 100%;
|
28
|
+
height: 2em;
|
29
|
+
background-color: $black;
|
30
|
+
text-align: center;
|
31
|
+
p {
|
32
|
+
margin: 0;
|
33
|
+
padding: 0;
|
34
|
+
}
|
35
|
+
}
|
36
|
+
|
37
|
+
body.green {
|
38
|
+
|
39
|
+
color: $green;
|
40
|
+
a {
|
41
|
+
color: $green;
|
42
|
+
}
|
43
|
+
}
|
44
|
+
|
45
|
+
body.amber {
|
46
|
+
color: $amber;
|
47
|
+
a {
|
48
|
+
color: $amber;
|
49
|
+
}
|
9
50
|
}
|
10
51
|
|
11
52
|
h1 {
|
12
53
|
font-size: 1.2em;
|
13
54
|
margin-left: 1.6em;
|
14
|
-
color: white;
|
15
55
|
}
|
16
56
|
|
17
57
|
header a {
|
@@ -21,7 +61,6 @@ header a {
|
|
21
61
|
p {
|
22
62
|
margin: 2em;
|
23
63
|
line-height: 1.2em;
|
24
|
-
color: #fff;
|
25
64
|
&:last-child {
|
26
65
|
margin-bottom:4em;
|
27
66
|
}
|
@@ -39,10 +78,6 @@ ul {
|
|
39
78
|
list-style-type: none;
|
40
79
|
}
|
41
80
|
|
42
|
-
ul li {
|
43
|
-
color: #fff;
|
44
|
-
}
|
45
|
-
|
46
81
|
/* Smartphones (portrait) ----------- */
|
47
82
|
@media only screen and (max-width : 420px) {
|
48
83
|
|
@@ -84,7 +119,7 @@ ul li {
|
|
84
119
|
top: 0;
|
85
120
|
padding-top: 5px;
|
86
121
|
padding-bottom: 5px;
|
87
|
-
background: black;
|
122
|
+
background: $black;
|
88
123
|
}
|
89
124
|
}
|
90
125
|
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: monomulder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Charles Mulder
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-09-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|