feat: friend page enable check
This commit is contained in:
@@ -84,14 +84,15 @@
|
|||||||
border-radius: var(--card-border-radius);
|
border-radius: var(--card-border-radius);
|
||||||
background: var(--card-background);
|
background: var(--card-background);
|
||||||
box-shadow: var(--shadow-l1);
|
box-shadow: var(--shadow-l1);
|
||||||
transition: transform 0.2s ease, box-shadow 0.2s ease;
|
transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease,
|
||||||
|
opacity 0.2s ease;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
transform: translateY(-2px);
|
transform: translateY(-2px);
|
||||||
box-shadow: var(--shadow-l2);
|
box-shadow: var(--shadow-l2);
|
||||||
}
|
}
|
||||||
|
|
||||||
> a {
|
> .link-card__body {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
@@ -101,20 +102,50 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.link-card--disabled {
|
||||||
|
.link-card__body {
|
||||||
|
cursor: not-allowed;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
filter: grayscale(1);
|
||||||
|
opacity: 0.65;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.link-card__details {
|
.link-card__details {
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.link-card__title {
|
.link-card__title {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
margin: 0 0 8px;
|
margin: 0 0 8px;
|
||||||
overflow: hidden;
|
|
||||||
color: var(--card-text-color-main);
|
color: var(--card-text-color-main);
|
||||||
font-size: 1.8rem;
|
font-size: 1.8rem;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
|
gap: 8px;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.link-card__name {
|
||||||
|
min-width: 0;
|
||||||
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.link-card__status {
|
||||||
|
flex: 0 0 auto;
|
||||||
|
padding: 2px 7px;
|
||||||
|
border: 1px solid var(--card-text-color-tertiary);
|
||||||
|
border-radius: 4px;
|
||||||
|
color: var(--card-text-color-tertiary);
|
||||||
|
font-size: 1.1rem;
|
||||||
|
font-weight: 500;
|
||||||
|
line-height: 1.4;
|
||||||
|
}
|
||||||
|
|
||||||
.link-card__description {
|
.link-card__description {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ comment: true
|
|||||||
- 论坛
|
- 论坛
|
||||||
- 资源分享
|
- 资源分享
|
||||||
|
|
||||||
我将每个季度审查一次所有已添加友链的网站,若发现网站无法访问或不符合上述要求,将移除该友链
|
我将每个季度审查一次所有已添加友链的网站,若发现网站无法访问或不符合上述要求,将标记为已失效。
|
||||||
|
|
||||||
## 友链申请格式
|
## 友链申请格式
|
||||||
|
|
||||||
|
|||||||
@@ -1,68 +1,79 @@
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
|
"enabled": true,
|
||||||
"title": "锐岚科技",
|
"title": "锐岚科技",
|
||||||
"website": "https://blog.rhyland.cn",
|
"website": "https://blog.rhyland.cn",
|
||||||
"image": "rhyland.png",
|
"image": "rhyland.png",
|
||||||
"description": "锐岚科技核心博客"
|
"description": "锐岚科技博客"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"enabled": true,
|
||||||
"title": "木头の小屋",
|
"title": "木头の小屋",
|
||||||
"website": "http://wjlshare.com",
|
"website": "http://wjlshare.com",
|
||||||
"image": "wjlshare.jpg",
|
"image": "wjlshare.jpg",
|
||||||
"description": "网络安全工程师"
|
"description": "网络安全工程师"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"enabled": false,
|
||||||
"title": "帆's life",
|
"title": "帆's life",
|
||||||
"website": "https://huxiaofan.com",
|
"website": "https://huxiaofan.com",
|
||||||
"image": "fan.jpg",
|
"image": "fan.jpg",
|
||||||
"description": "阳光宅男"
|
"description": "阳光宅男"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"enabled": true,
|
||||||
"title": "Rogister的博客园",
|
"title": "Rogister的博客园",
|
||||||
"website": "http://blog.rogister.top",
|
"website": "http://blog.rogister.top",
|
||||||
"image": "default.png",
|
"image": "default.png",
|
||||||
"description": "死宅真可怕"
|
"description": "死宅真可怕"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"enabled": false,
|
||||||
"title": "PeterQiu 的博客",
|
"title": "PeterQiu 的博客",
|
||||||
"website": "https://peterqiu871217776.wordpress.com",
|
"website": "https://peterqiu871217776.wordpress.com",
|
||||||
"image": "peterqiu.jpg",
|
"image": "peterqiu.jpg",
|
||||||
"description": "守护全世界最好的 Peter"
|
"description": "PeterQiu YYDS"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"enabled": false,
|
||||||
"title": "章森森的博客",
|
"title": "章森森的博客",
|
||||||
"website": "https://blog.thangssen.site",
|
"website": "https://blog.thangssen.site",
|
||||||
"image": "thangssen.jpg",
|
"image": "thangssen.jpg",
|
||||||
"description": "魔法师预备役"
|
"description": "魔法师预备役"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"enabled": true,
|
||||||
"title": "肥喵科技",
|
"title": "肥喵科技",
|
||||||
"website": "https://fatcattech.cn/",
|
"website": "https://fatcattech.cn/",
|
||||||
"image": "fatcattech.png",
|
"image": "fatcattech.png",
|
||||||
"description": "肥喵科技–一个专注于科技的博客"
|
"description": "肥喵科技–一个专注于科技的博客"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"enabled": true,
|
||||||
"title": "晨鹤部落格",
|
"title": "晨鹤部落格",
|
||||||
"website": "https://chenhe.me/",
|
"website": "https://chenhe.me/",
|
||||||
"image": "chenhe.png",
|
"image": "chenhe.png",
|
||||||
"description": "晨鹤部落格"
|
"description": "晨鹤部落格"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"enabled": false,
|
||||||
"title": "Clouder’s Blog",
|
"title": "Clouder’s Blog",
|
||||||
"website": "https://www.codein.icu/",
|
"website": "https://www.codein.icu/",
|
||||||
"image": "codein.png",
|
"image": "codein.png",
|
||||||
"description": "A student who enjoys tech & life."
|
"description": "A student who enjoys tech & life."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"enabled": true,
|
||||||
"title": "吕舒君的博客",
|
"title": "吕舒君的博客",
|
||||||
"website": "https://cszj.wang/",
|
"website": "https://cszj.wang/",
|
||||||
"image": "cszj.png",
|
"image": "cszj.png",
|
||||||
"description": "吕舒君的博客"
|
"description": "吕舒君的博客"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"enabled": true,
|
||||||
"title": "王泽丰的个人网站",
|
"title": "王泽丰的个人网站",
|
||||||
"website": "https://zhejianglao.cn/",
|
"website": "https://zhejianglao.cn/",
|
||||||
"image": "zhejianglao.png",
|
"image": "zhejianglao.png",
|
||||||
"description": "写写博客,发发说说"
|
"description": "写写博客,发发说说"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -9,11 +9,19 @@
|
|||||||
<div class="links-grid">
|
<div class="links-grid">
|
||||||
{{ $siteResources := resources }}
|
{{ $siteResources := resources }}
|
||||||
{{ range $link := hugo.Data.links }}
|
{{ range $link := hugo.Data.links }}
|
||||||
<article class="link-card">
|
{{ $enabled := not (eq $link.enabled false) }}
|
||||||
<a href="{{ $link.website }}" target="_blank" rel="noopener">
|
<article class="link-card{{ if not $enabled }} link-card--disabled{{ end }}">
|
||||||
|
{{ if $enabled }}
|
||||||
|
<a class="link-card__body" href="{{ $link.website }}" target="_blank" rel="noopener">
|
||||||
|
{{ else }}
|
||||||
|
<div class="link-card__body" aria-disabled="true">
|
||||||
|
{{ end }}
|
||||||
<div class="link-card__details">
|
<div class="link-card__details">
|
||||||
<h2 class="link-card__title">
|
<h2 class="link-card__title">
|
||||||
{{- $link.title -}}
|
<span class="link-card__name">{{ $link.title }}</span>
|
||||||
|
{{ if not $enabled }}
|
||||||
|
<span class="link-card__status">已失效</span>
|
||||||
|
{{ end }}
|
||||||
</h2>
|
</h2>
|
||||||
<p class="link-card__description">
|
<p class="link-card__description">
|
||||||
{{ with $link.description }}
|
{{ with $link.description }}
|
||||||
@@ -32,7 +40,7 @@
|
|||||||
loading="lazy" alt="{{ $link.title }}" data-key="links-{{ $link.website }}" data-hash="{{ $image.Data.Integrity }}">
|
loading="lazy" alt="{{ $link.title }}" data-key="links-{{ $link.website }}" data-hash="{{ $image.Data.Integrity }}">
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</a>
|
{{ if $enabled }}</a>{{ else }}</div>{{ end }}
|
||||||
</article>
|
</article>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user