Skip to content

Commit

Permalink
archive
Browse files Browse the repository at this point in the history
  • Loading branch information
YiHui-Liu committed Feb 12, 2024
1 parent 2d39b6d commit 0ba25b2
Show file tree
Hide file tree
Showing 10 changed files with 136 additions and 14 deletions.
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
store-dir=/home/ubuntu/.pnpm-store
19 changes: 15 additions & 4 deletions languages/zh-CN.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,21 @@ nav:
# 导航栏菜单
menu:
home: 首页
article: 文章
archives: 归档
categories: 分类
tags: 标签
about: 关于
About: 关于
site: 本站
friends: 友人
friendlink: 友链
friendcircle: 友圈
lab: 实验室
run: 跑步
statistics: 统计
other: 其他
boundfor: 开往
goto: 虫洞

# 归档页、分类页、标签页
page:
Expand Down Expand Up @@ -43,9 +54,9 @@ social:
segmentfault: 思否
zhihu: 知乎
weibo: 微博
wechat: 微信
telegram: Telegram
qq: QQ
Bilibili: BiliBili
Email: 邮箱


# 文章
post:
Expand Down
10 changes: 9 additions & 1 deletion languages/zh-HK.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,18 @@ nav:
# 巡覽列選單
menu:
home: 首頁
article: 文章
archives: 歸檔
categories: 分類
tags: 標籤
about: 關於
About: 關於
Author: 作者
bb: 哔哔
gallery: 相册
reward: 打赏
friends: 友链
lab: 實驗室
boundfor: 開往

# 歸檔頁、分類頁、標籤頁
page:
Expand Down
3 changes: 3 additions & 0 deletions layout/_layout.pug
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
-
var SW_URL = '/sw_init.js';
var HEXO_URL = 'http://hexo.io/';
var STUN_URL = 'https://github.com/liuyib/hexo-theme-stun/';
var isNoHeader = !theme.header.enable || (is_post() && !theme.header.show_on.post);
Expand All @@ -22,6 +23,8 @@
}
var ccUrl = `https://creativecommons.org/licenses/${ccLicense}/4.0/deed.${ccLanguage}`;
script(src=SW_URL)

doctype html
html(lang=config.language)
head
Expand Down
16 changes: 15 additions & 1 deletion layout/_third-party/comments/waline.pug
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,21 @@ script&attributes(dataPjax).
admin: '!{theme.waline.locale.admin}',
placeholder: '!{theme.waline.locale.placeholder}'
},
reaction: !{theme.waline.reaction}
reaction: !{theme.waline.reaction},
imageUploader: function(file) {
let formData = new FormData();
let headers = new Headers();

formData.append('file', file);
headers.append('Authorization', '!{theme.waline.imageUploader.token}');
headers.append('Accept', 'application/json');

return fetch('!{theme.waline.imageUploader.url}', {
method: 'POST',
headers: headers,
body: formData
}).then(resp => resp.json()).then(resp => resp.data.links.url);
}
});
}

Expand Down
6 changes: 3 additions & 3 deletions source/css/_common/components/header/index.styl
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,12 @@ if (hexo-config('header.nav.height') && match('%', hexo-config('header.nav.heigh

&-menu-item__link {
padding: 0 .5rem;
menuItemHover(#f4f5f5, #999);
menuItemHover(#2d2e30, #a09d9b);
}

&-submenu-item__link {
padding: .75rem .5rem;
menuItemHover(#f4f5f5, #999);
menuItemHover(#2d2e30, #a09d9b);
}

&-menu {
Expand All @@ -118,7 +118,7 @@ if (hexo-config('header.nav.height') && match('%', hexo-config('header.nav.heigh
&-item {
float: left;
position: relative;
margin: 0 1rem 0 0;
margin: 0 0.25rem 0 0;
height: header-nav-height;
text-align: center;
cursor: pointer;
Expand Down
2 changes: 1 addition & 1 deletion source/css/_common/components/plugins/friends.styl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
display: flex;
float: left;
padding: .5rem 1rem;
width: 50%;
width: 33%;
height: 100px;
transition: background-color .3s;
align-items: center;
Expand Down
82 changes: 82 additions & 0 deletions source/css/_custom/_common.styl
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
// 图片设置
.content img {
border: none;
margin: 5px auto;
max-height: 300px;
}

img.inline {
vertical-align: -4px;
display: inline-block;
height: 20px
}

// 脚注
.footnotes-list {
padding-inline-start: 20px;
}
.footnote-item {
line-height: 125% !important;
font-size: 12px;
}

// 评论表情
.wl-content img {
display: inline;
}

.wl-content img[src^="https://img.t.sinajs.cn"]
{
width: 1.25em;
margin: 0.25em;
vertical-align: middle;
}

// 顶部栏
@media (max-width: $md-width) {
.header-nav-menu-item__link {
color: #2d2e30;
}
}

/*哔哩哔哩视频适配*/
.bilibili {
position: relative;
width: 100%;
}
@media only screen and (max-width: 767px) {
.bilibili {height: 15em;max-width: 25em;}
}
@media only screen and (min-width: 768px) and (max-width: 991px) {
.bilibili {height: 20em;max-width: 30em;}
}
@media only screen and (min-width: 992px) and (max-width: 1199px) {
.bilibili {height: 30em;max-width: 40em;}
}
@media only screen and (min-width: 1200px) {
.bilibili {height: 40em;max-width: 50em;}
}

// Module color
// -------------------------------------------
// Header
$header-bg-color = #ffebd7
$header-text-color = #2d2e30
$header-nav-bg-color = #ffebd7
$header-menu-hover-color = $blue-light

// Footer
$footer-bg-color = #2d2e30
$footer-text-color = #f5f6f7
$footer-link-color = #c20808
$footer-link-hover-color = #ed0b0b

// 其他
h1 {
margin: .67em 0;
font-size: 1.8em !important;
}

.fa,.fa-brands,.fa-duotone,.fa-light,.fa-regular,.fa-solid {
line-height: inherit !important;
}
5 changes: 4 additions & 1 deletion source/css/_custom/index.styl
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Custom styles by yourself.
// You should always modify the style here, not in the source code.
// Otherwise, when the theme is updated, the code you modified will be overwritten.
// Otherwise, when the theme is updated, the code you modified will be overwritten.

// common
@import './_common.styl';
6 changes: 3 additions & 3 deletions source/css/_variables/color.styl
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ $hr-color = #b8dcfd
// Module color
// -------------------------------------------
// Header
$header-bg-color = #2d2e30
$header-text-color = #f5f6f7
$header-nav-bg-color = #2d2e30
$header-bg-color = #ffebd7
$header-text-color = #2d2e30
$header-nav-bg-color = #ffebd7
$header-menu-hover-color = $blue-light

// Footer
Expand Down

0 comments on commit 0ba25b2

Please sign in to comment.