Skip to content

Commit

Permalink
Merge pull request #35 from EvanNotFound/dev
Browse files Browse the repository at this point in the history
v0.4.5
  • Loading branch information
EvanNotFound authored Jan 1, 2023
2 parents 672e99e + 5b5c098 commit d6f7065
Show file tree
Hide file tree
Showing 16 changed files with 1,059 additions and 384 deletions.
9 changes: 7 additions & 2 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,6 @@ comment:
waline:
serverUrl: # Waline server url(vercel) example: https://example.example.com
lang: zh-CN # Waline language, default: zh-CN. See: https://waline.js.org/guide/client/i18n.html
dark: auto # Waline dark mode, default: auto. See: https://waline.js.org/reference/component.html#dark

# Gitalk
# See: https://github.com/gitalk/gitalk
Expand All @@ -211,6 +210,12 @@ comment:
env_id: # Vercel or Tencent Cloud Function environment ID
region: # environment region. If select Guangzhou, fill in "ap-guangzhou". (optional)

# ---------------------------------------------------------------------------------------
# Friend Links page
# ---------------------------------------------------------------------------------------
friend_links:
columns: 2 # number of columns. 2 or 3

# ---------------------------------------------------------------------------------------
# RSS
# Dependencies: hexo-generator-feed
Expand Down Expand Up @@ -257,4 +262,4 @@ footer:
# ---------------------------------------------------------------------------------------
# Redefine Theme version (Please don't modify)
# ---------------------------------------------------------------------------------------
version: 0.4.4
version: 0.4.5
3 changes: 1 addition & 2 deletions layout/_partial/comment/waline.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
) { %>
<div id="waline"></div>
<link rel="stylesheet" href="//evan.beee.top/css/waline.css"/>
<script <%= theme.pjax.enable === true ? 'data-pjax' : '' %>
src="//evan.beee.top/js/waline.js"></script>
<script <%= theme.pjax.enable === true ? 'data-pjax' : '' %>>
Expand All @@ -15,7 +14,7 @@
el: '#waline',
serverURL: '<%= theme.comment.waline.serverUrl %>',
lang: '<%= theme.comment.waline.lang %>',
dark: '<%= theme.comment.waline.dark %>',
dark: 'body[class~="dark-mode"]',
requiredMeta: ['nick','mail'], // cannot customize by theme config, change it yourself
});
}
Expand Down
2 changes: 1 addition & 1 deletion layout/_partial/friends-link.ejs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<h1 style="margin: 15px 5px;"><%- __('links') %></h1>
<h1 style="margin: 10px 5px 30px 5px;"><%- __('links') %></h1>
<div class="friends-link-container">
<ul class="friends-link-list">
<% for (const f of theme.links) { %>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hexo-theme-redefine",
"version": "0.4.4",
"version": "0.4.5",
"private": false,
"description": "\"Redefine\" hexo theme is a simple & fast & pure theme, but with no compromise.",
"scripts": {
Expand Down
1 change: 1 addition & 0 deletions scripts/helpers/export-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ hexo.extend.helper.register('export_config', function () {
pjax: theme.pjax,
lazyload: theme.lazyload,
version: theme.version,
friend_links: theme.friend_links,
}

return `<script id="hexo-configurations">
Expand Down
4 changes: 2 additions & 2 deletions source/css/common/codeblock/code-block.styl
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ disable-user-select() {
if (hexo-config('code_block.style') == 'mac') {
.highlight-container[data-rel]{
background var(--second-background-color)
border-radius 14px
box-shadow var(--shadow-color-2) 0px 6px 24px 0px, var(--shadow-color-1) 0px 0px 0px 1px
border-radius 18px
box-shadow var(--redefine-box-shadow)
padding-top 20px
margin-top 10px

Expand Down
4 changes: 2 additions & 2 deletions source/css/common/redefine-theme.styl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
$redefine-container-border-radius = 18px

hover-style(isTransform, scaleX, scaleY) {
box-shadow var(--shadow-color-2) 0px 6px 24px 0px, var(--shadow-color-1) 0px 0px 0px 1px
box-shadow var(--redefine-box-shadow)

if (isTransform) {
transition-t("transform", "0", "0.2", "linear")
Expand All @@ -13,7 +13,7 @@ hover-style(isTransform, scaleX, scaleY) {
}

if (hexo-config('style.hover.shadow')) {
box-shadow var(--shadow-color-2) 0px 6px 24px 0px, var(--shadow-color-1) 0px 0px 0px 1px, var(--shadow-color-1) 0px 0px 0px 1px inset
box-shadow var(--redefine-box-shadow-hover)
}
}
}
Expand Down
3 changes: 3 additions & 0 deletions source/css/common/variables.styl
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,9 @@ root-color(mode) {
--note-purple-title-bg : mode == 'light' ? $note-purple-title-bg : $dark-note-purple-title-bg

--first-screen-text-color mode == 'light' ? $first-screen-text-color : $first-screen-text-color-dark

--redefine-box-shadow : var(--shadow-color-2) 0px 6px 24px 0px, var(--shadow-color-1) 0px 0px 0px 1px
--redefine-box-shadow-hover : var(--shadow-color-2) 0px 6px 24px 0px, var(--shadow-color-1) 0px 0px 0px 1px, var(--shadow-color-1) 0px 0px 0px 1px inset
}


Expand Down
6 changes: 2 additions & 4 deletions source/css/layout/_partial/comment/comment.styl
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
//@import "waline-config.styl"

if (hexo-config('comment.enable') == true && hexo-config('comment.use') != "") {
if (hexo-config('comment.use') == "valine") {
@require "./valine.styl"
if (hexo-config('comment.use') == "waline") {
@require "./waline.styl"

} else if (hexo-config('comment.use') == "gitalk") {
@require "./gitalk.styl"
Expand Down
147 changes: 0 additions & 147 deletions source/css/layout/_partial/comment/valine.styl

This file was deleted.

Loading

0 comments on commit d6f7065

Please sign in to comment.