-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Ayush Nandanwar
authored and
Ayush Nandanwar
committed
Nov 1, 2024
1 parent
a7e555d
commit 1042353
Showing
13 changed files
with
587 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>NotesShare | About Us</title> | ||
<!-- Bootstrap CSS --> | ||
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"> | ||
<!-- Custom CSS --> | ||
<link rel="stylesheet" href="assets/css/styles.css"> | ||
</head> | ||
<body> | ||
<!-- Navbar --> | ||
<header> | ||
<nav class="navbar navbar-expand-lg navbar-dark bg-dark shadow"> | ||
<div class="container"> | ||
<a class="navbar-brand fw-bold" href="index.html">NotesShare</a> | ||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation"> | ||
<span class="navbar-toggler-icon"></span> | ||
</button> | ||
<div class="collapse navbar-collapse" id="navbarNav"> | ||
<ul class="navbar-nav ms-auto"> | ||
<li class="nav-item"> | ||
<a class="nav-link" href="index.html">Home</a> | ||
</li> | ||
<li class="nav-item"> | ||
<a class="nav-link" href="categories.html">Categories</a> | ||
</li> | ||
<li class="nav-item"> | ||
<a class="nav-link" href="notes.html">All Notes </a> | ||
</li> | ||
<li class="nav-item"> | ||
<a class="nav-link active" href="about.html">About</a> | ||
</li> | ||
</ul> | ||
</div> | ||
</div> | ||
</nav> | ||
</header> | ||
|
||
<!-- Hero Section --> | ||
<section class="bg-primary text-white text-center py-5"> | ||
<div class="container"> | ||
<h1 class="display-4">About NotesShare</h1> | ||
<p class="lead">Empowering students and professionals with free, high-quality notes.</p> | ||
</div> | ||
</section> | ||
|
||
<!-- Mission Section --> | ||
<section class="py-5"> | ||
<div class="container"> | ||
<h2 class="text-center fw-bold mb-4">Our Mission</h2> | ||
<p class="text-center mx-auto" style="max-width: 800px;">NotesShare was created with the goal of providing accessible, high-quality educational resources for everyone. Our platform allows students, teachers, and lifelong learners to share and access notes in a variety of subjects, empowering them to achieve their educational goals.</p> | ||
</div> | ||
</section> | ||
<!-- Bootstrap JavaScript --> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
/* Custom CSS Reset */ | ||
* { | ||
box-sizing: border-box; | ||
margin: 0; | ||
padding: 0; | ||
} | ||
|
||
/* Body Styling */ | ||
body { | ||
background-color: #f8f9fa; /* Light background for better contrast */ | ||
font-family: Arial, sans-serif; /* Clean font */ | ||
} | ||
|
||
/* Navbar Styling */ | ||
.navbar { | ||
padding: 1rem; | ||
font-weight: bold; | ||
} | ||
|
||
/* Hero Section Styling */ | ||
.hero-section { | ||
height: 100vh; | ||
background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('assets/images/hero-background.jpg') no-repeat center center/cover; | ||
color: white; | ||
} | ||
|
||
.hero-section h1 { | ||
font-size: 3rem; | ||
font-weight: 700; | ||
line-height: 1.2; | ||
} | ||
|
||
.hero-section p { | ||
font-size: 1.25rem; | ||
margin-top: 0.5rem; | ||
} | ||
|
||
.hero-section .btn { | ||
font-size: 1.2rem; | ||
padding: 0.75rem 2rem; | ||
} | ||
|
||
/* Animations using Animate.css */ | ||
@import url("https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css"); | ||
|
||
.hero-section h1, | ||
.hero-section p, | ||
.hero-section .btn { | ||
animation-duration: 1.5s; | ||
} | ||
|
||
/* Search Modal Custom Styling */ | ||
.modal-body input[type="text"] { | ||
border-radius: 50px; | ||
padding: 1rem 1.5rem; | ||
font-size: 1.25rem; | ||
border: 2px solid #ddd; | ||
} | ||
|
||
/* Responsive Breakpoints */ | ||
@media (max-width: 768px) { | ||
.hero-section h1 { | ||
font-size: 2.5rem; | ||
} | ||
|
||
.hero-section p { | ||
font-size: 1rem; | ||
} | ||
} | ||
/* Notes Page Styling */ | ||
section { | ||
padding-top: 2rem; | ||
padding-bottom: 2rem; | ||
} | ||
|
||
.card { | ||
transition: transform 0.3s ease-in-out; | ||
} | ||
|
||
.card:hover { | ||
transform: translateY(-5px); | ||
} | ||
|
||
.btn-success { | ||
background-color: #28a745; | ||
border: none; | ||
} | ||
|
||
.btn-success:hover { | ||
background-color: #218838; | ||
} | ||
|
||
.list-unstyled { | ||
font-size: 0.9rem; | ||
color: #6c757d; | ||
} | ||
|
||
/* About Page Styling */ | ||
.bg-primary { | ||
background-color: #0d6efd !important; | ||
} | ||
|
||
.card img { | ||
border-radius: 50%; | ||
max-width: 150px; | ||
margin-top: -75px; | ||
margin-bottom: 20px; | ||
} | ||
|
||
.card-title { | ||
font-weight: 600; | ||
} | ||
|
||
.card-text { | ||
color: #6c757d; | ||
} | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
function sortNotes() { | ||
const sortOption = document.getElementById("sortNotes").value; | ||
const notesList = document.getElementById("notesList"); | ||
const notes = Array.from(notesList.getElementsByClassName("col")); | ||
|
||
notes.sort((a, b) => { | ||
if (sortOption === "date") { | ||
const dateA = new Date(a.querySelector("ul li:nth-child(1) strong").nextSibling.nodeValue.trim()); | ||
const dateB = new Date(b.querySelector("ul li:nth-child(1) strong").nextSibling.nodeValue.trim()); | ||
return dateB - dateA; | ||
} else if (sortOption === "size") { | ||
const sizeA = parseFloat(a.querySelector("ul li:nth-child(2) strong").nextSibling.nodeValue.trim()); | ||
const sizeB = parseFloat(b.querySelector("ul li:nth-child(2) strong").nextSibling.nodeValue.trim()); | ||
return sizeB - sizeA; | ||
} | ||
}); | ||
|
||
notes.forEach(note => notesList.appendChild(note)); // Re-append sorted notes | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>NotesShare | Categories</title> | ||
<!-- Bootstrap CSS --> | ||
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"> | ||
<!-- Custom CSS --> | ||
<link rel="stylesheet" href="assets/css/styles.css"> | ||
</head> | ||
<body> | ||
<!-- Navigation Bar --> | ||
<header> | ||
<nav class="navbar navbar-expand-lg navbar-dark bg-dark shadow"> | ||
<div class="container"> | ||
<a class="navbar-brand fw-bold" href="index.html">NotesShare</a> | ||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation"> | ||
<span class="navbar-toggler-icon"></span> | ||
</button> | ||
<div class="collapse navbar-collapse" id="navbarNav"> | ||
<ul class="navbar-nav ms-auto"> | ||
<li class="nav-item"> | ||
<a class="nav-link" href="index.html">Home</a> | ||
</li> | ||
<li class="nav-item"> | ||
<a class="nav-link active" href="categories.html">Categories</a> | ||
</li> | ||
<li class="nav-item"> | ||
<a class="nav-link" href="notes.html">All Notes </a> | ||
</li> | ||
<li class="nav-item"> | ||
<a class="nav-link" href="about.html">About</a> | ||
</li> | ||
</ul> | ||
</div> | ||
</div> | ||
</nav> | ||
</header> | ||
|
||
<!-- Categories Section --> | ||
<section class="py-5 bg-light"> | ||
<div class="container mt-5"> | ||
<h1 class="text-center">Categories</h1> | ||
|
||
<!-- Search Bar --> | ||
<div class="form-group mb-4"> | ||
<div class="input-group"> | ||
<input type="text" id="search-input" class="form-control" placeholder="Search categories by name" onkeyup="filterCategories()"> | ||
<div class="input-group-append"> | ||
<span class="input-group-text"><i class="fas fa-search"></i></span> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div id="categories-container" class="row"></div> | ||
</div> | ||
</section> | ||
|
||
<script> | ||
let categoriesData = []; // Array to store categories data | ||
let notesData = []; // Array to store notes data | ||
|
||
// Fetch categories from the JSON file | ||
fetch('categories.json') | ||
.then(response => response.json()) | ||
.then(categories => { | ||
categoriesData = categories; // Store the fetched categories | ||
fetchNotesData(); // Fetch notes data | ||
}) | ||
.catch(error => console.error('Error fetching categories:', error)); | ||
|
||
function fetchNotesData() { | ||
// Fetch notes from the JSON file | ||
fetch('notes.json') | ||
.then(response => response.json()) | ||
.then(notes => { | ||
notesData = notes; // Store the fetched notes | ||
renderCategories(categoriesData); // Render categories with notes count | ||
}) | ||
.catch(error => console.error('Error fetching notes:', error)); | ||
} | ||
|
||
function getNotesCountForCategory(categoryId) { | ||
return notesData.filter(note => note.category === categoryId).length; | ||
} | ||
|
||
function renderCategories(categories) { | ||
const categoriesContainer = document.getElementById('categories-container'); | ||
categoriesContainer.innerHTML = ''; // Clear previous content | ||
|
||
categories.forEach(category => { | ||
const count = getNotesCountForCategory(category.id); // Get notes count for the category | ||
const categoryCard = ` | ||
<div class="col-md-4 mb-4"> | ||
<div class="card h-100"> | ||
<div class="card-body"> | ||
<h5 class="card-title">${category.header}</h5> | ||
<p class="card-text">${category.description}</p> | ||
<p class="card-text"><small class="text-muted">Notes Available: ${count}</small></p> | ||
<a href="notes.html?category=${category.id}" class="btn btn-primary">View Notes</a> | ||
</div> | ||
</div> | ||
</div> | ||
`; | ||
categoriesContainer.innerHTML += categoryCard; | ||
}); | ||
} | ||
|
||
function filterCategories() { | ||
const searchInput = document.getElementById('search-input').value.toLowerCase(); | ||
const filteredCategories = categoriesData.filter(category => | ||
category.header.toLowerCase().includes(searchInput) | ||
); | ||
renderCategories(filteredCategories); // Render filtered categories | ||
} | ||
</script> | ||
|
||
<!-- Bootstrap JavaScript --> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script> | ||
<script src="https://kit.fontawesome.com/a076d05399.js"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
[ | ||
{ | ||
"id": "math", | ||
"header": "Mathematics", | ||
"description": "Explore the fascinating world of numbers, equations, and mathematical theories." | ||
}, | ||
{ | ||
"id": "science", | ||
"header": "Science", | ||
"description": "Delve into the realms of biology, chemistry, physics, and the wonders of the universe." | ||
}, | ||
{ | ||
"id": "history", | ||
"header": "History", | ||
"description": "Uncover the events, people, and places that shaped our world throughout the ages." | ||
} | ||
] |
Oops, something went wrong.