Subversion-Projekte lars-tiefland.ci

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
776 lars 1
/* Load this script using conditional IE comments if you need to support IE 7 and IE 6. */
2
 
3
window.onload = function() {
4
	function addIcon(el, entity) {
5
		var html = el.innerHTML;
6
		el.innerHTML = '<span style="font-family: \'Simple-Line-Icons\'">' + entity + '</span>' + html;
7
	}
8
	var icons = {
9
			'icon-user-unfollow' : '&#xe000;',
10
			'icon-user-friends' : '&#xe001;',
11
			'icon-user-following' : '&#xe002;',
12
			'icon-user-follow' : '&#xe003;',
13
			'icon-trophy' : '&#xe004;',
14
			'icon-speedometer' : '&#xe005;',
15
			'icon-social-youtube' : '&#xe006;',
16
			'icon-social-twitter' : '&#xe007;',
17
			'icon-social-tumblr' : '&#xe008;',
18
			'icon-social-facebook' : '&#xe009;',
19
			'icon-social-dropbox' : '&#xe00a;',
20
			'icon-social-dribbble' : '&#xe00b;',
21
			'icon-shield' : '&#xe00c;',
22
			'icon-screen-tablet' : '&#xe00d;',
23
			'icon-screen-smartphone' : '&#xe00e;',
24
			'icon-screen-desktop' : '&#xe00f;',
25
			'icon-plane' : '&#xe010;',
26
			'icon-notebook' : '&#xe011;',
27
			'icon-moustache' : '&#xe012;',
28
			'icon-mouse' : '&#xe013;',
29
			'icon-magnet' : '&#xe014;',
30
			'icon-magic-wand' : '&#xe015;',
31
			'icon-hourglass' : '&#xe016;',
32
			'icon-graduation' : '&#xe017;',
33
			'icon-ghost' : '&#xe018;',
34
			'icon-game-controller' : '&#xe019;',
35
			'icon-fire' : '&#xe01a;',
36
			'icon-eyeglasses' : '&#xe01b;',
37
			'icon-envelope-open' : '&#xe01c;',
38
			'icon-envelope-letter' : '&#xe01d;',
39
			'icon-energy' : '&#xe01e;',
40
			'icon-emoticon-smile' : '&#xe01f;',
41
			'icon-disc' : '&#xe020;',
42
			'icon-cursor-move' : '&#xe021;',
43
			'icon-crop' : '&#xe022;',
44
			'icon-credit-card' : '&#xe023;',
45
			'icon-chemistry' : '&#xe024;',
46
			'icon-bell' : '&#xe025;',
47
			'icon-badge' : '&#xe026;',
48
			'icon-anchor' : '&#xe027;',
49
			'icon-action-redo' : '&#xe028;',
50
			'icon-action-undo' : '&#xe029;',
51
			'icon-bag' : '&#xe02a;',
52
			'icon-basket' : '&#xe02b;',
53
			'icon-basket-loaded' : '&#xe02c;',
54
			'icon-book-open' : '&#xe02d;',
55
			'icon-briefcase' : '&#xe02e;',
56
			'icon-bubbles' : '&#xe02f;',
57
			'icon-calculator' : '&#xe030;',
58
			'icon-call-end' : '&#xe031;',
59
			'icon-call-in' : '&#xe032;',
60
			'icon-call-out' : '&#xe033;',
61
			'icon-compass' : '&#xe034;',
62
			'icon-cup' : '&#xe035;',
63
			'icon-diamond' : '&#xe036;',
64
			'icon-direction' : '&#xe037;',
65
			'icon-directions' : '&#xe038;',
66
			'icon-docs' : '&#xe039;',
67
			'icon-drawer' : '&#xe03a;',
68
			'icon-drop' : '&#xe03b;',
69
			'icon-earphones' : '&#xe03c;',
70
			'icon-earphones-alt' : '&#xe03d;',
71
			'icon-feed' : '&#xe03e;',
72
			'icon-film' : '&#xe03f;',
73
			'icon-folder-alt' : '&#xe040;',
74
			'icon-frame' : '&#xe041;',
75
			'icon-globe' : '&#xe042;',
76
			'icon-globe-alt' : '&#xe043;',
77
			'icon-handbag' : '&#xe044;',
78
			'icon-layers' : '&#xe045;',
79
			'icon-map' : '&#xe046;',
80
			'icon-picture' : '&#xe047;',
81
			'icon-pin' : '&#xe048;',
82
			'icon-playlist' : '&#xe049;',
83
			'icon-present' : '&#xe04a;',
84
			'icon-printer' : '&#xe04b;',
85
			'icon-puzzle' : '&#xe04c;',
86
			'icon-speech' : '&#xe04d;',
87
			'icon-vector' : '&#xe04e;',
88
			'icon-wallet' : '&#xe04f;',
89
			'icon-arrow-down' : '&#xe050;',
90
			'icon-arrow-left' : '&#xe051;',
91
			'icon-arrow-right' : '&#xe052;',
92
			'icon-arrow-up' : '&#xe053;',
93
			'icon-bar-chart' : '&#xe054;',
94
			'icon-bulb' : '&#xe055;',
95
			'icon-calendar' : '&#xe056;',
96
			'icon-control-end' : '&#xe057;',
97
			'icon-control-forward' : '&#xe058;',
98
			'icon-control-pause' : '&#xe059;',
99
			'icon-control-play' : '&#xe05a;',
100
			'icon-control-rewind' : '&#xe05b;',
101
			'icon-control-start' : '&#xe05c;',
102
			'icon-cursor' : '&#xe05d;',
103
			'icon-dislike' : '&#xe05e;',
104
			'icon-equalizer' : '&#xe05f;',
105
			'icon-graph' : '&#xe060;',
106
			'icon-grid' : '&#xe061;',
107
			'icon-home' : '&#xe062;',
108
			'icon-like' : '&#xe063;',
109
			'icon-list' : '&#xe064;',
110
			'icon-login' : '&#xe065;',
111
			'icon-logout' : '&#xe066;',
112
			'icon-loop' : '&#xe067;',
113
			'icon-microphone' : '&#xe068;',
114
			'icon-music-tone' : '&#xe069;',
115
			'icon-music-tone-alt' : '&#xe06a;',
116
			'icon-note' : '&#xe06b;',
117
			'icon-pencil' : '&#xe06c;',
118
			'icon-pie-chart' : '&#xe06d;',
119
			'icon-question' : '&#xe06e;',
120
			'icon-rocket' : '&#xe06f;',
121
			'icon-share' : '&#xe070;',
122
			'icon-share-alt' : '&#xe071;',
123
			'icon-shuffle' : '&#xe072;',
124
			'icon-size-actual' : '&#xe073;',
125
			'icon-size-fullscreen' : '&#xe074;',
126
			'icon-support' : '&#xe075;',
127
			'icon-tag' : '&#xe076;',
128
			'icon-trash' : '&#xe077;',
129
			'icon-umbrella' : '&#xe078;',
130
			'icon-wrench' : '&#xe079;',
131
			'icon-ban' : '&#xe07a;',
132
			'icon-bubble' : '&#xe07b;',
133
			'icon-camcorder' : '&#xe07c;',
134
			'icon-camera' : '&#xe07d;',
135
			'icon-check' : '&#xe07e;',
136
			'icon-clock' : '&#xe07f;',
137
			'icon-close' : '&#xe080;',
138
			'icon-cloud-download' : '&#xe081;',
139
			'icon-cloud-upload' : '&#xe082;',
140
			'icon-doc' : '&#xe083;',
141
			'icon-envelope' : '&#xe084;',
142
			'icon-eye' : '&#xe085;',
143
			'icon-flag' : '&#xe086;',
144
			'icon-folder' : '&#xe087;',
145
			'icon-heart' : '&#xe088;',
146
			'icon-info' : '&#xe089;',
147
			'icon-key' : '&#xe08a;',
148
			'icon-link' : '&#xe08b;',
149
			'icon-lock' : '&#xe08c;',
150
			'icon-lock-open' : '&#xe08d;',
151
			'icon-magnifier' : '&#xe08e;',
152
			'icon-magnifier-add' : '&#xe08f;',
153
			'icon-magnifier-remove' : '&#xe090;',
154
			'icon-paper-clip' : '&#xe091;',
155
			'icon-paper-plane' : '&#xe092;',
156
			'icon-plus' : '&#xe093;',
157
			'icon-pointer' : '&#xe094;',
158
			'icon-power' : '&#xe095;',
159
			'icon-refresh' : '&#xe096;',
160
			'icon-reload' : '&#xe097;',
161
			'icon-settings' : '&#xe098;',
162
			'icon-star' : '&#xe099;',
163
			'icon-symbol-female' : '&#xe09a;',
164
			'icon-symbol-male' : '&#xe09b;',
165
			'icon-target' : '&#xe09c;',
166
			'icon-user-female' : '&#xe09d;',
167
			'icon-user-male' : '&#xe09e;',
168
			'icon-volume-1' : '&#xe09f;',
169
			'icon-volume-2' : '&#xe0a0;',
170
			'icon-volume-off' : '&#xe0a1;'
171
		},
172
		els = document.getElementsByTagName('*'),
173
		i, attr, c, el;
174
	for (i = 0; ; i += 1) {
175
		el = els[i];
176
		if(!el) {
177
			break;
178
		}
179
		attr = el.getAttribute('data-icon');
180
		if (attr) {
181
			addIcon(el, attr);
182
		}
183
		c = el.className;
184
		c = c.match(/icon-[^\s'"]+/);
185
		if (c && icons[c[0]]) {
186
			addIcon(el, icons[c[0]]);
187
		}
188
	}
189
};