postcss and scripts

This commit is contained in:
Per Stark
2024-12-30 12:13:36 +01:00
parent c3ec25cc44
commit d5cf81edbe
6 changed files with 4716 additions and 2153 deletions

File diff suppressed because one or more lines are too long

View File

@@ -13,7 +13,6 @@
packages = [ packages = [
pkgs.openssl pkgs.openssl
pkgs.nodejs pkgs.nodejs
pkgs.nodePackages.tailwindcss
]; ];
# https://devenv.sh/languages/ # https://devenv.sh/languages/
@@ -35,7 +34,6 @@
# https://devenv.sh/processes/ # https://devenv.sh/processes/
processes = { processes = {
surreal_db.exec = "docker run --rm --pull always -p 8000:8000 --net=host --user $(id -u) -v $(pwd)/database:/database surrealdb/surrealdb:latest-dev start rocksdb:/database/database.db --user root_user --pass root_password"; surreal_db.exec = "docker run --rm --pull always -p 8000:8000 --net=host --user $(id -u) -v $(pwd)/database:/database surrealdb/surrealdb:latest-dev start rocksdb:/database/database.db --user root_user --pass root_password";
# tailwind_css.exec = "tailwindcss --input assets/input.css --output assets/style.css -w > tailwind.log 2>&1";
}; };
services = { services = {

4697
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +1,18 @@
{ {
"scripts": {
"build:css": "postcss assets/input.css -o assets/style.css",
"watch:css": "postcss assets/input.css -o assets/style.css --watch",
"build:tailwind": "tailwindcss --input assets/input.css --output assets/style.css",
"watch:tailwind": "tailwindcss --input assets/input.css --output assets/style.css --watch",
"dev": "npm-run-all --parallel watch:css watch:tailwind"
},
"devDependencies": { "devDependencies": {
"daisyui": "^4.12.20" "autoprefixer": "^10.4.20",
"cssnano": "^7.0.6",
"daisyui": "^4.12.23",
"npm-run-all": "^4.1.5",
"postcss": "^8.4.49",
"postcss-cli": "^11.0.0",
"tailwindcss": "^3.4.17"
} }
} }

9
postcss.config.js Normal file
View File

@@ -0,0 +1,9 @@
module.exports = {
plugins: [
require('tailwindcss'),
require('autoprefixer'),
require('cssnano')({
preset: 'default', // Minify CSS
}),
],
};

View File

@@ -1,7 +1,7 @@
{% extends "body_base.html" %} {% extends "body_base.html" %}
{% block main %} {% block main %}
{% if user %} {% if user %}
<p>HI</p> <p class="text-blue-950">HI</p>
{% else %} {% else %}
<div class="flex flex-col items-center justify-center min-h-[80vh] space-y-8"> <div class="flex flex-col items-center justify-center min-h-[80vh] space-y-8">
<!-- Hero Section --> <!-- Hero Section -->
@@ -31,4 +31,4 @@
</div> </div>
</div> </div>
{% endif %} {% endif %}
{% endblock %} {% endblock %}