Skip to content

Commit ff2042d

Browse files
Remix Jam 2025 photo gallery (#366)
* Add PhotoSchema and transformShopifyImageUrl function to handle image URL transformations. Implement getPhotos function to fetch and parse photo data from Shopify metaobjects, ensuring proper error handling and validation. * Add gallery route and page for Remix Jam 2025 - Introduced a new route for the photo gallery at "2025/gallery". - Created the GalleryPage component to display optimized photos fetched from Shopify. - Implemented responsive image handling and metadata for SEO. * Refactor GalleryPage component and enhance image handling - Renamed the download icon in icons.svg for clarity. - Updated the GalleryPage component to include new image handling features such as modal support, keyboard navigation, and download functionality. - Improved photo optimization and added full resolution image URLs for better user experience. - Implemented hydration checks to manage modal visibility and body scroll behavior. - Enhanced accessibility with keyboard navigation and improved link handling for images. * Refactor GalleryPage component to improve image rendering and data handling - Updated the loader function to return all optimized photos instead of a limited set. - Replaced direct image elements with a new Photo component for better code organization and reusability. - Removed unnecessary comments and cleaned up the modal image handling for clarity. - Enhanced the overall structure of the GalleryPage for improved maintainability. * Enhance GalleryPage component and update styles - Refactored modal handling to preserve scroll position when the dialog is open. - Improved CSS styles for scrollbar appearance and stability. * Refactor GalleryPage component to enhance modal functionality and accessibility - Moved modal handling logic into a separate PhotoModal component for better organization. - Implemented dialog accessibility features, including scroll locking and focus trapping. - Updated keyboard navigation for improved user experience when interacting with the modal. - Enhanced CSS styles for focus outlines and button interactions. * Refactor image handling and optimize photo rendering in GalleryPage - Moved the transformShopifyImageUrl function to utils.tsx for better organization and reusability. - Updated GalleryPage to utilize the new image transformation function, enhancing photo optimization. - Introduced a new og-gallery image for improved social sharing. - Cleaned up the loader function to streamline photo data handling and removed redundant code related to image optimization. * Fix React key prop to use unique photo URL instead of array index (#367) * Initial plan * Fix: use photo.url as key instead of array index Co-authored-by: brookslybrand <12396812+brookslybrand@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: brookslybrand <12396812+brookslybrand@users.noreply.github.com> * Cleanup code * Enhance Navbar and GalleryPage components - Added a "Gallery" link to the Navbar for improved navigation. - Updated styles for responsive design in Navbar and TicketLogo. - Cleaned up the GalleryPage loader function by removing redundant code and ensuring proper photo fetching. * Remove the width and height of the image element * Refactor PhotoModal and ModalImage components for improved image handling - Added click event to backdrop for better user interaction. - Introduced aspect ratio handling and conditional styling for images based on orientation. - Updated image quality settings for enhanced rendering. * Small style tweaks * Remove rounded corners on full image display * Make the focus state of icons a bit more visible --------- Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: brookslybrand <12396812+brookslybrand@users.noreply.github.com>
1 parent 97dc3fa commit ff2042d

File tree

9 files changed

+556
-6
lines changed

9 files changed

+556
-6
lines changed

app/icons.svg

Lines changed: 1 addition & 1 deletion
Loading

app/routes.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@ export default [
99
route("2025/lineup", "routes/jam/pages/2025.lineup.tsx"),
1010
route("2025/faq", "routes/jam/pages/2025.faq.tsx"),
1111
route("2025/coc", "routes/jam/pages/2025.coc.tsx"),
12+
route("2025/gallery", "routes/jam/pages/2025.gallery.tsx"),
1213
]),
1314
] satisfies RouteConfig;
105 KB
Loading

app/routes/jam/jam.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ CSS Variables used in this file:
1414
src: url("/font/jet-brains-mono.woff2") format("woff2");
1515
}
1616

17+
html,
18+
body {
19+
scrollbar-color: theme(colors.gray.300) theme(colors.gray.800);
20+
}
21+
1722
@media (prefers-reduced-motion: reduce) {
1823
html {
1924
scroll-behavior: auto;

app/routes/jam/navbar.tsx

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,14 @@ export function Navbar({ className }: { className?: string }) {
2121
}}
2222
>
2323
<Link to={href("/jam/2025")} className="flex items-center md:block">
24-
<JamLogo className="h-[48px] fill-white md:h-auto md:w-[200px]" />
24+
<JamLogo className="h-[48px] fill-white md:h-auto md:w-[200px] lg:w-[160px] xl:w-[200px]" />
2525
</Link>
2626

2727
<div className="hidden items-center justify-center gap-2 rounded-full bg-black/40 p-2 backdrop-blur-lg lg:flex">
2828
<NavLink to={href("/jam/2025/lineup")}>Schedule & Lineup</NavLink>
29+
<NavLink className="text-white" to={href("/jam/2025/gallery")}>
30+
Gallery
31+
</NavLink>
2932
<NavLink className="text-white" to={href("/jam/2025/coc")}>
3033
Code of Conduct
3134
</NavLink>
@@ -35,7 +38,7 @@ export function Navbar({ className }: { className?: string }) {
3538
</div>
3639

3740
<JamLink className="hidden lg:flex" to={href("/jam/2025/ticket")}>
38-
<TicketLogo className="size-6 fill-current md:size-8" />
41+
<TicketLogo className="size-6 fill-current md:size-8 lg:size-6 xl:size-8" />
3942
<span>Ticket</span>
4043
</JamLink>
4144

@@ -56,11 +59,14 @@ function MobileMenu() {
5659
</svg>
5760
</summary>
5861
<div className="absolute right-0 z-20 lg:left-0">
59-
<div className="top-1 p-1 w-max">
62+
<div className="top-1 w-max p-1">
6063
<nav className="flex flex-col gap-2 overflow-hidden rounded-[2rem] bg-black/40 px-2 py-2.5 backdrop-blur-lg">
6164
<MobileNavLink to={href("/jam/2025/lineup")}>
6265
Schedule & Lineup
6366
</MobileNavLink>
67+
<MobileNavLink to={href("/jam/2025/gallery")}>
68+
Gallery
69+
</MobileNavLink>
6470
<MobileNavLink to={href("/jam/2025/coc")}>
6571
Code of Conduct
6672
</MobileNavLink>
@@ -120,7 +126,7 @@ function NavLink({ className, children, ...props }: NavLinkProps) {
120126
<RRNavLink
121127
className={({ isActive }) =>
122128
clsx(
123-
"rounded-full border-2 px-5 py-0.5 text-base font-bold outline-none transition-colors duration-300 md:border-4 md:py-3 md:text-xl",
129+
"rounded-full border-2 px-5 py-0.5 text-base font-bold outline-none transition-colors duration-300 md:border-4 md:py-3 md:text-xl lg:border-2 lg:px-4 lg:py-2 lg:text-base xl:px-5 xl:py-3 xl:text-xl",
124130
isActive
125131
? "border-white text-white"
126132
: "border-transparent text-white/70 hover:border-white hover:text-white focus-visible:border-white focus-visible:text-white",

0 commit comments

Comments
 (0)