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

feat: add bio-card play #1570

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions src/plays/bio-card/App.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import React from 'react';
import './styles.css';
import Avatar from './components/Avatar';
import Intro from './components/Intro';
import SkillList from './components/SkillList';

const App = () => {
return (
<div className="bio-card_card">
<Avatar />
<div className="bio-card_data">
<Intro />
<SkillList />
</div>
</div>
);
};

export default App;
20 changes: 20 additions & 0 deletions src/plays/bio-card/BioCard.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import React from 'react';

import PlayHeader from 'common/playlists/PlayHeader';
import './styles.css';
import App from './App';

function BioCard(props: any) {
return (
<>
<div className="play-details">
<PlayHeader play={props} />
<div className="play-details-body">
<App />
</div>
</div>
</>
);
}

export default BioCard;
27 changes: 27 additions & 0 deletions src/plays/bio-card/Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Bio Card

The card is a compact profile display featuring a person’s image, a brief bio, and a list of technologies they specialize in.

## Play Demographic

- Language: ts
- Level: Beginner

## Creator Information

- User: aaqib605
- Gihub Link: https://github.com/aaqib605
- Blog: https://hashnode.com/@aaqib605
- Video:

## Implementation Details

Update your implementation idea and details here

## Consideration

Update all considerations(if any)

## Resources

Update external resources(if any)
Binary file added src/plays/bio-card/assets/aaqib-javaid.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions src/plays/bio-card/components/Avatar.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import React from 'react';

import profileImg from '../assets/aaqib-javaid.jpg';

function Avatar() {
return <img alt="Aaqib Javaid" className="bio-card_profile-picture" src={profileImg} />;
}

export default Avatar;
15 changes: 15 additions & 0 deletions src/plays/bio-card/components/Intro.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import React from 'react';

function Intro() {
return (
<div>
<h1 className="bio-card_name">Aaqib Javaid</h1>
<p className="bio-card_person-bio">
Passionate about crafting beautiful and functional web experiences. Love open source. Let's
connect and collaborate on some cool projects!
</p>
</div>
);
}

export default Intro;
22 changes: 22 additions & 0 deletions src/plays/bio-card/components/Skill.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import React from 'react';

interface SkillProps {
skill: string;
color: string;
level: string;
}

const Skill: React.FC<SkillProps> = ({ skill, color, level }) => {
return (
<div className="bio-card_skill" style={{ backgroundColor: color }}>
<span>{skill}</span>
<span>
{level === 'beginner' && '👶'}
{level === 'intermediate' && '👍'}
{level === 'advanced' && '💪'}
</span>
</div>
);
};

export default Skill;
48 changes: 48 additions & 0 deletions src/plays/bio-card/components/SkillList.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
import React from 'react';

import Skill from './Skill';

function SkillList() {
const skills = [
{
skill: 'HTML+CSS',
level: 'advanced',
color: '#2662EA'
},
{
skill: 'JavaScript',
level: 'advanced',
color: '#EFD81D'
},
{
skill: 'Web Design',
level: 'advanced',
color: '#C3DCAF'
},
{
skill: 'Git and GitHub',
level: 'intermediate',
color: '#E84F33'
},
{
skill: 'React',
level: 'advanced',
color: '#60DAFB'
},
{
skill: 'Svelte',
level: 'beginner',
color: '#FF3B00'
}
];

return (
<div className="bio-card_skill-list">
{skills.map((skill) => (
<Skill color={skill.color} level={skill.level} skill={skill.skill} />
))}
</div>
);
}

export default SkillList;
Binary file added src/plays/bio-card/cover.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
74 changes: 74 additions & 0 deletions src/plays/bio-card/styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@300;400;500&display=swap');

* {
margin: 0;
padding: 0;
box-sizing: border-box;
}

body {
font-family: 'IBM Plex Mono', sans-serif;
background-color: #f7f7f7;
}
Comment on lines +3 to +12
Copy link
Member

Choose a reason for hiding this comment

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

please avoid targeting directly


.bio-card_name {
font-size: 2rem;
margin: 1rem auto 2rem auto;
text-align: center;
}

.bio-card_card {
max-width: 450px;
margin: 40px auto;
border: 4px solid #222;
}

.bio-card_card::after {
content: '';
display: block;
}

.bio-card_profile-picture {
width: 100%;
display: block;
background: none;
}

.bio-card_data {
padding: 32px;
padding-top: 24px;
}

.bio-card_person-bio {
text-align: center;
}

.bio-card_skill-list {
list-style: none;
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 8px;
margin-top: 16px;
}

.bio-card_skill {
padding: 2px 12px;
border-radius: 5px;
display: flex;
align-items: center;
gap: 8px;
font-weight: 500;
}

@media (max-width: 425px) {
.bio-card_data {
padding: 1rem 0.5rem;
padding-top: 0;
}

.bio-card_name {
font-size: 1.5rem;
margin: 1rem auto;
}
}
Loading