├── MIT_LICENSE
├── README.md
├── docs
├── .gitignore
├── README.txt
├── next.config.js
├── package.json
├── pages
│ └── .gitkeep
├── public
│ └── index.html
└── yarn.lock
├── fonts.css
└── theme.css
/MIT_LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2015-2022 Hack Club
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy of
6 | this software and associated documentation files (the "Software"), to deal in
7 | the Software without restriction, including without limitation the rights to
8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9 | the Software, and to permit persons to whom the Software is furnished to do so,
10 | subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Hack Club CSS
2 |
3 | [Hack Club](https://hackclub.com/)'s [theme](https://theme.hackclub.com) implemented as CSS.
4 | - Use our [css-starter](https://github.com/hackclub/css-starter) for a blank but ready website template that already includes our theme CSS.
5 | - View the [contribute](https://github.com/hackclub/contribute) repository for an example of our CSS theme [in action](https://contribute.hackclub.com/).
6 |
7 | ## Getting Started with Hack Club CSS
8 |
9 | 1. Create a new folder for your site
10 | 2. Add a `style.css` file inside your folder
11 | 3. Add an `index.html` page inside your folder
12 | 4. Link to the CSS files in the `
` tag of your HTML:
13 | ```html
14 |
15 |
16 | ```
17 | 5. View https://theme.hackclub.com/ for a visual representation of our theme
18 | 6. View https://github.com/hackclub/css#usage for the documentation of the tags in our theme
19 | 7. Run your static site locally with `python -m SimpleHTTPServer` and view it at `http://localhost:8000/`
20 | 8. Have fun and get creative making websites!
21 |
22 | ## Development
23 |
24 | To run the site locally, follow the steps below:
25 |
26 | 1. Clone the repository:
27 | ```sh
28 | git clone https://github.com/hackclub/css.git
29 | ```
30 |
31 | 2. Start up a server (or open the `index.html` file in your browser):
32 |
33 | ```sh
34 | python -m SimpleHTTPServer
35 | ```
36 |
37 | And then visit http://0.0.0.0:8000 to see the site!
38 |
39 | ## Accessing The Stylesheets
40 |
41 | Get the latest theme stylesheet: [`css.hackclub.com/theme.css`](https://css.hackclub.com/theme.css)
42 |
43 | Get the latest minified theme stylesheet: [`css.hackclub.com/theme.min.css`](https://css.hackclub.com/theme.min.css)
44 |
45 | (HQ-only) Get the latest fonts stylesheet: [`css.hackclub.com/fonts.css`](https://css.hackclub.com/fonts.css)
46 |
47 | (HQ-only) Get the latest minified fonts stylesheet: [`css.hackclub.com/fonts.min.css`](https://css.hackclub.com/fonts.min.css)
48 |
49 | ### Archives
50 |
51 | To access `theme.css` at commit ID `d0888dc` use [`css.hackclub.com/d0888dc/theme.css`](https://css.hackclub.com/d0888dc/theme.css).
52 |
53 | Similarly, to access `fonts.min.css` at commit SHA `cbe01ca9a4de7bc7a5b1048d887287dfedba0a07` use [`css.hackclub.com/cbe01ca9a4de7bc7a5b1048d887287dfedba0a07/fonts.min.css`](https://css.hackclub.com/cbe01ca9a4de7bc7a5b1048d887287dfedba0a07/fonts.min.css).
54 |
55 | This can be done for every commit in this repository.
56 |
57 | ## Usage
58 |
59 | The stylesheet places light styling on the following tags: ``, ``, ``, ``, ``, ``, ``, ``, `` , ``, ``, ``, ``, ``, ``, ``, ``, ``, `
`, `
` & `
`.
60 |
61 | More opinionated theming is provided by addition classes. CSS variables enable more refined styling by the developer.
62 |
63 | ### Classes
64 |
65 | #### Cards
66 |
67 | To create a card element use the `.card` class.
68 |
69 | The following modifcations are available:
70 |
71 | - `.sunken` a card without shadows and uses the `--sunken` colour
72 | - `.interactive` a card that grows on hover, to indicate the ability to click it
73 |
74 | #### Headings
75 |
76 | Headings should be created using standard `` tags.
77 |
78 | The following modifcations are available (through classes):
79 |
80 | - `.ultratitle` a very large title
81 | - `.title` a moderatly large title
82 | - `.subtitle` a smaller title
83 | - `.headline` for use in large bodies of text, provides margins around the title
84 | - `.subheadline` smaller version of `.headline`
85 | - `.eyebrow` a gray, all-caps title for use as an alternative visually
86 | - `.lead` has a font weight of `400`
87 | - `.caption` is for image captions
88 |
89 | #### Badges
90 |
91 | These are small rounded objects to highlight key information.
92 |
93 | The following variants are available:
94 |
95 | - `.pill` this is the standard badge with a colour background
96 | - `.outline-badge` a transparent badge
97 |
98 | #### Buttons
99 |
100 | A standard button can be created with the `` element.
101 |
102 | The following variants are available:
103 |
104 | - `.lg` larger button
105 | - `.outline` a transparent button
106 | - `.cta` a button with a gradient background to provide more emphasis
107 |
108 | #### Containers
109 |
110 | These are boxes are varying length to hold content in. Create one with the `.container` class.
111 |
112 | The widths available are: `wide`, `.container` (the standard without a modifier class), `.copy` & `.narrow`.
113 |
114 | For containers of different widths use both the `.container` class and the width modifier class (e.g `.copy`).
115 |
116 | ### CSS Variables
117 |
118 | The CSS vars made available are as follows:
119 |
120 | #### Colours
121 |
122 | ```css
123 | --darker: #121217;
124 | --dark: #17171d;
125 | --darkless: #252429;
126 | --black: #1f2d3d;
127 | --steel: #273444;
128 | --slate: #3c4858;
129 | --muted: #8492a6;
130 | --smoke: #e0e6ed;
131 | --snow: #f9fafc;
132 | --white: #ffffff;
133 | --red: #ec3750;
134 | --orange: #ff8c37;
135 | --yellow: #f1c40f;
136 | --green: #33d6a6;
137 | --cyan: #5bc0de;
138 | --blue: #338eda;
139 | --purple: #a633d6;
140 | --text: var(--black);
141 | --background: var(--white);
142 | --elevated: var(--white);
143 | --sheet: var(--snow);
144 | --sunken: var(--smoke);
145 | --border: var(--smoke);
146 | --primary: #ec3750;
147 | --secondary: #8492a6;
148 | --accent: #5bc0de;
149 | --twitter: #1da1f2;
150 | --facebook: #3b5998;
151 | --instagram: #e1306c;
152 | ```
153 |
154 | #### Breakpoints
155 |
156 | ```css
157 | --breakpoint-xs: 32em;
158 | --breakpoint-s: 48em;
159 | --breakpoint-m: 64em;
160 | --breakpoint-l: 96em;
161 | --breakpoint-xl: 128em;
162 | ```
163 |
164 | #### Spacing
165 |
166 | ```css
167 | --spacing-0: 0px;
168 | --spacing-1: 4px;
169 | --spacing-2: 8px;
170 | --spacing-3: 16px;
171 | --spacing-4: 32px;
172 | --spacing-5: 64px;
173 | --spacing-6: 128px;
174 | --spacing-7: 256px;
175 | --spacing-8: 512px;
176 | ```
177 |
178 | #### Font Sizes
179 |
180 | ```css
181 | --font-1: 12px;
182 | --font-2: 16px;
183 | --font-3: 20px;
184 | --font-4: 24px;
185 | --font-5: 32px;
186 | --font-6: 48px;
187 | --font-6: 64px;
188 | --font-7: 96px;
189 | --font-8: 128px;
190 | --font-9: 160px;
191 | --font-10: 192px;
192 | ```
193 |
194 | #### Line Heights
195 |
196 | ```css
197 | --line-height-limit: 0.875;
198 | --line-height-title: 1;
199 | --line-height-heading: 1.125;
200 | --line-height-subheading: 1.25;
201 | --line-height-caption: 1.375;
202 | --line-height-body: 1.5;
203 | ```
204 |
205 | #### Font Weights
206 |
207 | ```css
208 | --font-weight-body: 400;
209 | --font-weight-bold: 700;
210 | --font-weight-heading: var(--font-weight-bold);
211 | ```
212 |
213 | ### Letter Spacing
214 |
215 | ```css
216 | --letter-spacing-title: -0.009em;
217 | --letter-spacing-headline: 0.009em;
218 | ```
219 |
220 | #### Box Sizes (Widths)
221 |
222 | ```css
223 | --size-wide-plus: 2048px;
224 | --size-wide: 1536px;
225 | --size-layout-plus: 1200px;
226 | --size-layout: 1024px;
227 | --size-copy-ultra: 980px;
228 | --size-copy-plus: 768px;
229 | --size-copy: 680px;
230 | --size-narrow-plus: 600px;
231 | --size-narrow: 512px;
232 | ```
233 |
234 | ### Border Radii
235 |
236 | ```css
237 | --radii-small: 4px;
238 | --radii-default: 8px;
239 | --radii-extra: 12px;
240 | --radii-ultra: 16px;
241 | --radii-circle: 99999px;
242 | ```
243 |
244 | #### Shadows
245 |
246 | ```css
247 | --shadow-text: 0 1px 2px rgba(0, 0, 0, 0.25), 0 2px 4px rgba(0, 0, 0, 0.125);
248 | --shadow-small: 0 1px 2px rgba(0, 0, 0, 0.0625),
249 | 0 2px 4px rgba(0, 0, 0, 0.0625);
250 | --shadow-card: 0 4px 8px rgba(0, 0, 0, 0.125);
251 | --shadow-elevated: 0 1px 2px rgba(0, 0, 0, 0.0625),
252 | 0 8px 12px rgba(0, 0, 0, 0.125);
253 | ```
254 |
--------------------------------------------------------------------------------
/docs/.gitignore:
--------------------------------------------------------------------------------
1 | .next
2 | node_modules
--------------------------------------------------------------------------------
/docs/README.txt:
--------------------------------------------------------------------------------
1 | This a workaround hack to be able to include `.env` vars in our Vercel redirects, don't worry about touching this directory!
2 |
--------------------------------------------------------------------------------
/docs/next.config.js:
--------------------------------------------------------------------------------
1 | let productionRedirects = [
2 | {
3 | source: "/:file.css",
4 | destination: `https://cdn.jsdelivr.net/gh/hackclub/css@${
5 | process.env.VERCEL_GIT_COMMIT_SHA
6 | ? process.env.VERCEL_GIT_COMMIT_SHA
7 | : "main"
8 | }/:file.css`,
9 | permanent: false,
10 | },
11 | {
12 | source: "/:slug/:file.css",
13 | destination: "https://cdn.jsdelivr.net/gh/hackclub/css@:slug/:file.css",
14 | permanent: false,
15 | },
16 | ];
17 |
18 | const nextConfig = {
19 | trailingSlash: true,
20 | async redirects() {
21 | return process.env.VERCEL_GIT_COMMIT_SHA ? productionRedirects : [];
22 | },
23 | async rewrites() {
24 | return [{ source: "/", destination: "/index.html" }];
25 | },
26 | };
27 |
28 | module.exports = nextConfig;
29 |
--------------------------------------------------------------------------------
/docs/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@hackclub/css",
3 | "version": "0.0.1",
4 | "author": "Hack Club",
5 | "license": "MIT",
6 | "scripts": {
7 | "dev": "next dev",
8 | "build": "next build",
9 | "start": "next start",
10 | "lint": "next lint"
11 | },
12 | "dependencies": {
13 | "next": "^12.1.0",
14 | "react": "^17.0.2",
15 | "react-dom": "^17.0.2"
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/docs/pages/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hackclub/css/c5cf9c989b8cb3d3f2e15830c0f3b3e8fb42e6eb/docs/pages/.gitkeep
--------------------------------------------------------------------------------
/docs/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Hack Club CSS
6 |
7 |
8 |
9 |
10 |
11 |
15 |
19 |
23 |
24 |
25 |
26 |
27 |
28 |
138 | This is a whole paragraph of text, include
139 | code like this, as
140 | well as
141 | linked code &
142 | regular links. The paragraph
143 | ended up being 1 sentence, but now I guess it’s two.
144 |
145 |
146 | Here’s a code block! No highlighting to be found.
147 |