-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathblog-color.html
158 lines (131 loc) · 2.73 KB
/
blog-color.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
<!DOCTYPE html>
<html>
<head>
<style>
html,
body,
h1 {
margin: 0;
padding: 0;
border: 0
}
html {
background-color: #fff;
font-size: 16px;
line-height: 1.5;
color: #333
}
@media (min-width: 940px) {
html {
font-size: 18px
}
}
body {
max-width: 1000px;
margin: 0 auto;
padding: 0 10px
}
.f-right { float: right }
.f-left { float: left }
.parent { display: flex }
.inner { align-self: center }
.justify-spaceBetween { justify-content: space-between}
.w100 { width: 100% }
body {
font-family: "Roboto", "Helvetica Neue", "Helvetica", "Arial", sans-serif;
font-style: normal;
font-weight: 400;
font-size: 16px;
color: #333
}
h1 {
font-size: 2.25em;
line-height: 1.3333em;
padding: 0.33335em 0
}
@media (min-width: 940px) {
h1 {
font-size: 2.6667em;
line-height: 1em;
padding: 0.25em 0
}
}
#header {
border-bottom: 1px solid rgba(0, 0, 0, 0.14);
text-align: center;
margin-bottom: 3em;
height: 5em;
position: relative
}
#header a {
text-decoration: none;
display: inline-block;
}
#header h1 {
font-size: 2em;
padding-bottom: 0
}
#header h1 span {
color: rgba(0, 0, 0, 0.6);
font-weight: 300
}
.color-display {
font-size: .75em;
color: #AAA
}
</style>
</head>
<body>
<header id="header" class="parent justify-spaceBetween">
<div class="inner w100 relative">
<span class="f-left">
<a href="#">
<h1 class="colorMe">
<span>dead</span>Pix3l
</h1>
</a>
<span class="color-display">(#abcdef)</span>
</span>
</div>
<div class="inner w100 relative" style="background-color: #ddd;">
<span class="f-left">
<a href="#">
<h1 class="colorMe">
<span>dead</span>Pix3l
</h1>
</a>
<span class="color-display">(#abcdef)</span>
</span>
</div>
<div class="inner w100 relative" style="background-color: #666;">
<span class="f-left">
<a href="#">
<h1 class="colorMe">
<span>dead</span>Pix3l
</h1>
</a>
<span class="color-display">(#abcdef)</span>
</span>
</div>
<div class="inner w100 relative" style="background-color: #333;">
<span class="f-left">
<a href="#">
<h1 class="colorMe">
<span>dead</span>Pix3l
</h1>
</a>
<span class="color-display">(#abcdef)</span>
</span>
</div>
</header>
<script>
function colorHeader(val) {
var recolor = document.getElementsByClassName("colorMe");
for (var i = 0; i < recolor.length; i++) { recolor[i].style.color = val;}
var rename = document.getElementsByClassName("color-display");
for (var i = 0; i < rename.length; i++) { rename[i].innerHTML = '(' + val + ')';}
}
</script>
<input type="color" onchange=colorHeader(this.value) />
</body>
</html>