Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"name": "travel-blog",
"version": "0.1.0",
"private": true,
"dependencies": {
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router-dom": "^6.16.0",
"react-scripts": "5.0.1",
"web-vitals": "^2.1.4"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
21 changes: 21 additions & 0 deletions public/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta
name="description"
content="Travel Blog showcasing amazing destinations around the world"
/>
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<title>Travel Blog - Explore the World</title>
<link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;700&display=swap" rel="stylesheet">
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
</body>
</html>
17 changes: 17 additions & 0 deletions src/App.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
.App {
display: flex;
flex-direction: column;
min-height: 100vh;
}

main {
flex-grow: 1;
padding: 60px 0;
}

.page-title {
text-align: center;
margin-bottom: 40px;
color: #333;
font-size: 2.5rem;
}
24 changes: 24 additions & 0 deletions src/App.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import React from 'react';
import { Routes, Route } from 'react-router-dom';
import './App.css';
import Navbar from './components/Navbar';
import Footer from './components/Footer';
import Home from './pages/Home';
import DestinationDetail from './pages/DestinationDetail';

function App() {
return (
<div className="App">
<Navbar />
<main>
<Routes>
<Route path="/" element={<Home />} />
<Route path="/destination/:id" element={<DestinationDetail />} />
</Routes>
</main>
<Footer />
</div>
);
}

export default App;
63 changes: 63 additions & 0 deletions src/components/Footer.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
.footer {
background-color: #f0f2f5;
padding: 60px 0 20px;
margin-top: 40px;
}

.footer-container {
display: flex;
flex-direction: column;
}

.footer-content {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
margin-bottom: 40px;
}

.footer-section {
flex: 1;
margin-right: 30px;
min-width: 200px;
margin-bottom: 20px;
}

.footer-section:last-child {
margin-right: 0;
}

.footer-section h3 {
margin-bottom: 15px;
font-size: 1.2rem;
color: #0066cc;
}

.footer-section p {
color: #555;
}

.footer-section ul {
list-style: none;
}

.footer-section ul li {
margin-bottom: 8px;
}

.social-links {
display: flex;
flex-direction: column;
}

.social-links a {
margin-bottom: 8px;
}

.footer-bottom {
text-align: center;
padding-top: 20px;
border-top: 1px solid #ddd;
color: #777;
font-size: 0.9rem;
}
38 changes: 38 additions & 0 deletions src/components/Footer.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import React from 'react';
import './Footer.css';

function Footer() {
return (
<footer className="footer">
<div className="container footer-container">
<div className="footer-content">
<div className="footer-section">
<h3>Travel Blog</h3>
<p>Explore the world's most beautiful destinations through our travel guides.</p>
</div>
<div className="footer-section">
<h3>Quick Links</h3>
<ul>
<li><a href="/">Home</a></li>
<li><a href="/about">About</a></li>
<li><a href="/contact">Contact</a></li>
</ul>
</div>
<div className="footer-section">
<h3>Connect With Us</h3>
<div className="social-links">
<a href="https://facebook.com">Facebook</a>
<a href="https://instagram.com">Instagram</a>
<a href="https://twitter.com">Twitter</a>
</div>
</div>
</div>
<div className="footer-bottom">
<p>&copy; {new Date().getFullYear()} Travel Blog. All rights reserved.</p>
</div>
</div>
</footer>
);
}

export default Footer;
42 changes: 42 additions & 0 deletions src/components/Navbar.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
.navbar {
background-color: #ffffff;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
position: sticky;
top: 0;
z-index: 100;
}

.navbar-container {
display: flex;
justify-content: space-between;
align-items: center;
height: 80px;
}

.navbar-logo h1 {
font-size: 1.8rem;
color: #0066cc;
font-weight: 700;
margin: 0;
}

.navbar-menu {
display: flex;
list-style: none;
}

.navbar-item {
margin-left: 30px;
}

.navbar-link {
color: #333;
font-weight: 500;
font-size: 1.1rem;
transition: color 0.3s ease;
}

.navbar-link:hover {
color: #0066cc;
text-decoration: none;
}
28 changes: 28 additions & 0 deletions src/components/Navbar.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import React from 'react';
import { Link } from 'react-router-dom';
import './Navbar.css';

function Navbar() {
return (
<nav className="navbar">
<div className="container navbar-container">
<Link to="/" className="navbar-logo">
<h1>Travel Blog</h1>
</Link>
<ul className="navbar-menu">
<li className="navbar-item">
<Link to="/" className="navbar-link">Home</Link>
</li>
<li className="navbar-item">
<Link to="/about" className="navbar-link">About</Link>
</li>
<li className="navbar-item">
<Link to="/contact" className="navbar-link">Contact</Link>
</li>
</ul>
</div>
</nav>
);
}

export default Navbar;
40 changes: 40 additions & 0 deletions src/data/destinations.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 27 additions & 0 deletions src/index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}

body {
font-family: 'Montserrat', sans-serif;
line-height: 1.6;
color: #333;
background-color: #f8f8f8;
}

a {
text-decoration: none;
color: #0066cc;
}

a:hover {
text-decoration: underline;
}

.container {
max-width: 1200px;
margin: 0 auto;
padding: 0 20px;
}
14 changes: 14 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import React from 'react';
import ReactDOM from 'react-dom/client';
import './index.css';
import App from './App';
import { BrowserRouter } from 'react-router-dom';

const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(
<React.StrictMode>
<BrowserRouter>
<App />
</BrowserRouter>
</React.StrictMode>
);
Loading