Skip to content

Commit cc282b8

Browse files
authored
Merge pull request #1 from c-keys/animations
Animations and Stuff
2 parents d2e8651 + e0af036 commit cc282b8

File tree

2 files changed

+295
-13
lines changed

2 files changed

+295
-13
lines changed

raffle-style.css

Lines changed: 277 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,277 @@
1+
@import url(https://fonts.googleapis.com/css?family=Lato);
2+
3+
body {
4+
background: #1d1f20;
5+
color: #eee;
6+
font-family: 'Lato', sans-serif;
7+
font-size: 2em;
8+
}
9+
10+
.multi-12 {
11+
padding: 0;
12+
height: 24em;
13+
}
14+
.multi-12, .multi-12 > li, .multi-12 > li > a {
15+
line-height: 1;
16+
}
17+
.multi-12 > li {
18+
line-height: 2em;
19+
margin: 0;
20+
padding: 0;
21+
width: 25%;
22+
text-transform: uppercase;
23+
animation: fadeIn 0.5s linear;
24+
animation-fill-mode: both;
25+
list-style-type: none;
26+
}
27+
.multi-12 > li:nth-child(-n+120) {
28+
margin-left: 225%;
29+
}
30+
.multi-12 > li:nth-child(-n+108) {
31+
margin-left: 200%;
32+
}
33+
.multi-12 > li:nth-child(-n+96) {
34+
margin-left: 175%;
35+
}
36+
.multi-12 > li:nth-child(-n+84) {
37+
margin-left: 150%;
38+
}
39+
.multi-12 > li:nth-child(-n+72) {
40+
margin-left: 125%;
41+
}
42+
.multi-12 > li:nth-child(-n+60) {
43+
margin-left: 100%;
44+
}
45+
.multi-12 > li:nth-child(-n+48) {
46+
margin-left: 75%;
47+
}
48+
.multi-12 > li:nth-child(-n+36) {
49+
margin-left: 50%;
50+
}
51+
.multi-12 > li:nth-child(-n+24) {
52+
margin-left: 25%;
53+
}
54+
.multi-12 > li:nth-child(-n+12) {
55+
margin-left: 0%;
56+
}
57+
.multi-12 > li:nth-child(12n+13) {
58+
margin-top: -24em;
59+
}
60+
.multi-12 li {
61+
text-align: center;
62+
position: relative;
63+
}
64+
.multi-12 li:before {
65+
content: "";
66+
position: absolute;
67+
border-left: 1px solid #555;
68+
top: 0;
69+
bottom: 0;
70+
right: 0;
71+
}
72+
73+
li:nth-child(1) {
74+
animation-delay: 0.25s;
75+
}
76+
77+
li:nth-child(2) {
78+
animation-delay: 0.5s;
79+
}
80+
81+
li:nth-child(3) {
82+
animation-delay: 0.75s;
83+
}
84+
85+
li:nth-child(4) {
86+
animation-delay: 1s;
87+
}
88+
89+
li:nth-child(5) {
90+
animation-delay: 1.25s;
91+
}
92+
93+
li:nth-child(6) {
94+
animation-delay: 1.5s;
95+
}
96+
97+
li:nth-child(7) {
98+
animation-delay: 1.75s;
99+
}
100+
101+
li:nth-child(8) {
102+
animation-delay: 2s;
103+
}
104+
105+
li:nth-child(9) {
106+
animation-delay: 2.25s;
107+
}
108+
109+
li:nth-child(10) {
110+
animation-delay: 2.5s;
111+
}
112+
113+
li:nth-child(11) {
114+
animation-delay: 2.75s;
115+
}
116+
117+
li:nth-child(12) {
118+
animation-delay: 3s;
119+
}
120+
121+
li:nth-child(13) {
122+
animation-delay: 3.25s;
123+
}
124+
125+
li:nth-child(14) {
126+
animation-delay: 3.5s;
127+
}
128+
129+
li:nth-child(15) {
130+
animation-delay: 3.75s;
131+
}
132+
133+
li:nth-child(16) {
134+
animation-delay: 4s;
135+
}
136+
137+
li:nth-child(17) {
138+
animation-delay: 4.25s;
139+
}
140+
141+
li:nth-child(18) {
142+
animation-delay: 4.5s;
143+
}
144+
145+
li:nth-child(19) {
146+
animation-delay: 4.75s;
147+
}
148+
149+
li:nth-child(20) {
150+
animation-delay: 5s;
151+
}
152+
153+
li:nth-child(21) {
154+
animation-delay: 5.25s;
155+
}
156+
157+
li:nth-child(22) {
158+
animation-delay: 5.5s;
159+
}
160+
161+
li:nth-child(23) {
162+
animation-delay: 5.75s;
163+
}
164+
165+
li:nth-child(24) {
166+
animation-delay: 6s;
167+
}
168+
169+
li:nth-child(25) {
170+
animation-delay: 6.25s;
171+
}
172+
173+
li:nth-child(26) {
174+
animation-delay: 6.5s;
175+
}
176+
177+
li:nth-child(27) {
178+
animation-delay: 6.75s;
179+
}
180+
181+
li:nth-child(28) {
182+
animation-delay: 7s;
183+
}
184+
185+
li:nth-child(29) {
186+
animation-delay: 7.25s;
187+
}
188+
189+
li:nth-child(30) {
190+
animation-delay: 7.5s;
191+
}
192+
193+
li:nth-child(31) {
194+
animation-delay: 7.75s;
195+
}
196+
197+
li:nth-child(32) {
198+
animation-delay: 8s;
199+
}
200+
201+
li:nth-child(33) {
202+
animation-delay: 8.25s;
203+
}
204+
205+
li:nth-child(34) {
206+
animation-delay: 8.5s;
207+
}
208+
209+
li:nth-child(35) {
210+
animation-delay: 8.75s;
211+
}
212+
213+
li:nth-child(36) {
214+
animation-delay: 9s;
215+
}
216+
217+
li:nth-child(37) {
218+
animation-delay: 9.25s;
219+
}
220+
221+
li:nth-child(38) {
222+
animation-delay: 9.5s;
223+
}
224+
225+
li:nth-child(39) {
226+
animation-delay: 9.75s;
227+
}
228+
229+
li:nth-child(40) {
230+
animation-delay: 10s;
231+
}
232+
233+
li:nth-child(41) {
234+
animation-delay: 10.25s;
235+
}
236+
237+
li:nth-child(42) {
238+
animation-delay: 10.5s;
239+
}
240+
241+
li:nth-child(43) {
242+
animation-delay: 10.75s;
243+
}
244+
245+
li:nth-child(44) {
246+
animation-delay: 11s;
247+
}
248+
249+
li:nth-child(45) {
250+
animation-delay: 11.25s;
251+
}
252+
253+
li:nth-child(46) {
254+
animation-delay: 11.5s;
255+
}
256+
257+
li:nth-child(47) {
258+
animation-delay: 11.75s;
259+
}
260+
261+
li:nth-child(48) {
262+
animation-delay: 12s;
263+
}
264+
265+
@-webkit-keyframes fadeIn {
266+
0% {
267+
opacity: 0;
268+
top: 100px;
269+
}
270+
75% {
271+
opacity: 0.5;
272+
top: 0px;
273+
}
274+
100% {
275+
opacity: 1;
276+
}
277+
}

raffle.py

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import random
33
import sys
44
from random import shuffle
5+
totalWinners = 42
56
winlist = []
67
with open(sys.argv[1]) as csvfile:
78
reader = csv.DictReader(csvfile)
@@ -10,22 +11,26 @@
1011
if row['What username do you go by online?'] == '-':
1112
username = row['Ticket First Name']
1213
winlist.append(row['Number'] + " " + username)
13-
[print(thing) for thing in random.sample(winlist, len(winlist))[0:30]]
14-
slide = open('slide.html','w')
14+
[print(thing) for thing in random.sample(winlist, len(winlist))[0:totalWinners]]
15+
slide = open('winners.html','w')
1516
slide.write("""
16-
<!DOCTYPE html>
17-
<html>
18-
<head>
19-
<meta charset="UTF-8">
20-
<title>SMK Winter Meetup 2018 Winners!</title>
21-
<h1>And the winners are...</h1>
22-
</head>
23-
<body>
17+
<!doctype html>
18+
<html lang=en>
19+
<head>
20+
<meta charset=utf-8>
21+
<title>SMKmeetup Giveaway Winners!</title>
22+
<link rel="stylesheet" href="raffle-style.css">
23+
</head>
24+
<body>
25+
<h2>SMKmeetup Giveaway Winners</h2>
26+
<ul class="multi-12">
2427
""")
25-
for i in random.sample(winlist, len(winlist))[0:30]:
26-
slide.write("<p>"+i+"</p>\n")
28+
for i in random.sample(winlist, len(winlist))[0:totalWinners]:
29+
winner = i[:12] + (i[12:] and '...')
30+
slide.write("<li>"+winner+"</li>\n")
2731
slide.write("""
28-
</body>
32+
</ul>
33+
</body>
2934
</html>
3035
""")
3136
slide.close()

0 commit comments

Comments
 (0)