generated from Fascinated/nextjs-13-template-with-tailwindcss
add optional color to icon only links
All checks were successful
Publish Docker Image / docker (push) Successful in 1m44s
All checks were successful
Publish Docker Image / docker (push) Successful in 1m44s
This commit is contained in:
parent
1486ce77a5
commit
1c3a39f5b8
10
README.md
10
README.md
@ -117,12 +117,18 @@ simple-links | Type error: Property 'theme' does not exist on type '{ name: stri
|
||||
// Icon only links
|
||||
"socialLinks": [
|
||||
{
|
||||
"icon": "fab fa-github", // The icon to show
|
||||
"url": "https://git.fascinated.cc" // Where the link goes to
|
||||
"icon": "fab fa-twitter", // The icon to use
|
||||
"color": "#1DA1F2", // An optional color
|
||||
"url": "https://twitter.com" // The link to go to
|
||||
},
|
||||
{
|
||||
"icon": "fab fa-reddit",
|
||||
"color": "#FF4300",
|
||||
"url": "https://www.reddit.com/user/ImFascinatedMC"
|
||||
},
|
||||
{
|
||||
"icon": "fab fa-git-alt",
|
||||
"url": "https://git.fascinated.cc"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
10
config.json
10
config.json
@ -57,12 +57,18 @@
|
||||
],
|
||||
"socialLinks": [
|
||||
{
|
||||
"icon": "fab fa-github",
|
||||
"url": "https://git.fascinated.cc"
|
||||
"icon": "fab fa-twitter",
|
||||
"color": "#1DA1F2",
|
||||
"url": "https://twitter.com"
|
||||
},
|
||||
{
|
||||
"icon": "fab fa-reddit",
|
||||
"color": "#FF4300",
|
||||
"url": "https://www.reddit.com/user/ImFascinatedMC"
|
||||
},
|
||||
{
|
||||
"icon": "fab fa-git-alt",
|
||||
"url": "https://git.fascinated.cc"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -123,9 +123,15 @@ export default function Home() {
|
||||
href={link.url}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className={`hover:brightness-75 transition`}
|
||||
className="hover:brightness-75 transition"
|
||||
>
|
||||
{link.icon && <FontAwesomeIcon size="2xl" icon={icons} />}
|
||||
{link.icon && (
|
||||
<FontAwesomeIcon
|
||||
color={link.color && link.color}
|
||||
size="2xl"
|
||||
icon={icons}
|
||||
/>
|
||||
)}
|
||||
</a>
|
||||
);
|
||||
})}
|
||||
|
Loading…
x
Reference in New Issue
Block a user