Skip to content

Commit

Permalink
Merge branch 'master' into mastodon-verification
Browse files Browse the repository at this point in the history
  • Loading branch information
AliSajid authored Dec 3, 2024
2 parents 61f51b2 + 83d25c3 commit f8385af
Show file tree
Hide file tree
Showing 57 changed files with 843 additions and 519 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ jobs:
hugo-version: latest
extended: true
- name: Build Hugo static files
run: hugo -v --source=demo --gc --minify
run: hugo --source=demo --gc --minify --logLevel info
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v18
24 changes: 15 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ Outline: [Installation](https://fixit.lruihao.cn/documentation/installation/)

Click the following links to generate a new repository with template:

| Template repository | Generate link |
| :----------------------------------------- | :----------------------------: |
| [hugo-fixit/hugo-fixit-starter][starter] | [Click][starter:generate] |
| [hugo-fixit/hugo-fixit-starter1][starter1] | [Click][starter1:generate] |
| [hugo-fixit/docs][docs] | [Click][docs:generate] |
| [Lruihao/hugo-blog][lruihao-blog] | [Click][lruihao-blog:generate] |
| Template | repository | Generate link |
| :-------------------------------------------- | :-------------------------------- | :----------------------------: |
| A quick-start template base on Hugo Modules. | [hugo-fixit-starter][starter] | [Click][starter:generate] |
| A quick-start template base on Git submodule. | [hugo-fixit-starter1][starter1] | [Click][starter1:generate] |
| Build multilingual sites using Fixit theme. | [docs][docs] | [Click][docs:generate] |
| Customize with FixIt theme. | [Lruihao/hugo-blog][lruihao-blog] | [Click][lruihao-blog:generate] |

[starter]: https://github.com/hugo-fixit/hugo-fixit-starter
[starter:generate]: https://github.com/hugo-fixit/hugo-fixit-starter/generate
Expand All @@ -65,6 +65,11 @@ I don't know why 🤷
- Optimized SEO performance with a correct **SEO SCHEMA** based on JSON-LD
- **[Google Analytics](https://analytics.google.com/analytics)** supported
- **[Fathom Analytics](https://usefathom.com/)** supported
- **[Baidu Analytics](https://tongji.baidu.com/)** supported
- **[Umami Analytics](https://umami.is/)** supported
- **[Plausible Analytics](https://plausible.io/)** supported
- **[Cloudflare Web Analytics](https://www.cloudflare.com/web-analytics)** supported
- **[Splitbee Analytics](https://splitbee.io)** supported
- Search engine **verification** supported (Google, Bing, Yandex, Pinterest, Baidu, 360 and Sogou)
- **CDN** for third-party libraries supported

Expand Down Expand Up @@ -102,7 +107,8 @@ I don't know why 🤷
- **Sub Menu** supported
- **Content Encryption** supported (Pages, Partial)
- **Friends** page embedded template
- **Search** supported by [algolia](https://www.algolia.com/) or [Fuse.js](https://fusejs.io/)
- **Search** supported by [algolia](https://www.algolia.com/), [Fuse.js](https://fusejs.io/) or CSE
- **Custom Search Engine (CSE)** supported by [Google](https://programmablesearchengine.google.com/)
- **Twemoji** supported
- Automatically **highlighting** code
- **Copy code** to clipboard with one click
Expand Down Expand Up @@ -243,8 +249,8 @@ FixIt is licensed under the **MIT** license. Check the [LICENSE file](/LICENSE)

If you enjoy the theme, please consider buying me a coffee ☕️. Thanks!

- [Wechat](images/wechatpay.jpg)
- [Alipay](images/alipay.jpg)
- [Wechat](/images/wechatpay.jpg)
- [Alipay](/images/alipay.jpg)
- [PayPal](https://paypal.me/Lruihao)

## Author
Expand Down
24 changes: 15 additions & 9 deletions README.zh-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@

点击以下链接使用模板生成一个新的仓库:

| 模板仓库 | 生成链接 |
| :----------------------------------------- | :-------------------------------: |
| [hugo-fixit/hugo-fixit-starter][starter] | [点击生成][starter:generate] |
| [hugo-fixit/hugo-fixit-starter1][starter1] | [点击生成][starter1:generate] |
| [hugo-fixit/docs][docs] | [点击生成][docs:generate] |
| [Lruihao/hugo-blog][lruihao-blog] | [点击生成][lruihao-blog:generate] |
| 模板 | 仓库 | 生成链接 |
| :---------------------------------- | :-------------------------------- | :-------------------------------: |
| 基于 Hugo Modules 的快速入门模板。 | [hugo-fixit-starter][starter] | [点击生成][starter:generate] |
| 基于 Git submodule 的快速入门模板。 | [hugo-fixit-starter1][starter1] | [点击生成][starter1:generate] |
| 使用 Fixit 主题构建多语言网站。 | [docs][docs] | [点击生成][docs:generate] |
| 基于 FixIt 主题进行自定义设置。 | [Lruihao/hugo-blog][lruihao-blog] | [点击生成][lruihao-blog:generate] |

[starter]: https://github.com/hugo-fixit/hugo-fixit-starter
[starter:generate]: https://github.com/hugo-fixit/hugo-fixit-starter/generate
Expand All @@ -65,6 +65,11 @@
- 使用基于 JSON-LD 格式 的 **SEO SCHEMA** 文件进行 SEO 优化
- 支持 **[Google Analytics](https://analytics.google.com/analytics)**
- 支持 **[Fathom Analytics](https://usefathom.com/)**
- 支持 **[百度统计](https://tongji.baidu.com/)**
- 支持 **[Umami Analytics](https://umami.is/)**
- 支持 **[Plausible Analytics](https://plausible.io/)**
- 支持 **[Cloudflare Web Analytics](https://www.cloudflare.com/web-analytics)**
- 支持 **[Splitbee Analytics](https://splitbee.io)**
- 支持搜索引擎的**网站验证** (Google, Bing, Yandex, Pinterest, Baidu, 360 and Sogou)
- 支持所有第三方库的 **CDN**

Expand Down Expand Up @@ -102,7 +107,8 @@
- 支持**二级菜单**
- 支持**内容加密**(页面、局部)
- 支持**友情链接**的页面模板
- 支持基于 [algolia](https://www.algolia.com/)[Fuse.js](https://fusejs.io/)**搜索**
- 支持基于 [algolia](https://www.algolia.com/)[Fuse.js](https://fusejs.io/)**CSE****搜索**
- 支持基于 [Google](https://programmablesearchengine.google.com/)**自定义搜索引擎 (CSE)**
- 支持 **Twemoji**
- 支持**代码高亮**
- 一键**复制代码**到剪贴板
Expand Down Expand Up @@ -247,8 +253,8 @@ FixIt 根据 **MIT** 许可协议授权。更多信息请查看 [LICENSE 文件]

如果你喜爱这个主题,请考虑给我买杯咖啡 ☕️,谢谢!

- [微信支付](images/wechatpay.jpg)
- [支付宝](images/alipay.jpg)
- [微信支付](/images/wechatpay.jpg)
- [支付宝](/images/alipay.jpg)
- [PayPal](https://paypal.me/Lruihao)

## 作者
Expand Down
5 changes: 5 additions & 0 deletions archetypes/search.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
title: {{ T "assets.search" }}
layout: search
date: {{ .Date }}
---
9 changes: 3 additions & 6 deletions assets/css/_core/_header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ header {
}
}

.search {
.menu .search {
position: relative;

input {
Expand Down Expand Up @@ -384,6 +384,8 @@ header {
@include scrollbar-width(none, 0);

[data-theme='dark'] & {
background: $header-background-color-dark;
border-top-color: $global-border-color-dark;
@include box-shadow(0 0.125rem 0.25rem rgba(255, 255, 255, 0.1));
}

Expand Down Expand Up @@ -512,11 +514,6 @@ header {
&.active {
display: block;
}

[data-theme='dark'] & {
background: $header-background-color-dark;
border-top-color: $global-border-color-dark;
}
}
}

Expand Down
9 changes: 7 additions & 2 deletions assets/css/_core/_root.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
:root {
// Note: Custom variable values only support SassScript inside `#{}`.
// TODO migrate SCSS variables to CSS variables

--#{$prefix}global-font-color: #{$global-font-color};
--#{$prefix}global-border-color: #{$global-border-color};

// Theme colors variables
@each $color, $value in $theme-colors {
Expand All @@ -22,12 +26,13 @@
--#{$prefix}scrollbar-track-color: transparent;
--#{$prefix}scrollbar-width: thin;
--#{$prefix}scrollbar-width-legacy: 12px;

// TODO migrate SCSS variables to CSS variables
}

// Dark theme
[data-theme=dark] {
--#{$prefix}global-font-color: #{$global-font-color-dark};
--#{$prefix}global-border-color: #{$global-border-color-dark};

@each $color, $value in $theme-colors {
--#{$prefix}#{$color}: #{darken($value, 5%)};
}
Expand Down
32 changes: 21 additions & 11 deletions assets/css/_page/_home.scss
Original file line number Diff line number Diff line change
Expand Up @@ -81,22 +81,32 @@
}

.summary {
padding-top: 1rem;
padding-bottom: 0.8rem;
color: $global-font-color;
border-bottom: 1px dashed $global-border-color;
padding-block: 1rem;
color: var(--#{$prefix}global-font-color);

&:first-of-type {
padding-top: 0;
&:not(:last-of-type)::after {
content: '';
position: absolute;
width: 100%;
padding: 2px;
transform: translateY(18px);
background: repeating-linear-gradient(
135deg,
var(--#{$prefix}hr-background-color) 0px,
var(--#{$prefix}hr-background-color) 4px,
transparent 4px,
transparent 8px
);
}

[data-theme='dark'] & {
color: $global-font-color-dark;
border-bottom: 1px dashed $global-border-color-dark;
&:first-of-type {
padding-top: 0;
}

.featured-image-preview {
width: 100%;
// resolve the aspect ratio issue temporarily
max-width: 1000px;
// use the same proportions as the cover image of https://dev.to/
aspect-ratio: auto 1000 / 420;
position: relative;
Expand Down Expand Up @@ -144,7 +154,7 @@
}

.post-footer {
margin-top: 0.4rem;
margin-block: 0.4rem 0;
display: flex;
justify-content: space-between;
align-items: center;
Expand All @@ -156,7 +166,7 @@
padding: 0;

@include link(true, true);

.post-tag:not(:last-child)::after {
content: ',';
margin-right: 0.25rem;
Expand Down
1 change: 0 additions & 1 deletion assets/css/_page/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,3 @@
@import '_home';
@import '_404';
@import '_offline';
@import '_friends';
20 changes: 13 additions & 7 deletions assets/css/_page/_single.scss
Original file line number Diff line number Diff line change
Expand Up @@ -97,15 +97,14 @@
hr {
position: relative;
height: 1em;
margin-block: 1em;
background: linear-gradient(to right, var(--#{$prefix}hr-background-color) 50%, transparent 50%);
background-size: 10px 2px;
background-position: center;
background-repeat: repeat-x;
border: none;

&.awesome-hr {
margin-block: 0.5em;

&::before {
display: inline-block;
font-weight: 600;
Expand Down Expand Up @@ -249,11 +248,14 @@
li[data-task='x'],
li[data-task='-'] {
--#{$prefix}task-color: var(--#{$prefix}secondary);
text-decoration: line-through;
text-decoration: line-through rgba(145, 145, 145, 0.6);
}
li[data-task='x'] {
--#{$prefix}checkbox-color: var(--#{$prefix}primary);
}
li[data-task='-'] {
opacity: 0.6;
}
li[data-task='/'] {
--#{$prefix}task-color: var(--#{$prefix}success);
}
Expand Down Expand Up @@ -304,6 +306,7 @@
}

.table-wrapper {
position: relative;
overflow-x: auto;
--#{$prefix}scrollbar-thumb-color: #{$table-background-color};

Expand Down Expand Up @@ -495,10 +498,6 @@
}
}

hr {
margin-block: 0;
}

kbd {
display: inline-block;
padding: 0 0.25rem;
Expand All @@ -518,6 +517,13 @@
}
}

// Katex styles
.katex-display {
max-width: 100%;
overflow-x: auto;
padding-block: 2px;
}

@import '../_partials/_single/alert';
@import '../_partials/_single/code';
@import '../_shortcodes';
Expand Down
6 changes: 0 additions & 6 deletions assets/css/_page/_special.scss

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* @Description: Style of layout named 'friends'.
* Style of layout named 'friends'.
* @Author: Lruihao <https://lruihao.cn>
* @Updated: 2022/3/11 21:36
*/
Expand Down
14 changes: 14 additions & 0 deletions assets/css/_page/_special/_index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
.special {
.single-title,
.single-subtitle {
text-align: right;
}

&.friends {
@import '_friends';
}

&.search {
@import '_search';
}
}
10 changes: 10 additions & 0 deletions assets/css/_page/_special/_search.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// Style of layout named 'search'
// TODO Adapting to dark mode, maybe use css variables

// Google CSE
.gcse-searchbox:empty,
.gcse-searchresults:empty {
display: none;
}

// Bing CSE (Unsupported)
1 change: 1 addition & 0 deletions assets/css/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ $global-link-hover-color: #2983bb !default; // 潮蓝
$global-link-hover-color-dark: #fff !default;

// Color of the border
// TODO refactor border colors
$global-border-color: #f0f0f0 !default;
$global-border-color-dark: #363636 !default;
// ========== Global ========== //
Expand Down
10 changes: 5 additions & 5 deletions assets/data/cdn/jsdelivr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ libFiles:
cryptoSha256JS: [email protected]/sha256.js
# [email protected] https://github.com/apache/echarts
echartsJS: [email protected]/dist/echarts.min.js
# fontawesome-free@6.4.2 https://github.com/FortAwesome/Font-Awesome
fontawesomeFreeCSS: '@fortawesome/fontawesome-free@6.4.2/css/all.min.css'
# fontawesome-free@6.7.1 https://github.com/FortAwesome/Font-Awesome
fontawesomeFreeCSS: '@fortawesome/fontawesome-free@6.7.1/css/all.min.css'
# [email protected] https://github.com/krisk/fuse
fuseJS: [email protected]/dist/fuse.min.js
# [email protected] https://github.com/gitalk/gitalk
Expand Down Expand Up @@ -72,9 +72,9 @@ libFiles:
typeitJS: [email protected]/dist/index.umd.js
# [email protected] https://github.com/xCss/Valine
valineJS: [email protected]/dist/Valine.min.js
# waline@2.15.8 https://github.com/walinejs/waline
walineCSS: '@waline/client@2.15.8/dist/waline.css'
walineJS: '@waline/client@2.15.8/dist/waline.js'
# waline@3.4.1 https://github.com/walinejs/waline
walineCSS: '@waline/client@3.4.1/dist/waline.css'
walineJS: '@waline/client@3.4.1/dist/waline.umd.js'
# [email protected] https://github.com/jungomi/xxhash-wasm
xxhashWasmJS: [email protected]/umd/xxhash-wasm.js

Loading

0 comments on commit f8385af

Please sign in to comment.