Преглед на файлове

Move to local tailwind and fix spoilers

Adam преди 5 месеца
родител
ревизия
12d12eeb7f
променени са 7 файла, в които са добавени 637 реда и са изтрити 58 реда
  1. 1 2
      index.html
  2. 623 50
      package-lock.json
  3. 2 0
      package.json
  4. 0 0
      public/TEST.md
  5. 2 1
      public/posts/index.json
  6. 7 4
      src/index.css
  7. 2 1
      vite.config.js

+ 1 - 2
index.html

@@ -5,8 +5,7 @@
     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
     <title>The Goonblog</title>
     <!-- Add this line below -->
-    <script src="https://cdn.tailwindcss.com"></script>
-    <script src="https://cdn.tailwindcss.com/typography"></script>
+    <link href="/src/style.css" rel="stylesheet">
   </head>
   <body>
     <div id="root"></div>

Файловите разлики са ограничени, защото са твърде много
+ 623 - 50
package-lock.json


+ 2 - 0
package.json

@@ -11,6 +11,7 @@
   },
   "dependencies": {
     "@digitalocean/do-markdownit": "^1.16.1",
+    "@tailwindcss/vite": "^4.1.13",
     "chokidar": "^4.0.3",
     "dompurify": "^3.2.6",
     "markdown-it": "^14.1.0",
@@ -30,6 +31,7 @@
   },
   "devDependencies": {
     "@eslint/js": "^9.33.0",
+    "@tailwindcss/cli": "^4.1.13",
     "@types/react": "^19.1.10",
     "@types/react-dom": "^19.1.7",
     "@vitejs/plugin-react": "^5.0.0",

+ 0 - 0
TEST.md → public/TEST.md


+ 2 - 1
public/posts/index.json

@@ -1,3 +1,4 @@
 [
-  "20250715.md"
+  "20250715.md",
+  "TEST.md"
 ]

+ 7 - 4
src/index.css

@@ -3,6 +3,9 @@
  * The default browser styles for <html> and <body> do not stretch to 100% height,
  * so we must set this explicitly. This allows Tailwind's min-h-screen to work correctly.
  */
+
+ @import "tailwindcss";
+
 html, body, #root {
   height: 100%;
   width: 100%;
@@ -269,13 +272,13 @@ body {
 }
 
 .markdown-content details.spoiler {
-  @apply bg-gray-800/40 border border-gray-600 rounded-lg p-3 my-4;
+  @apply bg-gray-100/60 border border-gray-200 rounded-lg p-3 my-4;
 }
 
 .markdown-content details.spoiler summary {
-  @apply cursor-pointer font-semibold text-purple-400;
+  @apply cursor-pointer font-semibold text-indigo-700;
 }
 
 .markdown-content details.spoiler[open] {
-  @apply bg-gray-900/60;
-}
+  @apply bg-gray-200/80;
+}

+ 2 - 1
vite.config.js

@@ -3,6 +3,7 @@ import react from '@vitejs/plugin-react'
 import fs from "fs";
 import path from "path";
 import chokidar from "chokidar";
+import tailwindcss from '@tailwindcss/vite';
 
 // https://vite.dev/config/
 
@@ -39,5 +40,5 @@ function generateIndexPlugin() {
 }
 
 export default defineConfig({
-  plugins: [react(),generateIndexPlugin()],
+  plugins: [react(),generateIndexPlugin(),tailwindcss()],
 })

Някои файлове не бяха показани, защото твърде много файлове са промени