Compare commits
9 Commits
d7dec1741e
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| fbe8340210 | |||
| 55d6d494d9 | |||
| db1875a745 | |||
| 899ee3025d | |||
| 377d3d0de3 | |||
|
|
8af304ffb3 | ||
|
|
cb6cea765a | ||
|
|
ba7bbbd40e | ||
|
|
b4621e1f79 |
@@ -13,6 +13,7 @@ RUN bun run build
|
|||||||
FROM nginx:alpine
|
FROM nginx:alpine
|
||||||
|
|
||||||
COPY --from=builder /app/dist /usr/share/nginx/html
|
COPY --from=builder /app/dist /usr/share/nginx/html
|
||||||
|
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||||
|
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
|
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>testpage</title>
|
<title>Matiss Jurevics</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="root"></div>
|
<div id="root"></div>
|
||||||
|
|||||||
37
nginx.conf
Normal file
37
nginx.conf
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
server_name _;
|
||||||
|
root /usr/share/nginx/html;
|
||||||
|
index index.html;
|
||||||
|
|
||||||
|
# Gitea API proxy
|
||||||
|
location /api/gitea {
|
||||||
|
resolver 1.1.1.1 8.8.8.8 valid=300s;
|
||||||
|
resolver_timeout 5s;
|
||||||
|
|
||||||
|
rewrite ^/api/gitea(.*)$ $1 break;
|
||||||
|
proxy_pass https://git.mati.ss;
|
||||||
|
proxy_ssl_verify off;
|
||||||
|
proxy_ssl_server_name on;
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_set_header Host git.mati.ss;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
|
||||||
|
# CORS headers (if needed)
|
||||||
|
add_header Access-Control-Allow-Origin * always;
|
||||||
|
add_header Access-Control-Allow-Methods "GET, POST, OPTIONS" always;
|
||||||
|
add_header Access-Control-Allow-Headers "Authorization, Content-Type" always;
|
||||||
|
|
||||||
|
if ($request_method = OPTIONS) {
|
||||||
|
return 204;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# Serve static files
|
||||||
|
location / {
|
||||||
|
try_files $uri $uri/ /index.html;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
4
public/favicon.svg
Normal file
4
public/favicon.svg
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
|
||||||
|
<rect width="100" height="100" rx="20" fill="#000000"/>
|
||||||
|
<text x="50" y="70" font-family="Arial, sans-serif" font-weight="900" font-size="60" text-anchor="middle" fill="#ffffff">MJ</text>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 261 B |
@@ -14,6 +14,7 @@ gsap.registerPlugin(ScrollTrigger);
|
|||||||
|
|
||||||
function App() {
|
function App() {
|
||||||
const lenisRef = useRef()
|
const lenisRef = useRef()
|
||||||
|
console.log("App")
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
// Lenis setup
|
// Lenis setup
|
||||||
|
|||||||
@@ -21,12 +21,13 @@ const GlobeMesh = () => {
|
|||||||
|
|
||||||
// Detect mobile device and reduce polygon count accordingly
|
// Detect mobile device and reduce polygon count accordingly
|
||||||
const isMobile = useMemo(() => {
|
const isMobile = useMemo(() => {
|
||||||
return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ||
|
return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ||
|
||||||
(window.innerWidth <= 768);
|
(window.innerWidth <= 768);
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
// Generate Borders Texture using D3
|
// Generate Borders Texture using D3
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
let texture = null;
|
||||||
const generateTexture = async () => {
|
const generateTexture = async () => {
|
||||||
try {
|
try {
|
||||||
// Fetch World Topology (small 110m res)
|
// Fetch World Topology (small 110m res)
|
||||||
@@ -55,7 +56,7 @@ const GlobeMesh = () => {
|
|||||||
context.stroke();
|
context.stroke();
|
||||||
|
|
||||||
// Create Texture
|
// Create Texture
|
||||||
const texture = new THREE.CanvasTexture(canvas);
|
texture = new THREE.CanvasTexture(canvas);
|
||||||
texture.needsUpdate = true;
|
texture.needsUpdate = true;
|
||||||
setBordersTexture(texture);
|
setBordersTexture(texture);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
@@ -64,6 +65,10 @@ const GlobeMesh = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
generateTexture();
|
generateTexture();
|
||||||
|
|
||||||
|
return () => {
|
||||||
|
if (texture) texture.dispose();
|
||||||
|
};
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
// Ireland Coordinates
|
// Ireland Coordinates
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ const Terrain = () => {
|
|||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
// Create geometry with reduced segment count for mobile devices
|
// Create geometry with reduced segment count for mobile devices
|
||||||
const segments = isMobile ? 40 : 100; // Reduce from 100x100 to 40x40 on mobile (84% reduction)
|
const segments = isMobile ? 28 : 100; // Reduce from 100x100 to 28x28 on mobile (50% polygon reduction)
|
||||||
const geometry = useMemo(() => new THREE.PlaneGeometry(20, 20, segments, segments), [segments]);
|
const geometry = useMemo(() => new THREE.PlaneGeometry(20, 20, segments, segments), [segments]);
|
||||||
|
|
||||||
useFrame((state) => {
|
useFrame((state) => {
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ const ActivityHeatmap = () => {
|
|||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.warn("Gitea API error:", e);
|
console.warn("Gitea API error:", e);
|
||||||
|
console.error('Failed to fetch Gitea heatmap. URL:', '/api/gitea/api/v1/users/Matiss/heatmap');
|
||||||
}
|
}
|
||||||
|
|
||||||
// 3. Process & Merge
|
// 3. Process & Merge
|
||||||
|
|||||||
@@ -61,6 +61,7 @@ const GitHistory = () => {
|
|||||||
return commitsArrays.flat();
|
return commitsArrays.flat();
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.warn('Gitea history error:', err);
|
console.warn('Gitea history error:', err);
|
||||||
|
console.error('Failed to fetch Gitea history. Check if the proxy is correctly configured and the target URL is reachable.');
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -53,8 +53,12 @@ const InfoTabs = () => {
|
|||||||
|
|
||||||
{/* Content Area */}
|
{/* Content Area */}
|
||||||
<div>
|
<div>
|
||||||
{activeTab === 'location' && <WhereAmI />}
|
<div style={{ display: activeTab === 'location' ? 'block' : 'none' }}>
|
||||||
{activeTab === 'git' && <GitSection />}
|
<WhereAmI />
|
||||||
|
</div>
|
||||||
|
<div style={{ display: activeTab === 'git' ? 'block' : 'none' }}>
|
||||||
|
<GitSection />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -110,4 +110,17 @@ button:focus-visible {
|
|||||||
button {
|
button {
|
||||||
background-color: #f9f9f9;
|
background-color: #f9f9f9;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Hero Title Mobile Responsive */
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
.hero-title {
|
||||||
|
font-size: 3rem !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 480px) {
|
||||||
|
.hero-title {
|
||||||
|
font-size: 2rem !important;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -9,7 +9,19 @@ export default defineConfig({
|
|||||||
'/api/gitea': {
|
'/api/gitea': {
|
||||||
target: 'https://git.mati.ss',
|
target: 'https://git.mati.ss',
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
rewrite: (path) => path.replace(/^\/api\/gitea/, '')
|
secure: false,
|
||||||
|
rewrite: (path) => path.replace(/^\/api\/gitea/, ''),
|
||||||
|
configure: (proxy, _options) => {
|
||||||
|
proxy.on('error', (err, _req, _res) => {
|
||||||
|
console.log('proxy error', err);
|
||||||
|
});
|
||||||
|
proxy.on('proxyReq', (proxyReq, req, _res) => {
|
||||||
|
console.log('Sending Request to the Target:', req.method, req.url);
|
||||||
|
});
|
||||||
|
proxy.on('proxyRes', (proxyRes, req, _res) => {
|
||||||
|
console.log('Received Response from the Target:', proxyRes.statusCode, req.url);
|
||||||
|
});
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user