Skip to content

Commit 67df9c9

Browse files
committed
Add leaderboard
1 parent 7226289 commit 67df9c9

141 files changed

Lines changed: 1324 additions & 14 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

build.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,14 @@ def main() -> None:
4848
raise FileNotFoundError("CNAME file not found. Please create a CNAME file in the root directory.")
4949

5050
# load data as needed
51+
leaderboards = json.loads((ROOT / "data" / "leaderboard.json").read_text())
5152

5253
# render all pages
5354
for tpl_name, out_name in PAGES.items():
5455
tpl = env.get_template(tpl_name)
5556
html = tpl.render(
56-
title="CodeClash",
57+
title="CodeClash",
58+
leaderboards=leaderboards,
5759
)
5860
(DIST / out_name).write_text(html)
5961
print(f"built {out_name}")

css/core.css

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
/* Fonts */
2+
@import 'inter/inter.css';
3+
@import 'jersey/jersey.css';
4+
5+
/**
6+
* Design tokens and CSS variables
7+
*/
8+
:root {
9+
/* Layout */
10+
--container-width: 768px;
11+
12+
/* Typography */
13+
--font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
14+
--font-jersey: 'Jersey', serif;
15+
16+
/* Font sizes */
17+
--text-xs: 0.75rem; /* 12px */
18+
--text-sm: 0.875rem; /* 14px */
19+
--text-base: 1rem; /* 16px */
20+
--text-md: 1.125rem; /* 18px */
21+
--text-lg: 1.25rem; /* 20px */
22+
--text-xl: 1.5rem; /* 24px */
23+
--text-2xl: 1.875rem; /* 30px */
24+
--text-3xl: 2.25rem; /* 36px */
25+
26+
/* Font weights */
27+
--weight-normal: 400;
28+
--weight-medium: 500;
29+
--weight-semibold: 600;
30+
--weight-bold: 700;
31+
}
32+
33+
.jersey { font-family: var(--font-jersey); }
34+
35+
.text-xs { font-size: var(--text-xs); }
36+
.text-sm { font-size: var(--text-sm); }
37+
.text-base { font-size: var(--text-base); }
38+
.text-md { font-size: var(--text-md); }
39+
.text-lg { font-size: var(--text-lg); }
40+
.text-xl { font-size: var(--text-xl); }
41+
.text-2xl { font-size: var(--text-2xl); }
42+
.text-3xl { font-size: var(--text-3xl); }
883 KB
Binary file not shown.
854 KB
Binary file not shown.

css/inter/OFL.txt

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
Copyright 2020 The Inter Project Authors (https://github.com/rsms/inter)
2+
3+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
4+
This license is copied below, and is also available with a FAQ at:
5+
https://openfontlicense.org
6+
7+
8+
-----------------------------------------------------------
9+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
10+
-----------------------------------------------------------
11+
12+
PREAMBLE
13+
The goals of the Open Font License (OFL) are to stimulate worldwide
14+
development of collaborative font projects, to support the font creation
15+
efforts of academic and linguistic communities, and to provide a free and
16+
open framework in which fonts may be shared and improved in partnership
17+
with others.
18+
19+
The OFL allows the licensed fonts to be used, studied, modified and
20+
redistributed freely as long as they are not sold by themselves. The
21+
fonts, including any derivative works, can be bundled, embedded,
22+
redistributed and/or sold with any software provided that any reserved
23+
names are not used by derivative works. The fonts and derivatives,
24+
however, cannot be released under any other type of license. The
25+
requirement for fonts to remain under this license does not apply
26+
to any document created using the fonts or their derivatives.
27+
28+
DEFINITIONS
29+
"Font Software" refers to the set of files released by the Copyright
30+
Holder(s) under this license and clearly marked as such. This may
31+
include source files, build scripts and documentation.
32+
33+
"Reserved Font Name" refers to any names specified as such after the
34+
copyright statement(s).
35+
36+
"Original Version" refers to the collection of Font Software components as
37+
distributed by the Copyright Holder(s).
38+
39+
"Modified Version" refers to any derivative made by adding to, deleting,
40+
or substituting -- in part or in whole -- any of the components of the
41+
Original Version, by changing formats or by porting the Font Software to a
42+
new environment.
43+
44+
"Author" refers to any designer, engineer, programmer, technical
45+
writer or other person who contributed to the Font Software.
46+
47+
PERMISSION & CONDITIONS
48+
Permission is hereby granted, free of charge, to any person obtaining
49+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
50+
redistribute, and sell modified and unmodified copies of the Font
51+
Software, subject to the following conditions:
52+
53+
1) Neither the Font Software nor any of its individual components,
54+
in Original or Modified Versions, may be sold by itself.
55+
56+
2) Original or Modified Versions of the Font Software may be bundled,
57+
redistributed and/or sold with any software, provided that each copy
58+
contains the above copyright notice and this license. These can be
59+
included either as stand-alone text files, human-readable headers or
60+
in the appropriate machine-readable metadata fields within text or
61+
binary files as long as those fields can be easily viewed by the user.
62+
63+
3) No Modified Version of the Font Software may use the Reserved Font
64+
Name(s) unless explicit written permission is granted by the corresponding
65+
Copyright Holder. This restriction only applies to the primary font name as
66+
presented to the users.
67+
68+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
69+
Software shall not be used to promote, endorse or advertise any
70+
Modified Version, except to acknowledge the contribution(s) of the
71+
Copyright Holder(s) and the Author(s) or with their explicit written
72+
permission.
73+
74+
5) The Font Software, modified or unmodified, in part or in whole,
75+
must be distributed entirely under this license, and must not be
76+
distributed under any other license. The requirement for fonts to
77+
remain under this license does not apply to any document created
78+
using the Font Software.
79+
80+
TERMINATION
81+
This license becomes null and void if any of the above conditions are
82+
not met.
83+
84+
DISCLAIMER
85+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
86+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
87+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
88+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
89+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
90+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
91+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
92+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
93+
OTHER DEALINGS IN THE FONT SOFTWARE.

css/inter/README.txt

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
Inter Variable Font
2+
===================
3+
4+
This download contains Inter as both variable fonts and static fonts.
5+
6+
Inter is a variable font with these axes:
7+
opsz
8+
wght
9+
10+
This means all the styles are contained in these files:
11+
Inter/Inter-VariableFont_opsz,wght.ttf
12+
Inter/Inter-Italic-VariableFont_opsz,wght.ttf
13+
14+
If your app fully supports variable fonts, you can now pick intermediate styles
15+
that aren’t available as static fonts. Not all apps support variable fonts, and
16+
in those cases you can use the static font files for Inter:
17+
Inter/static/Inter_18pt-Thin.ttf
18+
Inter/static/Inter_18pt-ExtraLight.ttf
19+
Inter/static/Inter_18pt-Light.ttf
20+
Inter/static/Inter_18pt-Regular.ttf
21+
Inter/static/Inter_18pt-Medium.ttf
22+
Inter/static/Inter_18pt-SemiBold.ttf
23+
Inter/static/Inter_18pt-Bold.ttf
24+
Inter/static/Inter_18pt-ExtraBold.ttf
25+
Inter/static/Inter_18pt-Black.ttf
26+
Inter/static/Inter_24pt-Thin.ttf
27+
Inter/static/Inter_24pt-ExtraLight.ttf
28+
Inter/static/Inter_24pt-Light.ttf
29+
Inter/static/Inter_24pt-Regular.ttf
30+
Inter/static/Inter_24pt-Medium.ttf
31+
Inter/static/Inter_24pt-SemiBold.ttf
32+
Inter/static/Inter_24pt-Bold.ttf
33+
Inter/static/Inter_24pt-ExtraBold.ttf
34+
Inter/static/Inter_24pt-Black.ttf
35+
Inter/static/Inter_28pt-Thin.ttf
36+
Inter/static/Inter_28pt-ExtraLight.ttf
37+
Inter/static/Inter_28pt-Light.ttf
38+
Inter/static/Inter_28pt-Regular.ttf
39+
Inter/static/Inter_28pt-Medium.ttf
40+
Inter/static/Inter_28pt-SemiBold.ttf
41+
Inter/static/Inter_28pt-Bold.ttf
42+
Inter/static/Inter_28pt-ExtraBold.ttf
43+
Inter/static/Inter_28pt-Black.ttf
44+
Inter/static/Inter_18pt-ThinItalic.ttf
45+
Inter/static/Inter_18pt-ExtraLightItalic.ttf
46+
Inter/static/Inter_18pt-LightItalic.ttf
47+
Inter/static/Inter_18pt-Italic.ttf
48+
Inter/static/Inter_18pt-MediumItalic.ttf
49+
Inter/static/Inter_18pt-SemiBoldItalic.ttf
50+
Inter/static/Inter_18pt-BoldItalic.ttf
51+
Inter/static/Inter_18pt-ExtraBoldItalic.ttf
52+
Inter/static/Inter_18pt-BlackItalic.ttf
53+
Inter/static/Inter_24pt-ThinItalic.ttf
54+
Inter/static/Inter_24pt-ExtraLightItalic.ttf
55+
Inter/static/Inter_24pt-LightItalic.ttf
56+
Inter/static/Inter_24pt-Italic.ttf
57+
Inter/static/Inter_24pt-MediumItalic.ttf
58+
Inter/static/Inter_24pt-SemiBoldItalic.ttf
59+
Inter/static/Inter_24pt-BoldItalic.ttf
60+
Inter/static/Inter_24pt-ExtraBoldItalic.ttf
61+
Inter/static/Inter_24pt-BlackItalic.ttf
62+
Inter/static/Inter_28pt-ThinItalic.ttf
63+
Inter/static/Inter_28pt-ExtraLightItalic.ttf
64+
Inter/static/Inter_28pt-LightItalic.ttf
65+
Inter/static/Inter_28pt-Italic.ttf
66+
Inter/static/Inter_28pt-MediumItalic.ttf
67+
Inter/static/Inter_28pt-SemiBoldItalic.ttf
68+
Inter/static/Inter_28pt-BoldItalic.ttf
69+
Inter/static/Inter_28pt-ExtraBoldItalic.ttf
70+
Inter/static/Inter_28pt-BlackItalic.ttf
71+
72+
Get started
73+
-----------
74+
75+
1. Install the font files you want to use
76+
77+
2. Use your app's font picker to view the font family and all the
78+
available styles
79+
80+
Learn more about variable fonts
81+
-------------------------------
82+
83+
https://developers.google.com/web/fundamentals/design-and-ux/typography/variable-fonts
84+
https://variablefonts.typenetwork.com
85+
https://medium.com/variable-fonts
86+
87+
In desktop apps
88+
89+
https://theblog.adobe.com/can-variable-fonts-illustrator-cc
90+
https://helpx.adobe.com/nz/photoshop/using/fonts.html#variable_fonts
91+
92+
Online
93+
94+
https://developers.google.com/fonts/docs/getting_started
95+
https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Fonts/Variable_Fonts_Guide
96+
https://developer.microsoft.com/en-us/microsoft-edge/testdrive/demos/variable-fonts
97+
98+
Installing fonts
99+
100+
MacOS: https://support.apple.com/en-us/HT201749
101+
Linux: https://www.google.com/search?q=how+to+install+a+font+on+gnu%2Blinux
102+
Windows: https://support.microsoft.com/en-us/help/314960/how-to-install-or-remove-a-font-in-windows
103+
104+
Android Apps
105+
106+
https://developers.google.com/fonts/docs/android
107+
https://developer.android.com/guide/topics/ui/look-and-feel/downloadable-fonts
108+
109+
License
110+
-------
111+
Please read the full license text (OFL.txt) to understand the permissions,
112+
restrictions and requirements for usage, redistribution, and modification.
113+
114+
You can use them in your products & projects – print or digital,
115+
commercial or otherwise.
116+
117+
This isn't legal advice, please consider consulting a lawyer and see the full
118+
license for all details.

css/inter/inter.css

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
@font-face {
2+
font-family: 'Inter';
3+
src: url('Inter-VariableFont_opsz,wght.ttf') format('truetype-variations');
4+
font-weight: 100 900;
5+
font-style: normal;
6+
font-display: swap;
7+
}
8+
9+
@font-face {
10+
font-family: 'Inter';
11+
src: url('Inter-Italic-VariableFont_opsz,wght.ttf') format('truetype-variations');
12+
font-weight: 100 900;
13+
font-style: italic;
14+
font-display: swap;
15+
}
337 KB
Binary file not shown.
341 KB
Binary file not shown.
336 KB
Binary file not shown.

0 commit comments

Comments
 (0)