Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI Overhaul and Dynamic Content Implementation #44

Closed
wants to merge 1 commit into from
Closed
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
105 changes: 101 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,110 @@
<!doctype html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + React</title>
<title>Propacity</title>
<link rel="shortcut icon" href="./src/assets/icons/logo.png" type="image/x-icon">
<style>
body {
font-family: 'Arial', sans-serif;
margin: 0;
padding: 0;
background-color: #f4f4f4;
}
header {
background: #333;
color: #fff;
padding: 10px 20px;
display: flex;
justify-content: space-between;
align-items: center;
}
nav {
display: flex;
}
nav a {
color: #fff;
padding: 15px;
text-decoration: none;
}
.container {
max-width: 1200px;
margin: auto;
padding: 20px;
}
.card {
background: #fff;
border-radius: 8px;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
margin: 20px 0;
padding: 20px;
}
footer {
background: #333;
color: #fff;
text-align: center;
padding: 20px;
position: relative;
bottom: 0;
width: 100%;
}
.loading {
text-align: center;
font-size: 20px;
color: #333;
}
</style>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.jsx"></script>
<header>
<div>
<img src="./src/assets/icons/logo.png" alt="Logo" style="height: 40px;">
</div>
<nav>
<a href="#">Home</a>
<a href="#">Courses</a>
<a href="#">Contact</a>
</nav>
</header>

<div class="container" id="content">
<h1>Welcome to Propacity</h1>
<div id="dynamicContent" class="card">
<div class="loading">Loading content...</div>
</div>
</div>

<footer>
<p>&copy; 2024 Propacity. All rights reserved.</p>
</footer>

<script>
document.addEventListener("DOMContentLoaded", () => {
const dynamicContent = document.getElementById('dynamicContent');

// Simulating an API call to fetch dynamic content
setTimeout(() => {
const content = `
<h2>Dynamic Content Loaded</h2>
<p>This content is loaded dynamically when the page is ready.</p>
<button id="loadMoreBtn">Load More</button>
`;
dynamicContent.innerHTML = content;

// Load more content on button click
document.getElementById('loadMoreBtn').addEventListener('click', () => {
const moreContent = `
<div class="card">
<h3>Additional Information</h3>
<p>Here is some more dynamically loaded content.</p>
</div>
`;
dynamicContent.insertAdjacentHTML('beforeend', moreContent);
});
}, 2000); // Simulating 2 seconds delay for content load
});
</script>
</body>
</html>