Skip to content

Commit f97b759

Browse files
committed
Add django-tailwind library and initial configuration.
1 parent cd3c9b9 commit f97b759

File tree

10 files changed

+2180
-1
lines changed

10 files changed

+2180
-1
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,3 +209,4 @@ assets/
209209
node_modules
210210

211211
djangosnippets/static/css/site.css
212+
theme/static/css/dist/styles.css

djangosnippets/settings/base.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ def user_url(user):
6161
"comments_spamfighter",
6262
"ratings",
6363
"taggit",
64+
"tailwind",
65+
"theme",
6466
"django_recaptcha",
6567
"django_extensions",
6668
"rest_framework",
@@ -104,6 +106,7 @@ def user_url(user):
104106
STATIC_URL = "/assets/static/"
105107
STATIC_ROOT = os.path.join(PROJECT_ROOT, "..", "assets", "static")
106108
STATICFILES_DIRS = (os.path.join(PROJECT_ROOT, "static"),)
109+
TAILWIND_APP_NAME = "theme"
107110

108111
SESSION_ENGINE = "django.contrib.sessions.backends.cached_db"
109112
MESSAGE_STORAGE = "django.contrib.messages.storage.session.SessionStorage"

djangosnippets/templates/base.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{% load static %}<!DOCTYPE html>
1+
{% load static tailwind_tags %}<!DOCTYPE html>
22
<html lang="en">
33
<head>
44
<title>djangosnippets: {% block head_title %}Home{% endblock %}</title>
@@ -10,6 +10,7 @@
1010
<link href="{% static "css/site.css" %}" rel="stylesheet">
1111
<link rel="stylesheet" href="{% static "css/main.css" %}" type="text/css" />
1212
{% block feeds %}{% endblock %}
13+
{% tailwind_css %}
1314
</head>
1415
<body class="{% block bodyclass %}{% endblock %}">
1516
<div id="accountbar"><div class="inner">

requirements/base.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ django-generic-aggregation==0.4.0
88
django-ratelimit-backend==2.0
99
django-recaptcha==4.1.0
1010
django-taggit==5.0.1
11+
django-tailwind==4.0.1
1112
ipython==7.33.0
1213
Markdown==3.4.4
1314
Pillow==9.1.0

theme/__init__.py

Whitespace-only changes.

theme/apps.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
from django.apps import AppConfig
2+
3+
4+
class ThemeConfig(AppConfig):
5+
name = 'theme'

theme/static_src/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

0 commit comments

Comments
 (0)