forked from mozilla/Fira
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
158 lines (129 loc) · 4.28 KB
/
index.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>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1, maximum-scale=1">
<title>Fira</title>
<link rel="stylesheet" href="fira.css">
<style>
body {
font-family: 'Fira Sans';
font-weight: 300;
overflow-x: hidden;
}
article {
margin: 0 auto;
max-width: 800px;
padding: 1em;
}
h1, .glyph {
font-family: 'Fira Sans';
font-size: 40px;
}
p {
font-family: 'Fira Sans';
font-size: 32px;
padding: 0 1em;
}
.mono {
font-family: 'Fira Mono';
}
.ribbon {
background: none repeat scroll 0% 0% rgb(34, 34, 34);
color: white;
display: block;
font: 400 13px 'Fira Sans';
padding: 8px 150px;
position: absolute;
right: 0px;
text-decoration: none;
top: 0px;
-webkit-transform: translate(50%, -50%) rotate(45deg) translateY(72px);
-moz-transform: translate(50%, -50%) rotate(45deg) translateY(72px);
-ms-transform: translate(50%, -50%) rotate(45deg) translateY(72px);
-o-transform: translate(50%, -50%) rotate(45deg) translateY(72px);
transform: translate(50%, -50%) rotate(45deg) translateY(72px);
white-space: nowrap;
}
.glyph {
margin: 1em auto;
text-align: center;
font-size: 72px;
}
@media (max-width: 640px) {
p {
padding: 0;
font-size: 18px;
}
}
</style>
</head>
<body>
<article>
<h1>Fira Sans</h1>
<h2>Hair</h2>
<p contenteditable id="orig" style="font-weight: 100;">
The quick brown Firefox jumps over the lazy dog.<br>
abcdefghijklmnopqrstuvwxyz<br>
ABCDEFGHIJKLMNOPQRSTUVWXYZ<br>
1234567890!@#$%^&*()`~{}[]+=:;'"‘’“”
</p>
<p contenteditable style="font-weight: 100; font-style: italic;"></p>
<h2>UltraLight</h2>
<p contenteditable style="font-weight: 200;"></p>
<p contenteditable style="font-weight: 200; font-style: italic;"></p>
<h2>Light</h2>
<p contenteditable style="font-weight: 300;"></p>
<p contenteditable style="font-weight: 300; font-style: italic;"></p>
<h2>Regular</h2>
<p contenteditable style="font-weight: 400;"></p>
<p contenteditable style="font-weight: 400; font-style: italic;"></p>
<h2>Medium</h2>
<p contenteditable style="font-weight: 500;"></p>
<p contenteditable style="font-weight: 500; font-style: italic;"></p>
<h2>SemiBold</h2>
<p contenteditable style="font-weight: 600;"></p>
<p contenteditable style="font-weight: 600; font-style: italic;"></p>
<h2>Bold</h2>
<p contenteditable style="font-weight: 700;"></p>
<p contenteditable style="font-weight: 700; font-style: italic;"></p>
<h2>ExtraBold</h2>
<p contenteditable style="font-weight: 800;"></p>
<p contenteditable style="font-weight: 800; font-style: italic;"></p>
<h2>Heavy</h2>
<p contenteditable style="font-weight: 900;"></p>
<p contenteditable style="font-weight: 900; font-style: italic;"></p>
<br>
<br>
<br>
<h1 class="mono">Fira Mono</h1>
<h2 class="mono">Regular</h2>
<p contenteditable class="mono" style="font-weight: 400;"></p>
<h2 class="mono">Medium</h2>
<p contenteditable class="mono" style="font-weight: 500;"></p>
<h2 class="mono">Bold</h2>
<p id='foo' contenteditable class="mono" style="font-weight: 600;"></p>
<a class="ribbon" href="https://github.com/mozilla/Fira">Fira on GitHub</a>
<div class="glyph"><span style="color:#f00"></span><span style="color:#fff"></span></div>
</article>
<script>
var elems = document.querySelectorAll("p");
elems = Array.prototype.slice.call(elems);
function propagate(changedElem) {
var str = changedElem.innerHTML;
elems.forEach(function(x) {
if (x !== changedElem) {
x.innerHTML = str;
}
});
}
elems.forEach(function(x) {
x.oninput = function() {
propagate(x);
};
});
var orig = document.querySelector("#orig");
propagate(orig);
</script>
</body>
</html>