Init, base deps
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'
|
||||
183889
theme/static/css/styles.css
Normal file
183889
theme/static/css/styles.css
Normal file
File diff suppressed because it is too large
Load Diff
1
theme/static/css/styles.css.map
Normal file
1
theme/static/css/styles.css.map
Normal file
File diff suppressed because one or more lines are too long
1
theme/static_src/.gitignore
vendored
Normal file
1
theme/static_src/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
node_modules
|
||||
30
theme/static_src/package.json
Normal file
30
theme/static_src/package.json
Normal file
@@ -0,0 +1,30 @@
|
||||
{
|
||||
"name": "django_tailwind",
|
||||
"description": "",
|
||||
"scripts": {
|
||||
"start": "npm run dev",
|
||||
"build": "npm run build:clean && npm run build:sass && npm run build:postcss && npm run build:cleancss",
|
||||
"build:clean": "rimraf ../static/css",
|
||||
"build:sass": "node-sass --output-style compressed src/styles.scss ../static/css/styles.css",
|
||||
"build:postcss": "cross-env NODE_ENV=production postcss --config . --map false --output ../static/css/styles.css ../static/css/styles.css",
|
||||
"build:cleancss": "cleancss -o ../static/css/styles.css ../static/css/styles.css",
|
||||
"dev": "watch \"npm run dev:sass && npm run dev:postcss\" ./src",
|
||||
"dev:sass": "node-sass --output-style expanded --source-map true src/styles.scss ../static/css/styles.css",
|
||||
"dev:postcss": "postcss --config . --map true --output ../static/css/styles.css ../static/css/styles.css"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"autoprefixer": "^10.0.2",
|
||||
"clean-css-cli": "^4.3.0",
|
||||
"cross-env": "^7.0.3",
|
||||
"node-sass": "^5.0.0",
|
||||
"postcss": "^8.1.9",
|
||||
"postcss-cli": "^8.3.0",
|
||||
"postcss-scss": "^3.0.4",
|
||||
"rimraf": "^3.0.2",
|
||||
"tailwindcss": "^2.0.1",
|
||||
"watch": "^1.0.2"
|
||||
}
|
||||
}
|
||||
12
theme/static_src/postcss.config.js
Normal file
12
theme/static_src/postcss.config.js
Normal file
@@ -0,0 +1,12 @@
|
||||
module.exports = {
|
||||
plugins: {
|
||||
tailwindcss: {},
|
||||
autoprefixer: {},
|
||||
},
|
||||
purge: [
|
||||
// Templates within theme app (e.g. base.html)
|
||||
'../templates/**/*.html',
|
||||
// Templates in other apps
|
||||
'../../templates/**/*.html',
|
||||
],
|
||||
}
|
||||
3
theme/static_src/src/styles.scss
Normal file
3
theme/static_src/src/styles.scss
Normal file
@@ -0,0 +1,3 @@
|
||||
@tailwind base;
|
||||
@tailwind components;
|
||||
@tailwind utilities;
|
||||
20
theme/static_src/tailwind.config.js
Normal file
20
theme/static_src/tailwind.config.js
Normal file
@@ -0,0 +1,20 @@
|
||||
// This is a minimal config.
|
||||
// If you need the full config, get it from here:
|
||||
// https://unpkg.com/browse/tailwindcss@latest/stubs/defaultConfig.stub.js
|
||||
module.exports = {
|
||||
purge: [
|
||||
// Templates within theme app (e.g. base.html)
|
||||
'../templates/**/*.html',
|
||||
// Templates in other apps. Uncomment the following line if it matches
|
||||
// your project structure or change it to match.
|
||||
// '../../templates/**/*.html',
|
||||
],
|
||||
darkMode: false, // or 'media' or 'class'
|
||||
theme: {
|
||||
extend: {},
|
||||
},
|
||||
variants: {
|
||||
extend: {},
|
||||
},
|
||||
plugins: [],
|
||||
}
|
||||
29
theme/templates/base.html
Normal file
29
theme/templates/base.html
Normal file
@@ -0,0 +1,29 @@
|
||||
{% load static %}
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<title>Tailwind CSS Skeleton</title>
|
||||
<meta name="description" content="">
|
||||
<meta name="keywords" content="">
|
||||
<meta name="author" content="">
|
||||
|
||||
<link rel="stylesheet" href="{% static 'css/styles.css' %}">
|
||||
</head>
|
||||
|
||||
<body class="bg-grey-lightest font-serif leading-normal tracking-normal">
|
||||
|
||||
<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