muted nm-dmg tier colors, updated navbar/search/menu to follow new "brand", modified auth for features, new homepage
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
---
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-info p-2 rounded-circle"
|
||||
class="btn btn-light p-2 rounded-squircle"
|
||||
aria-label="Back to Top"
|
||||
aria-hidden="true"
|
||||
id="btn-back-to-top"
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
---
|
||||
import BackToTop from "./BackToTop.astro"
|
||||
---
|
||||
<div class="container-fluid container-sm mt-3">
|
||||
<div class="row mb-4">
|
||||
<div class="col-md-2">
|
||||
<div class="h5 d-none">Inventory management placeholder</div>
|
||||
@@ -43,6 +44,7 @@ import BackToTop from "./BackToTop.astro"
|
||||
</button>
|
||||
|
||||
<BackToTop />
|
||||
</div>
|
||||
|
||||
<script is:inline>
|
||||
(function () {
|
||||
@@ -646,6 +648,15 @@ import BackToTop from "./BackToTop.astro"
|
||||
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
initInventoryForms();
|
||||
|
||||
const pending = sessionStorage.getItem('pendingSearch');
|
||||
if (pending) {
|
||||
sessionStorage.removeItem('pendingSearch');
|
||||
const input = document.getElementById('searchInput');
|
||||
if (input) input.value = pending;
|
||||
// The form's hx-trigger="load" will fire automatically on page load,
|
||||
// picking up the pre-populated input value — no manual trigger needed.
|
||||
}
|
||||
});
|
||||
|
||||
})();
|
||||
|
||||
@@ -1,18 +1,33 @@
|
||||
---
|
||||
|
||||
import logo from "/src/svg/logo/rat_light.svg?raw";
|
||||
---
|
||||
<footer class="bd-footer py-4 py-md-5 mt-0 bg-body-tertiary">
|
||||
<div class="container py-4 py-md-5 px-4 px-md-3 text-body-secondary">
|
||||
<div class="row justify-content-end">
|
||||
<div class="col mb-3">
|
||||
<a class="btn btn-outline-success rounded p-2 float-end" href="/contact">
|
||||
Contact Us
|
||||
<svg aria-hidden="true" class="nav-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640">
|
||||
<path opacity=".25" d="M112 176L404 176C411.9 206.7 431 233 456.6 250.2L320 353.9L112 196.1L112 176zM112 256.3L305.5 403.1L320 414.1L334.5 403.1L509.2 270.6C515.3 271.5 521.6 272 528 272L528 464L112 464L112 256.3z"/>
|
||||
<path d="M528 64C572.2 64 608 99.8 608 144C608 188.2 572.2 224 528 224C483.8 224 448 188.2 448 144C448 99.8 483.8 64 528 64zM88 128L401 128C400.3 133.2 400 138.6 400 144C400 155 401.4 165.8 404 176L112 176L112 196.1L320 353.9L456.6 250.3C472.1 260.7 489.9 267.8 509.2 270.7L334.5 403.2L320 414.2L305.5 403.2L112 256.4L112 464.1L528 464.1L528 272.1C545 272.1 561.2 268.8 576 262.8L576 512.1L64 512.1L64 128.1L88 128.1z"/>
|
||||
</svg>
|
||||
</a>
|
||||
</div>
|
||||
<footer class="footer py-5 border-top border-subtle" role="contentinfo">
|
||||
<div class="container">
|
||||
<div class="row g-4 mb-4">
|
||||
<div class="col-md-4">
|
||||
<a href="/" class="d-inline-block mb-3" aria-label="RAT home">
|
||||
<span set:html={logo} class="logo-svg d-flex" style="--logo-width: 8rem;"></span>
|
||||
</a>
|
||||
<p class="text-body-secondary small">Real. Accurate. Transparent. Pokémon card price tracker for collectors who want to buy, sell, and trade with confidence.</p>
|
||||
</div>
|
||||
<nav class="col-md-2 ms-md-auto" aria-label="Tools">
|
||||
<h3 class="h6 fw-semibold text-body-emphasis mb-3">Tools</h3>
|
||||
<ul class="list-unstyled small text-body-secondary">
|
||||
<li class="mb-2"><a href="/pokemon" class="text-body-secondary text-decoration-none hover-white">Browse Cards</a></li>
|
||||
<li class="mb-2"><span class="text-body-tertiary">Inventory/Collection Tracker <em>(soon)</em></span></li>
|
||||
</ul>
|
||||
</nav>
|
||||
<nav class="col-md-2" aria-label="Company">
|
||||
<h3 class="h6 fw-semibold text-body-emphasis mb-3">Company</h3>
|
||||
<ul class="list-unstyled small text-body-secondary">
|
||||
<li class="mb-2"><a href="https://www.route301cards.com/" class="text-body-secondary text-decoration-none hover-white">About</a></li>
|
||||
<li class="mb-2"><a href="/privacy" class="text-body-secondary text-decoration-none hover-white">Terms and Privacy</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
<div class="d-flex flex-wrap justify-content-between align-items-center pt-4 border-top border-subtle">
|
||||
<p class="text-body-tertiary small mb-0">© {new Date().getFullYear()} RAT. Not affiliated with Nintendo, The Pokémon Company, or their affiliates.</p>
|
||||
<p class="text-body-tertiary small mb-0">Pokémon and all related names are trademarks of Nintendo / Creatures Inc. / GAME FREAK inc.</p>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
</footer>
|
||||
56
src/components/Hero.astro
Normal file
56
src/components/Hero.astro
Normal file
@@ -0,0 +1,56 @@
|
||||
---
|
||||
import { SignInButton, Show } from '@clerk/astro/components'
|
||||
import type { sign } from 'node:crypto'
|
||||
---
|
||||
<!-- ═══════════════════════════════════════════
|
||||
HERO
|
||||
═══════════════════════════════════════════ -->
|
||||
<div class="hero position-relative overflow-hidden">
|
||||
<div class="hero-bg" aria-hidden="true"></div>
|
||||
<div class="container py-5 py-md-6 position-relative">
|
||||
<div class="row align-items-center g-5">
|
||||
<div class="col-xl-6">
|
||||
<p class="eyebrow text-purple-light mb-3">Pokémon Card Price Aggregator</p>
|
||||
<h1 class="display-4 fw-bold lh-sm mb-4">
|
||||
The home of</br>
|
||||
<span class="text-gradient">Real. Accurate. Transparent.</span><br/>
|
||||
pricing data.
|
||||
</h1>
|
||||
<p class="lead text-body-secondary mb-4 pe-lg-4">
|
||||
Real-time prices across the Pokémon trading card game. See prices for all conditions at a glance — no spreadsheets, no guesswork.
|
||||
</p>
|
||||
<div class="d-flex flex-wrap gap-3">
|
||||
<Show when="signed-out">
|
||||
<SignInButton asChild mode="modal">
|
||||
<button class="btn btn-purple btn-lg px-4">
|
||||
Get Started Free
|
||||
</button>
|
||||
</SignInButton>
|
||||
</Show>
|
||||
<Show when="signed-in">
|
||||
<SignInButton asChild mode="modal">
|
||||
<a href="/pokemon" class="btn btn-outline-light btn-lg px-4">Browse Cards</a>
|
||||
</SignInButton>
|
||||
</Show>
|
||||
</div>
|
||||
<p class="mt-3 text-body-tertiary small d-none">Free forever. No credit card required.</p>
|
||||
</div>
|
||||
|
||||
<div class="col-xl-6 d-none d-xl-block" aria-hidden="true">
|
||||
<div class="hero-cards-mockup">
|
||||
<div class="mockup-card mockup-card--1 shadow-lg rounded-4">
|
||||
<img class="img-fluid" src="/static/cards/124125.jpg" alt="Imakuni?'s Doduo - XY - Evolutions (EVO)" />
|
||||
</div>
|
||||
<div class="mockup-card mockup-card--2 shadow-lg rounded-4">
|
||||
<img class="img-fluid" src="/static/cards/88875.jpg" alt="Sabrina's Gengar - Gym Challenge (G2)" />
|
||||
</div>
|
||||
<div class="mockup-card mockup-card--3 shadow-lg rounded-4">
|
||||
<img class="img-fluid" src="/static/cards/567429.jpg" alt="Squirtle - SV07: Stellar Crown (SCR)" />
|
||||
</div>
|
||||
<div class="price-chip price-chip--nm">NM <strong>$114.99</strong></div>
|
||||
<div class="price-chip price-chip--lp">LP <strong>$85.66</strong></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,12 +1,36 @@
|
||||
---
|
||||
|
||||
import { UserButton, SignInButton, Show } from '@clerk/astro/components'
|
||||
import logo from "/src/svg/logo/rat_light.svg?raw";
|
||||
---
|
||||
<nav class="navbar navbar-expand sticky-top bg-dark" data-bs-theme="dark" aria-label="Main navigation">
|
||||
<div class="container">
|
||||
<a class="navbar-brand d-flex" href="/">
|
||||
<span class="h3 d-none d-md-flex">Rigid's App Thing</span><span aria-hidden="true" class="h3 d-md-none d-flex m-auto">RAT</span>
|
||||
<nav class="navbar sticky-top bg-dark shadow" data-bs-theme="dark" aria-label="Main navigation">
|
||||
<div class="container align-items-center" id="navContainer">
|
||||
<a class="navbar-brand" href="/">
|
||||
<span set:html={logo} class="logo-svg d-flex"></span>
|
||||
</a>
|
||||
<slot name="navItems"/>
|
||||
<slot name="searchInput"/>
|
||||
<div class="d-flex d-md-none nav-user-btn" id="navUserBtn">
|
||||
<Show when="signed-in">
|
||||
<UserButton afterSignOutUrl="/" showName={false} />
|
||||
</Show>
|
||||
<Show when="signed-out">
|
||||
<SignInButton asChild mode="modal">
|
||||
<button class="btn btn-light">Sign In</button>
|
||||
</SignInButton>
|
||||
</Show>
|
||||
<slot name="navItems"/>
|
||||
</div>
|
||||
<div class="d-flex flex-column-reverse flex-md-row search-container" id="searchContainer">
|
||||
<slot name="searchInput"/>
|
||||
<div class="d-none d-md-flex ms-4 nav-user-btn">
|
||||
<Show when="signed-in">
|
||||
<UserButton afterSignOutUrl="/" showName={false} />
|
||||
</Show>
|
||||
<Show when="signed-out">
|
||||
<SignInButton asChild mode="modal">
|
||||
<button class="btn btn-light">Sign In</button>
|
||||
</SignInButton>
|
||||
</Show>
|
||||
<slot name="navItems"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
@@ -1,16 +1,46 @@
|
||||
---
|
||||
---
|
||||
<button
|
||||
class="navbar-toggler ms-4 p-1 btn btn-purple border-0"
|
||||
type="button"
|
||||
data-bs-toggle="offcanvas"
|
||||
data-bs-target="#navOffcanvas"
|
||||
aria-controls="navOffcanvas"
|
||||
aria-label="Toggle navigation"
|
||||
>
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
|
||||
---
|
||||
<div class="navbar-collapse" id="navbarNav" aria-labelledby="navbarToggler">
|
||||
<ul class="navbar-nav ms-auto">
|
||||
<li class="nav-item d-flex">
|
||||
<a class="nav-link btn btn-warning rounded p-2" href="/pokemon" aria-label="Cards">
|
||||
<span class="d-inline-block d-md-none" aria-hidden="true">Cards</span>
|
||||
<svg aria-hidden="true" class="nav-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640">
|
||||
<path opacity=".4" d="M256 519.9L256 576L576 576L576 128L378.8 128C408.7 239.7 438.6 351.3 468.5 463C397.7 482 326.8 501 256 519.9z"/>
|
||||
<path d="M43.5 113L352.6 30.2L468.6 462.9L159.5 545.7z"/>
|
||||
</svg>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div
|
||||
id="navOffcanvasWrapper"
|
||||
data-bs-theme="dark"
|
||||
>
|
||||
<div
|
||||
class="offcanvas offcanvas-end"
|
||||
tabindex="-1"
|
||||
id="navOffcanvas"
|
||||
aria-labelledby="navOffcanvasLabel"
|
||||
>
|
||||
<div class="offcanvas-header">
|
||||
<h5 class="offcanvas-title" id="navOffcanvasLabel">Menu</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="offcanvas-body px-3 pt-0">
|
||||
<ul class="navbar-nav">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link py-3 border-bottom border-secondary" href="/pokemon">Browse Cards</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link py-3" href="/dashboard">Dashboard</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script is:inline>
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
const wrapper = document.getElementById('navOffcanvasWrapper');
|
||||
if (wrapper) document.body.appendChild(wrapper);
|
||||
});
|
||||
</script>
|
||||
@@ -8,7 +8,6 @@ import { Show } from '@clerk/astro/components'
|
||||
const val = Number(start.value) || 0;
|
||||
start.value = (val + 20).toString();
|
||||
}
|
||||
// delete the triggering element
|
||||
if (e && e.detail && e.detail.elt) {
|
||||
e.detail.elt.remove();
|
||||
}
|
||||
@@ -26,21 +25,47 @@ import { Show } from '@clerk/astro/components'
|
||||
</script>
|
||||
|
||||
<Show when="signed-in">
|
||||
<form class="d-flex ms-2 align-items-center gap-2" role="search" id="searchform" hx-post="/partials/cards" hx-target="#cardGrid" hx-trigger="load, submit" hx-vals='{"start":"0"}' hx-on--after-request="afterUpdate()" hx-on--before-request="beforeSearch()">
|
||||
<a class="btn btn-secondary btn-lg" data-bs-toggle="offcanvas" href="#filterBar" role="button" aria-controls="filterBar" aria-label="filter">
|
||||
<span class="d-block d-md-none filter-icon py-2">
|
||||
<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><path opacity=".4" d="M96 160L283.3 347.3C286.3 350.3 288 354.4 288 358.6L288 480L352 544L352 358.6C352 354.4 353.7 350.3 356.7 347.3L544 160L96 160z"/><path d="M66.4 147.8C71.4 135.8 83.1 128 96 128L544 128C556.9 128 568.6 135.8 573.6 147.8C578.6 159.8 575.8 173.5 566.7 182.7L384 365.3L384 544C384 556.9 376.2 568.6 364.2 573.6C352.2 578.6 338.5 575.8 329.3 566.7L265.3 502.7C259.3 496.7 255.9 488.6 255.9 480.1L256 365.3L73.4 182.6C64.2 173.5 61.5 159.7 66.4 147.8zM544 160L96 160L283.3 347.3C286.3 350.3 288 354.4 288 358.6L288 480L352 544L352 358.6C352 354.4 353.7 350.3 356.7 347.3L544 160z"/></svg>
|
||||
</span>
|
||||
<span class="d-none d-md-block">Filters</span>
|
||||
</a>
|
||||
|
||||
<form
|
||||
class="d-flex align-items-center"
|
||||
role="search"
|
||||
id="searchform"
|
||||
hx-post="/partials/cards"
|
||||
hx-target="#cardGrid"
|
||||
hx-trigger="load, submit"
|
||||
hx-vals='{"start":"0"}'
|
||||
hx-on--after-request="afterUpdate()"
|
||||
hx-on--before-request="beforeSearch()"
|
||||
>
|
||||
<div class="input-group">
|
||||
{Astro.url.pathname === '/pokemon' && (
|
||||
<button class="btn btn-purple" data-bs-toggle="offcanvas" href="#filterBar" type="button" role="button" aria-controls="filterBar" aria-label="filter">
|
||||
<span class="d-block d-md-none filter-icon py-2">
|
||||
<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><path d="M528.8 96.3C558.6 90.8 571.2 118.9 568.9 142.2C572.3 173.4 570.8 207 553.9 230.8C513.9 283.2 459.3 315.9 414.3 364.3C414.9 418.3 419.8 459.8 423.6 511.2C427.6 552.4 388.7 586.8 346.6 570.1C303.2 550.5 259.4 527.5 230.4 493.3C217 453.1 225.9 407.5 222.2 365.3C222.2 365.3 222.1 365.1 222 365C151.4 319.6 59.3 250.9 61 158.4C59.9 121 91.8 96.1 123.8 96.5C259.3 98.5 394.1 104.4 528.8 96.3zM506.1 161.4C378.3 168.2 252 162.1 125.2 160.5C128.6 227 199 270.8 250 306.8C305.5 335.4 281.6 410.5 288.3 461.7C310.8 478.9 334.6 494.6 358.9 505.8C355.4 458 350.7 415.4 350.2 364.6C349.9 349.2 355.3 333.7 366.5 321.7C384.3 302.6 402.8 287.8 421.5 270.1C446.1 245.2 477.9 225.1 499.7 196.7C509 182.2 504.7 174.5 506 161.5z"/></svg>
|
||||
</span>
|
||||
<span class="d-none d-md-block fw-medium">Filters</span>
|
||||
</button>
|
||||
)}
|
||||
<input type="hidden" name="start" id="start" value="0" />
|
||||
<input type="hidden" name="sort" id="sortInput" value="" />
|
||||
<input type="hidden" name="language" id="languageInput" value="all" />
|
||||
<input type="search" name="q" class="form-control form-control-lg" placeholder="Search cards..." />
|
||||
<button type="submit" class="btn btn-danger btn-lg border border-danger-subtle border-start-0" aria-label="search" value="" onclick="const q = this.closest('form').querySelector('[name=q]').value; dataLayer.push({ event: 'view_search_results', search_term: q });">
|
||||
<svg aria-hidden="true" class="search-button d-block" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><path d="M432 272C432 183.6 360.4 112 272 112C183.6 112 112 183.6 112 272C112 360.4 183.6 432 272 432C360.4 432 432 360.4 432 272zM401.1 435.1C365.7 463.2 320.8 480 272 480C157.1 480 64 386.9 64 272C64 157.1 157.1 64 272 64C386.9 64 480 157.1 480 272C480 320.8 463.2 365.7 435.1 401.1L569 535C578.4 544.4 578.4 558.1 569 567.5C559.6 575.9 544.4 575.9 536 567.5L401.1 435.1z"/></svg>
|
||||
<input type="search" name="q" id="searchInput" class="form-control search-input" placeholder="Search cards" />
|
||||
<button
|
||||
type="submit"
|
||||
class="btn btn-purple border-start-0"
|
||||
aria-label="search"
|
||||
onclick="
|
||||
const q = this.closest('form').querySelector('[name=q]').value;
|
||||
dataLayer.push({ event: 'view_search_results', search_term: q });
|
||||
if (window.location.pathname !== '/pokemon') {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
sessionStorage.setItem('pendingSearch', q);
|
||||
window.location.href = '/pokemon';
|
||||
}
|
||||
"
|
||||
>
|
||||
<svg aria-hidden="true" class="search-button d-block" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><path d="M503.7 304.9C520.3 80.3 214-44 100.9 169.4C-14.1 383.9 203.9 614.6 419.8 466.3C459.7 500.3 494.8 542.3 531.5 578.2C561.1 607.7 606.3 562.8 576.8 533L540 496.1C520.2 471.6 495.7 449.1 473.7 428.9C471.1 426.5 468.5 424.2 466 421.9C491.9 385.4 500.1 341 503.7 304.8zM236.1 129C334 92.1 452.1 198.1 440 298.6C440.5 404.9 335.6 462.2 244 445.8C99 407.1 100.3 178.9 236.2 129z"/></svg>
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</form>
|
||||
</Show>
|
||||
Reference in New Issue
Block a user