Skip to content

Commit

Permalink
Merge pull request #265 from XPoet/dev
Browse files Browse the repository at this point in the history
Release  new version
  • Loading branch information
XPoet authored Oct 17, 2023
2 parents 33d81d1 + 0a30fc4 commit 238e7a2
Show file tree
Hide file tree
Showing 19 changed files with 107 additions and 81 deletions.
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ body:
I made sure I checked
我确认我已经检查过了
options:
- label: I am using Keep version 3.8.4 or later.
- label: I am using Keep version 3.8.5 or later.
required: true
- label: I have already read the [Troubleshooting page of Hexo](https://hexo.io/docs/troubleshooting) and [Keep documents](https://keep-docs.xpoet.cn/tutorial/get-start/install-theme.html).
- label: I have already read the [Troubleshooting page of Hexo](https://hexo.io/docs/troubleshooting) and [Keep documents](https://keep-docs.xpoet.cn).
required: true
- label: I have already searched for current [issues](https://github.com/XPoet/hexo-theme-keep/issues), which does not help me.
required: true
Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/feature-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ body:
I made sure I checked
我确认我已经检查过了
options:
- label: I am using Keep version 3.8.4 or later.
- label: I am using Keep version 3.8.5 or later.
required: true
- label: I have already read the [Troubleshooting page of Hexo](https://hexo.io/docs/troubleshooting) and [Keep documents](https://keep-docs.xpoet.cn/tutorial/get-start/install-theme.html).
- label: I have already read the [Troubleshooting page of Hexo](https://hexo.io/docs/troubleshooting) and [Keep documents](https://keep-docs.xpoet.cn).
required: true
- label: I have already searched for current [issues](https://github.com/XPoet/hexo-theme-keep/issues), which does not help me.
required: true
Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/other.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ body:
I made sure I checked
我确认我已经检查过了
options:
- label: I am using Keep version 3.8.4 or later.
- label: I am using Keep version 3.8.5 or later.
required: true
- label: I have already read the [Troubleshooting page of Hexo](https://hexo.io/docs/troubleshooting) and [Keep documents](https://keep-docs.xpoet.cn/tutorial/get-start/install-theme.html).
- label: I have already read the [Troubleshooting page of Hexo](https://hexo.io/docs/troubleshooting) and [Keep documents](https://keep-docs.xpoet.cn).
required: true
- label: I have already searched for current [issues](https://github.com/XPoet/hexo-theme-keep/issues), which does not help me.
required: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ on:
branches:
- master

name: release-version
name: release

jobs:
release-version:
release:
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v3
Expand Down
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@

**Keep** is a simple and light [Hexo](https://hexo.io) theme. It makes you more focused on writing.

[![Github License](https://img.shields.io/github/license/XPoet/hexo-theme-keep?style=for-the-badge&logo=github&color=3366CC)](https://github.com/XPoet/hexo-theme-keep/blob/master/LICENSE)
[![NPM version](https://img.shields.io/npm/v/hexo-theme-keep?style=for-the-badge&logo=npm&color=FF9999)](https://www.npmjs.com/package/hexo-theme-keep)
[![NPM Downloads](https://img.shields.io/npm/dw/hexo-theme-keep?style=for-the-badge&logo=npm&color=9966CC)](https://www.npmjs.com/package/hexo-theme-keep)
[![Node.js Version](https://img.shields.io/badge/node-%3E=14.0.0-009999?style=for-the-badge&logo=Node.js)](https://nodejs.org/)
[![Required Hexo version](https://img.shields.io/badge/hexo-%3E=5.0.0-99ccff?style=for-the-badge&logo=hexo)](https://hexo.io)
[![Github License](https://img.shields.io/github/license/XPoet/hexo-theme-keep?style=flat-square&logo=github&color=3366cc)](https://github.com/XPoet/hexo-theme-keep/blob/master/LICENSE)
[![Github Release](https://img.shields.io/github/release/XPoet/hexo-theme-keep?style=flat-square&logo=github&color=mediumpurple)](https://github.com/XPoet/hexo-theme-ils/releases)
[![NPM Version](https://img.shields.io/npm/v/hexo-theme-keep?style=flat-square&logo=npm&color=indianred)](https://www.npmjs.com/package/hexo-theme-keep)
[![NPM Downloads](https://img.shields.io/npm/dw/hexo-theme-keep?style=flat-square&logo=npm&color=darkorange)](https://www.npmjs.com/package/hexo-theme-keep)
[![Node.js Version](https://img.shields.io/badge/node-%3E=14.0.0-forestgreen?style=flat-square&logo=Node.js)](https://nodejs.org)
[![Required Hexo version](https://img.shields.io/badge/hexo-%3E=5.0.0-steelblue?style=flat-square&logo=hexo)](https://hexo.io)

## :star2: Online Preview

Expand Down
11 changes: 6 additions & 5 deletions docs/README_zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@

**Keep** 是一款简约轻快的 [Hexo](https://hexo.io) 主题。它能让你更专注于写作。

[![Github License](https://img.shields.io/github/license/XPoet/hexo-theme-keep?style=for-the-badge&logo=github&color=3366CC)](https://github.com/XPoet/hexo-theme-keep/blob/master/LICENSE)
[![NPM version](https://img.shields.io/npm/v/hexo-theme-keep?style=for-the-badge&logo=npm&color=FF9999)](https://www.npmjs.com/package/hexo-theme-keep)
[![NPM Downloads](https://img.shields.io/npm/dw/hexo-theme-keep?style=for-the-badge&logo=npm&color=9966CC)](https://www.npmjs.com/package/hexo-theme-keep)
[![Node.js Version](https://img.shields.io/badge/node-%3E=14.0.0-009999?style=for-the-badge&logo=Node.js)](https://nodejs.org/)
[![Required Hexo version](https://img.shields.io/badge/hexo-%3E=5.0.0-99ccff?style=for-the-badge&logo=hexo)](https://hexo.io)
[![Github License](https://img.shields.io/github/license/XPoet/hexo-theme-keep?style=flat-square&logo=github&color=3366cc)](https://github.com/XPoet/hexo-theme-keep/blob/master/LICENSE)
[![Github Release](https://img.shields.io/github/release/XPoet/hexo-theme-keep?style=flat-square&logo=github&color=mediumpurple)](https://github.com/XPoet/hexo-theme-ils/releases)
[![NPM Version](https://img.shields.io/npm/v/hexo-theme-keep?style=flat-square&logo=npm&color=indianred)](https://www.npmjs.com/package/hexo-theme-keep)
[![NPM Downloads](https://img.shields.io/npm/dw/hexo-theme-keep?style=flat-square&logo=npm&color=darkorange)](https://www.npmjs.com/package/hexo-theme-keep)
[![Node.js Version](https://img.shields.io/badge/node-%3E=14.0.0-forestgreen?style=flat-square&logo=Node.js)](https://nodejs.org)
[![Required Hexo version](https://img.shields.io/badge/hexo-%3E=5.0.0-steelblue?style=flat-square&logo=hexo)](https://hexo.io)

## :star2: 在线预览

Expand Down
11 changes: 6 additions & 5 deletions docs/README_zh-TW.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@

**Keep** 是一款簡約輕快的 [Hexo](https://hexo.io) 主題。它能讓你更專注於寫作。

[![Github License](https://img.shields.io/github/license/XPoet/hexo-theme-keep?style=for-the-badge&logo=github&color=3366CC)](https://github.com/XPoet/hexo-theme-keep/blob/master/LICENSE)
[![NPM version](https://img.shields.io/npm/v/hexo-theme-keep?style=for-the-badge&logo=npm&color=FF9999)](https://www.npmjs.com/package/hexo-theme-keep)
[![NPM Downloads](https://img.shields.io/npm/dw/hexo-theme-keep?style=for-the-badge&logo=npm&color=9966CC)](https://www.npmjs.com/package/hexo-theme-keep)
[![Node.js Version](https://img.shields.io/badge/node-%3E=14.0.0-009999?style=for-the-badge&logo=Node.js)](https://nodejs.org/)
[![Required Hexo version](https://img.shields.io/badge/hexo-%3E=5.0.0-99ccff?style=for-the-badge&logo=hexo)](https://hexo.io)
[![Github License](https://img.shields.io/github/license/XPoet/hexo-theme-keep?style=flat-square&logo=github&color=3366cc)](https://github.com/XPoet/hexo-theme-keep/blob/master/LICENSE)
[![Github Release](https://img.shields.io/github/release/XPoet/hexo-theme-keep?style=flat-square&logo=github&color=mediumpurple)](https://github.com/XPoet/hexo-theme-ils/releases)
[![NPM Version](https://img.shields.io/npm/v/hexo-theme-keep?style=flat-square&logo=npm&color=indianred)](https://www.npmjs.com/package/hexo-theme-keep)
[![NPM Downloads](https://img.shields.io/npm/dw/hexo-theme-keep?style=flat-square&logo=npm&color=darkorange)](https://www.npmjs.com/package/hexo-theme-keep)
[![Node.js Version](https://img.shields.io/badge/node-%3E=14.0.0-forestgreen?style=flat-square&logo=Node.js)](https://nodejs.org)
[![Required Hexo version](https://img.shields.io/badge/hexo-%3E=5.0.0-steelblue?style=flat-square&logo=hexo)](https://hexo.io)

## :star2: 線上預覽

Expand Down
8 changes: 6 additions & 2 deletions layout/_partial/comment/waline.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ const { enable: pjax_enable } = theme?.pjax || {}
let {
server_url: waline_env_server_url,
version: waline_version,
reaction: waline_reaction
reaction: waline_reaction,
options: waline_options = {}
} = theme?.comment?.waline || {}
if (!waline_version) { waline_version = '2' }
let cdn_css = `//cdn.jsdelivr.net/npm/@waline/client@v${waline_version}/dist/waline.css`
Expand Down Expand Up @@ -35,12 +36,15 @@ if (t_cdn_enable === true) {
<div id="waline-comment"></div>
<script <%= pjax_enable === true ? 'data-pjax' : '' %>>
function loadWaline() {
const tmpOptions = JSON.parse('<%= JSON.stringify(waline_options) %>'.replace(/&#34;/g, '"'))
Waline.init({
el: '#waline-comment',
serverURL: '<%= waline_env_server_url %>',
lang: '<%= config.language %>' || 'zh-CN',
comment: '.post-comments-count',
reaction: '<%= waline_reaction %>' === 'true'
reaction: '<%= waline_reaction %>' === 'true',
...tmpOptions
})
}
Expand Down
12 changes: 12 additions & 0 deletions source/css/common/css-variables.styl
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,17 @@
--base-font-family Optima-Regular, Optima, PingFang SC, Microsoft YaHei, sans-serif


// ==============================================================================================
// page
// ==============================================================================================
--page-content-width 80%
--page-content-width-tablet 88%
--page-content-width-mobile 90%
--page-content-max-width 928px
--page-content-max-width-2 calc(var(--page-content-max-width) * 1.2)
--components-spacing 36px


// ==============================================================================================
// box style
// ==============================================================================================
Expand All @@ -22,6 +33,7 @@
--header-height 70px
--header-shrink-height calc(var(--header-height) * 0.72)
--header-backdrop-filter-blur 4px
--header-scroll-progress-bar-height 2PX


// ==============================================================================================
Expand Down
22 changes: 0 additions & 22 deletions source/css/common/stylus-variables.styl
Original file line number Diff line number Diff line change
@@ -1,25 +1,3 @@
// ==============================================================================================
// KEEP THEME VARIABLE //
// ==============================================================================================


// ==============================================================================================
// layout
// ==============================================================================================
$scroll-progress-bar-height = 2px // scroll progress bar height
$main-content-width = 80% // main content width (PC)
$main-content-width-tablet = 88% // main content width (tablet)
$main-content-width-mobile = 90% // main content width (mobile)
$component-spacing-value = 38px // component-spacing-value (PC)
$content-max-width = 928px // main content max width

// main content max width of has TOC
$has-toc-content-max-width = $content-max-width * 1.2

// main content max width of has first screen
$has-fs-content-max-width = $content-max-width * 1.2


// ==============================================================================================
// media query
// ==============================================================================================
Expand Down
2 changes: 1 addition & 1 deletion source/css/layout/_partial/archive-list.styl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ $timeline-circle-width = 0.6rem
.archive-list-container {

.archive-item {
margin-bottom $component-spacing-value
margin-bottom var(--components-spacing)

&:last-child {
margin-bottom 0
Expand Down
2 changes: 1 addition & 1 deletion source/css/layout/_partial/comment/comment.styl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ if (hexo-config('comment') && hexo-config('comment.enable') == true && hexo-conf
.comments-container {
display inline-block
width 100%
margin-top $component-spacing-value
margin-top var(--components-spacing)

.comment-area-title {
width 100%
Expand Down
14 changes: 7 additions & 7 deletions source/css/layout/_partial/header.styl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ $logo-image-box-width = 2.8rem
box-sizing border-box
width 100%
height 100%
padding-top $scroll-progress-bar-height
padding-top var(--header-scroll-progress-bar-height)
background var(--background-color-1)
box-shadow 1px 2px 6px var(--shadow-color)

Expand All @@ -24,29 +24,29 @@ $logo-image-box-width = 2.8rem
flex-direction row
align-items center
justify-content space-between
width $main-content-width
max-width $content-max-width
width var(--page-content-width)
max-width var(--page-content-max-width)
height 100%
transition-t("max-width, width", "0, 0", "0.1, 0.1", "ease, ease")


&.has-first-screen {
max-width $has-fs-content-max-width
max-width var(--page-content-max-width-2)
}


.has-toc & {
max-width $has-toc-content-max-width
max-width var(--page-content-max-width-2)
}


+keep-tablet() {
width $main-content-width-tablet
width var(--page-content-width-tablet)
}


+keep-mobile() {
width $main-content-width-mobile
width var(--page-content-width-mobile)
}


Expand Down
2 changes: 1 addition & 1 deletion source/css/layout/_partial/post/post-tools.styl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ $li-margin-bottom = 0.8rem
$post-tool-button-width = 2.5rem

.post-tools-container {
padding-top $component-spacing-value
padding-top var(--components-spacing)

.tools-list {

Expand Down
2 changes: 1 addition & 1 deletion source/css/layout/_partial/progress-bar.styl
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
left 0
z-index $z-index-7
width 0
height $scroll-progress-bar-height
height var(--header-scroll-progress-bar-height)
background var(--primary-color)
visibility hidden
transition-t("width", "0", "0.1", "linear")
Expand Down
47 changes: 37 additions & 10 deletions source/css/layout/article-content.styl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ $spacer-padding = 2rem
width 100%
height 100%


&.show-toc {
.pc-post-toc {
display block
Expand Down Expand Up @@ -221,15 +220,15 @@ $spacer-padding = 2rem


.article-content {
margin-top $component-spacing-value * 0.8
padding-bottom $component-spacing-value * 0.8
margin-top calc(var(--components-spacing) * 0.8)
padding-bottom calc(var(--components-spacing) * 0.8)
color var(--text-color-3)
text-align justify
word-wrap break-word

+keep-tablet() {
margin-top $component-spacing-value * 0.6
padding-bottom $component-spacing-value * 0.6
margin-top calc(var(--components-spacing) * 0.6)
padding-bottom calc(var(--components-spacing) * 0.6)
}


Expand Down Expand Up @@ -291,7 +290,7 @@ $spacer-padding = 2rem

.article-nav {
height 2.8rem
margin-top $component-spacing-value
margin-top var(--components-spacing)

.article-prev
.article-next {
Expand Down Expand Up @@ -368,12 +367,12 @@ $spacer-padding = 2rem

.pc-post-toc {
position sticky
top 'calc(var(--header-height) + %s)' % $component-spacing-value
top calc(var(--header-height) + var(--components-spacing))
display none
flex-shrink 0
box-sizing border-box
width $toc-container-width
max-height 'calc(100vh - %s)' % ('calc(var(--header-height) + %s)' % $component-spacing-value)
max-height calc(100vh - calc(var(--header-height) + var(--components-spacing)))
transition-t("top, display, max-height", "0, 0, 0", "0.2, 0.1, 0.2", "ease, ease, ease")

&.right-toc {
Expand All @@ -387,8 +386,36 @@ $spacer-padding = 2rem
}

.header-shrink & {
top 'calc(var(--header-shrink-height) + %s)' % $component-spacing-value
max-height 'calc(100vh - %s)' % ('calc(var(--header-shrink-height) + %s)' % $component-spacing-value)
top calc(var(--header-shrink-height) + var(--components-spacing))
max-height calc(100vh - calc(var(--header-shrink-height) + var(--components-spacing)))
}
}

.hbe-container {

.hbe-input-field {
color var(--text-color-3) !important
background var(--background-color-3) !important
}


.hbe-input-label {
&::before {
display none !important
}

&::after {
background var(--text-color-4) !important
}

.hbe-input-label-content {
color var(--text-color-4) !important
}
}


.hbe-button {
margin-top 2rem
}
}
}
2 changes: 1 addition & 1 deletion source/css/layout/category-content.styl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ $category-name-font-size = 1.5rem
keep-container(1, 2rem, 2rem)

.category-name {
margin-bottom $component-spacing-value
margin-bottom var(--components-spacing)
color var(--text-color-2)
font-weight 600
font-size $category-name-font-size
Expand Down
Loading

0 comments on commit 238e7a2

Please sign in to comment.