Skip to content

Commit 2016df6

Browse files
Fix page loading issue and layout display
This update addresses the problem where pages no longer load content and only show a large, poorly positioned logo and menu. The fix involves correcting the layout and ensuring the content loads properly.
1 parent 8b9eed6 commit 2016df6

File tree

4 files changed

+97
-17
lines changed

4 files changed

+97
-17
lines changed

index.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
<!DOCTYPE html>
23
<html lang="en">
34
<head>
@@ -25,7 +26,7 @@
2526
<link rel="icon" href="/public/lovable-uploads/ALogo.png" type="image/x-icon" />
2627
</head>
2728

28-
<body style="background-image: url('/public/lovable-uploads/ALogo.png'); background-size: cover; background-position: center;">
29+
<body>
2930
<!-- Root Element -->
3031
<div id="root"></div>
3132

src/App.tsx

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,34 @@
1-
import React from 'react';
2-
import { BrowserRouter, Routes, Route } from 'react-router-dom';
1+
2+
import { BrowserRouter as Router, Routes, Route } from 'react-router-dom';
3+
import Layout from './components/Layout';
34
import Index from './pages/Index';
45
import About from './pages/About';
5-
import Contact from './pages/Contact';
66
import Academy from './pages/Academy';
7+
import AlienTrip from './pages/AlienTrip';
78
import Clubs from './pages/Clubs';
89
import CoNetWorKing from './pages/CoNetWorKing';
9-
import AlienTrip from './pages/AlienTrip';
10+
import Contact from './pages/Contact';
1011
import NotFound from './pages/NotFound';
12+
import './index.css';
13+
import './global.css';
1114

12-
const App: React.FC = () => {
15+
function App() {
1316
return (
14-
<BrowserRouter>
17+
<Router>
1518
<Routes>
16-
<Route path="/" element={<Index />} />
17-
<Route path="/about" element={<About />} />
18-
<Route path="/alien-trip" element={<AlienTrip />} />
19-
<Route path="/contact" element={<Contact />} />
20-
<Route path="/academy" element={<Academy />} />
21-
<Route path="/clubs" element={<Clubs />} />
22-
<Route path="/conetworking" element={<CoNetWorKing />} />
23-
<Route path="*" element={<NotFound />} />
19+
<Route path="/" element={<Layout />}>
20+
<Route index element={<Index />} />
21+
<Route path="about" element={<About />} />
22+
<Route path="academy" element={<Academy />} />
23+
<Route path="alien-trip" element={<AlienTrip />} />
24+
<Route path="clubs" element={<Clubs />} />
25+
<Route path="conetworking" element={<CoNetWorKing />} />
26+
<Route path="contact" element={<Contact />} />
27+
<Route path="*" element={<NotFound />} />
28+
</Route>
2429
</Routes>
25-
</BrowserRouter>
30+
</Router>
2631
);
27-
};
32+
}
2833

2934
export default App;

src/components/Layout.tsx

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
2+
import React from 'react';
3+
import { Outlet } from 'react-router-dom';
4+
import Header from './Header';
5+
import Footer from './Footer';
6+
import '../global.css';
7+
8+
const Layout: React.FC = () => {
9+
return (
10+
<>
11+
<Header />
12+
<div className="content-container">
13+
<img
14+
src="/public/lovable-uploads/ALogo.png"
15+
alt="AlienFlowSpace Logo"
16+
className="background-logo"
17+
/>
18+
<div className="container">
19+
<Outlet />
20+
</div>
21+
</div>
22+
<Footer />
23+
</>
24+
);
25+
};
26+
27+
export default Layout;

src/global.css

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
2+
/* Global styles */
3+
html, body {
4+
margin: 0;
5+
padding: 0;
6+
height: 100%;
7+
width: 100%;
8+
overflow-x: hidden;
9+
}
10+
11+
body {
12+
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
13+
background-color: #000;
14+
color: #fff;
15+
}
16+
17+
#root {
18+
min-height: 100vh;
19+
display: flex;
20+
flex-direction: column;
21+
}
22+
23+
.background-logo {
24+
position: fixed;
25+
bottom: 10%;
26+
right: 5%;
27+
width: 250px;
28+
height: 250px;
29+
opacity: 0.2;
30+
z-index: -1;
31+
pointer-events: none;
32+
}
33+
34+
/* Layout fixes */
35+
.container {
36+
width: 100%;
37+
max-width: 1200px;
38+
margin: 0 auto;
39+
padding: 0 1rem;
40+
}
41+
42+
/* Make sure content is visible */
43+
.content-container {
44+
flex: 1;
45+
z-index: 1;
46+
position: relative;
47+
}

0 commit comments

Comments
 (0)