Browse Source

Tailwind CSS is currently built locally rather than relying on a CDN.

pull/469/head
goodbyepavlyi 3 years ago
parent
commit
d4d4ccf638
  1. 4882
      src/package-lock.json
  2. 8
      src/package.json
  3. 6
      src/tailwind.config.js
  4. 1718
      src/www/css/app.css
  5. 1
      src/www/css/vendor/tailwind.min.css
  6. 7
      src/www/index.html
  7. 3
      src/www/src/css/app.css

4882
src/package-lock.json

File diff suppressed because it is too large

8
src/package.json

@ -7,7 +7,8 @@
"scripts": {
"serve": "DEBUG=Server,WireGuard nodemon server.js",
"serve-with-password": "PASSWORD=wg npm run serve",
"lint": "eslint ."
"lint": "eslint .",
"buildcss": "npx tailwindcss -i ./www/src/css/app.css -o ./www/css/app.css --watch"
},
"author": "Emile Nijssen",
"license": "GPL",
@ -20,7 +21,8 @@
},
"devDependencies": {
"eslint": "^7.27.0",
"eslint-config-athom": "^2.1.0"
"eslint-config-athom": "^2.1.0",
"tailwindcss": "^3.3.2"
},
"nodemonConfig": {
"ignore": [
@ -30,4 +32,4 @@
"engines": {
"node": "14"
}
}
}

6
src/tailwind.config.js

@ -0,0 +1,6 @@
/** @type {import('tailwindcss').Config} */
module.exports = {
darkMode: 'class',
content: ["./www/**/*.{html,js}"]
}

1718
src/www/css/app.css

File diff suppressed because it is too large

1
src/www/css/vendor/tailwind.min.css

File diff suppressed because one or more lines are too long

7
src/www/index.html

@ -3,19 +3,14 @@
<head>
<title>WireGuard</title>
<script src="https://cdn.tailwindcss.com"></script>
<link href="./css/app.css" rel="stylesheet">
<script>
tailwind.config = {
darkMode: 'class',
}
if (localStorage.theme === 'dark' || (!('theme' in localStorage) && window.matchMedia('(prefers-color-scheme: dark)').matches)) {
document.documentElement.classList.add('dark')
} else {
document.documentElement.classList.remove('dark')
}
</script>
<!-- <link href="./css/vendor/tailwind.min.css" rel="stylesheet"> -->
<link rel="manifest" href="./manifest.json">
<link rel="icon" type="image/png" href="./img/favicon.png">
<link rel="apple-touch-icon" href="./img/apple-touch-icon.png">

3
src/www/src/css/app.css

@ -0,0 +1,3 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
Loading…
Cancel
Save