Skip to content

Commit

Permalink
feat: glow ass title
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron Christopher Tanhar committed Sep 19, 2023
1 parent 52c84f4 commit a410ed0
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 15 deletions.
39 changes: 39 additions & 0 deletions src/components/typography/MainTitle.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import type { ReactNode } from 'react';

import Accent from '@/components/Accent';
import clsxm from '@/lib/clsxm';

export type MainTitleProps = {
children?: ReactNode;
title: ReactNode;
className?: string;
};

export const MainTitle = ({ title, children, className }: MainTitleProps) => {
return (
<>
<div>
<h1
className={clsxm(
'glow inline text-4xl font-bold md:text-6xl 2xl:text-7xl',
className
)}
>
<Accent>{title}</Accent>
{children}
</h1>
</div>
<style jsx>{`
.glow {
transition: all 1s ease-in-out;
text-shadow: none;
}
.glow:hover {
text-shadow: 0 0 1px #eb2754, 0 0 2px #eb2754, 0 0 6px #1cb7ff,
0 0 8px #eb2754;
}
`}</style>
</>
);
};
9 changes: 5 additions & 4 deletions src/pages/about.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import type { NextPage } from 'next';
import { useInView } from 'react-intersection-observer';

import Accent from '@/components/Accent';
import CloudinaryImg from '@/components/images/CloudinaryImg';
import Layout from '@/components/layout/Layout';
import ButtonLink from '@/components/links/ButtonLink';
import Marker from '@/components/Marker';
import Seo from '@/components/Seo';
import TechStack from '@/components/TechStack';
import { MainTitle } from '@/components/typography/MainTitle';
import { LINK_SHORTENER_URL } from '@/constants/env';
import clsxm from '@/lib/clsxm';

Expand All @@ -24,9 +24,10 @@ const AboutPage: NextPage = () => {
<section className={clsxm('my-16 flex flex-col justify-center')}>
<article className='layout flex flex-col gap-y-6'>
<div className='flex items-center gap-x-3'>
<h1 className='text-3xl md:text-5xl 2xl:text-6xl'>
<Accent>Hey, I{"'"}m Aaron Christopher</Accent>
</h1>
<MainTitle
className='text-3xl md:text-5xl 2xl:text-6xl'
title="Hey, I'm Aaron Christopher"
/>
<CloudinaryImg
className='float-right w-24 md:w-24'
publicId={'lordronz-site/main/memoji-thonking-airpods'}
Expand Down
8 changes: 5 additions & 3 deletions src/pages/blog/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import StyledInput from '@/components/forms/StyledInput';
import Layout from '@/components/layout/Layout';
import Seo from '@/components/Seo';
import SortListbox, { SortOption } from '@/components/SortListbox';
import { MainTitle } from '@/components/typography/MainTitle';
import useInjectContentMeta from '@/hooks/useInjectContentMeta';
import clsxm from '@/lib/clsxm';
import { getFromSessionStorage } from '@/lib/helper';
Expand Down Expand Up @@ -128,9 +129,10 @@ const IndexPage = ({
<main>
<section className={clsxm(isLoaded && 'fade-in-start')}>
<div className='layout py-12'>
<h1 className='text-3xl md:text-5xl'>
<Accent>Blog {!isEnglish && 'Bahasa Indonesia'}</Accent>
</h1>
<MainTitle
className='text-3xl md:text-5xl'
title={`Blog${!isEnglish ? ' Bahasa Indonesia' : ''}`}
/>
<p className='mt-2 text-gray-600 dark:text-gray-300'>
Random thoughts about my expertise and hobby. It should be
informational for yall sussy bakas.
Expand Down
7 changes: 3 additions & 4 deletions src/pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import type { NextPage } from 'next';

import Accent from '@/components/Accent';
import CoolButton from '@/components/buttons/CoolButton';
import { Graphic } from '@/components/layout/Graphic';
import Layout from '@/components/layout/Layout';
import CustomLink from '@/components/links/CustomLink';
import UnstyledLink from '@/components/links/UnstyledLink';
import Seo from '@/components/Seo';
import { MainTitle } from '@/components/typography/MainTitle';
import Wave from '@/components/Wave';
import clsxm from '@/lib/clsxm';

Expand All @@ -19,10 +19,9 @@ const Home: NextPage = () => {
<article className='layout'>
<div className='flex h-full flex-col items-center gap-x-4 gap-y-4 md:flex-row'>
<div className='flex flex-col'>
<h1 className='text-4xl font-bold md:text-6xl 2xl:text-7xl'>
<Accent>Henlo there </Accent>
<MainTitle title='Henlo there '>
<Wave title='Hello'>👋</Wave>
</h1>
</MainTitle>
<p
className={clsxm(
'my-4 max-w-4xl md:mt-6',
Expand Down
9 changes: 5 additions & 4 deletions src/pages/projects.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import type { NextPage } from 'next';
import { useState } from 'react';
import Lightbox from 'react-image-lightbox';

import Accent from '@/components/Accent';
import Layout from '@/components/layout/Layout';
import ProjectCard, { Project } from '@/components/ProjectCard';
import Seo from '@/components/Seo';
import { MainTitle } from '@/components/typography/MainTitle';
import { LINK_SHORTENER_URL } from '@/constants/env';
import clsxm from '@/lib/clsxm';

Expand Down Expand Up @@ -107,9 +107,10 @@ const Projects: NextPage = () => {
<main>
<section className={clsxm('flex flex-col justify-center')}>
<article className='layout space-y-10 py-8'>
<h1 className='text-3xl md:text-5xl 2xl:text-6xl'>
<Accent>Projects</Accent>
</h1>
<MainTitle
className='text-3xl md:text-5xl 2xl:text-6xl'
title='Projects'
/>
<div className='grid grid-cols-1 gap-4 md:grid-cols-2'>
{projects.map((project) => (
<ProjectCard
Expand Down

1 comment on commit a410ed0

@vercel
Copy link

@vercel vercel bot commented on a410ed0 Sep 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.