-
Notifications
You must be signed in to change notification settings - Fork 9
/
try.html
144 lines (136 loc) · 7.97 KB
/
try.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
<title>Try Routed Gothic</title>
<link rel="stylesheet" href="css/app.css">
<script src="https://code.jquery.com/jquery-3.3.1.min.js"
integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
crossorigin="anonymous"></script>
</head>
<body>
<!--#include virtual="includes/header.inc.html" -->
<div class="grid-container">
<div class="grid-x grid-padding-x">
<div class="cell">
<main>
<h1 class="page-title">
Try Routed Gothic
</h1>
<form>
<div class="grid-x grid-padding-x">
<div class="cell medium-6 large-4">
<fieldset>
<legend class="show-for-large">
Font Stretch:
</legend>
<ul class="menu simple">
<li>
<label class="display-inline-block">
<input type="radio" name="font-stretch" value="normal" checked> Normal
</label>
</li>
<li>
<label class="display-inline-block">
<input type="radio" name="font-stretch" value="narrow"> Narrow
</label>
</li>
<li>
<label class="display-inline-block">
<input type="radio" name="font-stretch" value="wide"> Wide
</label>
</li>
</ul>
</fieldset>
</div>
<div class="cell medium-6 large-4">
<fieldset>
<legend class="show-for-large">
Font Style:
</legend>
<ul class="menu simple">
<li>
<label class="display-inline-block">
<input type="radio" name="font-style" value="normal" checked> Normal
</label>
</li>
<li>
<label class="display-inline-block">
<input type="radio" name="font-style" value="half-italic"> Half Italic
</label>
</li>
<li>
<label class="display-inline-block">
<input type="radio" name="font-style" value="italic"> Italic
</label>
</li>
</ul>
</fieldset>
</div>
<div class="cell medium-6 large-4">
<fieldset>
<legend class="show-for-large">
Font Size:
</legend>
<ul class="menu simple">
<li>
<label class="display-inline-block">
<input type="radio" name="font-size" value="normal" checked> Normal
</label>
</li>
<li>
<label class="display-inline-block">
<input type="radio" name="font-size" value="large"> Large
</label>
</li>
<li>
<label class="display-inline-block">
<input type="radio" name="font-size" value="x-large"> Extra Large
</label>
</li>
</ul>
</fieldset>
</div>
</div>
<textarea class="try-routed-gothic" name="try" placeholder="Type some text here." rows="6"></textarea>
</form>
<script>
(function ($) {
var fontStretch;
var fontStyle;
var fontSize;
var $textarea = $('textarea.try-routed-gothic');
function update() {
$(':input[name="font-stretch"]').each(function (index, input) {
$textarea.removeClass('font-stretch--' + input.value);
});
$(':input[name="font-style"]').each(function (index, input) {
$textarea.removeClass('font-style--' + input.value);
});
$(':input[name="font-size"]').each(function (index, input) {
$textarea.removeClass('font-size--' + input.value);
});
$(':input[name="font-stretch"]:checked').each(function (index, input) {
$textarea.addClass('font-stretch--' + input.value);
});
$(':input[name="font-style"]:checked').each(function (index, input) {
$textarea.addClass('font-style--' + input.value);
});
$(':input[name="font-size"]:checked').each(function (index, input) {
$textarea.addClass('font-size--' + input.value);
});
}
$(document).on('change', ':input[name="font-stretch"]', update);
$(document).on('change', ':input[name="font-style"]', update);
$(document).on('change', ':input[name="font-size"]', update);
update();
}(jQuery));
</script>
</main>
</div>
</div>
</div>
<!--#include virtual="includes/footer.inc.html" -->
</body>
</html>