forked from davelab6/typefaceporn.com
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
179 lines (156 loc) · 6.16 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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Typeface Porn</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<!-- Le styles -->
<link href="assets/css/bootstrap.css" rel="stylesheet">
<style>
body {
padding-top: 60px; /* 60px to make the container go all the way to the bottom of the topbar */
}
/* safari and chrome */
@-webkit-keyframes wiggle {
0% {left:0;}
50% {left:10px;}
100% {left:0px;}
}
/* firefox */
@-moz-keyframes wiggle {
0% {left:0;}
50% {left:10px;}
100% {left:0px;}}
/* anyone brave enough to implement the ideal method */
@keyframes wiggle {
0% {left:0;}
50% {left:10px;}
100% {left:0px;}
}
.wiggle {
display: none;
}
.wiggle:hover {
-webkit-animation: wiggle 0.5s infinite;
-moz-animation: wiggle 0.5s infinite;
animation: wiggle 0.5s infinite;
position:relative;
}
</style>
<link href="assets/css/bootstrap-responsive.css" rel="stylesheet">
<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<!-- Fav and touch icons -->
<link rel="shortcut icon" href="assets/ico/favicon.ico">
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="assets/ico/apple-touch-icon-144-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="assets/ico/apple-touch-icon-114-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="assets/ico/apple-touch-icon-72-precomposed.png">
<link rel="apple-touch-icon-precomposed" href="assets/ico/apple-touch-icon-57-precomposed.png">
</head>
<body>
<div class="navbar navbar-inverse navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
<a class="brand" href="#">Typeface Porn</a>
<div class="nav-collapse collapse">
<ul class="nav">
<li class="active"><a href="#">See more</a></li>
<li><a href="#about">About</a></li>
<li><a href="#contact">Contact</a></li>
</ul>
</div><!--/.nav-collapse -->
</div>
</div>
</div>
<div class="container">
<div id="about" class="modal hide fade" tabindex="-1"
role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"
aria-hidden="true">×</button>
<h1 id="myModalLabel">Typeface Porn</h1>
</div>
<div class="modal-body">
<p>A hot peek at <a href="http://www.google.com/fonts">Google
Fonts</a>, a collection of hundreds of libre fonts.</p>
</div>
<div class="modal-footer">
<button class="btn btn-primary">Close</button>
</div>
</div>
<div id="contact" class="modal hide fade" tabindex="-1"
role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"
aria-hidden="true">×</button>
<h3 id="myModalLabel">Contact</h3>
</div>
<div class="modal-body">
<p>Email <a
href="mailto:dave@understandingfonts.com">dave@understandingfonts.com</a></p>
</div>
<div class="modal-footer">
<button class="btn btn-primary">Close</button>
</div>
</div>
<h2 class="wiggle">sexy<br /> bell-bottom jeans <br />and a <br />fuzzy <br/>cape? <br />I've awoken <br />in the age of <br />aquarius!</h2>
</div> <!-- /container -->
<!-- Le javascript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="assets/js/jquery.js"></script>
<script src="assets/js/bootstrap-transition.js"></script>
<script src="assets/js/bootstrap-alert.js"></script>
<script src="assets/js/bootstrap-modal.js"></script>
<script src="assets/js/bootstrap-dropdown.js"></script>
<script src="assets/js/bootstrap-scrollspy.js"></script>
<script src="assets/js/bootstrap-tab.js"></script>
<script src="assets/js/bootstrap-tooltip.js"></script>
<script src="assets/js/bootstrap-popover.js"></script>
<script src="assets/js/bootstrap-button.js"></script>
<script src="assets/js/bootstrap-collapse.js"></script>
<script src="assets/js/bootstrap-carousel.js"></script>
<script src="assets/js/bootstrap-typeahead.js"></script>
<script src="assets/js/jquery.fittext.js"></script>
<script>
var GWF_APIKEY = 'AIzaSyBKEIQeLtpWJgZ8rqSPGoy5NgzqOoqlJIY';
var wiggleText = $('.wiggle');
$.fn.random = function() {
var randomIndex = Math.floor(Math.random() * this.length);
return this[randomIndex];
};
function setupWiggleText(font) {
var font_url = 'http://fonts.googleapis.com/css?subset=latin&family=' + font.family;
var variant = $(font.variants).random();
var link = $('<link>').attr('href', font_url).attr('rel', 'stylesheet').attr('type', 'text/css');
$('head').append(link);
wiggleText.fitText();
wiggleText.css('font-family', font.family)
if (variant) {
wiggleText.css('font-style', variant);
}
wiggleText.fadeIn(900);
}
$(function(){
var webfonts_url = 'https://www.googleapis.com/webfonts/v1/webfonts';
$.ajax({
url: webfonts_url,
data: {key: GWF_APIKEY},
success: function(data, textStatus, jqXHR) {
setupWiggleText($(data.items).random());
},
dataType: 'json'
});
});
</script>
</body>
</html>