forked from meteor/meteor
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclock.html
More file actions
37 lines (31 loc) · 954 Bytes
/
clock.html
File metadata and controls
37 lines (31 loc) · 954 Bytes
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
<head>
<title>SVG Clock Demo</title>
</head>
<body>
<svg xmlns="http://www.w3.org/2000/svg"
width="400" height="400"
viewBox="-110 -110 220 220">
<!-- bounding circle -->
<circle style="stroke: black; fill: #eee;"
cx="0" cy="0" r="100"/>
<!-- hour, minute and second hands -->
{{#with handData}}
<line {{radial hourDegrees 0 .55}}
style="stroke-width: 6px;
stroke: green;" />
<line {{radial minuteDegrees 0 .85}}
style="stroke-width: 4px;
stroke: blue;" />
<line {{radial secondDegrees 0 .95}}
style="stroke-width: 2px;
stroke: red;" />
{{/with}}
<!-- tick marks -->
{{#each hours}}
<line {{radial degrees 0.9 1}}
style="stroke-width: 3px;
stroke: black;" />
{{/each}}
</svg>
</body>
<!-- Adapted from David Basoko's SVG clock demo -->