From 278c2ac4f5119da5226e042552b2804c626a336b Mon Sep 17 00:00:00 2001 From: Aidan Date: Sat, 15 Feb 2025 20:33:45 -0500 Subject: [PATCH] transition to tailwind v4.0.6, add gitea workflow --- .gitea/workflows/docker.yml | 30 ++++++++++++++++++++++++++++++ package.json | 5 +++-- src/css/styles.css | 22 +++++++++++++++++++--- src/views/pages/apps.ejs | 2 +- src/views/pages/home.ejs | 6 +++--- src/views/pages/modules.ejs | 2 +- src/views/templates/app.ejs | 14 +++++++------- src/views/templates/module.ejs | 14 +++++++------- tailwind.config.js | 11 ----------- 9 files changed, 71 insertions(+), 35 deletions(-) create mode 100644 .gitea/workflows/docker.yml delete mode 100644 tailwind.config.js diff --git a/.gitea/workflows/docker.yml b/.gitea/workflows/docker.yml new file mode 100644 index 0000000..ad285e5 --- /dev/null +++ b/.gitea/workflows/docker.yml @@ -0,0 +1,30 @@ +name: Build and Push Docker Image + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + build_and_push: + runs-on: ubuntu-latest + + steps: + - name: Checkout Code + uses: actions/checkout@v3 + + - name: Log in to Gitea Package Registry + run: echo "${{ secrets.PACKAGE_TOKEN }}" | docker login $SERVER_URL -u $USERNAME --password-stdin + env: + SERVER_URL: ${{ secrets.SERVER_URL }} + USERNAME: ${{ secrets.USERNAME }} + PACKAGE_TOKEN: ${{ secrets.PACKAGE_TOKEN }} + + - name: Build Docker Image + run: docker build -t git.pontusmail.org/aidan/modules:latest . + + - name: Push Docker Image + run: docker push git.pontusmail.org/aidan/modules:latest \ No newline at end of file diff --git a/package.json b/package.json index c4efcf1..5c29498 100644 --- a/package.json +++ b/package.json @@ -15,15 +15,16 @@ }, "homepage": "https://github.com/ihatenodejs/modules#readme", "scripts": { - "build:css": "tailwindcss -i ./src/css/styles.css -o ./public/css/styles.css" + "build:css": "bunx @tailwindcss/cli -i ./src/css/styles.css -o ./public/css/styles.css" }, "dependencies": { + "@tailwindcss/cli": "^4.0.6", "ejs": "^3.1.10", "express": "^4.21.2", "figlet": "^1.8.0", "helmet": "^8.0.0", "morgan": "^1.10.0", - "tailwindcss": "^3.4.17", + "tailwindcss": "^4.0.0", "validator": "^13.12.0" } } diff --git a/src/css/styles.css b/src/css/styles.css index b5c61c9..bbf4595 100644 --- a/src/css/styles.css +++ b/src/css/styles.css @@ -1,3 +1,19 @@ -@tailwind base; -@tailwind components; -@tailwind utilities; +@import 'tailwindcss'; + +/* + The default border color has changed to `currentColor` in Tailwind CSS v4, + so we've added these compatibility styles to make sure everything still + looks the same as it did with Tailwind CSS v3. + + If we ever want to remove these styles, we need to add an explicit border + color utility to any element that depends on these defaults. +*/ +@layer base { + *, + ::after, + ::before, + ::backdrop, + ::file-selector-button { + border-color: var(--color-gray-200, currentColor); + } +} diff --git a/src/views/pages/apps.ejs b/src/views/pages/apps.ejs index cb79bf5..3c66ab4 100644 --- a/src/views/pages/apps.ejs +++ b/src/views/pages/apps.ejs @@ -42,7 +42,7 @@ ===================================================================== --> - +