forked from openSUSE/countdown.o.o
-
Notifications
You must be signed in to change notification settings - Fork 0
/
picker.html
184 lines (174 loc) · 4.98 KB
/
picker.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
180
181
182
183
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="utf-8"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>openSUSE Countdown Picker</title>
<link rel="stylesheet" href="bootstrap.min.css"/>
<style type="text/css">
body {
padding-top: 60px;
}
#rcontainer {
width: 400px;
height: 400px;
/*border: 1px solid;*/
background: #f2f2f2;
}
#rcontainer img {
border: 1px solid;
}
#tcontainer {
margin-top: 1.5em;
}
#t {
display: block;
padding: 0.5em;
font-size: 150%;
font-weight: bold;
}
footer {
text-align: center;
}
footer p {
margin-bottom: 0.1em;
}
</style>
</head>
<body>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
<script type="text/javascript">
function update() {
var size = $("#sizelist * input:radio:checked").val();
var design = $("#designlist * input:radio:checked").val();
var lang = $("#langlist * input:radio:checked").val();
var path = "" + size + design;
if (lang && lang.length > 0) {
path += "." + lang + ".png";
}
var url = "http://counter.opensuse.org/" + path;
$("#r").attr("src", url);
$("#t").text("<a href=\"http://counter.opensuse.org/linkto/\">\n<img src=\"" + url + "\"/>\n</a>");
}
$(document).ready(function() {
update();
$("li * input").each(function(i) {
$(this).change(function() {
update();
})
})
});
</script>
<div class="topbar">
<div class="topbar-inner">
<div class="container">
<h3>
<a href="#">openSUSE Countdown Picker</a>
</h3>
</div>
</div>
</div>
<div class="container">
<div class="content">
<div class="row">
<h1>openSUSE Countdown Picker</h1>
</div>
<div class="row">
<div class="span6">
<div class="row" id="rcontainer">
<img id="r"/>
</div>
</div>
<div class="span6">
<div class="row">
<form>
<fieldset>
<legend>Choose the size</legend>
<div class="input">
<ul id="sizelist" class="inputs-list">
<li>
<label>
<input type="radio" name="size" value="large"/>
<span>Large (400x400 px)</span>
</label>
</li>
<li>
<label>
<input type="radio" checked name="size" value="medium"/>
<span>Medium (256x256 px)</span>
</label>
</li>
<li>
<label>
<input type="radio" name="size" value="small"/>
<span>Small (130x130 px)</span>
</label>
</li>
</ul>
</fieldset>
</form>
</div>
<div class="row">
<form>
<fieldset>
<legend>Choose the design</legend>
<div class="input">
<ul id="designlist" class="inputs-list">
<li>
<label>
<input type="radio" name="design" checked value="-label"/>
<span>Default</span>
</label>
</li>
<li>
<label>
<input type="radio" name="design" value="-nolabel"/>
<span>Without label</span>
</label>
</li>
</ul>
</div>
</fieldset>
</form>
</div>
<div class="row">
<form>
<fieldset>
<legend>Choose the language</legend>
<div class="input">
<ul id="langlist" class="inputs-list">
<li>
<label>
<input type="radio" name="design" checked value=""/>
<span>Automatic</span>
</label>
</li>
<li>
<label>
<input type="radio" name="design" value="de"/>
<span>German</span>
</label>
</li>
</ul>
</div>
</fieldset>
</form>
</div>
</div>
</div>
</div>
<div class="row" id="tcontainer">
<div class="span15 offset1">
<p>Copy and paste the following HTML markup on your website/blog/…:</p>
<code id="t">...</code>
</div>
</div>
</div>
<footer>
<p>This site is developed and operated by members of the openSUSE community.</p>
<p>openSUSE is a registered trademark of Novell, Inc.</p>
<p>This page is not affiliated with Novell, Inc.</p>
</footer>
</div>
</body>
</html>