feat: friends link

This commit is contained in:
沈宇 2020-09-07 18:26:26 +08:00
parent 3bb55b8fcb
commit e95cdd5cd8
22 changed files with 129 additions and 10 deletions

View File

@ -273,6 +273,26 @@ gongan:
img: /images/beian.png
url: "http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=01234567890123" #link
text: "浙公网安备01234567890123号"
# friends link
friends_link:
Ayer: #site name
# site url
url: https://github.com/Shen-Yu/hexo-theme-ayer
# site icon(optional)
img: /images/ayer.png
GitHub:
url: https://github.com/Shen-Yu
img: https://i.loli.net/2020/09/07/indb4PRYDA98EkN.png
gitee:
url: https://gitee.com/shen-yu
img: https://i.loli.net/2020/09/07/K3AqO7h6krQFlRX.png
Hexo:
url: https://hexo.io
img: https://i.loli.net/2020/09/07/UYGzjo7h68CRWny.png
hexo-tag-chart:
url: https://github.com/Shen-Yu/hexo-tag-chart
img: https://i.loli.net/2020/09/07/GIXBYE5SoylhR1r.png
```
## Plugins
@ -334,6 +354,20 @@ layout: "categories"
## Tags
Same as categories.
## Friend Links
``` bash
hexo new page friends
```
Then paste following codes to file: /source/friends/index.md
``` md
---
title: friends
type: friends
layout: "friends"
---
```
Then edit `friends_link` in `_config.yml`
## Gallery
Need to write in the head of the markdown, this is not a good way to write, I hope to get a better way to write on github.

View File

@ -6,6 +6,7 @@ menu:
标签: /tags
旅行: /tags/旅行/
摄影: http://shenyu-vip.lofter.com
友链: /friends
关于我: /2019/about
# 站点次标题和打字动效
@ -174,6 +175,26 @@ gongan:
url: "http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=01234567890123" #公安备案链接
text: "浙公网安备01234567890123号" #公安备案信息
# 友情链接
friends_link:
Ayer主题: #网站名称
#网站地址
url: https://github.com/Shen-Yu/hexo-theme-ayer
#网站图片(可忽略不写)
img: /images/ayer.png
GitHub:
url: https://github.com/Shen-Yu
img: https://i.loli.net/2020/09/07/indb4PRYDA98EkN.png
码云:
url: https://gitee.com/shen-yu
img: https://i.loli.net/2020/09/07/K3AqO7h6krQFlRX.png
Hexo官网:
url: https://hexo.io
img: https://i.loli.net/2020/09/07/UYGzjo7h68CRWny.png
Hexo图表插件:
url: https://github.com/Shen-Yu/hexo-tag-chart
img: https://i.loli.net/2020/09/07/GIXBYE5SoylhR1r.png
# 评论1、Valine(推荐)2、Gitalk3、MiniValine
# 1、Valine[一款快速、简洁且高效的无后端评论系统](https://github.com/xCss/Valine)

View File

@ -20,6 +20,7 @@ category: Kategorie
tag: Tag
site_visitors: Visitors
page_views: Views
friends: Freunde
post:
word_count: Wortzahl
@ -28,4 +29,4 @@ post:
reward: Belohnung
sticky: Oben
copyright_title: Copyright-Hinweis
copyright_content: Sofern nicht anders angegeben, liegt das Urheberrecht aller Artikel in diesem Blog beim Autor. Nachdruck bitte Quelle angeben!
copyright_content: Sofern nicht anders angegeben, liegt das Urheberrecht aller Artikel in diesem Blog beim Autor. Nachdruck bitte Quelle angeben!

View File

@ -20,6 +20,7 @@ category: Category
tag: Tag
site_visitors: Visitors
page_views: Views
friends: Friends
post:
word_count: Word count

View File

@ -20,6 +20,7 @@ category: Category
tag: Tag
site_visitors: Visitors
page_views: Views
friends: Friends
post:
word_count: Word count

View File

@ -20,6 +20,7 @@ category: Categoría
tag: Tag
site_visitors: Visitors
page_views: Views
friends: Amigos
post:
word_count: El recuento de palabras
@ -28,4 +29,4 @@ post:
reward: Recompensa
sticky: Arriba
copyright_title: Derechos de autor
copyright_content: Los derechos de autor son propiedad del autor. Para reimpresiones comerciales, comuníquese con el autor para obtener autorización. Para reimpresiones no comerciales, indique la fuente.
copyright_content: Los derechos de autor son propiedad del autor. Para reimpresiones comerciales, comuníquese con el autor para obtener autorización. Para reimpresiones no comerciales, indique la fuente.

View File

@ -20,6 +20,7 @@ category: Catégorie
tag: Mot-clé
site_visitors: Visitors
page_views: Views
friends: Mes amis
post:
word_count: Nombre de mots

View File

@ -20,6 +20,7 @@ category: カテゴリ
tag: タグ
site_visitors: Visitors
page_views: Views
friends: 友達
post:
word_count: 単語数
@ -28,4 +29,4 @@ post:
reward: 報酬
sticky: 上へ
copyright_title: 著作権表示
copyright_content: 著作権は著者が所有しています。商業版の複製については、承認について著者に連絡してください。非商業版の複製については、出典を明記してください。
copyright_content: 著作権は著者が所有しています。商業版の複製については、承認について著者に連絡してください。非商業版の複製については、出典を明記してください。

View File

@ -20,6 +20,7 @@ category: 카테고리
tag: 태그
site_visitors: Visitors
page_views: Views
friends: 친구 들
post:
word_count: 단어 수
@ -28,4 +29,4 @@ post:
reward: 보상
sticky:
copyright_title: 저작권 고지
copyright_content: 저작권은 저자가 소유합니다. 상업용 재 인쇄의 경우 승인을 위해 저자에게 문의하십시오. 비상업적 재 인쇄의 경우 출처를 명시하십시오.
copyright_content: 저작권은 저자가 소유합니다. 상업용 재 인쇄의 경우 승인을 위해 저자에게 문의하십시오. 비상업적 재 인쇄의 경우 출처를 명시하십시오.

View File

@ -20,6 +20,7 @@ category: Categorie
tag: Label
site_visitors: Visitors
page_views: Views
friends: Vrienden
post:
word_count: Aantal woorden in artikel

View File

@ -20,6 +20,7 @@ category: Category
tag: Tag
site_visitors: Visitors
page_views: Views
friends: Venner
post:
word_count: Ordtelling

View File

@ -20,6 +20,7 @@ category: Categoria
tag: Tag
site_visitors: Visitors
page_views: Views
friends: Amigos
post:
word_count: Word count

View File

@ -20,6 +20,7 @@ category: Категория
tag: Метка
site_visitors: Visitors
page_views: Views
friends: друзья
post:
word_count: Количество слов
@ -28,4 +29,4 @@ post:
reward: вознаграждение
sticky: липкий
copyright_title: Авторские права
copyright_content: Авторские права принадлежат автору. Для коммерческих перепечаток, пожалуйста, свяжитесь с автором для авторизации. Для некоммерческих перепечаток, пожалуйста, укажите источник.
copyright_content: Авторские права принадлежат автору. Для коммерческих перепечаток, пожалуйста, свяжитесь с автором для авторизации. Для некоммерческих перепечаток, пожалуйста, укажите источник.

View File

@ -20,6 +20,7 @@ category: Thể loại
tag: thẻ
site_visitors: Visitors
page_views: Views
friends: Bạn
post:
word_count: Đếm từ

View File

@ -20,6 +20,7 @@ category: Category
tag: Tag
site_visitors: 访问人数
page_views: 浏览次数
friends: 友情链接
post:
word_count: 字数统计
@ -28,4 +29,4 @@ post:
reward: 打赏
sticky: 置顶
copyright_title: 版权声明
copyright_content: 本博客所有文章除特别声明外,著作权归作者所有。转载请注明出处!
copyright_content: 本博客所有文章除特别声明外,著作权归作者所有。转载请注明出处!

View File

@ -20,6 +20,7 @@ category: Category
tag: Tag
site_visitors: Visitors
page_views: Views
friends: 友情鏈接
post:
word_count: 字數統計
@ -28,4 +29,4 @@ post:
reward: 打賞
sticky: 置頂
copyright_title: 版權聲明
copyright_content: 本博客所有文章除特別聲明外,著作權歸作者所有。轉載請註明出處!
copyright_content: 本博客所有文章除特別聲明外,著作權歸作者所有。轉載請註明出處!

20
layout/friends.ejs Normal file
View File

@ -0,0 +1,20 @@
<section class="outer">
<% if(theme.friends_link && theme.friends_link.length != 0){ %>
<h1 class="page-type-title"><%= __('friends') %></h1>
<ul id="friends_link">
<% for (var i in theme.friends_link){ %>
<li class="friends_li">
<a href="<%- url_for(theme.friends_link[i].url) %>" target="_blank" class="search-title"
<% if (theme.friends_link[i].description){ %>title="<%= theme.friends_link[i].description %>" <% } %>>
<% if (theme.friends_link[i].img){ %>
<img src="<%- url_for(theme.friends_link[i].img) %>">
<% } else { %>
<i class="ri-user-fill"></i>
<% } %>
<%= i %>
</a>
</li>
<% } %>
</ul>
<%}%>
</section>

View File

@ -26,7 +26,7 @@
},
"homepage": "https://shen-yu.gitee.io/",
"devDependencies": {
"autoprefixer": "^9.7.4",
"autoprefixer": "^9.8.6",
"parcel-bundler": "^1.12.4",
"parcel-plugin-bundle-visualiser": "^1.2.0",
"postcss-modules": "^1.5.0"

View File

@ -0,0 +1,29 @@
// friends
#friends_link
.friends_li
list-style none
float left
a
padding 15px 25px
display flex
align-items center
justify-content space-between
font-size 17px
text-decoration none
background-color rgba(6,129,208,.1)
color #000
border-radius 6px
margin-right 20px
margin-bottom 20px
img
display inline-block
width 40px
height 40px
border-radius 50%
margin-right 10px
i
font-size 25px
width 40px
height 40px
&:hover
background-color rgba(6,129,208,.15)

View File

@ -71,6 +71,7 @@ button
@import "_partial/apple"
@import "_partial/reward"
@import "_partial/share"
@import "_partial/friends"
if sidebar
@import "_partial/sidebar"

File diff suppressed because one or more lines are too long

View File

@ -42,7 +42,7 @@
margin-bottom: 10px;
}</style>
<script>
window.TREE_DATA = {"groups":[{"label":"main.js","path":".\\source\\dist\\main.js","weight":5567,"formattedSize":"5.44 KB","formattedGzipSize":"2.23 KB","formattedTime":"5.25s","isTooLarge":false,"groups":[{"label":"source-src","path":".\\source-src","groups":[{"label":"main.js","path":".\\source-src\\main.js","weight":198,"time":482,"formattedTime":"482ms","formattedSize":"198 B","isTooLarge":false},{"label":"css","path":".\\source-src\\css","groups":[{"label":"style.styl","path":".\\source-src\\css\\style.styl","weight":1073,"time":4749,"formattedTime":"4.75s","formattedSize":"1.05 KB","isTooLarge":false}],"weight":1073,"formattedTime":"4.75s","formattedSize":"1.05 KB"},{"label":"js","path":".\\source-src\\js","groups":[{"label":"ayer.js","path":".\\source-src\\js\\ayer.js","weight":2547,"time":530,"formattedTime":"530ms","formattedSize":"2.49 KB","isTooLarge":false},{"label":"share.js","path":".\\source-src\\js\\share.js","weight":1729,"time":606,"formattedTime":"606ms","formattedSize":"1.69 KB","isTooLarge":false}],"weight":4276,"formattedTime":"1.14s","formattedSize":"4.18 KB"}],"weight":5547,"formattedTime":"6.37s","formattedSize":"5.42 KB"}]},{"label":"main.css","path":".\\source\\dist\\main.css","weight":35751,"formattedSize":"34.91 KB","formattedGzipSize":"7.86 KB","formattedTime":"4.75s","isTooLarge":false,"groups":[{"label":"source-src","path":".\\source-src","groups":[{"label":"css","path":".\\source-src\\css","groups":[{"label":"style.styl","path":".\\source-src\\css\\style.styl","weight":1073,"time":4749,"formattedTime":"4.75s","formattedSize":"1.05 KB","isTooLarge":false}],"weight":1073,"formattedTime":"4.75s","formattedSize":"1.05 KB"}],"weight":1073,"formattedTime":"4.75s","formattedSize":"1.05 KB"}]}]};
window.TREE_DATA = {"groups":[{"label":"main.js","path":".\\source\\dist\\main.js","weight":5567,"formattedSize":"5.44 KB","formattedGzipSize":"2.23 KB","formattedTime":"3.05s","isTooLarge":false,"groups":[{"label":"source-src","path":".\\source-src","groups":[{"label":"main.js","path":".\\source-src\\main.js","weight":198,"time":134,"formattedTime":"134ms","formattedSize":"198 B","isTooLarge":false},{"label":"css","path":".\\source-src\\css","groups":[{"label":"style.styl","path":".\\source-src\\css\\style.styl","weight":1073,"time":2903,"formattedTime":"2.90s","formattedSize":"1.05 KB","isTooLarge":false}],"weight":1073,"formattedTime":"2.90s","formattedSize":"1.05 KB"},{"label":"js","path":".\\source-src\\js","groups":[{"label":"ayer.js","path":".\\source-src\\js\\ayer.js","weight":2547,"time":382,"formattedTime":"382ms","formattedSize":"2.49 KB","isTooLarge":false},{"label":"share.js","path":".\\source-src\\js\\share.js","weight":1729,"time":403,"formattedTime":"403ms","formattedSize":"1.69 KB","isTooLarge":false}],"weight":4276,"formattedTime":"785ms","formattedSize":"4.18 KB"}],"weight":5547,"formattedTime":"3.82s","formattedSize":"5.42 KB"}]},{"label":"main.css","path":".\\source\\dist\\main.css","weight":36301,"formattedSize":"35.45 KB","formattedGzipSize":"7.97 KB","formattedTime":"2.91s","isTooLarge":false,"groups":[{"label":"source-src","path":".\\source-src","groups":[{"label":"css","path":".\\source-src\\css","groups":[{"label":"style.styl","path":".\\source-src\\css\\style.styl","weight":1073,"time":2903,"formattedTime":"2.90s","formattedSize":"1.05 KB","isTooLarge":false}],"weight":1073,"formattedTime":"2.90s","formattedSize":"1.05 KB"}],"weight":1073,"formattedTime":"2.90s","formattedSize":"1.05 KB"}]}]};
</script>
<script>/* eslint-disable */
/**