Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
stefango committed Apr 6, 2020
1 parent b5ae4e0 commit 6847255
Show file tree
Hide file tree
Showing 11 changed files with 126 additions and 9 deletions.
9 changes: 8 additions & 1 deletion config/_default/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,11 @@ ignoreFiles = ["\\.ipynb$", ".ipynb_checkpoints$", "\\.Rmd$", "\\.Rmarkdown$", "

[params]
disqusShortname = "stefango"

toc = true

############################
## Marketing
############################
[marketing]
google_analytics = "G-6NR1DCJ7F4"
google_tag_manager = "GTM-W7SRWJH"
2 changes: 1 addition & 1 deletion content/authors/admin/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,4 @@ user_groups:
- Visitors
---

Xu Zili is a student of Software Engineering in CIT.
Education: Software Engineering in CIT
File renamed without changes
14 changes: 7 additions & 7 deletions content/post/skills.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ image:
projects: []
---

[TOC]
{{% toc %}}

## Windows10

Expand Down Expand Up @@ -68,7 +68,7 @@ projects: []

7. 命令行启动 mysql57:`net start mysql57`

## Linux (TG: https://t.me/linux_home)
## Linux ( TG: https://t.me/linux_home )

1. 使用 zsh(ZSHELL) 替换 bash (配置方式:https://segmentfault.com/a/1190000015155864 主题:https://birdteam.net/131798)

Expand Down Expand Up @@ -239,7 +239,7 @@ tar -xf apache-tomcat-9.0.33.tar.gz
2. 打开新的标签页:单击鼠标滚轮 / `ctrl` + `T`
3. 打开新的窗口:`ctrl` + `N`
4. 不使用 IDM 插件下载:`alt` + `download_link`
5. IDM Chrome 插件 https://chrome.google.com/webstore/detail/idm-integration-module/ngpampappnmepgilojfohadhhmbhlaek
5. [IDM Chrome 插件](https://chrome.google.com/webstore/detail/idm-integration-module/ngpampappnmepgilojfohadhhmbhlaek)
6. 代理工具 SwitchyOmega ("导入/导出"中填入 `https://github.com/FelisCatus/SwitchyOmega/wiki/GFWList.bak`)

## Typora
Expand Down Expand Up @@ -328,7 +328,7 @@ git config --global http.https://github.com.proxy socks5://127.0.0.1:1080

## CDN

1. Github + jsDelivr + PicGo 打造稳定快速、高效免费图床 https://www.itrhx.com/2019/08/01/A27-image-hosting/
1. [Github + jsDelivr + PicGo 打造稳定快速、高效免费图床](https://www.itrhx.com/2019/08/01/A27-image-hosting/)

## 图片压缩

Expand All @@ -337,11 +337,11 @@ git config --global http.https://github.com.proxy socks5://127.0.0.1:1080
## MI5 卡刷

1. 新建备份,将备份文件拷至电脑
2. 下载 Team Win Recovery Project https://twrp.me/ ,fastboot flash recovery [Recovery路径和文件名].img
3. 下载 MIUI 11第三方rom包 https://sourceforge.net/projects/xiaomi-eu-multilang-miui-roms/files/xiaomi.eu/MIUI-WEEKLY-RELEASES/9.10.10/xiaomi.eu_multi_MI5_9.10.10_v11-8.0.zip/download
2. [下载 Team Win Recovery Project](https://twrp.me/),fastboot flash recovery [Recovery路径和文件名].img
3. [下载 MIUI 11第三方rom包](https://sourceforge.net/projects/xiaomi-eu-multilang-miui-roms/files/xiaomi.eu/MIUI-WEEKLY-RELEASES/9.10.10/xiaomi.eu_multi_MI5_9.10.10_v11-8.0.zip/download)
4. 手机关机,长按音量上键+电源键进入 rec (Team Win 页面),清除-格式化 data 数据-输入 yes (键盘弹不出来时切换语言)
5. 去手机卡,连接开代理的热点检查更新(其他跳过更新的方法也可以)
6. 添加 mipay 等应用 https://www.199989.xyz/%E5%B0%8F%E7%B1%B3%E6%89%8B%E6%A9%9F%E7%B3%BB%E7%B5%B1eu%E7%89%88%E5%8A%A0%E5%85%A5mipay%E4%BB%A5%E5%8F%8A%E6%97%A5%E6%9B%86%E5%A2%9E%E5%8A%A0%E8%BE%B2%E6%9B%86
6. [添加 mipay 等应用](https://www.199989.xyz/%E5%B0%8F%E7%B1%B3%E6%89%8B%E6%A9%9F%E7%B3%BB%E7%B5%B1eu%E7%89%88%E5%8A%A0%E5%85%A5mipay%E4%BB%A5%E5%8F%8A%E6%97%A5%E6%9B%86%E5%A2%9E%E5%8A%A0%E8%BE%B2%E6%9B%86)

## 互传(保留文件原有时间戳)

Expand Down
2 changes: 2 additions & 0 deletions content/post/第一个博客.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ draft: false
tags: ["hugo", "blog"]
---

{{% toc %}}

## 搭建博客 ( freenom + github + netlify / cloudflare + hugo ( extended version ) )

1. 安装go、[hugo ( extended version )](https://gohugo.io/getting-started/installing)
Expand Down
Binary file modified favicon.ico
Binary file not shown.
Binary file added favicon_zhihu.ico
Binary file not shown.
44 changes: 44 additions & 0 deletions layouts/partials/toc.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<!-- toc.html -->
<!-- ignore empty links with + -->
{{ $headers := findRE "<h[1-4].*?>(.|\n])+?</h[1-4]>" .Content }}
<!-- at least one header to link to -->
{{ if ge (len $headers) 1 }}
{{ $h1_n := len (findRE "(.|\n])+?" .Content) }}
{{ $re := (cond (eq $h1_n 0) "<h[2-4]" "<h[1-4]") }}
{{ $renum := (cond (eq $h1_n 0) "[2-4]" "[1-4]") }}

<!--Scrollspy-->
<div class="toc">

<div class="page-header"><strong>- CATALOG -</strong></div>

<div id="page-scrollspy" class="toc-nav">

{{ range $headers }}
{{ $header := . }}
{{ range first 1 (findRE $re $header 1) }}
{{ range findRE $renum . 1 }}
{{ $next_heading := (cond (eq $h1_n 0) (sub (int .) 1 ) (int . ) ) }}
{{ range seq $next_heading }}
<ul class="nav">
{{end}}
{{ $anchorId := (replaceRE ".* id=\"(.*?)\".*" "$1" $header ) }}
<li class="nav-item">
<a class="nav-link text-left" href="#{{ $anchorId }}">
{{ $header | plainify | htmlUnescape }}
</a>
</li>
<!-- close list -->
{{ range seq $next_heading }}
</ul>
{{ end }}
{{ end }}
{{ end }}
{{ end }}

</div>

</div>
<!--Scrollspy-->

{{ end }}
13 changes: 13 additions & 0 deletions layouts/posts/single.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{{ define "main" }}
<main>
<article>
<header>
<h1>{{ .Title }}</h1>
</header>
{{ .Content }}
</article>
<aside>
{{ .TableOfContents }}
</aside>
</main>
{{ end }}
51 changes: 51 additions & 0 deletions static/css/custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/* toc style */
.toc {
position: fixed;
top: 50%;
right: 10%;
width: 10%;
transform: translateY(-50%);
/*background-color: #f6f6f6;*/
/*border: solid 1px #c9c9c9;*/
border-radius: 5px;
padding-bottom: 1rem;
}

.toc .page-header {
margin-top: 1rem;
margin-bottom: 1rem;
}

.toc-nav ul {
overflow: hidden;
white-space: nowrap;
line-height: 1rem;
}

/* ignore h1 header */
.toc-nav ul ul ul {
margin-left: 2rem;
}

.toc-nav .nav-link {
text-overflow: ellipsis;
overflow: hidden;
color: #333;
}

.toc-nav li.active .nav-link {
background-color: #f6f6f6;
color: var(--accent);
border-left: solid 2px var(--accent);
}

/* Media Queries */
@media (max-width: 1080px) {
main {
max-width: 100%;
}

.toc {
display: none;
}
}
Binary file modified static/img/favicon.ico
Binary file not shown.

0 comments on commit 6847255

Please sign in to comment.