Skip to content

Commit

Permalink
fix scroll up on query params change
Browse files Browse the repository at this point in the history
  • Loading branch information
beumsk committed Jan 9, 2024
1 parent 0796110 commit bc82568
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 23 deletions.
2 changes: 1 addition & 1 deletion pages/blog/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export default function Blog({ title, description, url }) {
</a>
</Link>
{categories.map((c) => (
<Link key={c} href={`?${c}`}>
<Link key={c} href={`?${c}`} scroll={false}>
<a
className={`btn ${query === c ? 'active' : ''}`}
onClick={() => setCat(posts.filter((x) => x.categories.includes(c)))}
Expand Down
6 changes: 3 additions & 3 deletions pages/projects/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ export default function Projects({ title, description, url, projects }) {
</p>

<div className="project__tech-list mb-4">
<Link href={'?professional'}>
<Link href={'?professional'} scroll={false}>
<a onClick={() => setFilter('professional')} className={`btn ${filter === 'professional' ? 'active' : ''}`}>
Professional projects
</a>
</Link>
<Link href={'?personal'}>
<Link href={'?personal'} scroll={false}>
<a onClick={() => setFilter('personal')} className={`btn ${filter === 'personal' ? 'active' : ''}`}>
Personal projects
</a>
Expand All @@ -46,7 +46,7 @@ export default function Projects({ title, description, url, projects }) {

<div className="project__tech-list">
{skillsList.map((s) => (
<Link key={s} href={`?${s}`}>
<Link key={s} href={`?${s}`} scroll={false}>
<a onClick={() => setFilter(s)} className={`btn ${filter === s ? 'active' : ''}`}>
<Tech name={s} />
<span>{s.replace('-', ' ')}</span>
Expand Down
20 changes: 1 addition & 19 deletions public/styles/base/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ main.dark {
}

@media (prefers-color-scheme: dark) {
main {
main:not(.light) {
--text: #fcfcfc;
--text2: #eeeeee;
--text3: #dddddd;
Expand All @@ -85,22 +85,4 @@ main.dark {
filter: invert(0.94);
}
}

// TODO: check that this actually works
main.light {
--text: #111111;
--text2: #333333;
--text3: #454545;
--bg3: #dddddd;
--bg2: #eeeeee;
--bg: #fcfcfc;
--bg10: rgba(256, 256, 256, 0.1);
--bg20: rgba(256, 256, 256, 0.2);
--bg40: rgba(256, 256, 256, 0.4);
--bg80: rgba(256, 256, 256, 0.8);
--text10: rgba(0, 0, 0, 0.1);
--text20: rgba(0, 0, 0, 0.2);
--text40: rgba(0, 0, 0, 0.4);
--text80: rgba(0, 0, 0, 0.8);
}
}

0 comments on commit bc82568

Please sign in to comment.