funcionando local

This commit is contained in:
José Henrique 2025-07-20 17:59:36 -03:00
parent d30fd8d30b
commit e6bc95b7e6
11 changed files with 1447 additions and 105 deletions

35
App.tsx
View File

@ -15,7 +15,7 @@ import { baseWallpapers } from './components/utils/baseWallpapers';
const defaultConfig = { const defaultConfig = {
title: 'Vision Start', title: 'Vision Start',
subtitle: 'Your personal portal to the web.', subtitle: 'Your personal portal to the web.',
backgroundUrl: '/waves.jpg', backgroundUrl: 'https://i.imgur.com/C6ynAtX.jpeg',
wallpaperBlur: 0, wallpaperBlur: 0,
wallpaperBrightness: 100, wallpaperBrightness: 100,
wallpaperOpacity: 100, wallpaperOpacity: 100,
@ -291,23 +291,22 @@ const App: React.FC = () => {
)} )}
<div className={`flex flex-col ${config.alignment === 'bottom' ? 'mt-auto' : ''} items-center`}> <div className={`flex flex-col ${config.alignment === 'bottom' ? 'mt-auto' : ''} items-center`}>
{config.title || config.subtitle && {(config.title || config.subtitle) && (
( <div className="text-center">
<div className="text-center"> <h1
<h1 className={`${getTitleSizeClass(config.titleSize)} font-extrabold text-white tracking-tighter mb-3 mt-4`}
className={`${getTitleSizeClass(config.titleSize)} font-extrabold text-white tracking-tighter mb-3 mt-4`} style={{ textShadow: '0 2px 4px rgba(0,0,0,0.5)' }}
style={{ textShadow: '0 2px 4px rgba(0,0,0,0.5)' }} >
> {config.title}
{config.title} </h1>
</h1> <p
<p className={`${getSubtitleSizeClass(config.subtitleSize)} text-slate-300`}
className={`${getSubtitleSizeClass(config.subtitleSize)} text-slate-300`} style={{ textShadow: '0 1px 3px rgba(0,0,0,0.5)' }}
style={{ textShadow: '0 1px 3px rgba(0,0,0,0.5)' }} >
> {config.subtitle}
{config.subtitle} </p>
</p> </div>
</div> )}
)}
</div> </div>
<div className="flex flex-col gap-8 w-full mt-16"> <div className="flex flex-col gap-8 w-full mt-16">

View File

@ -20,6 +20,6 @@ export const baseWallpapers: Wallpaper[] = [
}, },
{ {
name: 'Waves', name: 'Waves',
url: 'waves.jpg', url: '/waves.jpg',
}, },
]; ];

1
index.css Normal file
View File

@ -0,0 +1 @@
@import "tailwindcss";

View File

@ -4,19 +4,8 @@
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vision Start</title> <title>Vision Start</title>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700&display=swap" rel="stylesheet">
<script type="importmap">
{
"imports": {
"react": "https://esm.sh/react@^19.1.0",
"react-dom/": "https://esm.sh/react-dom@^19.1.0/",
"react/": "https://esm.sh/react@^19.1.0/"
}
}
</script>
<link rel="stylesheet" href="/index.css"> <link rel="stylesheet" href="/index.css">
</head> </head>
<body class="bg-black"> <body class="bg-black">

View File

@ -1,7 +1,7 @@
import React from 'react'; import React from 'react';
import ReactDOM from 'react-dom/client'; import ReactDOM from 'react-dom/client';
import App from './App'; import App from './App';
import './index.css';
const rootElement = document.getElementById('root'); const rootElement = document.getElementById('root');
if (!rootElement) { if (!rootElement) {

15
manifest.json Normal file
View File

@ -0,0 +1,15 @@
{
"manifest_version": 3,
"name": "Vision Startpage",
"version": "1.0",
"description": "A beautiful and customizable startpage for your browser.",
"chrome_url_overrides": {
"newtab": "index.html"
},
"permissions": [
"storage"
],
"content_security_policy": {
"extension_pages": "script-src 'self'; object-src 'self';"
}
}

1422
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -10,13 +10,19 @@
}, },
"dependencies": { "dependencies": {
"@hello-pangea/dnd": "^18.0.1", "@hello-pangea/dnd": "^18.0.1",
"@tailwindcss/vite": "^4.1.11",
"lucide-react": "^0.525.0", "lucide-react": "^0.525.0",
"react": "^19.1.0", "react": "^19.1.0",
"react-dom": "^19.1.0" "react-dom": "^19.1.0"
}, },
"devDependencies": { "devDependencies": {
"@tailwindcss/postcss": "^4.1.11",
"@types/node": "^22.14.0", "@types/node": "^22.14.0",
"@types/react": "^19.1.8", "@types/react": "^19.1.8",
"@vitejs/plugin-react": "^4.7.0",
"autoprefixer": "^10.4.21",
"postcss": "^8.5.6",
"tailwindcss": "^4.1.11",
"typescript": "~5.7.2", "typescript": "~5.7.2",
"vite": "^6.2.0" "vite": "^6.2.0"
} }

6
postcss.config.cjs Normal file
View File

@ -0,0 +1,6 @@
module.exports = {
plugins: {
'@tailwindcss/postcss': {}, // ← use the new package name
autoprefixer: {},
}
}

11
tailwind.config.js Normal file
View File

@ -0,0 +1,11 @@
/** @type {import('tailwindcss').Config} */
export default {
content: [
"./index.html",
"./**/*.{js,ts,jsx,tsx}",
],
theme: {
extend: {},
},
plugins: [],
}

View File

@ -1,14 +1,27 @@
import path from 'path';
import { defineConfig, loadEnv } from 'vite';
export default defineConfig(({ mode }) => { import { defineConfig } from 'vite'
const env = loadEnv(mode, '.', ''); import react from '@vitejs/plugin-react'
return { import tailwindcss from '@tailwindcss/vite'
define: { }, import { resolve } from 'path'
resolve: {
alias: { // https://vitejs.dev/config/
'@': path.resolve(__dirname, '.'), export default defineConfig({
} plugins: [react(), tailwindcss()],
build: {
rollupOptions: {
input: {
index: resolve(__dirname, 'index.html'),
},
output: {
entryFileNames: 'assets/[name].js',
chunkFileNames: 'assets/[name].js',
assetFileNames: 'assets/[name].[ext]'
} }
}; },
}); // Ensure CSS is extracted to a separate file
cssCodeSplit: false,
},
// Base path for Chrome extension
base: './',
})