Merge branch 'mistletoe' of https://github.com/Aevann1/Drama into mistletoe

master
kek7198 2021-11-25 16:09:26 -06:00
commit f661530439
6 changed files with 5913 additions and 17 deletions

View File

@ -123,6 +123,10 @@ def before_request():
elif "Mobile/" in ua: g.system="ios/webview"
else: g.system="other/other"
@app.get('/tw')
def get_tailwind():
return render_template('tailwind.html')
@app.teardown_appcontext
def teardown_request(error):
if hasattr(g, 'db') and g.db:

File diff suppressed because it is too large Load Diff

View File

@ -1,11 +0,0 @@
module.exports = {
purge: [],
darkMode: false, // or 'media' or 'class'
theme: {
extend: {},
},
variants: {
extend: {},
},
plugins: [],
}

View File

@ -0,0 +1,17 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{% assets 'css' %}
<link rel="stylesheet" href="{{ ASSET_URL }}">
{% endassets %}
<title>Flask + Tailwind CSS</title>
</head>
<body class="bg-blue-100">
<h1 class="text-gray-700 font-bold text-3xl">hello world</h1>
</body>
</html>

View File

@ -4,11 +4,12 @@ module.exports = (ctx) => ({
plugins: [
require('tailwindcss')(path.resolve(__dirname, 'tailwind.config.js')),
require('autoprefixer'),
require('@fullhuman/postcss-purgecss')({
content: [
path.resolve(__dirname, 'templates/**/*.html')
],
defaultExtractor: content => content.match(/[A-Za-z0-9-_:/]+/g) || []
})
//require('@fullhuman/postcss-purgecss')({
// content: [
// path.resolve(__dirname, 'templates/**/*.html'),
// path.resolve(__dirname, 'templates/*.html')
// ],
// defaultExtractor: content => content.match(/[A-Za-z0-9-_:/]+/g) || []
//})
],
});

29
tailwind.config.js 100644
View File

@ -0,0 +1,29 @@
const colors = require('tailwindcss/colors')
module.exports = {
//mode: 'jit',
//purge: [
// '../../templates/**/*.html',
// '../../templates/*.html'
//],*/
darkMode: 'class', // or 'media' or 'class'
theme: {
colors: {
transparent: 'transparent',
current: 'currentColor',
black: colors.black,
white: colors.white,
gray: colors.gray,
pink: colors.pink,
green: colors.green,
red: colors.rose,
yellow: colors.amber,
blue: colors.blue
},
extend: {},
},
variants: {
extend: {},
},
plugins: [],
}