Skip to content

Commit

Permalink
update theme and simply the comment plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
xwi88 committed May 18, 2022
1 parent a6c8738 commit 928435e
Show file tree
Hide file tree
Showing 18 changed files with 694 additions and 174 deletions.
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,10 @@ prod:
@hugo server -w -e production
run: prod

# uglifyjs 3.15.2, shall not use npx babel will import npm module...
# uglifyjs 3.15.2, shall not use npx babel will import npm module...; latest version, use theme.js in assets/js/theme.js, old is theme.min.js
uglifyjs:
@uglifyjs ${BASEDIR}/src/js/theme.js -o ${BASEDIR}/assets/js/theme.min.js -c -m --source-map "url=theme.min.js.map,names=false,filename=theme.js,base='${BASEDIR}/assets/js'"
@uglifyjs ${BASEDIR}/src/js/theme.js -o ${BASEDIR}/assets/js/theme.js -c -b
# @uglifyjs ${BASEDIR}/src/js/theme.js -o ${BASEDIR}/assets/js/theme.min.js -c -m --source-map "url=theme.min.js.map,names=false,filename=theme.js,base='${BASEDIR}/assets/js'"
# @npx babel ${BASEDIR}/src/js/theme.js --out-file ${BASEDIR}/assets/js/theme.min.js --source-maps

# dev & test use
Expand Down
49 changes: 0 additions & 49 deletions assets/css/_custom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,52 +2,3 @@
// Custom style
// 自定义样式
// ==============================


.giscus, .giscus-frame {
width: 100%;
}

.giscus-frame {
border: none;
color-scheme: normal;
}

.gsc-comment-box-tabs {
align-items: center;
border-bottom-width: 1px;
border-top-left-radius: .25rem;
border-top-right-radius: .25rem;
display: flex;
justify-content: space-between;
}

// .gsc-comments > .gsc-comment-box {
// order: 2;
// margin-bottom: 1rem;
// }

// .gsc-comments > .gsc-timeline {
// order: 3;
// }

// .gsc-timeline {
// flex-direction: column-reverse;
// }

// .gsc-header {
// padding-bottom: 1rem;
// }

// /*! Custom CSS */
.gsc-reactions-count{
display:none
}

.gsc-comments>.gsc-header{
order:1
}

.gsc-homepage-bg{
background-color:#15202b
}
10 changes: 6 additions & 4 deletions assets/css/style.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
@charset "utf-8";

@import "../lib/normalize/normalize";

@import "_variables";
@import "_override";
@import "_core/variables";

@import "_mixin/index";

Expand All @@ -10,10 +13,9 @@

@import "_page/index";

@import "_partial/header";
@import "_partial/footer";
@import "_partial/pagination";

@import "_core/header";
@import "_core/footer";
@import "_core/pagination";
@import "_core/media";

@import "_custom";
Expand Down
578 changes: 578 additions & 0 deletions assets/js/theme.js

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions assets/js/theme.min.js

This file was deleted.

1 change: 0 additions & 1 deletion assets/js/theme.min.js.map

This file was deleted.

5 changes: 1 addition & 4 deletions config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ enableEmoji = true
url = "/favorite/"
title = ""
weight = 5

[languages.en.params]
# site description
description = "Tech Blog Share"
Expand Down Expand Up @@ -491,7 +490,7 @@ enableEmoji = true

# you can add extra information after the name (HTML format is supported), such as icons
# 你可以在名称 (允许 HTML 格式) 之后添加其他信息, 例如图标
post = "<i class='far fa-book fa'></i>"
post = "<i class='far fa-book fa-fw'></i>"
# whether to use typeit animation for title name
# 是否为标题显示打字机动画
typeit = false
Expand Down Expand Up @@ -766,11 +765,9 @@ enableEmoji = true
enable = true
category = "Announcements" # Announcements, Comments
lang = "en" # 保持 en, 只需要控制每篇文章的 url 不一样即可

repo = "xwi88/hugo-comment" # Entering repo will enable giscus
repo_id = "R_kgDOG7xEcg" # query by GraphQL API, https://docs.github.com/en/graphql/overview/explorer
category_id = "DIC_kwDOG7xEcs4CN-KB" # query by GraphQL API, https://docs.github.com/en/graphql/overview/explorer

mapping = "pathname"
reactions_enabled = "0"
emit_metadata = "0"
Expand Down
2 changes: 1 addition & 1 deletion content/posts/hugo-plugin-busuanzi.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Hugo 网站访问量、文章阅读次数统计插件 **busuanzi** 集成配置

>需要变动的地方如图所示:
![/images/screen_img/hugo_busuanzi_support.jpeg](/images/screen_img/hugo_busuanzi_support.jpeg)
![/images/screen_img/hugo_busuanzi_support.jpeg](/images/screen_img/hugo_busuanzi_support.jpeg "hugo busuanzi support")

##### 自定义配置

Expand Down
2 changes: 1 addition & 1 deletion content/posts/hugo-plugin-busuanzi.zh-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Hugo 网站访问量、文章阅读次数统计插件 **busuanzi** 集成配置

>需要变动的地方如图所示:
![/images/screen_img/hugo_busuanzi_support.jpeg](/images/screen_img/hugo_busuanzi_support.jpeg)
![/images/screen_img/hugo_busuanzi_support.jpeg](/images/screen_img/hugo_busuanzi_support.jpeg "hugo busuanzi support")

##### 自定义配置

Expand Down
2 changes: 1 addition & 1 deletion content/posts/hugo-plugin-giscus-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,4 @@ Hugo 评论插件用了几个感觉好用的还是 **utterances** 与 **giscus**
- [xwi88.com](https://xwi88.com/)
- [blog.xiw88.com](https://blog.xwi88.com/)

![hugo_giscus_demo](/images/screen_img/hugo_giscus_demo.png)
![hugo_giscus_demo](/images/screen_img/hugo_giscus_demo.png "hugo giscus demo")
4 changes: 2 additions & 2 deletions content/posts/pyroscope-continuous-profiling.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ toc:
- `Pyroscope Server` *记录并聚合应用程序正在执行的操作,然后将该数据发送到 `Pyroscope` 服务器。*
- `Pyroscope Agent` 处理、聚合和存储来自代理的数据,以实现任意时间范围内的快速查询。稍后,你可以查看在任何时间范围内的分析数据。

![pyroscope-agents](/images/go/pyroscope-agents.jpeg)
![pyroscope-agents](/images/go/pyroscope-agents.jpeg "pyroscope agents")

## Server 安装

Expand Down Expand Up @@ -271,7 +271,7 @@ func main() {
- `html`
- `flamegraph.com`

![proscope-server-table-flamegraph](/images/go/proscope-server-table-flamegraph.png)
![proscope-server-table-flamegraph](/images/go/proscope-server-table-flamegraph.png "proscope server table flamegraph")

## 参考

Expand Down
2 changes: 1 addition & 1 deletion layouts/_default/summary.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ <h1 class="single-title" itemprop="name headline">
{{- $authorLink := $params.authorlink | default .Site.Author.link | default .Site.Home.RelPermalink -}}
<span class="post-author">
{{- $options := dict "Class" "author" "Destination" $authorLink "Title" "Author" "Rel" "author" "Icon" (dict "Class" "fas fa-user-circle fa-fw") "Content" $author -}}
{{- partial "plugin/link.html" $options -}}
{{- partial "plugin/a.html" $options -}}
</span>

{{- with .Site.Params.dateFormat | default "2006-01-02" | .PublishDate.Format -}}
Expand Down
Loading

0 comments on commit 928435e

Please sign in to comment.