Skip to content

Commit e3effc0

Browse files
authored
Merge pull request #162 from sandiegopython/davidfischer/switch-to-tailwind
Switch to tailwind
2 parents 64ffe23 + 0e66a31 commit e3effc0

21 files changed

+1742
-10644
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ COPY . /code/
3838

3939
# Build JS/static assets
4040
RUN --mount=type=cache,target=/root/.npm npm install
41-
RUN npm run build
41+
RUN npm run dist
4242

4343
RUN python manage.py collectstatic --noinput --clear
4444

Procfile

Lines changed: 0 additions & 1 deletion
This file was deleted.

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ This is the repository for the San Diego Python website at [sandiegopython.org](
1616

1717
```shell
1818
pip install -r requirements/local.txt # Install local Python requirements
19-
npm install # Install node dependencies for CSS/JS compiling
20-
npm run build # Build CSS/JS
19+
npm install # Install JS dependencies for frontend CSS/JS
20+
npm run build # Build CSS (continuously with `npm run watch`)
2121
pre-commit install # Setup code standard pre-commit hook
2222
./manage.py migrate # Create a local development database
2323
./manage.py createsuperuser # Create a local development administrator user

assets/src/index.js

Lines changed: 0 additions & 19 deletions
This file was deleted.

assets/src/input.css

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
@tailwind base;
2+
3+
/* https://tailwindcss.com/docs/preflight#extending-preflight */
4+
/* https://tailwindcss.com/docs/adding-custom-styles#adding-base-styles */
5+
@layer base {
6+
h1 {
7+
@apply text-4xl;
8+
}
9+
h2 {
10+
@apply text-2xl;
11+
}
12+
h3 {
13+
@apply text-xl;
14+
}
15+
16+
a {
17+
@apply text-sky-600;
18+
}
19+
a:hover, a:active {
20+
@apply underline;
21+
}
22+
23+
blockquote,
24+
dl,
25+
dd,
26+
h1,
27+
h2,
28+
h3,
29+
h4,
30+
h5,
31+
h6,
32+
hr,
33+
figure,
34+
p,
35+
ul,
36+
pre {
37+
@apply mb-4;
38+
}
39+
}
40+
41+
@tailwind components;
42+
@tailwind utilities;

assets/src/sass/_theme.scss

Lines changed: 0 additions & 35 deletions
This file was deleted.

assets/src/sass/_variables.scss

Lines changed: 0 additions & 1 deletion
This file was deleted.

assets/src/sass/index.scss

Lines changed: 0 additions & 4 deletions
This file was deleted.

config/settings/base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,8 @@
109109
STATICFILES_DIRS = [
110110
os.path.join(BASE_DIR, "assets", "dist"),
111111
os.path.join(BASE_DIR, "pythonsd", "static"),
112+
# Only available after running `npm install`
113+
os.path.join(BASE_DIR, "node_modules/htmx.org/dist"),
112114
]
113115

114116
STORAGES = {
@@ -172,13 +174,11 @@
172174
"console-verbose": {
173175
"level": "DEBUG",
174176
"class": "logging.StreamHandler",
175-
"filters": ["require_debug_true"],
176177
"formatter": "verbose",
177178
},
178179
"console": {
179180
"level": "DEBUG",
180181
"class": "logging.StreamHandler",
181-
"filters": ["require_debug_true"],
182182
"formatter": "succinct",
183183
},
184184
"django.server": {

0 commit comments

Comments
 (0)