feat: add Mastodon to social links and include rel="me" attribute on external links
This commit is contained in:
15
config.js
15
config.js
@@ -108,12 +108,13 @@ const CONFIG = {
|
|||||||
{ name: "Threads", url: "https://www.threads.net/@nudoragon", icon: "fas fa-at", visible: true, order: 2, note: "使用 @ 符號替代" },
|
{ name: "Threads", url: "https://www.threads.net/@nudoragon", icon: "fas fa-at", visible: true, order: 2, note: "使用 @ 符號替代" },
|
||||||
{ name: "Facebook", url: "https://www.facebook.com/nudoragon/", icon: "fab fa-facebook", visible: true, order: 3 },
|
{ name: "Facebook", url: "https://www.facebook.com/nudoragon/", icon: "fab fa-facebook", visible: true, order: 3 },
|
||||||
{ name: "Twitter", url: "https://twitter.com/nudoragon", icon: "fab fa-twitter", visible: true, order: 4 },
|
{ name: "Twitter", url: "https://twitter.com/nudoragon", icon: "fab fa-twitter", visible: true, order: 4 },
|
||||||
{ name: "Bluesky", url: "https://bsky.app/profile/nudoragon.bsky.social", icon: "fas fa-cloud", visible: true, order: 5, note: "使用雲朵圖標替代" },
|
{ name: "Mastodon", url: "https://mastodon.social/@nudoragon", icon: "fab fa-mastodon", visible: true, order: 5 },
|
||||||
{ name: "Discord", url: "https://discord.gg/DcarunT4yw", icon: "fab fa-discord", visible: true, order: 6 },
|
{ name: "Bluesky", url: "https://bsky.app/profile/nudoragon.bsky.social", icon: "fas fa-cloud", visible: true, order: 6, note: "使用雲朵圖標替代" },
|
||||||
{ name: "Line", url: "#", icon: "fab fa-line", visible: false, order: 7 },
|
{ name: "Discord", url: "https://discord.gg/DcarunT4yw", icon: "fab fa-discord", visible: true, order: 7 },
|
||||||
{ name: "Telegram", url: "#", icon: "fab fa-telegram", visible: false, order: 8 },
|
{ name: "Line", url: "#", icon: "fab fa-line", visible: false, order: 8 },
|
||||||
{ name: "Mail", url: "mailto:hi@l.nudoragon.com", icon: "fas fa-envelope", visible: true, order: 9 },
|
{ name: "Telegram", url: "#", icon: "fab fa-telegram", visible: false, order: 9 },
|
||||||
{ name: "YouTube", url: "https://www.youtube.com/@nudoragon", icon: "fab fa-youtube", visible: true, order: 10 },
|
{ name: "Mail", url: "mailto:hi@l.nudoragon.com", icon: "fas fa-envelope", visible: true, order: 10 },
|
||||||
{ name: "Twitch", url: "https://www.twitch.tv/nudoragon", icon: "fab fa-twitch", visible: true, order: 11 }
|
{ name: "YouTube", url: "https://www.youtube.com/@nudoragon", icon: "fab fa-youtube", visible: true, order: 11 },
|
||||||
|
{ name: "Twitch", url: "https://www.twitch.tv/nudoragon", icon: "fab fa-twitch", visible: true, order: 12 }
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
@@ -68,7 +68,7 @@
|
|||||||
.sort((a, b) => (a.order || 0) - (b.order || 0));
|
.sort((a, b) => (a.order || 0) - (b.order || 0));
|
||||||
|
|
||||||
linksContainer.innerHTML = visibleLinks.map(link => `
|
linksContainer.innerHTML = visibleLinks.map(link => `
|
||||||
<a href="${link.url}" class="link-card animate-slide-up" style="animation-delay: ${link.delay};" target="_blank" rel="noopener noreferrer">
|
<a href="${link.url}" class="link-card animate-slide-up" style="animation-delay: ${link.delay};" target="_blank" rel="me noopener noreferrer">
|
||||||
<div class="link-icon"><i class="${link.icon}"></i></div>
|
<div class="link-icon"><i class="${link.icon}"></i></div>
|
||||||
<div class="link-content">
|
<div class="link-content">
|
||||||
<span class="link-title">${link.title}</span>
|
<span class="link-title">${link.title}</span>
|
||||||
@@ -85,7 +85,7 @@
|
|||||||
.sort((a, b) => (a.order || 0) - (b.order || 0));
|
.sort((a, b) => (a.order || 0) - (b.order || 0));
|
||||||
|
|
||||||
socialIcons.innerHTML = visibleSocials.map(social => `
|
socialIcons.innerHTML = visibleSocials.map(social => `
|
||||||
<a href="${social.url}" title="${social.name}${social.note ? ' - ' + social.note : ''}" target="_blank" rel="noopener noreferrer"><i class="${social.icon}"></i></a>
|
<a href="${social.url}" title="${social.name}${social.note ? ' - ' + social.note : ''}" target="_blank" rel="me noopener noreferrer"><i class="${social.icon}"></i></a>
|
||||||
`).join('');
|
`).join('');
|
||||||
|
|
||||||
// Render Copyright
|
// Render Copyright
|
||||||
|
|||||||
Reference in New Issue
Block a user