Skip to content

Commit c39ac0f

Browse files
.
1 parent 7dc7600 commit c39ac0f

5 files changed

Lines changed: 36 additions & 3 deletions

File tree

Campus Shelf.css

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -877,12 +877,17 @@ main {
877877

878878
/* Animation support */
879879
[data-animate] {
880+
opacity: 1;
881+
transform: none;
882+
}
883+
884+
html.animations-ready [data-animate] {
880885
opacity: 0;
881886
transform: translateY(25px);
882887
transition: opacity 0.6s ease, transform 0.6s ease;
883888
}
884889

885-
[data-animate].animated {
890+
html.animations-ready [data-animate].animated {
886891
opacity: 1;
887892
transform: translateY(0);
888893
}

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,20 @@ Campus Shelf is a fully animated campus library experience that blends a modern
2323
4. Use the search bar, category chips, and navigation links to explore the animated sections.
2424
5. Unlock the admin dashboard with the admin password above. The default admin account (`admin@campus-shelf.com`) is provisioned automatically.
2525

26+
## Usage Guide
27+
- **Registration & verification:** Submit the register form, copy the displayed 6-digit code, and confirm it inside the verification modal to activate your account.
28+
- **Social sign-in:** Click any provider button to spawn a fully verified demo profile—perfect for quick previews.
29+
- **Password management:** Use the forgot password flow to request a reset token, then set a new password in the follow-up modal.
30+
- **Session handling:** Successful sign-in stores a session in `sessionStorage`; logging out clears it and redirects back to the login portal.
31+
- **Admin unlock:** Open the admin access modal from the dashboard, enter `CampusShelf@Admin2025`, and the guard view swaps to the metrics/table console.
32+
- **Content exploration:** Search trims the featured grid in real time, while category chips filter by genre with smooth card animations.
33+
- **Engagement widgets:** The contact form thanks the sender inline and the newsletter button provides instant feedback without page reloads.
34+
35+
## Animations & UX Highlights
36+
- Elements with `[data-animate]` fade and rise into view via an IntersectionObserver-powered reveal system.
37+
- Cards, buttons, and navigation affordances use subtle transforms and shadow transitions to communicate state changes.
38+
- Mobile navigation collapses into a toggle-driven drawer that inherits the same animated styling for consistency.
39+
2640
## Project Structure
2741
- `index.html` / `style.css` — authentication portal and modal flows
2842
- `Campus Shelf.html` / `Campus Shelf.css` — library experience, animations, and admin console

auth.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
(() => {
22
'use strict';
33

4+
document.documentElement.classList.add('animations-ready');
5+
46
const STORAGE_KEY = 'campusShelfUsers';
57
const SESSION_KEY = 'campusShelfSession';
68
const PENDING_KEY = 'campusShelfPendingVerification';

script.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
return;
1212
}
1313

14+
document.documentElement.classList.add('animations-ready');
15+
1416
const bookCards = Array.from(document.querySelectorAll('.book-card'));
1517
const filterChips = Array.from(document.querySelectorAll('.chip'));
1618
const searchInput = document.getElementById('searchInput');
@@ -449,6 +451,11 @@
449451
if (!animatedNodes.length) {
450452
return;
451453
}
454+
if (typeof IntersectionObserver === 'undefined') {
455+
animatedNodes.forEach(node => node.classList.add('animated'));
456+
return;
457+
}
458+
452459
const observer = new IntersectionObserver(entries => {
453460
entries.forEach(entry => {
454461
if (entry.isIntersecting) {

style.css

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -607,13 +607,18 @@ footer {
607607
}
608608

609609
/* Micro animations */
610-
[data-animate="rise"] {
610+
[data-animate] {
611+
opacity: 1;
612+
transform: none;
613+
}
614+
615+
html.animations-ready [data-animate="rise"] {
611616
opacity: 0;
612617
transform: translateY(30px);
613618
transition: opacity 0.6s ease, transform 0.6s ease;
614619
}
615620

616-
[data-animate="rise"].animated {
621+
html.animations-ready [data-animate="rise"].animated {
617622
opacity: 1;
618623
transform: translateY(0);
619624
}

0 commit comments

Comments
 (0)