-
Notifications
You must be signed in to change notification settings - Fork 99
/
index.php
287 lines (234 loc) · 8.7 KB
/
index.php
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
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
<!doctype html>
<html lang="en">
<head>
<title>We Love Icon Fonts</title>
<meta charset="utf-8">
<meta name="author" content="Tim Pietrusky">
<meta name="robots" content="index,follow">
<meta name="revisit-after" content="1 days">
<meta name="description" content="A free & open source icon fonts hosting service for testing purposes.">
<meta property="og:title" content="We Love Icon Fonts">
<meta property="og:description" content="A free hosting service like Google Web Fonts, but for Icon Fonts (Open Source). Hurray!">
<meta property="og:image" content="https://weloveiconfonts.com/skin/img/weloveiconfonts.jpg">
<meta property="og:url" content="https://weloveiconfonts.com">
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" href="skin/css/4068f63a.style.css?2">
<link rel="shortcut icon" href="skin/img/weloveiconfonts.ico" type="image/x-icon">
<link rel="author" href="https://plus.google.com/112605782451035737058/posts">
</head>
<body id="weloveiconfonts" data-max-width="1024" data-theme="weloveiconfonts" data-auto-extend="true">
<article class="box--title" data-text="">
<section data-cols="1">
<div>
<h1 class="title">We <span class="hitman__alpha">Love</span> Icon Fonts</h1>
<p>We must stop here, this is icon fonts country!</p>
</div>
</section>
</article>
<article data-high="1" data-text="">
<section data-cols="3">
<div>
<h3>What?</h3>
<p>This is a free & open source <b>icon fonts hosting service</b> (like <a href="https://www.google.com/webfonts" target="_blank">Google Web Fonts</a>, but icon fonts only). Hurray! </p>
</div>
<div>
<h3>Caution!</h3>
<p>This is a public gamma. Use this service for mockups, reduced test-cases or <a href="https://codepen.io" target="_blank">CodePens</a>, but not on productive systems!</p>
</div>
<div>
<h3>Feedback!?</h3>
<p>
Send a message to <a href="https://twitter.com/WeLoveIconFonts" target="_blank">@WeLoveIconFonts</a> or create an <a href="https://github.com/TimPietrusky/weloveiconfonts" target="_blank">issue on GitHub</a>.
</p>
</div>
</section>
</article>
<?php
// Load the available icon fonts
$iconfonts = file_get_contents('skin/js/core/iconfonts.json');
$data = json_decode($iconfonts);
?>
<?php
// Create each icon font
?>
<?php foreach($data as $iconfont): ?>
<!-- <?php echo $iconfont->family; ?> -->
<article class="<?php echo $iconfont->family; ?>" id="<?php echo $iconfont->family; ?>" data-high="2" data-text="">
<section data-cols="2" class="icon-font--header">
<div>
<h2><?php echo $iconfont->name; ?></h2>
<p><?php echo $iconfont->description; ?></p>
</div>
<div>
<button class="add" data-type="2" data-collection="<?php echo $iconfont->family; ?>"><span class="fontawesome-heart"></span> add</button>
</div>
</section>
<section data-name="preview" data-cols="1" data-valign="center">
<div></div>
</section>
</article>
<?php endforeach; ?>
<!-- Your Icon Fonts -->
<article id="output" data-high="5">
<section data-cols="1">
<div>
<h2>Use selected font(s)</h2>
</div>
</section>
<section data-name="output" data-cols="1">
<div>
<pre class="output" data-type="1">
Pro tip: Select some icon fonts to the see real output here!
</pre>
</div>
</section>
</article>
<!-- How to use this? -->
<article id="how-to-use" data-high="2">
<section data-cols="1">
<div>
<h2>How to!</h2>
<p>3 steps to integrate icon fonts into your project:</p>
</div>
</section>
<section data-cols="2">
<div>
<section data-cols="1">
<div>
<h3>1. Add the icon font(s) to your collection:</h3>
<div class="icon-font--header">
<button class="add" data-type="2"><span class="fontawesome-heart"></span> add</button>
</div>
</div>
<div>
<h3>2. Import the icon fonts(s) into your css and add the font-family('s):</h3>
<pre data-type="1">
@import url(<span class="url">https://weloveiconfonts.com/api/?family=zocial</span>);
<span>/* zocial */</span>
[class*="zocial-"]:before {
<span class="css">font-family: 'zocial', sans-serif;</span>
}
</pre>
</div>
</section>
</div>
<div>
<h3>3. Burn baby, burn!</h3>
<pre data-type="1">
<span><!-- Single Element --></span>
<span class=<span class="css">"zocial-dribbble"</span>></span>
</pre>
<br>
<span class="zocial-dribbble example"></span>
<br>
<br>
<pre data-type="1">
<span><!-- Group of Elements --></span>
<ul>
<li class=<span class="css">"zocial-twitter"</span>></li>
<li class=<span class="css">"zocial-flickr"</span>></li>
<li class=<span class="css">"zocial-lastfm"</span>></li>
<li class=<span class="css">"zocial-reddit"</span>></li>
</ul>
</pre>
<ul class="example">
<li class="zocial-twitter"></li>
<li class="zocial-flickr"></li>
<li class="zocial-lastfm"></li>
<li class="zocial-reddit"></li>
</ul>
</div>
</section>
<section data-cols="1">
<div>
<hr>
<p>
<b><span class="typicons-power"></span></b>
<b>Pro Tip</b>: Use the element inspector of your favorite browser and discover the icons on this page for more examples!
</p>
</div>
</section>
</article>
<!-- Social & Feedback -->
<article data-high="4">
<section data-cols="3">
<div>
<a class="hitman__gamma" href="https://github.com/TimPietrusky/weloveiconfonts" target="_blank">
<button data-type="2">
Fork
<span class="brandico brandico-github">
me
</button>
</a>
</div>
<div>
<a class="hitman__gamma" href="https://twitter.com/share?text=@WeLoveIconFonts+-+A+free+and+open-source+icon+fonts+hosting+service&url=https://weloveiconfonts.com" target="_blank">
<button data-type="4">
Spread
<span class="zocial zocial-twitter"></span>
the word
</button>
</a>
</div>
<div>
<a class="hitman__gamma" href="mailto:[email protected]" target="_blank">
<button data-type="3">
<span class="zocial zocial-email"></span>
Feedback
</button>
</a>
</div>
</section>
</article>
<!-- Top & Handcrafted -->
<article data-high="3">
<section data-cols="1">
<div>
<footer>
Handcrafted 2012 - 2013 by <a href="https://twitter.com/TimPietrusky" target="_blank">@TimPietrusky</a> in Frankfurt (Main), Germany.
</footer>
</div>
</section>
</article>
<script id="iconTemplate" type="text/template"></script>
<script id="creatorTemplate" type="text/template">
<section data-cols="3">
<div class="creator__social">
<div class="hitman__gamma hitman__delta">
<a class="social__twitter" href="https://twitter.com/WeLoveIconFonts" target="_blank"><span class="entypo-twitter"></span></a>
<a class="social__github" href="https://github.com/TimPietrusky/weloveiconfonts" target="_blank"><span class="entypo-github"></span></a>
</div>
</div>
<div><textarea contenteditable data-name="text" data-type="1" spellcheck="false" title="iconfont-class"></textarea></div>
<div>
<section data-cols="1">
<div>
<a href="#output" title="# of selected fonts" class="plain">0</a>
<a href="#" class="entypo-minus-squared toggle" title="Toggle view: full/minimal"></a>
<a href="#how-to-use" class="entypo-info" title="How does this work?"></a>
</div>
</section>
</div>
</section>
</script>
<script id="outputTemplate" type="text/template">
</script>
<script type="text/javascript">
window.iconfonts = <?php echo $iconfonts ?>;
// Add a script element as a child of the body
function downloadJSAtOnload() {
var element = document.createElement('script');
element.src = 'skin/js/8a03a137.scripts.min.js';
document.body.appendChild(element);
}
// Check for browser support of event handling capability
if (window.addEventListener) {
window.addEventListener("load", downloadJSAtOnload, false);
} else if (window.attachEvent) {
window.attachEvent("onload", downloadJSAtOnload);
} else {
window.onload = downloadJSAtOnload;
}
</script>
</body>
</html>