refactor: 调整友情链接结构,拆分无法访问的网站
This commit is contained in:
@@ -5,8 +5,8 @@ import { ref, onBeforeMount } from 'vue';
|
|||||||
/** 默认图标 */
|
/** 默认图标 */
|
||||||
const defaultAvatar = withBase('/default-avatar.svg');
|
const defaultAvatar = withBase('/default-avatar.svg');
|
||||||
|
|
||||||
/** 网站列表 */
|
/** 网站列表 - 正常访问 */
|
||||||
const siteList = ref([
|
const siteListOnline = ref([
|
||||||
|
|
||||||
// 博客
|
// 博客
|
||||||
{
|
{
|
||||||
@@ -15,7 +15,6 @@ const siteList = ref([
|
|||||||
siteUrl: 'https://blog.dsrkafuu.net/',
|
siteUrl: 'https://blog.dsrkafuu.net/',
|
||||||
iconUrl0: 'https://c.frost-zx.top/data/uploads/blog/favicon/blog.dsrkafuu.net.png',
|
iconUrl0: 'https://c.frost-zx.top/data/uploads/blog/favicon/blog.dsrkafuu.net.png',
|
||||||
iconUrl1: '',
|
iconUrl1: '',
|
||||||
isError: false,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
siteTitle: 'haojunmei',
|
siteTitle: 'haojunmei',
|
||||||
@@ -23,7 +22,6 @@ const siteList = ref([
|
|||||||
siteUrl: 'https://www.haojunmei.top/',
|
siteUrl: 'https://www.haojunmei.top/',
|
||||||
iconUrl0: 'https://haojunmei.top/usr/themes/images/haojunmei.png',
|
iconUrl0: 'https://haojunmei.top/usr/themes/images/haojunmei.png',
|
||||||
iconUrl1: '',
|
iconUrl1: '',
|
||||||
isError: false,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
siteTitle: `Luminous' Home`,
|
siteTitle: `Luminous' Home`,
|
||||||
@@ -31,7 +29,6 @@ const siteList = ref([
|
|||||||
siteUrl: 'https://luotianyi.vc/',
|
siteUrl: 'https://luotianyi.vc/',
|
||||||
iconUrl0: 'https://static.lty.fun/weblogo/my.jpg',
|
iconUrl0: 'https://static.lty.fun/weblogo/my.jpg',
|
||||||
iconUrl1: '',
|
iconUrl1: '',
|
||||||
isError: false,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
siteTitle: 'Panniyanjie 个人博客',
|
siteTitle: 'Panniyanjie 个人博客',
|
||||||
@@ -39,7 +36,6 @@ const siteList = ref([
|
|||||||
siteUrl: 'https://blog.wdztbil.top/',
|
siteUrl: 'https://blog.wdztbil.top/',
|
||||||
iconUrl0: 'https://blog.wdztbil.top/usr/themes/Poem/images/favicon.png',
|
iconUrl0: 'https://blog.wdztbil.top/usr/themes/Poem/images/favicon.png',
|
||||||
iconUrl1: '',
|
iconUrl1: '',
|
||||||
isError: false,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
siteTitle: 'qqAys',
|
siteTitle: 'qqAys',
|
||||||
@@ -47,7 +43,6 @@ const siteList = ref([
|
|||||||
siteUrl: 'https://qqays.xyz/',
|
siteUrl: 'https://qqays.xyz/',
|
||||||
iconUrl0: 'https://c.frost-zx.top/data/uploads/blog/favicon/qqays.xyz.webp',
|
iconUrl0: 'https://c.frost-zx.top/data/uploads/blog/favicon/qqays.xyz.webp',
|
||||||
iconUrl1: '',
|
iconUrl1: '',
|
||||||
isError: false,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
siteTitle: `Saiita's Blog`,
|
siteTitle: `Saiita's Blog`,
|
||||||
@@ -55,7 +50,6 @@ const siteList = ref([
|
|||||||
siteUrl: 'https://www.saiita.com.cn/',
|
siteUrl: 'https://www.saiita.com.cn/',
|
||||||
iconUrl0: 'https://c.frost-zx.top/data/uploads/blog/favicon/www.saiita.com.cn.png',
|
iconUrl0: 'https://c.frost-zx.top/data/uploads/blog/favicon/www.saiita.com.cn.png',
|
||||||
iconUrl1: '',
|
iconUrl1: '',
|
||||||
isError: false,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
siteTitle: 'zgcwkj',
|
siteTitle: 'zgcwkj',
|
||||||
@@ -63,15 +57,6 @@ const siteList = ref([
|
|||||||
siteUrl: 'https://zgcwkj.cn/',
|
siteUrl: 'https://zgcwkj.cn/',
|
||||||
iconUrl0: 'https://zgcwkj.cn/favicon.ico',
|
iconUrl0: 'https://zgcwkj.cn/favicon.ico',
|
||||||
iconUrl1: '',
|
iconUrl1: '',
|
||||||
isError: false,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
siteTitle: '安和Blog',
|
|
||||||
siteDesc: 'nekocoffee.com',
|
|
||||||
siteUrl: 'https://nekocoffee.com/',
|
|
||||||
iconUrl0: 'https://i.imgtg.com/2022/06/23/7Sg4L.jpg',
|
|
||||||
iconUrl1: '',
|
|
||||||
isError: false,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
siteTitle: '冰屋小站',
|
siteTitle: '冰屋小站',
|
||||||
@@ -79,7 +64,6 @@ const siteList = ref([
|
|||||||
siteUrl: 'https://blog.biduang.cn/',
|
siteUrl: 'https://blog.biduang.cn/',
|
||||||
iconUrl0: 'https://gravatar.loli.net/avatar/5273a4d195a45fd8b900545f63a94f58?s=200&r=G',
|
iconUrl0: 'https://gravatar.loli.net/avatar/5273a4d195a45fd8b900545f63a94f58?s=200&r=G',
|
||||||
iconUrl1: '',
|
iconUrl1: '',
|
||||||
isError: false,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
siteTitle: '高坂滑稽果的滑稽果农场',
|
siteTitle: '高坂滑稽果的滑稽果农场',
|
||||||
@@ -87,7 +71,6 @@ const siteList = ref([
|
|||||||
siteUrl: 'https://funny233.xyz/',
|
siteUrl: 'https://funny233.xyz/',
|
||||||
iconUrl0: 'https://funny233.xyz/favicon.ico',
|
iconUrl0: 'https://funny233.xyz/favicon.ico',
|
||||||
iconUrl1: '',
|
iconUrl1: '',
|
||||||
isError: false,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
siteTitle: '派兹的小站',
|
siteTitle: '派兹的小站',
|
||||||
@@ -95,15 +78,6 @@ const siteList = ref([
|
|||||||
siteUrl: 'https://blog.blw.moe/',
|
siteUrl: 'https://blog.blw.moe/',
|
||||||
iconUrl0: 'https://global.cdn.blingwang.cn/blog/head.jpg',
|
iconUrl0: 'https://global.cdn.blingwang.cn/blog/head.jpg',
|
||||||
iconUrl1: '',
|
iconUrl1: '',
|
||||||
isError: false,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
siteTitle: '任我乐',
|
|
||||||
siteDesc: '一条迷茫的死咸鱼。',
|
|
||||||
siteUrl: 'https://renwole.com/',
|
|
||||||
iconUrl0: 'https://renwole.com/wp-content/uploads/2017/04/cropped-Renwole-logo-192x192-192x192.png',
|
|
||||||
iconUrl1: '',
|
|
||||||
isError: false,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
siteTitle: '王鑫的小站',
|
siteTitle: '王鑫的小站',
|
||||||
@@ -111,7 +85,6 @@ const siteList = ref([
|
|||||||
siteUrl: 'https://wxweb.xyz/',
|
siteUrl: 'https://wxweb.xyz/',
|
||||||
iconUrl0: 'https://pic.wxweb.xyz/pic/favicon.ico',
|
iconUrl0: 'https://pic.wxweb.xyz/pic/favicon.ico',
|
||||||
iconUrl1: '',
|
iconUrl1: '',
|
||||||
isError: false,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
siteTitle: '御坂秋生の小窝',
|
siteTitle: '御坂秋生の小窝',
|
||||||
@@ -119,7 +92,6 @@ const siteList = ref([
|
|||||||
siteUrl: 'https://www.akio.top/',
|
siteUrl: 'https://www.akio.top/',
|
||||||
iconUrl0: 'https://webstatic.akio.top/user/NiuBoss123.jpg',
|
iconUrl0: 'https://webstatic.akio.top/user/NiuBoss123.jpg',
|
||||||
iconUrl1: '',
|
iconUrl1: '',
|
||||||
isError: false,
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// Minecraft
|
// Minecraft
|
||||||
@@ -129,7 +101,6 @@ const siteList = ref([
|
|||||||
siteUrl: 'https://www.wheat-server.top/',
|
siteUrl: 'https://www.wheat-server.top/',
|
||||||
iconUrl0: 'https://www.wheat-server.top/upload/system/favicon.png',
|
iconUrl0: 'https://www.wheat-server.top/upload/system/favicon.png',
|
||||||
iconUrl1: '',
|
iconUrl1: '',
|
||||||
isError: false,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
siteTitle: '氢气工艺服务器',
|
siteTitle: '氢气工艺服务器',
|
||||||
@@ -137,9 +108,13 @@ const siteList = ref([
|
|||||||
siteUrl: 'https://wiki.hydcraft.cn/',
|
siteUrl: 'https://wiki.hydcraft.cn/',
|
||||||
iconUrl0: 'https://wiki.hydcraft.cn/favicon/logo.png',
|
iconUrl0: 'https://wiki.hydcraft.cn/favicon/logo.png',
|
||||||
iconUrl1: '',
|
iconUrl1: '',
|
||||||
isError: false,
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
]);
|
||||||
|
|
||||||
|
/** 网站列表 - 无法访问 */
|
||||||
|
const siteListOffline = ref([
|
||||||
|
|
||||||
// 无法访问
|
// 无法访问
|
||||||
{
|
{
|
||||||
siteTitle: '4SSH',
|
siteTitle: '4SSH',
|
||||||
@@ -147,7 +122,6 @@ const siteList = ref([
|
|||||||
siteUrl: 'https://4ssh.cn/',
|
siteUrl: 'https://4ssh.cn/',
|
||||||
iconUrl0: '',
|
iconUrl0: '',
|
||||||
iconUrl1: '',
|
iconUrl1: '',
|
||||||
isError: true,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
siteTitle: 'AurLemon Blog',
|
siteTitle: 'AurLemon Blog',
|
||||||
@@ -155,7 +129,6 @@ const siteList = ref([
|
|||||||
siteUrl: 'https://blog.aurlemon.top/',
|
siteUrl: 'https://blog.aurlemon.top/',
|
||||||
iconUrl0: 'https://blog.aurlemon.top/favicon.ico',
|
iconUrl0: 'https://blog.aurlemon.top/favicon.ico',
|
||||||
iconUrl1: '',
|
iconUrl1: '',
|
||||||
isError: true,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
siteTitle: 'LuRenDing',
|
siteTitle: 'LuRenDing',
|
||||||
@@ -163,7 +136,6 @@ const siteList = ref([
|
|||||||
siteUrl: 'https://blog.lurending.top/',
|
siteUrl: 'https://blog.lurending.top/',
|
||||||
iconUrl0: 'https://blog.lurending.top/favicon.ico',
|
iconUrl0: 'https://blog.lurending.top/favicon.ico',
|
||||||
iconUrl1: '',
|
iconUrl1: '',
|
||||||
isError: true,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
siteTitle: 'UNKNOW date',
|
siteTitle: 'UNKNOW date',
|
||||||
@@ -171,7 +143,20 @@ const siteList = ref([
|
|||||||
siteUrl: 'https://n-a.date/',
|
siteUrl: 'https://n-a.date/',
|
||||||
iconUrl0: 'https://n-a.date/favicon.ico',
|
iconUrl0: 'https://n-a.date/favicon.ico',
|
||||||
iconUrl1: '',
|
iconUrl1: '',
|
||||||
isError: true,
|
},
|
||||||
|
{
|
||||||
|
siteTitle: '安和Blog',
|
||||||
|
siteDesc: 'nekocoffee.com',
|
||||||
|
siteUrl: 'https://nekocoffee.com/',
|
||||||
|
iconUrl0: 'https://i.imgtg.com/2022/06/23/7Sg4L.jpg',
|
||||||
|
iconUrl1: '',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
siteTitle: '任我乐',
|
||||||
|
siteDesc: '一条迷茫的死咸鱼。',
|
||||||
|
siteUrl: 'https://renwole.com/',
|
||||||
|
iconUrl0: 'https://renwole.com/wp-content/uploads/2017/04/cropped-Renwole-logo-192x192-192x192.png',
|
||||||
|
iconUrl1: '',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
siteTitle: '软件探索',
|
siteTitle: '软件探索',
|
||||||
@@ -179,7 +164,6 @@ const siteList = ref([
|
|||||||
siteUrl: 'https://www.appts.cn/',
|
siteUrl: 'https://www.appts.cn/',
|
||||||
iconUrl0: 'https://cdn.jsdelivr.net/gh/appexplore/cdn/appts@v1.0/img/logo.png',
|
iconUrl0: 'https://cdn.jsdelivr.net/gh/appexplore/cdn/appts@v1.0/img/logo.png',
|
||||||
iconUrl1: '',
|
iconUrl1: '',
|
||||||
isError: true,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
siteTitle: '小哈博客',
|
siteTitle: '小哈博客',
|
||||||
@@ -187,7 +171,6 @@ const siteList = ref([
|
|||||||
siteUrl: 'https://blog.littleha.cn/',
|
siteUrl: 'https://blog.littleha.cn/',
|
||||||
iconUrl0: 'https://www.gravatar.com/avatar/baafed38e0ebbe171caa1cec177bf82e',
|
iconUrl0: 'https://www.gravatar.com/avatar/baafed38e0ebbe171caa1cec177bf82e',
|
||||||
iconUrl1: '',
|
iconUrl1: '',
|
||||||
isError: true,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
siteTitle: '云影云烟工作室',
|
siteTitle: '云影云烟工作室',
|
||||||
@@ -195,14 +178,15 @@ const siteList = ref([
|
|||||||
siteUrl: 'https://www.yunyingstudio.cn/',
|
siteUrl: 'https://www.yunyingstudio.cn/',
|
||||||
iconUrl0: 'https://www.yunyingstudio.cn/logo.jpg',
|
iconUrl0: 'https://www.yunyingstudio.cn/logo.jpg',
|
||||||
iconUrl1: '',
|
iconUrl1: '',
|
||||||
isError: true,
|
|
||||||
},
|
},
|
||||||
|
|
||||||
]);
|
]);
|
||||||
|
|
||||||
/** 加载链接项中的图标 */
|
/** 加载链接项中的图标 */
|
||||||
function loadIcons() {
|
function loadIcons() {
|
||||||
siteList.value.forEach((item) => {
|
((dataList) => {
|
||||||
|
dataList.forEach((siteList) => {
|
||||||
|
siteList.forEach((item) => {
|
||||||
|
|
||||||
let image = new Image();
|
let image = new Image();
|
||||||
let url = item.iconUrl0;
|
let url = item.iconUrl0;
|
||||||
@@ -214,16 +198,19 @@ function loadIcons() {
|
|||||||
image.src = url;
|
image.src = url;
|
||||||
|
|
||||||
});
|
});
|
||||||
|
});
|
||||||
|
})([
|
||||||
|
siteListOnline.value,
|
||||||
|
siteListOffline.value,
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description 跳转链接
|
* @description 跳转链接(用于无法访问的网站)
|
||||||
* @param {typeof siteList[number]} item
|
* @param {typeof siteListOffline[number]} item
|
||||||
*/
|
*/
|
||||||
function openLink(item) {
|
function openLink(item) {
|
||||||
if (item.isError) {
|
|
||||||
window.open(item.siteUrl, '_blank');
|
window.open(item.siteUrl, '_blank');
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
onBeforeMount(() => {
|
onBeforeMount(() => {
|
||||||
@@ -233,12 +220,38 @@ onBeforeMount(() => {
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="friendly-site-links">
|
<div class="friendly-site-links">
|
||||||
|
|
||||||
|
<!-- 正常访问 -->
|
||||||
<ul>
|
<ul>
|
||||||
<li v-for="(item, index) in siteList" :key="index">
|
<li v-for="(item, index) in siteListOnline" :key="index">
|
||||||
<a
|
<a
|
||||||
class="link-item"
|
class="link-item"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
:href="item.isError ? '#' : item.siteUrl"
|
:href="item.siteUrl"
|
||||||
|
:title="item.siteTitle"
|
||||||
|
>
|
||||||
|
<div class="icon">
|
||||||
|
<div
|
||||||
|
class="icon-content"
|
||||||
|
:style="{ backgroundImage: `url('${item.iconUrl1 || defaultAvatar}')` }"
|
||||||
|
></div>
|
||||||
|
</div>
|
||||||
|
<div class="info">
|
||||||
|
<div class="name">{{ item.siteTitle }}</div>
|
||||||
|
<div class="desc">{{ item.siteDesc }}</div>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<!-- 无法访问 -->
|
||||||
|
<details class="details custom-block">
|
||||||
|
<summary>无法正常访问的网站</summary>
|
||||||
|
<ul>
|
||||||
|
<li v-for="(item, index) in siteListOffline" :key="index">
|
||||||
|
<a
|
||||||
|
class="link-item"
|
||||||
|
href="#"
|
||||||
:title="item.siteTitle"
|
:title="item.siteTitle"
|
||||||
@click="openLink(item)"
|
@click="openLink(item)"
|
||||||
>
|
>
|
||||||
@@ -255,6 +268,8 @@ onBeforeMount(() => {
|
|||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
</details>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -264,25 +279,26 @@ onBeforeMount(() => {
|
|||||||
display: block;
|
display: block;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
// max-width: 32em;
|
|
||||||
box-shadow: 0.125em 0.125em 0.75em rgba(0, 0, 0, 0.1);
|
|
||||||
background-color: #FFF;
|
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
overflow: hidden;
|
|
||||||
-webkit-tap-highlight-color: transparent;
|
-webkit-tap-highlight-color: transparent;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
|
|
||||||
* {
|
* {
|
||||||
|
box-sizing: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul, li {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
box-sizing: inherit;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ul {
|
ul {
|
||||||
position: relative;
|
position: relative;
|
||||||
margin: 0;
|
margin-bottom: 12px;
|
||||||
padding: 0;
|
box-shadow: 0.125em 0.125em 0.75em rgba(0, 0, 0, 0.1);
|
||||||
|
background-color: #FFF;
|
||||||
list-style: none;
|
list-style: none;
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
&::before {
|
&::before {
|
||||||
content: "";
|
content: "";
|
||||||
|
@@ -42,4 +42,4 @@ import FriendlySiteLinks from './.vitepress/components/FriendlySiteLinks.vue';
|
|||||||
- 仅接受合法网站的友链申请,且网站必须存在有效的原创内容。
|
- 仅接受合法网站的友链申请,且网站必须存在有效的原创内容。
|
||||||
- 添加友链后,我会定期访问。
|
- 添加友链后,我会定期访问。
|
||||||
- 不接受单向链接。
|
- 不接受单向链接。
|
||||||
- 若网站长时间无法正常访问,链接项不会被删除,但会被移动至列表的末尾,直到恢复正常访问。
|
- 若网站长时间无法正常访问,链接项将会被隐藏,直到恢复正常访问。
|
||||||
|
Reference in New Issue
Block a user