Skip to content

Commit 92610d7

Browse files
committed
🔧 Mobile fixes
1 parent f110864 commit 92610d7

11 files changed

Lines changed: 25 additions & 64 deletions

File tree

README.md

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,6 @@ Rebuilding [my website](https://jacobmoy.com) in Next.js to do some more
44
cool stuff!
55

66
### TO-DO
7-
#### Main
8-
- [ ] Add mobile responsiveness to:
9-
- [ ] Blog list
10-
- [ ] Design new mobile-friendly tag filter
11-
- [ ] Blog post
12-
- [ ] Move theme and achievements to a hamburger menu button in toolbar for mobile
13-
- [X] Add CI/CD for staging
147

158
#### Strech/Misc.
169
- [ ] Add hobbies/niche projects
@@ -21,7 +14,4 @@ cool stuff!
2114
- [ ] SFX?
2215

2316
### KNOWN BUGS
24-
- [ ] Footnote hyperlinks aren't working (thanks remark-gfm)
25-
- [ ] Achievements hide content in the drawer and are unclickable in drawer
26-
- [ ] The light mode theme box does not appear correctly in dark mode drawer
27-
- [ ] Sometimes secret achievements count towards "Completionist" achievement
17+
- [ ] Footnote hyperlinks aren't working (thanks remark-gfm)

src/app/globals.css

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ body {
9797
scroll-behavior: smooth;
9898
}
9999

100-
:root {
100+
:root, .light {
101101
--radius: 0.625rem;
102102
--background: oklch(1 0 0);
103103
--foreground: oklch(0.141 0.005 285.823);
@@ -132,13 +132,13 @@ body {
132132
--sidebar-ring: oklch(0.705 0.015 286.067);
133133
--divider: #3f3f3f;
134134

135-
--rarity-common: var(--color-zinc-700);
136-
--rarity-uncommon: var(--color-green-700);
137-
--rarity-rare: var(--color-sky-700);
138-
--rarity-epic: var(--color-purple-700);
139-
--rarity-legendary: var(--color-yellow-600);
140-
--flavor: var(--color-yellow-600);
141-
--selected: var(--color-green-600)
135+
--rarity-common: var(--color-zinc-400);
136+
--rarity-uncommon: var(--color-green-400);
137+
--rarity-rare: var(--color-sky-400);
138+
--rarity-epic: var(--color-purple-400);
139+
--rarity-legendary: var(--color-yellow-500);
140+
--flavor: var(--color-amber-600);
141+
--selected: var(--color-green-500)
142142
}
143143

144144
.dark {

src/app/quick-links/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,8 @@ const links = [
119119

120120
export default function QuickLinks() {
121121
return (
122-
<div className="flex flex-col flex-wrap w-full items-center justify-evenly gap-12
123-
md:flex-row md:w-4xl md:mx-auto md:items-start">
122+
<div className="flex flex-col items-center w-full gap-12 pb-12
123+
md:flex-row md:w-4xl md:mx-auto md:items-start md:pb-0">
124124
{links.map((category) => (
125125
<div key={category.title} className="grid grid-cols-1 gap-2 md:p-8 h-fit w-fit">
126126
<div className="flex flex-row gap-4 items-center justify-center border-b-2 pb-1

src/components/ui/achievement.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export default function Achievement({
2929

3030
return (
3131
<div className="w-full">
32-
<div className="grid grid-cols-[1fr_7fr] w-full">
32+
<div className="grid grid-cols-[1fr_7fr] gap-2 w-full">
3333
<div className={cn(
3434
"w-10 h-10 md:w-12 md:h-12 rounded-md flex items-center justify-center",
3535
!unlocked && "",

src/components/ui/blog-entry.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export default function BlogEntry({
2020
createdAt,
2121
}: BlogEntryProps) {
2222
return (
23-
<a className="w-sm h-100 flex flex-col gap-2" href={`blog/posts/${slug}`}>
23+
<a className="md:w-sm h-100 flex flex-col gap-2" href={`blog/posts/${slug}`}>
2424
<AspectRatio ratio={5 / 3}>
2525
<Image
2626
src={prevImgSrc}

src/components/ui/blog-list.tsx

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { useMemo, useState } from "react";
44
import BlogEntry from "@/components/ui/blog-entry";
55
import FilterList from "@/components/ui/filter-list";
66
import type { FilterCategory, PostData } from "@/utils/types";
7-
import { useIsMobile } from "@/hooks/useIsMobile";
87

98
interface BlogListProps {
109
posts: PostData[];
@@ -13,7 +12,6 @@ interface BlogListProps {
1312

1413
export default function BlogList({ posts, categories }: BlogListProps) {
1514
const [activeFilters, setActiveFilters] = useState<string[]>([]);
16-
const isMobile = useIsMobile();
1715

1816
function handleFilterToggle(filter: string) {
1917
setActiveFilters((prevFilters) => {
@@ -47,8 +45,8 @@ export default function BlogList({ posts, categories }: BlogListProps) {
4745

4846
return (
4947
<div className="flex flex-col items-center
50-
md:flex-row md:justify-center md:items-start md:gap-12">
51-
<div className="grid grid-cols-1 place-items-center md:grid-cols-2 w-fit px-2 gap-12">
48+
md:flex-row md:justify-center md:items-start md:gap-12 md:px-0 px-4">
49+
<div className="grid grid-cols-1 place-items-center md:grid-cols-2 w-fit gap-12">
5250
{filteredPosts.map((post) => (
5351
<BlogEntry
5452
key={post.slug}
@@ -61,15 +59,13 @@ export default function BlogList({ posts, categories }: BlogListProps) {
6159
/>
6260
))}
6361
</div>
64-
{!isMobile &&
65-
<div className="h-fit sticky top-24 w-0">
62+
<div className="h-fit sticky top-24 w-0 md:block hidden">
6663
<FilterList
6764
categories={dynamicCategories}
6865
activeFilters={activeFilters}
6966
onFilterToggle={handleFilterToggle}
7067
/>
7168
</div>
72-
}
7369
</div>
7470
);
7571
}

src/components/ui/home-section.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,12 @@ export default function HomeSection({
2727
>
2828
{title}
2929
</p>
30-
<div className={`flex flex-col gap-${gap} pl-5.5`}>{children}</div>
30+
<div
31+
className={`flex flex-col pl-5.5`}
32+
style={{
33+
gap: `${0.25 * gap}rem`
34+
}}
35+
>{children}</div>
3136
</div>
3237
);
3338
}

src/components/ui/mobile-settings-content.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ export function MobileAchievementContent() {
7878
const [fetchedAchievements, setFetchedAchievements] = useState<AchievementProps[]>([]);
7979
const [page, setPage] = useState<number>(0);
8080
const [maxPages, setMaxPages] = useState<number>(0);
81-
const achievementsPerPage = 4;
81+
const achievementsPerPage = 3;
8282

8383
useEffect(() => {
8484
setFetchedAchievements(achievements.fetchAchievements());

src/components/ui/toolbar-button.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export default function ToolbarButton({
1414
return (
1515
<StatLink
1616
href={toLink(title)}
17-
className="underline-anim text-xl md:text-2xl font-bold tracking-normal"
17+
className="underline-anim text-lg md:text-2xl font-bold tracking-normal"
1818
>
1919
{title}
2020
</StatLink>

src/hooks/useIsMobile.ts

Lines changed: 0 additions & 30 deletions
This file was deleted.

0 commit comments

Comments
 (0)