Set up theme app with initial structure, Tailwind CSS integration, and npm dependencies
This commit is contained in:
0
theme/__init__.py
Normal file
0
theme/__init__.py
Normal file
5
theme/apps.py
Normal file
5
theme/apps.py
Normal file
@@ -0,0 +1,5 @@
|
||||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class ThemeConfig(AppConfig):
|
||||
name = 'theme'
|
||||
1
theme/static_src/.gitignore
vendored
Normal file
1
theme/static_src/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
node_modules
|
||||
1725
theme/static_src/package-lock.json
generated
Normal file
1725
theme/static_src/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
26
theme/static_src/package.json
Normal file
26
theme/static_src/package.json
Normal file
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"name": "theme",
|
||||
"version": "4.4.0",
|
||||
"description": "",
|
||||
"scripts": {
|
||||
"start": "npm run dev",
|
||||
"build": "npm run build:clean && npm run build:tailwind",
|
||||
"build:clean": "rimraf ../static/css/dist",
|
||||
"build:tailwind": "cross-env NODE_ENV=production postcss ./src/styles.css -o ../static/css/dist/styles.css --minify",
|
||||
"dev": "cross-env NODE_ENV=development postcss ./src/styles.css -o ../static/css/dist/styles.css --watch"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@tailwindcss/postcss": "^4.1.16",
|
||||
"daisyui": "^5.3.10",
|
||||
"cross-env": "^10.1.0",
|
||||
"postcss": "^8.5.6",
|
||||
"postcss-cli": "^11.0.1",
|
||||
"postcss-nested": "^7.0.2",
|
||||
"postcss-simple-vars": "^7.0.1",
|
||||
"rimraf": "^6.0.1",
|
||||
"tailwindcss": "^4.1.16"
|
||||
}
|
||||
}
|
||||
7
theme/static_src/postcss.config.js
Normal file
7
theme/static_src/postcss.config.js
Normal file
@@ -0,0 +1,7 @@
|
||||
module.exports = {
|
||||
plugins: {
|
||||
"@tailwindcss/postcss": {},
|
||||
"postcss-simple-vars": {},
|
||||
"postcss-nested": {}
|
||||
},
|
||||
}
|
||||
11
theme/static_src/src/styles.css
Normal file
11
theme/static_src/src/styles.css
Normal file
@@ -0,0 +1,11 @@
|
||||
@import "tailwindcss";
|
||||
@plugin "daisyui";
|
||||
|
||||
/**
|
||||
* A catch-all path to Django template files, JavaScript, and Python files
|
||||
* that contain Tailwind CSS classes and will be scanned by Tailwind to generate the final CSS file.
|
||||
*
|
||||
* If your final CSS file is not being updated after code changes, you may want to broaden or narrow
|
||||
* the scope of this path.
|
||||
*/
|
||||
@source "../../../**/*.{html,py,js}";
|
||||
26
theme/templates/base.html
Normal file
26
theme/templates/base.html
Normal file
@@ -0,0 +1,26 @@
|
||||
{% load static tailwind_tags %}
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Django Tailwind</title>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
{% tailwind_css %}
|
||||
</head>
|
||||
|
||||
<body class="bg-gray-50 text-black font-serif leading-normal tracking-normal">
|
||||
|
||||
<div class="toast toast-top toast-end">
|
||||
<div class="alert alert-info">
|
||||
<span>Hello from daisyUi 👋</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container mx-auto">
|
||||
<section class="flex items-center justify-center h-screen">
|
||||
<h1 class="text-5xl">Django + Tailwind = ❤️</h1>
|
||||
</section>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user