-
Notifications
You must be signed in to change notification settings - Fork 62
/
Copy pathindex.html
executable file
·179 lines (169 loc) · 5.82 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" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Arctext.js - Curving text with CSS3 and jQuery</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Arctext.js - Curving text with CSS3 and jQuery" />
<meta name="keywords" content="arc, letters, words, rotate, warp, circle, curve, along, path, jquery, css3, transform" />
<meta name="author" content="Codrops" />
<link rel="shortcut icon" href="../favicon.ico">
<link rel="stylesheet" type="text/css" href="css/demo.css" />
<link rel="stylesheet" type="text/css" href="css/style.css" />
<link href='http://fonts.googleapis.com/css?family=Montserrat|Sail|Concert+One' rel='stylesheet' type='text/css' />
</head>
<body>
<div class="container">
<!-- Codrops top bar -->
<div class="codrops-top">
<a href="http://tympanus.net/Tutorials/CSS3SlidingImagePanels/">
<strong>« Previous Demo: </strong>Sliding Image Panels with CSS3
</a>
<span class="right">
<a href="http://tympanus.net/codrops/2012/01/24/arctext-js-curving-text-with-css3-and-jquery/">
<strong>Back to the Codrops Article</strong>
</a>
</span>
<div class="clr"></div>
</div><!--/ Codrops top bar -->
<header>
<h1 id="headline">Arctext.js</h1>
<h2>Curving text with CSS3 & jQuery</h2>
<p class="codrops-demos">
<a href="#sub1">Curve</a>
<a href="#sub2">Direction</a>
<a href="#sub3">No rotation</a>
<a href="#sub4">Set/animate</a>
</p>
</header>
<section class="main">
<div id="arc-wrapper" class="arc-wrapper">
<h3>Just ♦ bend ♦ your ♦ text</h3>
<h4>ABCDEFG</h4>
</div>
</section>
<section class="sub" id="sub1">
<div class="example">
<h3 id="example1">I wanna be curved</h3>
</div>
<div class="code">
<h4>Example 1 - Curve</h4>
<p>Curved with a radius of 300</p>
<code>$example1.arctext({radius: 300})</code>
</div>
<div class="clr"></div>
</section>
<section class="sub" id="sub2">
<div class="example">
<h3 id="example2">I wanna be different</h3>
</div>
<div class="code">
<h4>Example 2 - Direction</h4>
<p>Changed direction</p>
<code>$example2.arctext({radius: 400, dir: -1})</code>
</div>
<div class="clr"></div>
</section>
<section class="sub" id="sub3">
<div class="example">
<h3 id="example3">I have straight letters</h3>
</div>
<div class="code">
<h4>Example 3 - No rotation</h4>
<p>Non-rotated letters</p>
<code>$example3.arctext({radius: 500, rotate: false})</code>
</div>
<div class="clr"></div>
</section>
<section class="sub" id="sub4">
<div class="example">
<h3 id="example4">See me change</h3>
</div>
<div class="code">
<h4>Example 4 - Set/animate</h4>
<p>Set or animate</p>
<code>$example4.arctext({radius: 300})</code>
<p class="buttons">
<a id="button_set" href="#"><span>Set me</span><span>radius: 140,<br /> dir: -1</span></a>
<a id="button_anim1" href="#"><span>Animate me</span><span>radius: 300,<br /> dir: -1,<br /> animation: 300ms ease-out</span></a>
<a id="button_anim2" href="#"><span>Animate me</span><span>radius: 200,<br /> dir: 1,<br /> animation: 300ms</span></a>
<a id="button_reset" href="#"><span>Reset me</span><span>radius: 300,<br /> dir: 1</span></a>
</p>
</div>
<div class="clr"></div>
</section>
<div class="clr"></div>
</div>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery.arctext.js"></script>
<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<script type="text/javascript">
var $headline = $('#headline').hide();
var $word1 = $('#arc-wrapper').find('h3').hide();
var $word2 = $('#arc-wrapper').find('h4').hide();
var $example1 = $('#example1').hide();
var $example2 = $('#example2').hide();
var $example3 = $('#example3').hide();
var $example4 = $('#example4').hide();
google.load('webfont','1');
google.setOnLoadCallback(function() {
WebFont.load({
google : {
families : ['Montserrat','Concert One']
},
fontactive : function(fontFamily, fontDescription) {
init();
},
fontinactive : function(fontFamily, fontDescription) {
init();
}
});
});
function init() {
$headline.show().arctext({radius: 400});
$word1.show().arctext();
$word2.show().arctext({radius: 148, dir: -1});
$example1.show().arctext({radius: 300});
$example2.show().arctext({radius: 400, dir: -1});
$example3.show().arctext({radius: 500, rotate: false});
$example4.show().arctext({radius: 300});
$('#button_set').on('click', function() {
$example4.arctext('set', {
radius : 140,
dir : -1
});
return false;
});
$('#button_anim1').on('click', function() {
$example4.arctext('set', {
radius : 300,
dir : -1,
animation : {
speed : 300,
easing : 'ease-out'
}
});
return false;
});
$('#button_anim2').on('click', function() {
$example4.arctext('set', {
radius : 200,
dir : 1,
animation : {
speed : 300
}
});
return false;
});
$('#button_reset').on('click', function() {
$example4.arctext('set', {
radius : 300,
dir : 1
});
return false;
});
};
</script/>
</body>
</html>