-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathview.php
141 lines (116 loc) · 4.65 KB
/
view.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
<?php
/**
* Simple HTML template for displaying the generated SVG.
*
* Copyright 2024 by Fenrikur <nosecounter(at)fenrikur.de>
*/
$output = <<< EOF
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Nosecounter {$nosecounterData->year}</title>
<style type="text/css">
@keyframes appear {
from {opacity: 0; max-height: 0;}
to {opacity: 100; max-height: 90ex;}
}
body {
font-family: sans-serif;
}
label {
font-size: 140%;
font-weight: bold;
}
input[type=checkbox] {
display: none;
}
input[type=checkbox] ~ label::before {
content: "+";
padding-right: 1ex;
color: #777;
}
input[type=checkbox]:checked ~ label::before {
content: "–";
padding-right: 1ex;
color: #777;
}
input[type=checkbox] ~ div {
display: none;
}
input[type=checkbox]:checked ~ div {
display: block;
animation-name: appear;
animation-timing-function: ease-in-out;
animation-duration: 2s;
}
.nosecounter-box {
font-weight: bold;
border: 1px solid #222;
background-color: #eee;
padding: 1ex;
margin: 1em 0;
display: table;
}
</style>
</head>
<body>
<h1>Nosecounter {$nosecounterData->year}</h1>
<div id="nosecounter-statusbar" class="nosecounter-box">
{$nosecounterData->statusbar}
</div>
<div>
<input type="checkbox" id="nosecounter-regs" /><label for="nosecounter-regs">Registrations per {$nosecounterData->registrationsInterval}</label>
<div><embed src="{$nosecounterData->registrations}" type="image/svg+xml" style="width: 100%" /></div>
</div>
<div>
<input type="checkbox" id="nosecounter-status" /><label for="nosecounter-status">Attendance by Status</label>
<div><embed src="{$nosecounterData->status}" type="image/svg+xml" style="width: 100%" /></div>
</div>
<div>
<input type="checkbox" id="nosecounter-country" /><label for="nosecounter-country">Attendance by Country</label>
<div><embed src="{$nosecounterData->country}" type="image/svg+xml" style="width: 100%" /></div>
</div>
<div>
<input type="checkbox" id="nosecounter-country-cmp" /><label for="nosecounter-country-cmp">Attendance by Country (Comparison)</label>
<div><embed src="{$nosecounterData->countryComparison}" type="image/svg+xml" style="width: 100%" /></div>
</div>
<div>
<input type="checkbox" id="nosecounter-gender" /><label for="nosecounter-gender">Attendance by Gender</label>
<div><embed src="{$nosecounterData->gender}" type="image/svg+xml" style="width: 100%" /></div>
</div>
<div>
<input type="checkbox" id="nosecounter-gender-cmp" /><label for="nosecounter-gender-cmp">Attendance by Gender (Comparison)</label>
<div><embed src="{$nosecounterData->genderComparison}" type="image/svg+xml" style="width: 100%" /></div>
</div>
<div>
<input type="checkbox" id="nosecounter-sponsors" /><label for="nosecounter-sponsors">Sponsors</label>
<div><embed src="{$nosecounterData->sponsors}" type="image/svg+xml" style="width: 100%" /></div>
</div>
<div>
<input type="checkbox" id="nosecounter-sponsors-cmp" /><label for="nosecounter-sponsors-cmp">Sponsors (Comparison)</label>
<div><embed src="{$nosecounterData->sponsorsComparison}" type="image/svg+xml" style="width: 100%" /></div>
</div>
<div>
<input type="checkbox" id="nosecounter-age" /><label for="nosecounter-age">Age Distribution</label>
<div><embed src="{$nosecounterData->age}" type="image/svg+xml" style="width: 100%" /></div>
</div>
<div>
<input type="checkbox" id="nosecounter-age-cmp" /><label for="nosecounter-age-cmp">Age Distribution (Comparison)</label>
<div><embed src="{$nosecounterData->ageComparison}" type="image/svg+xml" style="width: 100%" /></div>
</div>
<div>
<input type="checkbox" id="nosecounter-demographics" /><label for="nosecounter-demographics">Demographics (Comparison)</label>
<div><embed src="{$nosecounterData->demographics}" type="image/svg+xml" style="width: 100%" /></div>
</div>
<div>
<input type="checkbox" id="nosecounter-shirts" /><label for="nosecounter-shirts">T-Shirt Sizes (Comparison)</label>
<div><embed src="{$nosecounterData->shirts}" type="image/svg+xml" style="width: 100%" /></div>
</div>
<pre><p>Generated in {$nosecounterData->generatedIn} ms at {$nosecounterData->generatedAt->format('Y-m-d H:i:s P')}.</p></pre>
<div class="nosecounter-box">
Source code can be found at <a href="https://github.com/Fenrikur/Nosecounter" title="Fenrikur/Nosecounter @ GitHub">GitHub (Fenrikur/Nosecounter)</a>!
</div>
</body>
</html>
EOF;