diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index 58769f3..e22fad9 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -13,10 +13,7 @@ jobs: uses: actions/checkout@v3 - name: Install Tailwind and build run: | - cd ./themes/bluewater npm install - npm run build - cd ../.. - name: Setup Hugo uses: peaceiris/actions-hugo@v2 with: diff --git a/package.json b/package.json index d4f1aef..a1ba7be 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,10 @@ "author": "", "license": "ISC", "devDependencies": { + "@tailwindcss/cli": "^4.1.18", + "@tailwindcss/typography": "^0.5.19", "prettier": "^2.7.1", - "prettier-plugin-go-template": "0.0.13" + "prettier-plugin-go-template": "0.0.13", + "tailwindcss": "^4.1.18" } } diff --git a/themes/bluewater/assets/css/main.css b/themes/bluewater/assets/css/main.css new file mode 100644 index 0000000..6621f19 --- /dev/null +++ b/themes/bluewater/assets/css/main.css @@ -0,0 +1,27 @@ +@import "tailwindcss"; +@source "hugo_stats.json"; +@theme { + --color-primary-300: oklch(95.62% 0.0207 261.77); + --color-primary-400: oklch(71.92% 0.1176 261.69); + --color-primary-500: oklch(55.71% 0.1353 261.55); + --color-primary-600: oklch(40.02% 0.1117 261.27); + --color-primary-700: oklch(15.31% 0.0193 258.38); + --color-secondary-300: oklch(97.87% 0.031 160.25); + --color-secondary-400: oklch(86.39% 0.1535 156.39); + --color-secondary-500: oklch(74.71% 0.1693 153.7); + --color-secondary-600: oklch(56.47% 0.1374 152.54); + --color-secondary-700: oklch(18.31% 0.0283 156.39); + --color-tertiary-300: oklch(94.76% 0.03079683825198993 304.2711120183577); + --color-tertiary-400: oklch(67.95% 0.1701 301.1); + --color-tertiary-500: oklch(52.03% 0.1902 298.58); + --color-tertiary-600: oklch(37.19% 0.1536 297.45); + --color-tertiary-700: oklch(14.6% 0.0313 303.08); +} + +@layer base { + .font-outline-1 { + -webkit-text-stroke: 0.25px black; + } + } + +@plugin "@tailwindcss/typography"; \ No newline at end of file diff --git a/themes/bluewater/layouts/_default/baseof.html b/themes/bluewater/layouts/_default/baseof.html index cadb27a..f0b6ed2 100644 --- a/themes/bluewater/layouts/_default/baseof.html +++ b/themes/bluewater/layouts/_default/baseof.html @@ -25,7 +25,7 @@ id="to-top-button" onclick="goToTop()" title="Go To Top" - class="hidden md:hidden fixed z-90 bottom-6 right-8 border-0 w-16 h-16 rounded-full drop-shadow-md hover:bg-primary-500 border-4 border-white bg-primary-400 text-white text-4xl font-bold" + class="hidden md:hidden fixed z-90 bottom-6 right-8 w-16 h-16 rounded-full drop-shadow-md hover:bg-primary-500 border-4 border-white bg-primary-400 text-white text-4xl font-bold" > ↑ diff --git a/themes/bluewater/layouts/partials/css.html b/themes/bluewater/layouts/partials/css.html new file mode 100644 index 0000000..c335294 --- /dev/null +++ b/themes/bluewater/layouts/partials/css.html @@ -0,0 +1,12 @@ +{{ with resources.Get "css/main.css" }} + {{ $opts := dict "minify" (not hugo.IsDevelopment) }} + {{ with . | css.TailwindCSS $opts }} + {{ if hugo.IsDevelopment }} + + {{ else }} + {{ with . | fingerprint }} + + {{ end }} + {{ end }} + {{ end }} +{{ end }} \ No newline at end of file diff --git a/themes/bluewater/layouts/partials/head.html b/themes/bluewater/layouts/partials/head.html index a3ad487..f05d688 100644 --- a/themes/bluewater/layouts/partials/head.html +++ b/themes/bluewater/layouts/partials/head.html @@ -3,7 +3,9 @@ Knäckebootcrew {{ $styles := resources.Get "style.css" }} - + {{ with (templates.Defer (dict "key" "global")) }} + {{ partial "css.html" . }} + {{ end }} diff --git a/themes/bluewater/theme.toml b/themes/bluewater/theme.toml index ef2b2d6..7545f28 100644 --- a/themes/bluewater/theme.toml +++ b/themes/bluewater/theme.toml @@ -19,3 +19,21 @@ min_version = "0.41.0" name = "" homepage = "" repo = "" + +[build] + [build.buildStats] + enable = true + [[build.cachebusters]] + source = 'assets/notwatching/hugo_stats\.json' + target = 'css' + [[build.cachebusters]] + source = 'tailwind\.config\.js' + target = 'css' +[module] + [[module.mounts]] + source = 'assets' + target = 'assets' + [[module.mounts]] + disableWatch = true + source = 'hugo_stats.json' + target = 'assets/notwatching/hugo_stats.json'