Skip to content

Commit

Permalink
Merge pull request #76 from EvanNotFound/dev
Browse files Browse the repository at this point in the history
v1.1.3
  • Loading branch information
EvanNotFound authored Feb 24, 2023
2 parents 2b9ad45 + 65eb979 commit da7e3d9
Show file tree
Hide file tree
Showing 29 changed files with 1,265 additions and 965 deletions.
5 changes: 4 additions & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,9 @@ footer:
start_time: 2022/8/17 11:45:14 # the starting time of your website, format: yyyy/mm/dd hh:mm:ss
customize: # customize footer message, can be html code
icp: # ICP record number of your website, Can be null
enable: false
number: # ICP record number
url: # ICP record url

# ---------------------------------------------------------------------------------------
# Custom html code
Expand All @@ -300,4 +303,4 @@ inject:
# Please go to github to update the latest version frequently
# Github: https://github.com/EvanNotFound/hexo-theme-redefine
# ---------------------------------------------------------------------------------------
version: 1.1.2
version: 1.1.3
8 changes: 4 additions & 4 deletions layout/_partials/comments/waline.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
) { %>
<div id="waline"></div>
<script <%= theme.pjax.enable === true ? 'data-pjax' : '' %>
src="//evan.beee.top/js/waline.js"></script>
<script <%= theme.pjax.enable === true ? 'data-pjax' : '' %>>
<script type="module" <%= theme.pjax.enable === true ? 'data-pjax' : '' %>>
import { init } from 'https://evan.beee.top/js/waline.mjs';
function loadWaline() {
Waline.init({
init({
el: '#waline',
serverURL: '<%= theme.comment.waline.serverUrl %>',
lang: '<%= theme.comment.waline.lang %>',
Expand Down
10 changes: 8 additions & 2 deletions layout/_partials/footer.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,14 @@
<br>
<%# 保留主题信息是对作者的尊重,感谢! %><span class="theme-version-container"><%- __('theme') %>&nbsp;<a class="theme-version" target="_blank" href="https://github.com/EvanNotFound/hexo-theme-redefine">Redefine v<%= theme.version %></a><%# 保留主题信息是对作者的尊重,感谢! %>
</div>
<% if (theme.footer.hasOwnProperty('icp') && theme.footer.icp) { %>
<div class="icp-info info-item"><a target="_blank" rel="nofollow" href="https://beian.miit.gov.cn"><%= theme.footer.icp %></a></div>
<% if (theme.footer.icp.enable && theme.footer.icp.hasOwnProperty('number')) { %>
<div class="icp-info info-item"><a target="_blank" rel="nofollow" href="
<% if (theme.footer.icp.hasOwnProperty('url') && theme.footer.icp.url) { %>
<%= theme.footer.icp.url %>
<% } else { %>
https://beian.miit.gov.cn
<% } %>
"><%= theme.footer.icp.number %></a></div>
<% } %>
<% if (theme.footer.hasOwnProperty('upyun') && theme.footer.upyun) { %>
<div class="icp-info info-item"><a target="_blank" rel="nofollow" href="<%= theme.footer.upyun %>">本网站由
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": "1.1.2",
"version": "1.1.3",
"private": false,
"description": "Redefine your writing with modern style and various functionality in 'Redefine' Hexo Theme.",
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions scripts/modules/folding.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ function postFolding(args, content) {
title = args[0].trim();
}
if (style != undefined) {
return `<details class="${style}"><summary> ${title} </summary>
return `<details class="${style}"><summary><i class="fa-solid fa-chevron-right"></i>&nbsp&nbsp&nbsp&nbsp${title} </summary>
<div class='content'>
${hexo.render.renderSync({text: content, engine: 'markdown'}).split('\n').join('')}
</div>
</details>`;
}
return `<details><summary> ${title} </summary>
return `<details><summary><i class="fa-solid fa-chevron-right"></i>&nbsp&nbsp&nbsp${title} </summary>
<div class='content'>
${hexo.render.renderSync({text: content, engine: 'markdown'}).split('\n').join('')}
</div>
Expand Down
12 changes: 12 additions & 0 deletions source/css/common/basic.styl
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@
@require 'animated.styl'
@require 'redefine-theme.styl'

redefine-tablet() {
@media (max-width $media-max-width){
{block}
}
}

redefine-mobile() {
@media (max-width $media-max-width-mobile){
{block}
}
}

// ======================================================================
// all
// ======================================================================
Expand Down
2 changes: 1 addition & 1 deletion source/css/common/codeblock/code-block.styl
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ if (hexo-config('code_block.style') == 'mac') {
background var(--third-background-color)
border-radius $redefine-border-radius-large
box-shadow var(--redefine-box-shadow-flat)
padding-top 20px
padding-top 40px
margin-top 10px
position relative

Expand Down
2 changes: 2 additions & 0 deletions source/css/common/codeblock/highlight.styl
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ code {
pre {
@extend $code-block
padding 10px
tab-size 4

code {
padding 0
Expand All @@ -46,6 +47,7 @@ pre {
border-radius $redefine-border-radius-large-bottom
padding-bottom 5px
overflow: auto
margin 0 !important
if (hexo-config('code_block.style') == 'mac') {
border-top 1px solid var(--shadow-color-1)
}
Expand Down
12 changes: 12 additions & 0 deletions source/css/common/redefine-theme.styl
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
redefine-tablet() {
@media (max-width $media-max-width){
{block}
}
}

redefine-mobile() {
@media (max-width $media-max-width-mobile){
{block}
}
}

hover-style(isTransform, scaleX, scaleY) {
box-shadow var(--redefine-box-shadow)

Expand Down
17 changes: 10 additions & 7 deletions source/css/common/variables.styl
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,17 @@ $has-toc-content-max-width = $content-max-width * 1.2
$media-max-width = 780px; // media query max width (tablet)
$media-max-width-mobile = 500px; // media query max width (mobile)

redefine-tablet()
@media (max-width $media-max-width)
{ block }

redefine-mobile()
@media (max-width $media-max-width-mobile)
{ block }
redefine-tablet() {
@media (max-width $media-max-width){
{block}
}
}

redefine-mobile() {
@media (max-width $media-max-width-mobile){
{block}
}
}

// ========================================================================================
// z-index
Expand Down
3 changes: 2 additions & 1 deletion source/css/layout/_modules/buttons.styl
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ a.button:hover {

a.button:active {
box-shadow none
transform translateY(0)
transform translateY(3px)
transition transform 0.1s ease
}

a.center {
Expand Down
73 changes: 58 additions & 15 deletions source/css/layout/_modules/folding.styl
Original file line number Diff line number Diff line change
@@ -1,15 +1,42 @@
details {
margin-bottom 1rem

&> summary {
list-style: none;
}
&> summary::-webkit-details-marker {
display: none;
}
&> summary::marker {
display: none;
}
}

details[open] > summary {
i.fa-chevron-right {
transform rotate(90deg)
transition transform 0.2s ease
}
}

summary {
&:marker {
margin-right 100px
}


i.fa-chevron-right {
transform rotate(0deg)
transition transform 0.2s ease
}


box-shadow var(--redefine-box-shadow-flat)
border-radius $redefine-border-radius-small
padding 15px
font-size 1.2rem
background-color var(--background-color)
line-height 2rem
margin-bottom 1rem

cursor pointer

Expand All @@ -24,18 +51,22 @@ summary {
}

details div.content {
padding-left 30px
border-radius $redefine-border-radius-small
border solid 1px var(--shadow-color-1)
padding 1rem
margin-bottom 1rem
background-color var(--second-background-color)
animation: fade 0.2s ease forwards;
}


::marker {
padding-left 100px
//padding-left 100px
}

details.yellow {
summary {
border-left solid 4px #FFA930
//border-left solid 4px #FFA930

&:hover {
background-color #FFA93030
Expand All @@ -45,7 +76,7 @@ details.yellow {

details.blue {
summary {
border-left solid 4px #00A6FF
//border-left solid 4px #00A6FF

&:hover {
background-color #00A6FF30
Expand All @@ -55,7 +86,7 @@ details.blue {

details.green {
summary {
border-left solid 4px #00FFA6
//border-left solid 4px #00FFA6

&:hover {
background-color #00FFA630
Expand All @@ -65,7 +96,7 @@ details.green {

details.red {
summary {
border-left solid 4px #FF0000
//border-left solid 4px #FF0000

&:hover {
background-color #FF000030
Expand All @@ -75,7 +106,7 @@ details.red {

details.orange {
summary {
border-left solid 4px #FFA930
//border-left solid 4px #FFA930

&:hover {
background-color #FFA93030
Expand All @@ -85,7 +116,7 @@ details.orange {

details.pink {
summary {
border-left solid 4px #FF00FF
//border-left solid 4px #FF00FF

&:hover {
background-color #FF00FF30
Expand All @@ -95,7 +126,7 @@ details.pink {

details.cyan {
summary {
border-left solid 4px #00FFFF
// border-left solid 4px #00FFFF

&:hover {
background-color #00FFFF30
Expand All @@ -105,7 +136,7 @@ details.cyan {

details.white {
summary {
border-left solid 4px #FFFFFF
//border-left solid 4px #FFFFFF

&:hover {
background-color #FFFFFF30
Expand All @@ -115,7 +146,7 @@ details.white {

details.black {
summary {
border-left solid 4px #000000
//border-left solid 4px #000000

&:hover {
background-color #00000030
Expand All @@ -125,7 +156,7 @@ details.black {

details.gray {
summary {
border-left solid 4px #A6A6A6
//border-left solid 4px #A6A6A6

&:hover {
background-color #A6A6A630
Expand All @@ -135,7 +166,7 @@ details.gray {

details.purple {
summary {
border-left solid 4px #A763FF
//border-left solid 4px #A763FF

&:hover {
background-color #A763FF30
Expand All @@ -145,12 +176,24 @@ details.purple {

details {
summary {
border-left solid 4px #A6A6A6
//border-left solid 4px #A6A6A6

&:hover {
background-color #A6A6A630
}
}
}

@keyframes fade {
from {
opacity: 0;
visibility: hidden;
transform: translateY(-10px);
}
to {
opacity: 1;
visibility: visible;
transform: translateY(0);
}
}

12 changes: 12 additions & 0 deletions source/css/layout/_modules/tabs.styl
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,22 @@ div.tabs {
color: var(--primary-color)
background-color var(--second-background-color)
box-shadow var(--redefine-box-shadow-flat)
transform translateY(-1px)
transition transform 0.1s ease
}
}
}
.tab-content {
.highlight-container[data-rel] {
border-radius $redefine-border-radius-small
}
.highlight {
border-radius $redefine-border-radius-small-bottom
}
blockquote{
border-radius 0 $redefine-border-radius-small $redefine-border-radius-small 0
}

border-top 1px solid var(--shadow-color-1)
background-color var(--second-background-color)
border-radius: 0 0 $redefine-border-radius-medium $redefine-border-radius-medium
Expand Down
2 changes: 2 additions & 0 deletions source/css/layout/_partials/archive-list.styl
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ $archive-year-count-font-size = 1.2rem
$article-title-font-size = 1.2rem
$article-date-font-size = 1rem

@import "../../common/variables"

.archive-list-container {

.archive-item {
Expand Down
2 changes: 2 additions & 0 deletions source/css/layout/_partials/article-meta-info.styl
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@import "../../common/variables"

.article-meta-info {
font-size 0.8rem
color var(--third-text-color)
Expand Down
Loading

0 comments on commit da7e3d9

Please sign in to comment.