Skip to content

Commit 018e5c4

Browse files
committed
Add schedule
1 parent f858ffc commit 018e5c4

8 files changed

+368
-11
lines changed

RobotoSlab-VariableFont_wght.ttf

-244 KB
Binary file not shown.

index.html

+3-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414

1515
<div class="main-content">
1616
<div class="hook">
17-
<p class="hook-header">SAVE THE DATE</p>
18-
<p class="hook-description">RoboMaster Colorado starts <b style="color:#4287f5">June 14th</b> and ends <b style="color:#f54242">June 18th</b> at the <b style="color:#CFB87C">CU Boulder University Memorial Center</b></p>
17+
<p class="hook-header">IT'S ROBOT TIME</p>
18+
<p class="hook-description">RoboMaster Colorado starts <b style="color:#4287f5">June 14th</b> and ends <b style="color:#f54242">June 18th</b> at the <b style="color:#CFB87C">CU Boulder University Memorial Center</b>. The event is open to the public! Matches run from 9am-7pm each day.</p>
1919
</div>
2020
</div>
2121

@@ -24,6 +24,7 @@
2424
<li id="active" class="nav-img"><a href=""><div class="nav-link-display"><img src="media/rm-colorado-wide-black.png"></div></a></li>
2525
<li><a href="teams"><div class="nav-link-display">TEAMS</div></a></li>
2626
<li><a href="schedule"><div class="nav-link-display">SCHEDULE</div></a></li>
27+
<li><a href="upcoming-matches"><div class="nav-link-display">UPCOMING MATCHES</div></a></li>
2728
</ul>
2829
</div>
2930
</body>

sample.html

+150
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>Sheets API Quickstart</title>
5+
<meta charset="utf-8" />
6+
</head>
7+
<body>
8+
<p>Sheets API Quickstart</p>
9+
10+
<!--Add buttons to initiate auth sequence and sign out-->
11+
<button id="authorize_button" onclick="handleAuthClick()">Authorize</button>
12+
<button id="signout_button" onclick="handleSignoutClick()">Sign Out</button>
13+
14+
<pre id="content" style="white-space: pre-wrap;"></pre>
15+
16+
<script type="text/javascript">
17+
/* exported gapiLoaded */
18+
/* exported gisLoaded */
19+
/* exported handleAuthClick */
20+
/* exported handleSignoutClick */
21+
22+
// TODO(developer): Set to client ID and API key from the Developer Console
23+
const CLIENT_ID = '104110416687117444034';
24+
const API_KEY = 'MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDSlr3AV53VlaJI\nrNOaEoKzXBJZKHVv5mWcpE7TX+Rry8jA7d4QXalI60SWLLwnl+2QLAlvTbq+kyOX\nASpitNTy0YEAqScUgBS+AyOg/IpKPtxJ+NDAbqZBtG4PkdyBeZecU1Vuvj9bBLaC\n02FO49+x80FlvE1Q9MjA7h3nVTu3HUmtoPAPYi8K5lIkLwWvBTIevT8sdF7Jw1r4\n8oXZ8gzXSGbAsYjsrVeKzGG4qc/8qmeOFLScSVaeOg5kABfJ5vvgQ/YNXoIJ9zT+\nzC2mEtLcRNLX/067WHR8BhwBuRKLg7D8z9YUzpl83/WxHl7Zyu+6ZXf/aKUy+t2k\nN25l8L13AgMBAAECgf94a2UWF66pgfV1RAlKWEtk0xbHVr7tL8Qj+SY2f8m69tr/\n6XcEATWhix/0Ti6e5zNxaGfD2ktSkkK5ejhCjpb90SSP2JwAR68i+IwgAoH1K6eT\nT8K51W+SBnA+k3EEJucnp9TO/sI7ydmwLqFLiZDg6fHfEGq0CwzBDS+3CqKbBAyB\njVhnpKbbDJVZW+AbB1OQJ3qYp5cEYLIHuJ4zbaMgJ1PLEWQtJ2NDFOO4mvVC24T5\n3W/MXcefQ+UJtEuKY69oDRREd2V81B1PqRrX/mmvCsvO7A8kMN1P3YnDFDU5y97R\nEWYNpylAEwjxfzPgNZbJlxTxjNg37ta+fYrC3Z0CgYEA71J0Oboyv2UBti/QE6ZU\nrN9mJxyN6C6naPzJNknb2KURfQcnVHmwOc3Psq9gej3qxHXa6whz+Y4wCSZb6+dg\nlm4XHm6cJYQUxZ5woXsN8+mPh6tlyEK3KS2Q3Yl3BGJHPAs+MPtxKaruMo1pmzh/\ndLsIqvLxwnMyfyL2vUXF/aUCgYEA4UOuYX7iZC+Y1rdctPyE0rZ8CT7JSHLxs0mk\nPh1EcNKwiNu6EgSj6gFW90ZnuOGPioOvfvgmJ/CUb2KtmI9ta+x3lB/L/AhbaDvu\nAgIKvLseKFz9PhPuIen811x2LqkVO56cPyrDK5fSwdh0GJIZN2JXGmvVNC4NcTzE\nOS/Gm+sCgYEAkfdUdDEg6qOMm7YlzxZP5vCKuags1UQ/T0V+4+HAeS6UsBFA58Eg\nvuDMoUteKLDDE/heAaQyOC+FFM+UmRmSS63x49nK2wboNHAiehs3s2Ds7e6YMcCf\nPjpQdQ52zPG0SOcCk5WIu8VJawPdOZMICgZZjwqGcfcZAXoty9tWmxECgYEAlUcq\nukVBda7tE+0zLGTjCFgR3naTIMW7UlqM0vTGNBYLEsa5idM1ZI86uGcZuTUQ0HPv\nyq5basBNPXshGyaBFrH/lFN19DD9kheU5BPCVcuScqEc2RSQDD1pZrZJQyadgYLc\nfCe0aqET842jcdzvhPpQSpwHD6stEUt5pYP5k70CgYEA3mm2+REGE+PwlF2WpZ9+\nUCB6Wfx76ON5eltz9UNK9Tcm68BKz845mUnXw4F3DTSzqol8O+QLuu/rSq6f0IBW\nE4L/dWAjaQ+nPtZDLRjAj4cWbLlgcUipkU9sXWJZ66c8km3un7M/sQCyWv6x0k8t\nhJxGT271YXA/Iwq4WKUG6/4=';
25+
26+
// Discovery doc URL for APIs used by the quickstart
27+
const DISCOVERY_DOC = 'https://sheets.googleapis.com/$discovery/rest?version=v4';
28+
29+
// Authorization scopes required by the API; multiple scopes can be
30+
// included, separated by spaces.
31+
const SCOPES = 'https://www.googleapis.com/auth/spreadsheets.readonly';
32+
33+
let tokenClient;
34+
let gapiInited = false;
35+
let gisInited = false;
36+
37+
document.getElementById('authorize_button').style.visibility = 'hidden';
38+
document.getElementById('signout_button').style.visibility = 'hidden';
39+
40+
/**
41+
* Callback after api.js is loaded.
42+
*/
43+
function gapiLoaded() {
44+
gapi.load('client', initializeGapiClient);
45+
}
46+
47+
/**
48+
* Callback after the API client is loaded. Loads the
49+
* discovery doc to initialize the API.
50+
*/
51+
async function initializeGapiClient() {
52+
await gapi.client.init({
53+
apiKey: API_KEY,
54+
discoveryDocs: [DISCOVERY_DOC],
55+
});
56+
gapiInited = true;
57+
maybeEnableButtons();
58+
}
59+
60+
/**
61+
* Callback after Google Identity Services are loaded.
62+
*/
63+
function gisLoaded() {
64+
tokenClient = google.accounts.oauth2.initTokenClient({
65+
client_id: CLIENT_ID,
66+
scope: SCOPES,
67+
callback: '', // defined later
68+
});
69+
gisInited = true;
70+
maybeEnableButtons();
71+
}
72+
73+
/**
74+
* Enables user interaction after all libraries are loaded.
75+
*/
76+
function maybeEnableButtons() {
77+
if (gapiInited && gisInited) {
78+
document.getElementById('authorize_button').style.visibility = 'visible';
79+
}
80+
}
81+
82+
/**
83+
* Sign in the user upon button click.
84+
*/
85+
function handleAuthClick() {
86+
tokenClient.callback = async (resp) => {
87+
if (resp.error !== undefined) {
88+
throw (resp);
89+
}
90+
document.getElementById('signout_button').style.visibility = 'visible';
91+
document.getElementById('authorize_button').innerText = 'Refresh';
92+
await listMajors();
93+
};
94+
95+
if (gapi.client.getToken() === null) {
96+
// Prompt the user to select a Google Account and ask for consent to share their data
97+
// when establishing a new session.
98+
tokenClient.requestAccessToken({prompt: 'consent'});
99+
} else {
100+
// Skip display of account chooser and consent dialog for an existing session.
101+
tokenClient.requestAccessToken({prompt: ''});
102+
}
103+
}
104+
105+
/**
106+
* Sign out the user upon button click.
107+
*/
108+
function handleSignoutClick() {
109+
const token = gapi.client.getToken();
110+
if (token !== null) {
111+
google.accounts.oauth2.revoke(token.access_token);
112+
gapi.client.setToken('');
113+
document.getElementById('content').innerText = '';
114+
document.getElementById('authorize_button').innerText = 'Authorize';
115+
document.getElementById('signout_button').style.visibility = 'hidden';
116+
}
117+
}
118+
119+
/**
120+
* Print the names and majors of students in a sample spreadsheet:
121+
* https://docs.google.com/spreadsheets/d/1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms/edit
122+
*/
123+
async function listMajors() {
124+
let response;
125+
try {
126+
// Fetch first 10 files
127+
response = await gapi.client.sheets.spreadsheets.values.get({
128+
spreadsheetId: '1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms',
129+
range: 'Class Data!A2:E',
130+
});
131+
} catch (err) {
132+
document.getElementById('content').innerText = err.message;
133+
return;
134+
}
135+
const range = response.result;
136+
if (!range || !range.values || range.values.length == 0) {
137+
document.getElementById('content').innerText = 'No values found.';
138+
return;
139+
}
140+
// Flatten to string to display
141+
const output = range.values.reduce(
142+
(str, row) => `${str}${row[0]}, ${row[4]}\n`,
143+
'Name, Major:\n');
144+
document.getElementById('content').innerText = output;
145+
}
146+
</script>
147+
<script async defer src="https://apis.google.com/js/api.js" onload="gapiLoaded()"></script>
148+
<script async defer src="https://accounts.google.com/gsi/client" onload="gisLoaded()"></script>
149+
</body>
150+
</html>

schedule/RM-Colorado-Schedule.pdf

53.2 KB
Binary file not shown.

schedule/index.html

+7-4
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,20 @@
77
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
88
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap" rel="stylesheet">
99
<link href="https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap" rel="stylesheet">
10+
11+
<script src="jquery-3.7.1.min.js"></script>
12+
<script src="schedule.js"></script>
1013
</head>
1114
<body>
12-
<div class="main-content">
13-
<p class="TBD">SCHEDULE TBD</p>
14-
</div>
15+
<div class="schedule-content schedule-pdf-content">
16+
<embed class="schedule-pdf" src="RM-Colorado-Schedule.pdf#view=FitH" />
1517

1618
<div class="nav">
1719
<ul>
1820
<li class="nav-img"><a href="../"><div class="nav-link-display"><img src="../media/rm-colorado-wide-black.png"></div></a></li>
1921
<li><a href="../teams"><div class="nav-link-display">TEAMS</div></a></li>
20-
<li id="active"><a href=""><div class="nav-link-display">SCHEDULE</div></a></li>
22+
<li id="active"><a href=""><div class="nav-link-display">EVENT SCHEDULE</div></a></li>
23+
<li><a href="../upcoming-matches"><div class="nav-link-display">UPCOMING MATCHES</div></a></li>
2124
</ul>
2225
</div>
2326
</body>

styles.css

+137-3
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,14 @@ body {
1313
/* Navigation Bar */
1414
.nav {
1515
position: fixed;
16+
top: 0;
1617

1718
height: 60px;
1819
width: 100%;
1920
margin: 0;
2021
padding: 0;
2122
color: #000;
22-
font-size: 24px;
23+
font-size: 20px;
2324
display: flex;
2425
justify-content: center;
2526
flex-direction: column;
@@ -70,7 +71,7 @@ body {
7071
background-color: #eee;
7172
}
7273
.nav ul li img {
73-
height: 20px;
74+
height: 18px;
7475
}
7576
.nav #active a {
7677
color: #888;
@@ -178,7 +179,18 @@ body {
178179
margin: 12px;
179180
}
180181

181-
/* Schedule Page */
182+
/* Upcoming Matches Page */
183+
.schedule-content {
184+
position: absolute;
185+
top: 50;
186+
left: 0;
187+
width: 100%;
188+
display: flex;
189+
justify-content: flex-start;
190+
flex-direction: column;
191+
align-items: center;
192+
}
193+
182194
.tbd {
183195
font-family: "Open Sans", sans-serif;
184196
font-optical-sizing: auto;
@@ -187,4 +199,126 @@ body {
187199
font-size: 5vw;
188200

189201
margin: 0;
202+
}
203+
204+
.match-title {
205+
font-family: "Open Sans", sans-serif;
206+
font-optical-sizing: auto;
207+
font-weight: 800;
208+
font-style: normal;
209+
font-size: 2.5vw;
210+
211+
margin-top: 2vw;
212+
margin-bottom: 0.5vw;
213+
}
214+
215+
.match {
216+
font-family: "Open Sans", sans-serif;
217+
font-optical-sizing: auto;
218+
font-weight: 800;
219+
font-style: normal;
220+
221+
width: 60%;
222+
height: 8vw;
223+
text-align: center;
224+
margin-bottom: 2vw;
225+
}
226+
.match-current {
227+
font-weight: 900;
228+
font-size: 1.5vw;
229+
width: 80%;
230+
}
231+
.match-teams {
232+
height: 50%;
233+
line-height: 3vw;
234+
color: #0b0f12;
235+
}
236+
.match-current .match-teams {
237+
line-height: 4vw;
238+
}
239+
.match-type {
240+
margin: 0;
241+
margin-bottom: 0.25vw;
242+
font-size: 100%;
243+
color: #ccc;
244+
font-style: italic;
245+
}
246+
.match-red {
247+
width: 49.5%;
248+
height: 100%;
249+
float: left;
250+
text-align: left;
251+
background-color: #f54242;
252+
border-radius: 2vw 0 0 2vw;
253+
border-width: 0;
254+
border-right-width: 1%;
255+
border-color: #0b0f12;
256+
border-style: solid;
257+
box-shadow: 0 0 5px #000;
258+
}
259+
.match-blue {
260+
width: 49.5%;
261+
height: 100%;
262+
float: right;
263+
text-align: right;
264+
background-color: #4287f5;
265+
border-radius: 0 2vw 2vw 0;
266+
border-width: 0;
267+
border-left-width: 1%;
268+
border-color: #0b0f12;
269+
border-style: solid;
270+
box-shadow: 0 0 5px #000;
271+
}
272+
.match-name {
273+
font-size: 150%;
274+
font-weight: 800;
275+
276+
margin: 0 3vw;
277+
text-transform: uppercase;
278+
}
279+
.match-subinfo {
280+
margin: 0.25vw;
281+
color: #ccc;
282+
font-size: 120%;
283+
}
284+
285+
.schedule-title {
286+
font-family: "Open Sans", sans-serif;
287+
font-optical-sizing: auto;
288+
font-weight: 800;
289+
font-style: normal;
290+
font-size: 50px;
291+
292+
margin-top: 40px;
293+
margin-bottom: 10px;
294+
}
295+
296+
.schedule-embed {
297+
border: none;
298+
background: none;
299+
width: 1081px;
300+
height: 225px;
301+
overflow: visible;
302+
}
303+
304+
.schedule-link {
305+
font-family: "Open Sans", sans-serif;
306+
font-optical-sizing: auto;
307+
font-weight: 800;
308+
font-style: normal;
309+
font-size: 30px;
310+
311+
margin-top: 40px;
312+
color: lightblue;
313+
text-decoration: underline;
314+
}
315+
316+
/* Schedule Page */
317+
.schedule-pdf-content {
318+
height: 100%;
319+
}
320+
.schedule-pdf {
321+
margin-top: 50px;
322+
width: 80%;
323+
height: 80%;
190324
}

0 commit comments

Comments
 (0)