Skip to content
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

Fix #21 - Add Padding and icons #28

Closed
wants to merge 9 commits into from
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import React from "react";
NightmareFox12 marked this conversation as resolved.
Show resolved Hide resolved

type SkillComponentProps = {
icon: React.ReactNode;
name: string;
};

const SkillComponent = ({ icon, name }: SkillComponentProps) => {
return (
<div className="flex items-center gap-2 bg-primary p-3 rounded-xl hover:scale-105 hover:transition-all select-none">
{icon}
<span>{name}</span>
</div>
);
};

export default SkillComponent;
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
import Image from "next/image";
import nightmareFoxImage from "./../../../public/builders/avatars/0xD2692F9df925D18D527ABe8b3d99EE9E9C8d75AE.jpg";
import SkillComponent from "./_components/SkillComponent";
import { NextPage } from "next";
import { SiBootstrap, SiExpress, SiJavascript, SiNodedotjs, SiReact, SiTailwindcss } from "react-icons/si";
import { Address } from "~~/components/scaffold-eth";

const NightmareFox: NextPage = () => {
return (
<main className="w-full max-w-6xl mx-auto px-4 sm:px-8 py-12 md:py-16">
<div className="grid md:grid-cols-2 gap-8 md:gap-12">
<div className="flex flex-col items-center md:items-start gap-6">
<div className="rounded-full w-40 h-40 md:w-56 md:h-56 overflow-hidden border-red-500 border-2">
<Image
src={nightmareFoxImage}
Copy link
Member

@Pabl0cks Pabl0cks Aug 28, 2024

Choose a reason for hiding this comment

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

You can also do src={"/builders/avatars/0xD2692F9df925D18D527ABe8b3d99EE9E9C8d75AE.jpg"}

This approach works because it's using a public path. In Next.js, files inside the public directory are served at the root path.

Copy link
Author

Choose a reason for hiding this comment

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

done ! ✨

alt="NightmareFox Profile"
width={160}
height={160}
className="w-full h-full object-cover"
style={{ aspectRatio: "1 / 1", objectFit: "cover" }}
/>
</div>
<div className="space-y-2 text-center md:text-left">
<h1 className="text-2xl md:text-3xl font-bold">NightmareFox12</h1>
<p className="text-muted-foreground">Learning web development</p>
<Address address="0xD2692F9df925D18D527ABe8b3d99EE9E9C8d75AE" />
</div>
</div>
<div className="space-y-8">
<div className="space-y-4">
<h2 className="text-2xl font-bold">About me</h2>
<p className="text-muted-foreground">
I am a web development enthusiast who is learning about modern web application design and development. I
am passionate about technology and enjoy keeping up with market trends and tools. I am focusing on
improving my skills in JavaScript, React, Node.js and databases, and hope to continue advancing in this
exciting world. 🚀✨
</p>
</div>
<div className="space-y-4">
<h2 className="text-2xl font-bold">Skills</h2>
<div className="grid grid-cols-2 lg:grid-cols-3 gap-4">
<SkillComponent icon={<SiReact />} name="React" />
<SkillComponent icon={<SiNodedotjs />} name="NodeJS" />
<SkillComponent icon={<SiJavascript />} name="JavaScript" />
<SkillComponent icon={<SiBootstrap />} name="Bootstrap" />
<SkillComponent icon={<SiTailwindcss />} name="TailwindCSS" />
<SkillComponent icon={<SiExpress />} name="ExpressJS" />
</div>
</div>
</div>
</div>
</main>
);
};

export default NightmareFox;
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.