Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from hugo-fixit:master #28

Merged
merged 23 commits into from
Sep 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
466bb7b
:lock: Perf: use xxHash instead of md5 to calculate the hash value of…
Lruihao Aug 24, 2024
91f3c7c
:bug: Fix: fix fixit-encryptor shortcode duplicate binding events
Lruihao Aug 26, 2024
1864327
:memo: Docs: update default outputs config
Lruihao Aug 26, 2024
e7dd4c8
:zap: Chore: unified content encryption function
Lruihao Aug 26, 2024
ccce5b5
:chart_with_upwards_trend: Feat: remove noreferrer from friend links …
Lruihao Aug 26, 2024
b7ed9ca
:recycle: Refactor: refactor content encryption
Lruihao Aug 28, 2024
ede47a2
:recycle: Refactor: convert FixItDecryptor to ES6 Class
Lruihao Aug 29, 2024
64529c9
:pencil: Docs(ignore): update memo
Lruihao Aug 29, 2024
a67efe4
:wrench: Chore: update version automatic update script
Lruihao Aug 29, 2024
312b636
Merge pull request #494 from hugo-fixit/content-encryption
Lruihao Aug 29, 2024
349de54
:bug: Fix: featuredimagepreview error in summary and RSS
Lruihao Aug 29, 2024
5aaacec
:bug: Fix: resources get match error for page images
Lruihao Aug 29, 2024
3b99838
:recycle: Refactor: icon plugin
Lruihao Aug 29, 2024
8798f5b
:tada: Feat: add blockquote render hook to support GitHub alerts mark…
Lruihao Aug 29, 2024
e2cf5fe
:lipstick: Style: add alert stylesheet
Lruihao Aug 29, 2024
5dac03a
:globe_with_meridians: Feat: add translations for alerts
Lruihao Aug 29, 2024
52184d9
:lipstick: Style: update center-quote shortcode style
Lruihao Aug 29, 2024
442ec84
:arrow_up: Chore: update min hugo version to 0.132.0
Lruihao Aug 29, 2024
1f22b53
:zap: Chore: simplified code
Lruihao Aug 30, 2024
c8081af
:arrow_up: Chore(libs): update Valine from 1.5.1 to 1.5.2
Lruihao Aug 30, 2024
afc504e
:bookmark: Chore(release): 0.3.10
Lruihao Aug 30, 2024
5991958
:bug: Fix: FixIt theme internal version number error
Lruihao Aug 30, 2024
4203b57
:bookmark: Chore(release): 0.3.11
Lruihao Aug 30, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# FixIt

[![GitHub release (latest by date)](https://img.shields.io/github/v/release/hugo-fixit/FixIt?style=flat)](https://github.com/hugo-fixit/FixIt/releases)
[![Hugo](https://img.shields.io/badge/Hugo-%5E0.127.0-ff4088?style=flat&logo=hugo)](https://gohugo.io/)
[![Hugo](https://img.shields.io/badge/Hugo-%5E0.132.0-ff4088?style=flat&logo=hugo)](https://gohugo.io/)
[![License](https://img.shields.io/github/license/hugo-fixit/FixIt?style=flat)](/LICENSE)
[![Open Source Love](https://badges.frapsoft.com/os/v1/open-source.svg?v=103)](https://github.com/hugo-fixit/FixIt)

Expand Down Expand Up @@ -219,6 +219,7 @@ Thanks to all the [contributors](https://github.com/hugo-fixit/FixIt/graphs/cont
- [giscus](https://giscus.app/)
- [crypto-js](https://github.com/brix/crypto-js)
- [pace](https://github.com/CodeByZach/pace)
- [xxhash-wasm](https://github.com/jungomi/xxhash-wasm)

</details>

Expand Down
3 changes: 2 additions & 1 deletion README.zh-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# FixIt

[![GitHub release (latest by date)](https://img.shields.io/github/v/release/hugo-fixit/FixIt?style=flat)](https://github.com/hugo-fixit/FixIt/releases)
[![Hugo](https://img.shields.io/badge/Hugo-%5E0.127.0-ff4088?style=flat&logo=hugo)](https://gohugo.io/)
[![Hugo](https://img.shields.io/badge/Hugo-%5E0.132.0-ff4088?style=flat&logo=hugo)](https://gohugo.io/)
[![License](https://img.shields.io/github/license/hugo-fixit/FixIt?style=flat)](/LICENSE)
[![Open Source Love](https://badges.frapsoft.com/os/v1/open-source.svg?v=103)](https://github.com/hugo-fixit/FixIt)

Expand Down Expand Up @@ -223,6 +223,7 @@ Gitee 镜像仓库:<https://gitee.com/lruihao/FixIt>
- [giscus](https://giscus.app/zh-CN)
- [crypto-js](https://github.com/brix/crypto-js)
- [pace](https://github.com/CodeByZach/pace)
- [xxhash-wasm](https://github.com/jungomi/xxhash-wasm)

</details>

Expand Down
1 change: 1 addition & 0 deletions assets/css/_page/_single.scss
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,7 @@
}
}

@import '../_partials/_single/alert';
@import '../_partials/_single/code';
@import '../_shortcodes';
}
Expand Down
16 changes: 16 additions & 0 deletions assets/css/_partials/_maps/_alert.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// Color map of alert [$type $border-color $color, ... ]
$alert-color-map:
'note' #0969da #0969da,
'tip' #1a7f37 #1a7f37,
'important' #8250df #8250df,
'warning' #bf8700 #9a6700,
'caution' #cf222e #d1242f,
!default;

$alert-color-map-dark:
'note' #316dca #478be6,
'tip' #347d39 #57ab5a,
'important' #8256d0 #986ee2,
'warning' #966600 #c69026,
'caution' #c93c37 #e5534b,
!default;
44 changes: 44 additions & 0 deletions assets/css/_partials/_single/_alert.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
.alert {
padding: 0.5rem 1rem;
margin-block: 1rem;
color: inherit;
border-left: 0.25em solid var(--#{$prefix}alert-border-color);

> :first-child {
margin-top: 0;
}
> :last-child {
margin-bottom: 0;
}

.alert-title {
display: flex;
font-weight: 500;
align-items: center;
line-height: 1;
margin-bottom: 1rem;
color: var(--#{$prefix}alert-color);

> svg.icon {
width: initial;
height: initial;
margin-right: 0.5rem;
}
}

@each $type, $border-color, $color in $alert-color-map {
&.alert-#{$type} {
--#{$prefix}alert-border-color: #{$border-color};
--#{$prefix}alert-color: #{$color};
}
}

[data-theme='dark'] & {
@each $type, $border-color, $color in $alert-color-map-dark {
&.alert-#{$type} {
--#{$prefix}alert-border-color: #{$border-color};
--#{$prefix}alert-color: #{$color};
}
}
}
}
47 changes: 43 additions & 4 deletions assets/css/_partials/_single/_fixit-decryptor.scss
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
.fixit-decryptor-container {
font-family: $global-font-family;
text-align: center;
margin-top: 3rem;
margin-block: var(--fixit-decryptor-margin-block);

.fixit-decryptor-loading {
vertical-align: middle;
}

.fixit-decryptor-input,
.fixit-decryptor-btn,
.fixit-encryptor-btn {
display: inline-block;
display: none;
box-sizing: border-box;
outline: none;
color: $global-font-color;
Expand Down Expand Up @@ -60,19 +64,54 @@
background-color: $header-background-color-dark;
}
}

.fixit-encryptor-btn {
display: none;
}
}

// fixit-encryptor shortcodes
fixit-encryptor {
&.initialized > .fixit-decryptor-container {
.fixit-decryptor-input,
.fixit-decryptor-btn {
display: inline-block;
}

.fixit-decryptor-loading {
display: none;
}
}

cipher-text {
display: none !important;
}
}

// fixit-encryptor for for the encrypted pages
article fixit-encryptor {
.fixit-decryptor-container {
margin-top: 1rem;
--fixit-decryptor-margin-block: 2rem;
}
&.decrypted > .fixit-decryptor-container {
.fixit-decryptor-loading,
.fixit-decryptor-input,
.fixit-decryptor-btn {
display: none;
}

.fixit-encryptor-btn {
display: inline-block;
}
}
}

// fixit-encryptor shortcodes
#content fixit-encryptor {
.fixit-decryptor-container {
--fixit-decryptor-margin-block: 1rem;
}
&.decrypted > .fixit-decryptor-container {
display: none;
}
}

Expand Down
4 changes: 2 additions & 2 deletions assets/css/_shortcodes/_center-quote.scss
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
.blockquote-center {
blockquote.blockquote-center {
border-left: none;
margin: 40px 0;
padding: 0;
position: relative;
text-align: center;
color: initial;
color: inherit;

&::after,
&::before {
Expand Down
1 change: 1 addition & 0 deletions assets/css/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ $github-corner-fill-dark: $header-background-color !default;
// ========== GitHub Corners ========== //

@import '_partials/_maps/admonition';
@import '_partials/_maps/alert';
@import '_partials/_maps/code-highlight';
@import '_partials/_maps/code-type';
@import '_partials/_maps/colors';
Expand Down
7 changes: 4 additions & 3 deletions assets/data/cdn/jsdelivr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ libFiles:
# crypto-js@4.2.0 https://github.com/brix/crypto-js
cryptoCoreJS: crypto-js@4.2.0/core.js
cryptoEncBase64JS: crypto-js@4.2.0/enc-base64.js
cryptoMd5JS: crypto-js@4.2.0/md5.js
cryptoSha256JS: crypto-js@4.2.0/sha256.js
# echarts@5.3.3 https://github.com/apache/echarts
echartsJS: echarts@5.3.3/dist/echarts.min.js
Expand Down Expand Up @@ -71,9 +70,11 @@ libFiles:
twikooJS: twikoo@1.6.22/dist/twikoo.all.min.js
# typeit@8.7.1 https://github.com/alexmacarthur/typeit
typeitJS: typeit@8.7.1/dist/index.umd.js
# valine@1.5.1 https://github.com/xCss/Valine
valineJS: valine@1.5.1/dist/Valine.min.js
# valine@1.5.2 https://github.com/xCss/Valine
valineJS: valine@1.5.2/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'
# xxhash-wasm@1.0.2 https://github.com/jungomi/xxhash-wasm
xxhashWasmJS: xxhash-wasm@1.0.2/umd/xxhash-wasm.js

8 changes: 4 additions & 4 deletions assets/data/cdn/unpkg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ libFiles:
# crypto-js@4.2.0 https://github.com/brix/crypto-js
cryptoCoreJS: crypto-js@4.2.0/core.js
cryptoEncBase64JS: crypto-js@4.2.0/enc-base64.js
cryptoMd5JS: crypto-js@4.2.0/md5.js
cryptoSha256JS: crypto-js@4.2.0/sha256.js
# echarts@5.3.3 https://github.com/apache/echarts
echartsJS: echarts@5.3.3/dist/echarts.min.js
Expand Down Expand Up @@ -71,9 +70,10 @@ libFiles:
twikooJS: twikoo@1.6.22/dist/twikoo.all.min.js
# typeit@8.7.1 https://github.com/alexmacarthur/typeit
typeitJS: typeit@8.7.1/dist/index.umd.js
# valine@1.5.1 https://github.com/xCss/Valine
valineJS: valine@1.5.1/dist/Valine.min.js
# valine@1.5.2 https://github.com/xCss/Valine
valineJS: valine@1.5.2/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'

# xxhash-wasm@1.0.2 https://github.com/jungomi/xxhash-wasm
xxhashWasmJS: xxhash-wasm@1.0.2/umd/xxhash-wasm.js
1 change: 1 addition & 0 deletions assets/images/icons/alerts/alert.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/images/icons/alerts/info.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/images/icons/alerts/light-bulb.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/images/icons/alerts/report.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/images/icons/alerts/stop.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading