Skip to content

Commit

Permalink
Add responsive styles
Browse files Browse the repository at this point in the history
  • Loading branch information
agarun committed May 30, 2024
1 parent c7e8a0a commit ddf05c7
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 11 deletions.
4 changes: 2 additions & 2 deletions src/app/[slug]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import dynamic from 'next/dynamic';
import { getAlbum, getAlbums } from '@/lib/api';
import Nav from '@/lib/nav';
import { slugToAlbumTitle } from '@/lib/slug';
import { slugToAlbumTitle } from '@/lib/api/slug';
import { LocationIcon } from '@/lib/icons/location-icon';
import { Album } from '@/types';

const Masonry = dynamic(() => import('@/lib/masonry'), {
const Masonry = dynamic(() => import('@/lib/images/masonry'), {
ssr: false
});

Expand Down
4 changes: 2 additions & 2 deletions src/app/about/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ async function AboutPage() {
`}</p>

<p className="mb-32 text-lg">
The website is open source on GitHub, built with React and hosted on
Pages and Contentful.
The website is open source on GitHub, built with TypeScript and
React, and hosted using Pages and Contentful.
</p>

<Contact />
Expand Down
26 changes: 20 additions & 6 deletions src/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@
}

/* Animations */
.fade-in {
animation: fadeIn 2.5s ease-in-out;
}
@keyframes fadeIn {
0% {
opacity: 0;
Expand All @@ -40,15 +37,18 @@
opacity: 1;
}
}
.blink {
animation: blink 1s step-start infinite;
pointer-events: none;
.fade-in {
animation: fadeIn 2.5s ease-in-out;
}
@keyframes blink {
50% {
opacity: 0;
}
}
.blink {
animation: blink 1s step-start infinite;
pointer-events: none;
}
@keyframes scaleIn {
0%,
100% {
Expand All @@ -73,6 +73,20 @@
animation-iteration-count: 1;
animation-delay: 150ms;
}
@keyframes marquee {
0% {
left: 0;
}
100% {
left: -100%;
}
}
.marquee div {
display: block;
position: absolute;
overflow: hidden;
animation: marquee 5s linear infinite;
}

/* Lightbox */
.photoswipe--custom {
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/lib/masonry.tsx → src/lib/images/masonry.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import * as React from 'react';
import { Masonry as MasonicMasonry } from 'masonic';
import { useLightbox } from '../hooks/use-lightbox';
import { useLightbox } from '../../hooks/use-lightbox';
import { Photo } from '@/types';

const MasonryItem = ({ data: { url, width, height } }: { data: Photo }) => (
Expand Down

0 comments on commit ddf05c7

Please sign in to comment.