Spaces:
Running
Running
Fix navigation: Quests menu scrolls to section, View All goes to quests page
Browse files- index.html +3 -3
index.html
CHANGED
|
@@ -948,7 +948,7 @@
|
|
| 948 |
<div id="quests" class="mb-16">
|
| 949 |
<div class="flex items-center justify-between mb-8">
|
| 950 |
<h2 class="text-2xl font-bold">Featured Quests</h2>
|
| 951 |
-
<a href="#quests" class="flex items-center text-accent hover:text-accent-2 transition-colors">
|
| 952 |
View All
|
| 953 |
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" class="ml-1">
|
| 954 |
<path d="M5 12h14M12 5l7 7-7 7"></path>
|
|
@@ -2024,14 +2024,14 @@
|
|
| 2024 |
const targetId = this.getAttribute('href');
|
| 2025 |
|
| 2026 |
// Handle SPA navigation
|
| 2027 |
-
if (targetId === '#quests') {
|
| 2028 |
navigateToPage('quests');
|
| 2029 |
history.pushState(null, null, targetId);
|
| 2030 |
} else if (targetId === '#home') {
|
| 2031 |
navigateToPage('home');
|
| 2032 |
history.pushState(null, null, targetId);
|
| 2033 |
} else {
|
| 2034 |
-
// Handle regular section scrolling
|
| 2035 |
const targetSection = document.querySelector(targetId);
|
| 2036 |
if (targetSection) {
|
| 2037 |
// Close mobile menu
|
|
|
|
| 948 |
<div id="quests" class="mb-16">
|
| 949 |
<div class="flex items-center justify-between mb-8">
|
| 950 |
<h2 class="text-2xl font-bold">Featured Quests</h2>
|
| 951 |
+
<a href="#quests-page" class="flex items-center text-accent hover:text-accent-2 transition-colors">
|
| 952 |
View All
|
| 953 |
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" class="ml-1">
|
| 954 |
<path d="M5 12h14M12 5l7 7-7 7"></path>
|
|
|
|
| 2024 |
const targetId = this.getAttribute('href');
|
| 2025 |
|
| 2026 |
// Handle SPA navigation
|
| 2027 |
+
if (targetId === '#quests-page') {
|
| 2028 |
navigateToPage('quests');
|
| 2029 |
history.pushState(null, null, targetId);
|
| 2030 |
} else if (targetId === '#home') {
|
| 2031 |
navigateToPage('home');
|
| 2032 |
history.pushState(null, null, targetId);
|
| 2033 |
} else {
|
| 2034 |
+
// Handle regular section scrolling (including #quests)
|
| 2035 |
const targetSection = document.querySelector(targetId);
|
| 2036 |
if (targetSection) {
|
| 2037 |
// Close mobile menu
|