Skip to content

fix uwu flicker #6820

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Apr 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/components/Layout/HomeContent.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import CodeBlock from 'components/MDX/CodeBlock';
import {ExternalLink} from 'components/ExternalLink';
import sidebarBlog from '../../sidebarBlog.json';
import * as React from 'react';
import Image from 'next/image';

function Section({children, background = null}) {
return (
Expand Down Expand Up @@ -117,10 +118,12 @@ export function HomeContent() {
<div className="ps-0">
<div className="mx-5 mt-12 lg:mt-24 mb-20 lg:mb-32 flex flex-col justify-center">
<div className="uwu-visible flex justify-center">
<img
<Image
alt="logo by @sawaratsuki1004"
title="logo by @sawaratsuki1004"
className="uwu-visible h-24 lg:h-40"
loading="eager"
width={313}
height={160}
src="/images/uwu.png"
/>
</div>
Expand Down
12 changes: 7 additions & 5 deletions src/components/Layout/TopNav/TopNav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
startTransition,
Suspense,
} from 'react';
import Image from 'next/image';
import * as React from 'react';
import cn from 'classnames';
import NextLink from 'next/link';
Expand Down Expand Up @@ -249,14 +250,15 @@ export default function TopNav({
{isMenuOpen ? <IconClose /> : <IconHamburger />}
</button>
<div className="f">
<div className="uwu-visible">
<NextLink
href="/"
className={`active:scale-95 mt-0.5 overflow-hidden transition-transform relative items-center justify-center text-primary dark:text-primary-dark p-1 whitespace-nowrap outline-link rounded-full 3xl:rounded-xl inline-flex text-lg font-normal gap-2`}>
<img
<div className="uwu-visible flex items-center justify-center h-full">
<NextLink href="/">
<Image
alt="logo by @sawaratsuki1004"
title="logo by @sawaratsuki1004"
className="h-8"
priority
width={63}
height={32}
src="/images/uwu.png"
/>
</NextLink>
Expand Down
13 changes: 6 additions & 7 deletions src/styles/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -745,11 +745,10 @@ ol.mdx-illustration-block {
display: flex;
}

.uwu {
.uwu-visible {
display: flex;
}
.uwu-hidden {
display: none;
}
.uwu .uwu-visible {
display: flex;
}

.uwu .uwu-hidden {
display: none;
}
Loading