Skip to content

Commit

Permalink
Remove Umami
Browse files Browse the repository at this point in the history
  • Loading branch information
rgllm committed May 18, 2023
1 parent 595d2d9 commit b3273cf
Show file tree
Hide file tree
Showing 16 changed files with 74 additions and 139 deletions.
8 changes: 3 additions & 5 deletions components/BlogPost.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,13 @@ export default function BlogPost({title, description}) {
const slug = slugify(title, {lower: true})

return (
(<Link href={`/blog/${slug}`} className={`w-full umami--click--blog-${slug}`}>

<Link href={`/blog/${slug}`} className="w-full">
<div className="w-full mb-8">
<div className="flex flex-col justify-between md:flex-row">
<h2 className="w-full mb-2 text-lg font-medium text-gray-900 md:text-lg">{title}</h2>
</div>
<p className="text-gray-600">{description}</p>
</div>

</Link>)
);
</Link>
)
}
9 changes: 4 additions & 5 deletions components/BookmarksList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,14 @@ export default function BookmarksList({bookmarks}) {
href={bookmark.link}
target="_blank"
rel="noopener noreferrer"
className={`animatedArrow inline-flex items-center px-2.5 py-0.5 leading-5 font-medium text-gray-700 cursor-pointer umami--click--bookmark-${bookmark.id}`}>
View{' '}
<FiArrowRight className="arrow text-gray-700 mt-[2px] ml-[4px] max-w-[18px]" />

className="animatedArrow inline-flex items-center px-2.5 py-0.5 leading-5 font-medium text-gray-700 cursor-pointer"
>
View <FiArrowRight className="arrow text-gray-700 mt-[2px] ml-[4px] max-w-[18px]" />
</Link>
</div>
</div>
</li>
))}
</ul>
);
)
}
1 change: 0 additions & 1 deletion components/Container.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ function NavItem({href, text}) {
className={cn(
isActive ? 'font-semibold text-[#24292f]' : 'font-normal text-[#24292f]',
'hidden md:inline-block p-1 sm:px-3 sm:py-2 rounded-lg transition-all hover:bg-[#ededed] duration-120',
`umami--click--menu-${text.toLowerCase()}`,
)}
>
<span className="capsize">{text}</span>
Expand Down
6 changes: 3 additions & 3 deletions components/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,23 @@ export default function Footer() {
<div className="flex flex-row">
<Link
href="https://twitter.com/intent/follow?screen_name=rgllm"
className="mr-4 umami--click--footer-twitter"
className="mr-4"
target="_blank"
rel="noopener noreferrer"
>
<FiTwitter />
</Link>
<Link
href="https://github.com/rgllm"
className="mr-4 umami--click--footer-github"
className="mr-4"
target="_blank"
rel="noopener noreferrer"
>
<FiGithub />
</Link>
<Link
href="https://linkedin.com/in/rgllm"
className="mr-4 umami--click--footer-linkedin"
className="mr-4"
target="_blank"
rel="noopener noreferrer"
>
Expand Down
111 changes: 53 additions & 58 deletions components/MobileMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import Link from 'next/link'
import useDelayedRender from 'use-delayed-render'

import styles from 'styles/mobile-menu.module.css'
import {trackEvent} from 'lib/analytics'

export default function MobileMenu() {
const [isMenuOpen, setIsMenuOpen] = useState(false)
Expand All @@ -33,63 +32,59 @@ export default function MobileMenu() {
}
}, [])

return <>
<button
className={cn(styles.burger, 'visible md:hidden')}
aria-label="Toggle menu"
type="button"
onClick={toggleMenu}
>
<AiOutlineMenu className="absolute w-5 h-5 text-gray-900" data-hide={isMenuOpen} />
<GrClose className="absolute w-5 h-5 text-gray-900" data-hide={!isMenuOpen} />
</button>
{isMenuMounted && (
<ul
className={cn(
styles.menu,
'flex flex-col absolute bg-gray-100',
isMenuRendered && styles.menuRendered,
)}
return (
<>
<button
className={cn(styles.burger, 'visible md:hidden')}
aria-label="Toggle menu"
type="button"
onClick={toggleMenu}
>
<li
className="text-sm font-semibold text-gray-900 border-b border-gray-300"
style={{transitionDelay: '150ms'}}
<AiOutlineMenu className="absolute w-5 h-5 text-gray-900" data-hide={isMenuOpen} />
<GrClose className="absolute w-5 h-5 text-gray-900" data-hide={!isMenuOpen} />
</button>
{isMenuMounted && (
<ul
className={cn(
styles.menu,
'flex flex-col absolute bg-gray-100',
isMenuRendered && styles.menuRendered,
)}
>
<Link href="/" className="flex w-auto pb-4 umami--click--mobile-menu-home">
Home
</Link>
</li>
<li
className="text-sm font-semibold text-gray-900 border-b border-gray-300"
style={{transitionDelay: '175ms'}}
>
<Link
href="/about"
className="flex w-auto pb-4 umami--click--mobile-menu-about">
About
</Link>
</li>
<li
className="text-sm font-semibold text-gray-900 border-b border-gray-300"
style={{transitionDelay: '200ms'}}
>
<Link
href="/blog"
className="flex w-auto pb-4 umami--click--mobile-menu-writing">
Writing
</Link>
</li>
<li
className="text-sm font-semibold text-gray-900 border-b border-gray-300"
style={{transitionDelay: '250ms'}}
>
<Link
href="/bookmarks"
className="flex w-auto pb-4 umami--click--mobile-menu-bookmarks">
Bookmarks
</Link>
</li>
</ul>
)}
</>;
<li
className="text-sm font-semibold text-gray-900 border-b border-gray-300"
style={{transitionDelay: '150ms'}}
>
<Link href="/" className="flex w-auto pb-4">
Home
</Link>
</li>
<li
className="text-sm font-semibold text-gray-900 border-b border-gray-300"
style={{transitionDelay: '175ms'}}
>
<Link href="/about" className="flex w-auto pb-4">
About
</Link>
</li>
<li
className="text-sm font-semibold text-gray-900 border-b border-gray-300"
style={{transitionDelay: '200ms'}}
>
<Link href="/blog" className="flex w-auto pb-4">
Writing
</Link>
</li>
<li
className="text-sm font-semibold text-gray-900 border-b border-gray-300"
style={{transitionDelay: '250ms'}}
>
<Link href="/bookmarks" className="flex w-auto pb-4">
Bookmarks
</Link>
</li>
</ul>
)}
</>
)
}
4 changes: 2 additions & 2 deletions components/PageNavigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ export default function PageNavigation({currentPage, lastPage, setNext, setPrev}
<button
onClick={() => setPrev()}
disabled={currentPage === 1}
className="relative inline-flex items-center px-4 py-2 ml-2 text-lg text-gray-700 rounded-md disabled:opacity-50 umami--click--bookmarks-previous"
className="relative inline-flex items-center px-4 py-2 ml-2 text-lg text-gray-700 rounded-md disabled:opacity-50"
>
<ImArrowLeft2 />
</button>
<button
onClick={() => setNext()}
disabled={currentPage === lastPage}
className="relative inline-flex items-center px-4 py-2 ml-2 text-lg text-gray-700 rounded-md disabled:opacity-50 umami--click--bookmarks-next"
className="relative inline-flex items-center px-4 py-2 ml-2 text-lg text-gray-700 rounded-md disabled:opacity-50"
>
<ImArrowRight2 />
</button>
Expand Down
2 changes: 1 addition & 1 deletion components/PostCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Link from 'next/link'

export default function PostCard({title, slug}) {
return (
<Link href={`/blog/${slug}`} className={`umami--click--homepage-${slug}`}>
<Link href={`/blog/${slug}`}>
<h4 className="w-full mb-4 font-medium text-gray-600 text-md">{title}</h4>
</Link>
)
Expand Down
2 changes: 1 addition & 1 deletion components/ProjectCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React from 'react'

export default function ProjectCard({href, name, icon, description}) {
return (
<Link href={href} passHref className={`umami--click--homepage-${name}`}>
<Link href={href} passHref>
<li className="w-full mb-4 cursor-pointer transform hover:scale-[1.01] transition-all">
<div className="flex p-4 pl-0 border-0 border-gray-600 border-solid rounded-lg align-center">
{icon && <div className="flex flex-col justify-center mr-4 align-center">{icon}</div>}
Expand Down
10 changes: 3 additions & 7 deletions components/Weather.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,9 @@ export default function Weather() {
if (!temperature || !condition) return null

return (
(<Link
href="/weather"
className="flex flex-row items-center umami--click--weather">

<Link href="/weather" className="flex flex-row items-center">
{iconRenderSwitch(icon)}
<span className="font-normal text-[#24292f]">{Math.ceil(temperature)} ºC</span>

</Link>)
);
</Link>
)
}
25 changes: 0 additions & 25 deletions e2e/homepage.spec.ts

This file was deleted.

19 changes: 0 additions & 19 deletions lib/analytics.ts

This file was deleted.

7 changes: 0 additions & 7 deletions pages/_document.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,6 @@ export default function Document(props) {
<meta content="/favicons/browserconfig.xml" name="msapplication-config" />
<link href="/favicons/favicon.ico" rel="shortcut icon" />
<link href="/favicons/manifest.json" rel="manifest" />
<link rel="preconnect" href="https://ai.rgllm.com" crossOrigin="" />
<script
async
defer
data-website-id={process.env.UMAMI_WEBSITE_ID}
src="https://ai.rgllm.com/umami.js"
></script>
</Head>
<body>
<Main />
Expand Down
2 changes: 1 addition & 1 deletion pages/blog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export default function Blog({posts}: InferGetStaticPropsType<typeof getStaticPr
type="text"
onChange={e => setSearchValue(e.target.value)}
placeholder="Search posts"
className="block w-full px-4 py-2 text-gray-900 bg-white border border-gray-200 rounded-md focus:ring-blue-500 focus:border-blue-500 umami--input--blog-search"
className="block w-full px-4 py-2 text-gray-900 bg-white border border-gray-200 rounded-md focus:ring-blue-500 focus:border-blue-500"
/>
<svg
className="absolute w-5 h-5 text-gray-400 right-3 top-3 "
Expand Down
2 changes: 1 addition & 1 deletion pages/bookmarks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default function About({bookmarks}: InferGetStaticPropsType<typeof getSta
type="text"
onChange={e => setSearchValue(e.target.value)}
placeholder="Search bookmarks"
className="block w-full px-4 py-2 text-gray-900 bg-white border border-gray-200 rounded-md focus:ring-blue-500 focus:border-blue-500 umami--input--bookmark-search"
className="block w-full px-4 py-2 text-gray-900 bg-white border border-gray-200 rounded-md focus:ring-blue-500 focus:border-blue-500"
/>
<svg
className="absolute w-5 h-5 text-gray-400 right-3 top-3 "
Expand Down
4 changes: 2 additions & 2 deletions pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export default function Home({bookmarks, posts}: InferGetStaticPropsType<typeof
</div>
<Link
href="/blog"
className="inline-flex leading-5 text-gray-600 items-centerfont-medium animatedArrow umami--click--home-view-all-posts"
className="inline-flex leading-5 text-gray-600 items-centerfont-medium animatedArrow"
>
View all posts{' '}
<FiArrowRight className="arrow text-gray-600 mt-[2px] ml-[4px] max-w-[18px]" />
Expand All @@ -47,7 +47,7 @@ export default function Home({bookmarks, posts}: InferGetStaticPropsType<typeof
<BookmarksList bookmarks={bookmarks} />
<Link
href="/bookmarks"
className="inline-flex items-center pt-10 font-medium leading-5 text-gray-600 animatedArrow umami--click--home-view-all-bookmarks"
className="inline-flex items-center pt-10 font-medium leading-5 text-gray-600 animatedArrow"
>
View all bookmarks{' '}
<FiArrowRight className="arrow text-gray-600 mt-[2px] ml-[4px] max-w-[18px]" />
Expand Down
1 change: 0 additions & 1 deletion pages/resume.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import ReactToPrint from 'react-to-print'
import {getPage} from 'lib/get-pages'
import Container from '~/Container'
import convertToComponents from 'lib/parse-html'
import {trackEvent} from 'lib/analytics'

export default function Resume(props: InferGetStaticPropsType<typeof getStaticProps>) {
const {bodyHTML} = props.page
Expand Down

0 comments on commit b3273cf

Please sign in to comment.