Skip to content

Commit

Permalink
feat: wrap up open source page
Browse files Browse the repository at this point in the history
  • Loading branch information
pragmaticivan committed Aug 8, 2024
1 parent 529c0ce commit 0dea0cb
Show file tree
Hide file tree
Showing 9 changed files with 175 additions and 143 deletions.
5 changes: 2 additions & 3 deletions app/about/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@ export const metadata = genPageMetadata({

const AboutPage = () => (
<>
<header className="header__blog">
<NavigationBar />
</header>
<NavigationBar />

<main className="flex-auto">
<div className="mt-16 sm:mt-32 sm:px-8">
<div className="mx-auto w-full max-w-7xl lg:px-8">
Expand Down
120 changes: 82 additions & 38 deletions app/open-source/page.tsx
Original file line number Diff line number Diff line change
@@ -1,53 +1,97 @@
import React from 'react';
import NavigationBar from '../../components/NavigationBar';
import { genPageMetadata } from '../seo';
import styles from './styles.module.scss';
import FastReadText from '../../components/FastReadText';
import Link from 'next/link';
import Image from 'next/image';
import { BsGithub, BsArrowUpRightSquare } from 'react-icons/bs';
import SlideUp from '../../components/SlideUp';

export const metadata = genPageMetadata({
title: `Open Source ✍️`,
description: `I share anything that may help others, technologies I'm using and cool things I've made`,
});

const projects = [
{
name: "nestjs-otel",
description:
"OpenTelemetry (Tracing + Metrics) module for Nest framework (node.js)",
image: "/images/project-logo.png",
github: "https://github.com/pragmaticivan/nestjs-otel",
},
{
name: "nest-resend",
description: "Injectable Resend client for your nestjs projects",
image: "/images/project-logo.png",
github: "https://github.com/pragmaticivan/nest-resend",
},
{
name: "dotfiles",
description:
"Your dotfiles are how you personalize your system. These are mine",
image: "/images/project-logo.png",
github: "https://github.com/pragmaticivan/dotfiles",
},
{
name: "nestjs-otel-prom-grafana-tempo",
description:
"Prometheus + Grafana + Tempo + Loki Observability Stack example",
image: "/images/project-logo.png",
github: "https://github.com/pragmaticivan/nestjs-otel-prom-grafana-tempo",
},
]

const OpenSourcePage = () => (
<div>
<header className="header__blog">
<>
<NavigationBar />
</header>

<div className={styles.os}>
<div className={styles.content}>
<h1>Open Source</h1>
<p>
<FastReadText
text={`There's something magical about solving problems and helping others through their journey.`}
/>
</p>
<ul>
<li>
<a
href="https://github.com/pragmaticivan/nestjs-otel"
target="_blank"
>
<b>nestjs-otel</b>
</a>{' '}
- 🔭 OpenTelemetry (Tracing + Metrics) module for Nest framework
(node.js)
</li>
<li>
<a
href="https://github.com/pragmaticivan/guia-do-trabalho-remoto"
target="_blank"
>
<b>guia-do-trabalho-remoto</b>
</a>{' '}
- ✈️ Conjunto de informações, experiências e burocracias para poder
trabalhar remotamente para empresas do mundo todo
</li>
</ul>
</div>
</div>
</div>
<section id="projects" className='mx-auto max-w-3xl px-4 sm:px-6 md:max-w-5xl'>
<h1 className="my-20 text-center text-4xl font-bold tracking-tight text-zinc-800 sm:text-5xl dark:text-zinc-100">
Open Source
<hr className="w-6 h-1 mx-auto my-4 bg-cyan-700 border-0 rounded"></hr>
</h1>

<div className="flex flex-col space-y-28 mb-32">
{projects.map((project, idx) => {
return (
<div key={idx}>
<div className="flex flex-col animate-slideUpCubiBezier animation-delay-2 md:flex-row md:space-x-12">
<div className=" md:w-1/3">
<Image
src={project.image}
alt=""
width={500}
height={500}
className="rounded-xl shadow-xl hover:opacity-70"
/>
</div>
<div className="mt-1 md:w-1/2">
<h1 className="text-4xl font-bold mb-6">{project.name}</h1>
<p className="text-xl leading-7 mb-4 text-neutral-600 dark:text-neutral-400">
{project.description}
</p>
<div className="flex flex-row align-bottom space-x-4">
<Link href={project.github} target="_blank">
<BsGithub
size={30}
className="hover:-translate-y-1 transition-transform cursor-pointer"
/>
</Link>
{project.link && <Link href={project.link} target="_blank">
<BsArrowUpRightSquare
size={30}
className="hover:-translate-y-1 transition-transform cursor-pointer"
/>
</Link>}
</div>
</div>
</div>
</div>
)
})}
</div>
</section>
</>
);

export default OpenSourcePage;
54 changes: 0 additions & 54 deletions app/open-source/styles.module.scss

This file was deleted.

4 changes: 2 additions & 2 deletions app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import styles from '../styles/home.module.scss';
export default function Page() {
return (
<>
<header
<div
className={clsx(
'w-full',
'relative',
Expand All @@ -22,7 +22,7 @@ export default function Page() {
HOWDY!
</div>
</div>
</header>
</div>
<section
className={
'container mx-auto max-w-screen-lg p-4 text-center text-2xl font-bold leading-10'
Expand Down
4 changes: 1 addition & 3 deletions app/uses/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ export const metadata = genPageMetadata({

const IndexPage = () => (
<>
<header className="header__blog">
<NavigationBar />
</header>
<NavigationBar />

<main className="flex-auto">
<div className="mt-16 sm:mt-32 sm:px-8">
Expand Down
85 changes: 42 additions & 43 deletions components/NavigationBar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,49 +9,48 @@ interface Props {

const NavigationBar = (props: Props = { dark: false }) => {
return (
<div className="flex flex-wrap justify-center px-10 pt-10 sm:justify-between">
<h1>
<Link href="/" passHref={true}>
<Image
src={
props.dark
? '/images/ivan-logo-white.png'
: '/images/ivan-logo-black.png'
}
width={200}
height={77}
alt="Ivan Santos - Logo"
/>
</Link>
</h1>
<nav className={styles.menu}>
<ul>
<li>
<Link href="/about" title="About">
About
</Link>
</li>
<li>
<Link href="/uses" title="Uses">
Uses
</Link>
</li>
<li>
<Link href="/blog" title="Blog">
Blog
</Link>
</li>
{/* <li>
<Link href="/talks">Talks</Link>
</li> */}
<li>
<Link href="/open-source" title="Open Source">
Open Source
</Link>
</li>
</ul>
</nav>
</div>
<header>
<div className="flex flex-wrap justify-center px-10 pt-10 sm:justify-between">
<h1>
<Link href="/" passHref={true}>
<Image
src={
props.dark
? '/images/ivan-logo-white.png'
: '/images/ivan-logo-black.png'
}
width={200}
height={77}
alt="Ivan Santos - Logo"
/>
</Link>
</h1>
<nav className={styles.menu}>
<ul>
<li>
<Link href="/about" title="About">
About
</Link>
</li>
<li>
<Link href="/uses" title="Uses">
Uses
</Link>
</li>
<li>
<Link href="/blog" title="Blog">
Blog
</Link>
</li>
<li>
<Link href="/open-source" title="Open Source">
Open Source
</Link>
</li>
</ul>
</nav>
</div>
</header>
);
};

Expand Down
35 changes: 35 additions & 0 deletions components/SlideUp/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
"use client"

import React, { useEffect, useRef, ReactNode } from "react"
interface Props {
offset?: string
children?: ReactNode
}

export default function SlideUp({ children, offset = "0px" }: Props) {
const ref = useRef(null)

useEffect(() => {
const observer = new IntersectionObserver(
(entries) => {
entries.forEach((entry) => {
if (entry.isIntersecting) {
entry.target.classList.remove("opacity-0")
entry.target.classList.add("animate-slideUpCubiBezier")
}
})
},
{ rootMargin: offset }
)

if (ref.current) {
observer.observe(ref.current)
}
}, [ref])

return (
<div ref={ref} className="relative opacity-0">
{children}
</div>
)
}
10 changes: 10 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"nextjs-progressbar": "^0.0.16",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-icons": "^5.2.1",
"remark": "^15.0.1",
"remark-html": "^16.0.1",
"remark-prism": "^1.3.6",
Expand Down

0 comments on commit 0dea0cb

Please sign in to comment.