Create file with most used icon button configs (socials) (#144)
This commit is contained in:
parent
d0146bb384
commit
f7589b6ca7
5 changed files with 65 additions and 38 deletions
|
|
@ -1,5 +1,7 @@
|
|||
import type { ExperienceSection } from '@/types/experience-section';
|
||||
|
||||
import getSocial from '../socials';
|
||||
|
||||
const experienceData: ExperienceSection = {
|
||||
config: {
|
||||
title: 'Work experience',
|
||||
|
|
@ -51,10 +53,7 @@ const experienceData: ExperienceSection = {
|
|||
url: 'https://firebase.google.com/',
|
||||
},
|
||||
],
|
||||
socials: [
|
||||
{ name: 'Facebook', icon: 'fa6-brands:facebook-f', url: '#' },
|
||||
{ name: 'LinkedIn', icon: 'fa6-brands:linkedin-in', url: '#' },
|
||||
],
|
||||
socials: [getSocial('facebook', '#'), getSocial('linkedin', '#')],
|
||||
},
|
||||
{
|
||||
role: 'React.js developer',
|
||||
|
|
@ -93,10 +92,7 @@ const experienceData: ExperienceSection = {
|
|||
url: 'https://eslint.org/',
|
||||
},
|
||||
],
|
||||
socials: [
|
||||
{ name: 'Website', icon: 'fa6-solid:globe', url: '#' },
|
||||
{ name: 'Instagram', icon: 'fa6-brands:instagram', url: '#' },
|
||||
],
|
||||
socials: [getSocial('website', '#'), getSocial('instagram', '#')],
|
||||
},
|
||||
{
|
||||
role: 'Junior front-end developer',
|
||||
|
|
@ -129,10 +125,7 @@ const experienceData: ExperienceSection = {
|
|||
url: 'https://pnpm.io/',
|
||||
},
|
||||
],
|
||||
socials: [
|
||||
{ name: 'Twitter', icon: 'fa6-brands:twitter', url: '#' },
|
||||
{ name: 'GitHub', icon: 'fa6-brands:github', url: '#' },
|
||||
],
|
||||
socials: [getSocial('twitter', '#'), getSocial('github', '#')],
|
||||
},
|
||||
],
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
import type { MainSection } from '@/types/main-section';
|
||||
|
||||
import getSocial from '../socials';
|
||||
|
||||
const mainData: MainSection = {
|
||||
config: {
|
||||
icon: 'fa6-solid:user',
|
||||
|
|
@ -22,10 +24,10 @@ const mainData: MainSection = {
|
|||
url: '#',
|
||||
},
|
||||
socials: [
|
||||
{ name: 'Facebook', icon: 'fa6-brands:facebook-f', url: '#' },
|
||||
{ name: 'GitHub', icon: 'fa6-brands:github', url: '#' },
|
||||
{ name: 'LinkedIn', icon: 'fa6-brands:linkedin-in', url: '#' },
|
||||
{ name: 'Twitter', icon: 'fa6-brands:twitter', url: '#' },
|
||||
getSocial('facebook', '#'),
|
||||
getSocial('github', '#'),
|
||||
getSocial('linkedin', '#'),
|
||||
getSocial('twitter', '#'),
|
||||
],
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
import type { PortfolioSection } from '@/types/portfolio-section';
|
||||
|
||||
import getSocial from '../socials';
|
||||
|
||||
const portfolioData: PortfolioSection = {
|
||||
config: {
|
||||
title: 'Projects',
|
||||
|
|
@ -52,10 +54,7 @@ const portfolioData: PortfolioSection = {
|
|||
url: 'https://prettier.io/',
|
||||
},
|
||||
],
|
||||
socials: [
|
||||
{ name: 'Mockups', icon: 'fa6-solid:image', url: '#' },
|
||||
{ name: 'App demo', icon: 'fa6-solid:desktop', url: '#' },
|
||||
],
|
||||
socials: [getSocial('mockups', '#'), getSocial('demo', '#')],
|
||||
},
|
||||
{
|
||||
name: 'TruQuest',
|
||||
|
|
@ -96,10 +95,7 @@ const portfolioData: PortfolioSection = {
|
|||
url: 'https://www.postgresql.org/',
|
||||
},
|
||||
],
|
||||
socials: [
|
||||
{ name: 'Mockups', icon: 'fa6-solid:image', url: '#' },
|
||||
{ name: 'App demo', icon: 'fa6-solid:desktop', url: '#' },
|
||||
],
|
||||
socials: [getSocial('mockups', '#'), getSocial('demo', '#')],
|
||||
},
|
||||
{
|
||||
name: 'Software Chasers',
|
||||
|
|
@ -146,10 +142,7 @@ const portfolioData: PortfolioSection = {
|
|||
url: 'https://pnpm.io/',
|
||||
},
|
||||
],
|
||||
socials: [
|
||||
{ name: 'Website', icon: 'fa6-solid:globe', url: '#' },
|
||||
{ name: 'GitHub', icon: 'fa6-brands:github', url: '#' },
|
||||
],
|
||||
socials: [getSocial('website', '#'), getSocial('github', '#')],
|
||||
},
|
||||
{
|
||||
name: 'Disco Ninjas',
|
||||
|
|
@ -184,7 +177,7 @@ const portfolioData: PortfolioSection = {
|
|||
url: 'https://firebase.google.com/',
|
||||
},
|
||||
],
|
||||
socials: [{ name: 'Mockups', icon: 'fa6-solid:image', url: '#' }],
|
||||
socials: [getSocial('mockups', '#')],
|
||||
},
|
||||
],
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
import type { TestimonialsSection } from '@/types/testimonials-section';
|
||||
|
||||
import getSocial from '../socials';
|
||||
|
||||
const testimonialsData: TestimonialsSection = {
|
||||
config: {
|
||||
title: 'Testimonials',
|
||||
|
|
@ -12,10 +14,7 @@ const testimonialsData: TestimonialsSection = {
|
|||
relation: 'We work together as front-end developers at Google',
|
||||
content:
|
||||
'In nec mattis sem. Morbi purus lorem, euismod ac varius at, aliquet vitae augue. Pellentesque ut facilisis felis. In sed dui blandit, aliquet odio eu, elementum leo. In facilisis dapibus tortor ac volutpat. Cras cursus nec odio maximus elementum.',
|
||||
socials: [
|
||||
{ name: 'GitHub', icon: 'fa6-brands:github', url: '#' },
|
||||
{ name: 'LinkedIn', icon: 'fa6-brands:linkedin-in', url: '#' },
|
||||
],
|
||||
socials: [getSocial('github', '#'), getSocial('linkedin', '#')],
|
||||
},
|
||||
{
|
||||
image: import('@/assets/testimonials/testimonial-2.jpeg'),
|
||||
|
|
@ -23,7 +22,7 @@ const testimonialsData: TestimonialsSection = {
|
|||
relation: 'My project manager at GitLab',
|
||||
content:
|
||||
'Praesent nec congue elit. Vestibulum lobortis congue ipsum, a gravida mi tempus ac. Mauris aliquet purus nibh, vel varius turpis tempus non. Nullam eget ultricies orci. Quisque nulla ante, auctor eget varius ac, imperdiet nec magna.',
|
||||
socials: [{ name: 'LinkedIn', icon: 'fa6-brands:linkedin-in', url: '#' }],
|
||||
socials: [getSocial('linkedin', '#')],
|
||||
},
|
||||
{
|
||||
image: import('@/assets/testimonials/testimonial-3.jpeg'),
|
||||
|
|
@ -31,10 +30,7 @@ const testimonialsData: TestimonialsSection = {
|
|||
relation: 'My customer for sidewing.com website',
|
||||
content:
|
||||
'Mauris tincidunt at purus vehicula porta. Mauris eget mollis turpis. Sed iaculis rutrum pharetra. Vivamus risus quam, suscipit et semper ut, aliquet ut tellus. Donec quis auctor nunc.',
|
||||
socials: [
|
||||
{ name: 'GitHub', icon: 'fa6-brands:github', url: '#' },
|
||||
{ name: 'Website', icon: 'fa6-solid:globe', url: '#' },
|
||||
],
|
||||
socials: [getSocial('github', '#'), getSocial('website', '#')],
|
||||
},
|
||||
],
|
||||
};
|
||||
|
|
|
|||
43
src/data/socials.ts
Normal file
43
src/data/socials.ts
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
import type { Social } from '../types/common';
|
||||
|
||||
type SocialWithoutUrl = Omit<Social, 'url'>;
|
||||
|
||||
const socials = {
|
||||
facebook: { name: 'Facebook', icon: 'fa6-brands:facebook-f' },
|
||||
github: { name: 'GitHub', icon: 'fa6-brands:github' },
|
||||
linkedin: { name: 'LinkedIn', icon: 'fa6-brands:linkedin-in' },
|
||||
twitter: { name: 'Twitter', icon: 'fa6-brands:twitter' },
|
||||
instagram: { name: 'Instagram', icon: 'fa6-brands:instagram' },
|
||||
youtube: { name: 'YouTube', icon: 'fa6-brands:youtube' },
|
||||
twitch: { name: 'Twitch', icon: 'fa6-brands:twitch' },
|
||||
discord: { name: 'Discord', icon: 'fa6-brands:discord' },
|
||||
stackoverflow: { name: 'Stack Overflow', icon: 'fa6-brands:stack-overflow' },
|
||||
codepen: { name: 'CodePen', icon: 'fa6-brands:codepen' },
|
||||
dev: { name: 'Dev', icon: 'fa6-brands:dev' },
|
||||
behance: { name: 'Behance', icon: 'fa6-brands:behance' },
|
||||
dribbble: { name: 'Dribbble', icon: 'fa6-brands:dribbble' },
|
||||
medium: { name: 'Medium', icon: 'fa6-brands:medium' },
|
||||
reddit: { name: 'Reddit', icon: 'fa6-brands:reddit' },
|
||||
quora: { name: 'Quora', icon: 'fa6-brands:quora' },
|
||||
spotify: { name: 'Spotify', icon: 'fa6-brands:spotify' },
|
||||
soundcloud: { name: 'SoundCloud', icon: 'fa6-brands:soundcloud' },
|
||||
lastfm: { name: 'Last.fm', icon: 'fa6-brands:lastfm' },
|
||||
vimeo: { name: 'Vimeo', icon: 'fa6-brands:vimeo' },
|
||||
pinterest: { name: 'Pinterest', icon: 'fa6-brands:pinterest' },
|
||||
tumblr: { name: 'Tumblr', icon: 'fa6-brands:tumblr' },
|
||||
flickr: { name: 'Flickr', icon: 'fa6-brands:flickr' },
|
||||
figma: { name: 'Figma', icon: 'fa6-brands:figma' },
|
||||
|
||||
website: { name: 'Website', icon: 'fa6-solid:globe' },
|
||||
demo: { name: 'App demo', icon: 'fa6-solid:desktop' },
|
||||
mockups: { name: 'Mockups', icon: 'fa6-solid:image' },
|
||||
repository: { name: 'Repository', icon: 'fa6-solid:code-branch' },
|
||||
} satisfies Record<string, SocialWithoutUrl>;
|
||||
|
||||
const getSocial = (name: keyof typeof socials, url: string, overrides?: Partial<SocialWithoutUrl>): Social => ({
|
||||
url,
|
||||
...socials[name],
|
||||
...overrides,
|
||||
});
|
||||
|
||||
export default getSocial;
|
||||
Loading…
Reference in a new issue