Skip to content

Commit

Permalink
Merge pull request #15 from EvanNotFound/dev
Browse files Browse the repository at this point in the history
v0.3.3
  • Loading branch information
EvanNotFound authored Nov 19, 2022
2 parents c83bbf1 + 6ffdaf0 commit b61677e
Show file tree
Hide file tree
Showing 12 changed files with 65 additions and 61 deletions.
11 changes: 8 additions & 3 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,12 @@ style:
# First screen
first_screen:
enable: true
background_img: /images/wallheaven-bg.webp # background image of the first screen, use relative path or external link
background_image:
light: /images/wallhaven-bg-light.webp # background image of the first screen, use relative path or external link (if your website is in subdirectory, use external link)
dark: /images/wallhaven-bg-dark.webp # background image of the first screen, use relative path or external link (if your website is in subdirectory, use external link)
title_color:
light: "#fff" # first screen title color (light mode)
dark: "#323739" # first screen title color (dark mode)
description: Theme Redefine # the title in the middle of the first screen

# Scroll style settings
Expand Down Expand Up @@ -74,7 +79,7 @@ menu: #you can customize
Home: /
Archives: /archives
# Status: https://status.evanluo.top/
# Links: /friends
# Links: /links
# About: /about
# Changelog: /changelog
# ......
Expand Down Expand Up @@ -222,4 +227,4 @@ footer:
# ---------------------------------------------------------------------------------------
# Redefine Theme version (Please don't modify)
# ---------------------------------------------------------------------------------------
version: 0.3.2
version: 0.3.3
1 change: 1 addition & 0 deletions languages/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ changelog: Changelog
status: Status
site_time: Blog Up for
optimized_by: and Optimized by Evan
rights: All Rights Reserved
copyright:
author: Post author
title: Post title
Expand Down
1 change: 1 addition & 0 deletions languages/zh-CN.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ changelog: 更新日志
status: 状态
site_time: 博客已运行
optimized_by: 并由 Evan 进行优化
rights: 版权所有
copyright:
title: 本文标题
author: 本文作者
Expand Down
1 change: 1 addition & 0 deletions languages/zh-TW.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ changelog: 日誌
status: 狀態
site_time: 博客已運行
optimized_by: 並由 Evan 進行優化
rights: 版權所有
copyright:
author: 文章作者
title: 文章標題
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><%- __('links') %> <a href="/friends/zh-hans" style="border-bottom: none;"><i class="fa-duotone fa-language"></i></a></h1>
<h1><%- __('links') %> <a href="/friends/zh-hans" style="display: none;border-bottom: none;"><i class="fa-duotone fa-language"></i></a></h1>
<div class="friends-link-container">
<ul class="friends-link-list">
<% for (const f of theme.links) { %>
Expand Down
15 changes: 8 additions & 7 deletions layout/_partial/head.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,16 @@
<%- css('css/style') %>
<%- favicon_tag(theme.style.favicon) %>
<%- __css('css/fontawesome.min.css') %>
<link href="/css/fontawesome.min.css" rel="stylesheet" type="text/css">
<link href="/css/regular.min.css" rel="stylesheet" type="text/css">
<link href="/css/v5-font-face.min.css" rel="stylesheet" type="text/css">
<link href="/css/duotone.min.css" rel="stylesheet" type="text/css">
<link href="/css/brands.min.css" rel="stylesheet" type="text/css">
<link href="/css/solid.min.css" rel="stylesheet" type="text/css">
<%- __css('css/fontawesome.min.css') %>
<%- __css('css/regular.min.css') %>
<%- __css('css/v5-font-face.min.css') %>
<%- __css('css/duotone.min.css') %>
<%- __css('css/brands.min.css') %>
<%- __css('css/solid.min.css') %>
<%- __css('css/brands.min.css') %>
<%- __css('css/css2.css') %>
<link rel="stylesheet" href="//evan.beee.top/css/waline.css"/>
<script src="//evan.beee.top/js/waline.js"></script>
<link href='/css/css2.css' rel='stylesheet'>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<%- export_config() %>
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.3.2",
"version": "0.3.3",
"private": false,
"description": "\"Redefine\" hexo theme is a simple & fast & pure theme, but with no compromise.",
"scripts": {
Expand Down
24 changes: 18 additions & 6 deletions source/css/common/variables.styl
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// ========================================================================================
// REDEFINE THEME VARIABLE //
// REDEFINE THEME VARIABLE
// ========================================================================================


// ========================================================================================
// layout
// LAYOUT
// ========================================================================================
$header-height = 70px; // header height
$header-shrink-height = $header-height * 0.72; // header shrink height
Expand Down Expand Up @@ -93,6 +93,8 @@ $note-black-title-bg = #E9E9E9;
$note-cyan-title-bg = #E9FDF9;
$note-orange-title-bg = #fdf3e9;

$first-screen-text-color = convert(hexo-config('style.first_screen.title_color.light'));


// ========================================================================================
// dark mode color
Expand Down Expand Up @@ -127,19 +129,27 @@ $dark-note-gray-title-bg = #4e4e4e;
$dark-note-black-title-bg = #1e1e1e;
$dark-note-orange-title-bg = #4e3a1e;

$first-screen-text-color-dark = convert(hexo-config('style.first_screen.title_color.dark'));

// ========================================================================================
// background image
// ========================================================================================
$first-screen-img-light = hexo-config('style.first_screen.background_image.light')
$first-screen-img-dark = hexo-config('style.first_screen.background_image.dark')


// ========================================================================
// ========================================================================================
// font
// ========================================================================
// ========================================================================================
$default-font-family = Noto Sans, Noto Sans SC, Open Sans, -apple-system, system-ui, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial;
$default-font-size = 15.2px;
$default-font-line-height = 22px;
$default-font-weight = 400;


// ========================================================================
// ========================================================================================
// light/dark mode color
// ========================================================================
// ========================================================================================
root-color(mode) {
--background-color: mode == 'light' ? $background-color : $dark-background-color;
--second-background-color: mode == 'light' ? $second-background-color : $dark-second-background-color;
Expand Down Expand Up @@ -170,6 +180,8 @@ root-color(mode) {
--note-orange-title-bg : mode == 'light' ? $note-orange-title-bg : $dark-note-orange-title-bg;
--note-black-title-bg : mode == 'light' ? $note-black-title-bg : $dark-note-black-title-bg;
--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;
}


Expand Down
30 changes: 26 additions & 4 deletions source/css/layout/_partial/first-screen.styl
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
$first-screen-font-size = 2rem;
$first-screen-icon-size = 1.6rem;

$temp-img = hexo-config('style.first_screen.background_img');
$first-screen-img = $temp-img ? $temp-img:'/images/bg.svg';

.first-screen-container {
font-family: "Optima", sans-serif;
Expand All @@ -11,7 +9,7 @@ $first-screen-img = $temp-img ? $temp-img:'/images/bg.svg';
width: 100%;
overflow: hidden;
background: url($first-screen-img) center center / cover no-repeat;
background-position-y: $header-height;



+redefine-tablet() {
Expand All @@ -33,7 +31,7 @@ $first-screen-img = $temp-img ? $temp-img:'/images/bg.svg';
font-size: $first-screen-font-size;
line-height: 1.8;
text-align: center;
color: #FFF;
color: var(--first-screen-text-color);


+redefine-tablet() {
Expand Down Expand Up @@ -67,3 +65,27 @@ $first-screen-img = $temp-img ? $temp-img:'/images/bg.svg';
}
}
}

@media (prefers-color-scheme: light) {
.first-screen-container {
background: url($first-screen-img-light) center center / cover no-repeat !important;
}
}

@media (prefers-color-scheme: dark) {
.first-screen-container {
background: url($first-screen-img-dark) center center / cover no-repeat !important;
}
}

.light-mode{
.first-screen-container {
background: url($first-screen-img-light) center center / cover no-repeat !important;
}
}

.dark-mode{
.first-screen-container {
background: url($first-screen-img-dark) center center / cover no-repeat !important;
}
}
39 changes: 0 additions & 39 deletions source/images/bg.svg

This file was deleted.

Binary file added source/images/wallhaven-bg-dark.webp
Binary file not shown.
File renamed without changes.

0 comments on commit b61677e

Please sign in to comment.