Skip to content

Commit

Permalink
Use self-hosted icons and handwritten fonts
Browse files Browse the repository at this point in the history
  • Loading branch information
apqx committed Feb 18, 2024
1 parent 5e014d0 commit 43bf169
Show file tree
Hide file tree
Showing 16 changed files with 2,454 additions and 27 deletions.
5 changes: 1 addition & 4 deletions _includes/head-common.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,11 @@

<link rel="shortcut icon" href="https://apqx.oss-cn-hangzhou.aliyuncs.com/blog/site/snail.png" />
<link rel="apple-touch-icon" href="https://apqx.oss-cn-hangzhou.aliyuncs.com/blog/site/snail_white_bg.png" />
<!-- Material Icons -->
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons" />
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons+Outlined" />
<!-- Google Fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link
href="https://fonts.googleapis.com/css2?family=Noto+Sans:wght@300;400;500;700&family=Noto+Sans+SC:wght@300;400;500;700&family=Ma+Shan+Zheng&family=Noto+Color+Emoji&display=swap"
href="https://fonts.googleapis.com/css2?family=Noto+Sans:wght@300;400;500;700&family=Noto+Sans+SC:wght@300;400;500;700&family=Noto+Color+Emoji&display=swap"
rel="stylesheet">
{% comment %} js和css资源由内部npm工程输出,debug模式下使用localhost版本,release模式下使用托管在阿里云上的版本 {% endcomment %}
{% if debug == true %}
Expand Down
2 changes: 1 addition & 1 deletion _posts/original/2016-05-12-我的大学.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ tags: 碎碎念 记忆

那些年奇奇怪怪的心理,似乎也是在与我现在多变的性情相呼应。

小学只知道五年级要考中学,但并没有人告诉我“初中”“中心校”是什么东西,老老实实被老师带着去不远的`利民镇一中`考试(距离我家不到1公里)。**依然记得那一天,我们成群结队,穿过麦田,我的大脑中还有很多类似的片段,隐隐约约又很真切,难以释怀。**三门课考得不错,老师说可以跳过六年级,我不懂,就跳了,暑假贪玩想各种理由不去补习班,现在回溯,至少这件事做对了。
小学只知道五年级要考中学,但并没有人告诉我“初中”“中心校”是什么东西,老老实实被老师带着去不远的`利民镇一中`考试(距离我家不到1公里)。**依然记得那一天,我们成群结队,穿过麦田,我的大脑中还有很多类似的片段,隐隐约约又很真切,难以释怀。**三门课考得不错,老师说可以跳过六年级,我不懂,就跳了,暑假贪玩想各种理由不去补习班,现在回溯,至少这件事做对了。

#

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ tags: CS Java RaspberryPi

# 实时判断连接状态

`Socket`连接有一个缺陷,就是当连接意外断开的时候客户端和服务端都不会收到任何通知,这样会带来一些安全性问题。比如在命令机器人前进的过程中脱离了最大控制距离,其和控制端的连接已经断开,但是它既无法接收到控制端的停止指令,也无法意识到连接断开,只会执行接到的最后一条命令“前进”。要避免这种情况就需要实时判断连接状态,可以用定时发送心跳包的方式,每5秒发送一次,当一段时间内没有收到心跳就判断连接已经断开,执行一些“停止”“重连”之类的指令。
`Socket`连接有一个缺陷,就是当连接意外断开的时候客户端和服务端都不会收到任何通知,这样会带来一些安全性问题。比如在命令机器人前进的过程中脱离了最大控制距离,其和控制端的连接已经断开,但是它既无法接收到控制端的停止指令,也无法意识到连接断开,只会执行接到的最后一条命令“前进”。要避免这种情况就需要实时判断连接状态,可以用定时发送心跳包的方式,每5秒发送一次,当一段时间内没有收到心跳就判断连接已经断开,执行一些“停止”“重连”之类的指令。

# 功能抽象封装

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ tags: 碎碎念 旅行 摄影 看剧 戏剧 上海 昆曲 省昆 昆昆 浮生

![](https://apqx.oss-cn-hangzhou.aliyuncs.com/blog/20210117/kunqv_fushengliuji_09_thumb.jpg){: loading="lazy" class="clickable clickShowOriginalImg operaCopyright" alt="施夏明 单雯" }

从一年前《浮生六记》首演我就注意到一些对新剧服装的批评声音,诸如“不伦不类”“非传统”“非汉服”之类,我并不同意。
从一年前《浮生六记》首演我就注意到一些对新剧服装的批评声音,诸如“不伦不类”“非传统”“非汉服”之类,我并不同意。

我不确定有多少人是在剧场看了演出才写的评论,昆曲是用填词、曲调、身段去渲染意境以表现婉约之美的艺术,**服饰只是演绎的道具,来展现舞台上《浮生六记》的飘逸虚幻之美**。什么明、清、韩,又什么汉服,当然可以用现代的审美重新设计,哪有那么多的条条框框,若现代都按传统来,那“传统”又是从何而来,突然某一天从石头缝里蹦出来的么?肯定也是一步步随时代变化而演进的。

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ tags: CS Blog Git GitHub 开源

博客里的第一篇文章日期是2016年,算来已有7年,刚开始只是单纯的`HTML`页面,后来开始用`Jekyll``Markdown`,再后来引入`Webpack``React`,从[Materialize](https://materializecss.com){: target="_blank" }切换到如今的[Material Design Components](https://github.com/material-components/material-components-web){: target="_blank" },这之间的每一步都是在接触新“玩具”后对旧工程的梳理重构,同时也在`Git`时间线上留下了近千条`Commit`记录,而作为开源项目这些记录却一直让我耿耿于怀...

早期并没有意识到`Commit`记录在版本控制中的重要性,所以十分随意,充斥着“更新”“常规更新”之类毫无信息价值的`Message`,由它们填充的早期时间线看起来就乱糟糟的,一点也不“体面”。
早期并没有意识到`Commit`记录在版本控制中的重要性,所以十分随意,充斥着“更新”“常规更新”之类毫无信息价值的`Message`,由它们填充的早期时间线看起来就乱糟糟的,一点也不“体面”。

梳理时间线势在必行,只是`Git``Rebase`和那千条记录确实令人望而生畏,前者的“畏”在于不熟悉,后者的“畏”则在于数量,后来的实际操作也证明我的担心是合理的,整整用了2天时间才把这条时间线“捋顺”。其实做完之后倒觉得不过如此而已,不熟悉的`Rebase`变成了熟悉的`Rebase`,在`GitHub`上翻看历史记录也终于不再“尴尬”。以此为契机同时更新更详尽的[README](https://github.com/apqx/apqx.github.io){: target="_blank" },它是我的第一个`Cyber Child`,也是我拥抱开源的第一个尝试,应该以更规范的标准来维护。

Expand Down
2 changes: 1 addition & 1 deletion index-n.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<div class="mdc-card index-top-card drawer-trigger">
<img src="https://apqx.oss-cn-hangzhou.aliyuncs.com/blog/site/index_hangzhou_thumb.jpg" class="index-lazy-img"
style="object-fit: cover;"/>
<div class="index-top-card-container handwritten">
<div class="index-top-card-container handwritten handwritten__mashanzheng">
<p style="text-align: right;">暖风吹得游人醉,直把杭州作汴州</p>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion index-poetry-n.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<div class="mdc-card index-top-card drawer-trigger">
<img src="https://apqx.oss-cn-hangzhou.aliyuncs.com/blog/site/index_mudanting_thumb.jpg" class="index-lazy-img"
style="object-fit: cover;"/>
<div class="index-top-card-container handwritten">
<div class="index-top-card-container handwritten handwritten__mashanzheng">
<p style="text-align: right;">旧时王谢堂前燕,飞入寻常百姓家</p>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion index-poetry.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<div class="mdc-card index-top-card drawer-trigger">
<img src="https://apqx.oss-cn-hangzhou.aliyuncs.com/blog/site/index_duliniang_thumb.jpg" class="index-lazy-img"
style="object-fit: cover;"/>
<div class="index-top-card-container handwritten">
<div class="index-top-card-container handwritten handwritten__mashanzheng">
<p class="index-top-card-text">旧时王谢堂前燕,飞入寻常百姓家</p>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion index-repost.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<div class="mdc-card index-top-card drawer-trigger">
<img src="https://apqx.oss-cn-hangzhou.aliyuncs.com/blog/site/index_liumengmei_thumb.jpg" class="index-lazy-img"
style="object-fit: cover;"/>
<div class="index-top-card-container handwritten">
<div class="index-top-card-container handwritten handwritten__mashanzheng">
<p class="index-top-card-text">一个收藏夹,慢慢鼓起来</p>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<div class="mdc-card index-top-card drawer-trigger">
<img src="https://apqx.oss-cn-hangzhou.aliyuncs.com/blog/site/index_hangzhou_thumb.jpg" class="index-lazy-img"
style="object-fit: cover;"/>
<div class="index-top-card-container handwritten">
<div class="index-top-card-container handwritten handwritten__mashanzheng">
<p class="index-top-card-text">暖风吹得游人醉,直把杭州作汴州</p>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion npm/dist/apqx-v2.0.0.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion npm/dist/apqx-v2.0.0.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion npm/src/script/component/PreferenceDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export class PreferenceDialog extends BasicDialog<BasicDialogProps, DialogConten
return false
}

handwrittenFontTitle = "使用<a href=\"https://fonts.google.com/specimen/Ma+Shan+Zheng\" target=\"_blank\">马善政手写楷书</a>字体"
handwrittenFontTitle = "使用<a href=\"https://www.hanyi.com.cn/productdetail.php?id=8433&type=0\" target=\"_blank\">汉仪颐和仙境楷书</a>字体"

dialogContent(): JSX.Element {
console_debug("PreferenceDialogContent render")
Expand Down
4 changes: 4 additions & 0 deletions npm/src/style/_basic.scss
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,10 @@ blockquote.handwritten.pre p {
font-size: 1.3rem;
}

.handwritten.handwritten__mashanzheng * {
font-family: blogTheme.$handwritten-mashanzheng-font;
}


.mdc-deprecated-list {
@include list.deprecated-divider-color(var(--divider-color));
Expand Down
Loading

0 comments on commit 43bf169

Please sign in to comment.