Skip to content

Commit

Permalink
animasi animasi manis
Browse files Browse the repository at this point in the history
  • Loading branch information
ridhozhr10 committed May 14, 2024
1 parent 61d58d2 commit 3cc3fe6
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/app/_components/layout/Header/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ const Logo = ({ text }: { text?: string }) => (
<Link href="/" className={style.logo}>
<div>
<span>&gt;</span>
{text ? <span>{text}</span> : <span>$ echo &quot;Hi&quot;</span>}
<span>$</span>
{text ? <span>{text}</span> : <span>echo &quot;Hi&quot;</span>}
<span className="animate-cursor"></span>
</div>
</Link>
Expand Down
6 changes: 5 additions & 1 deletion src/app/_components/layout/Header/style.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,14 @@
& div {
@apply font-mono text-lg flex items-center;

& span:nth-child(1) {
& span:nth-child(1),
& span:nth-child(2) {
@apply mr-[5px];
}
& span:nth-child(3) {
@apply animate-typing overflow-hidden whitespace-nowrap tracking-widest w-0;
}
& span:nth-child(4) {
@apply inline-block w-2 h-4 bg-red-400 ml-[5px] rounded-[1px];
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/app/not-found.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const metadata = {

export default function NotFound() {
return (
<BaseLayout logoText="$ exit code 1.">
<BaseLayout logoText="exit code 1.">
<div>
<h2 className="text-4xl mb-5">Page Not Found</h2>
<Link href="/">Home</Link>
Expand Down
8 changes: 7 additions & 1 deletion tailwind.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,18 @@ const config: Config = {
'bg-dark': "#232425"
},
animation: {
'cursor': 'cursor 1s infinite'
'cursor': 'cursor 1s infinite',
'typing': 'typing 15s steps(25, end) infinite'
},
keyframes: {
cursor: {
'0%, 100%': { opacity: '1' },
'50%': { opacity: '0' },
},
typing: {
'5%': {width: '0%'},
'15%, 90%': {width: '100%'},
'100%': {width: '0%'},
}
}
}
Expand Down

0 comments on commit 3cc3fe6

Please sign in to comment.