Skip to content

Commit

Permalink
feat: reimu cursor
Browse files Browse the repository at this point in the history
  • Loading branch information
D-Sketon committed Jan 27, 2024
1 parent 0caa4d0 commit e7f0c40
Show file tree
Hide file tree
Showing 10 changed files with 51 additions and 8 deletions.
2 changes: 2 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,8 @@ service_worker:
live2d:
enable: false

reimu_cursor: true

# Dependent cdn links
vendor:
cdn_jsdelivr_gh: https://cdn.jsdelivr.net/gh/
Expand Down
5 changes: 4 additions & 1 deletion source/css/_partial/article.styl
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,10 @@ $article-meta-tag
margin-right: 10px

.article-share-link
cursor: pointer
if reimu_cursor
cursor: url(/images/cursor/reimu-cursor-pointer.cur), pointer
else
cursor: pointer
float: right
margin-left: 20px
font-size: 14px
Expand Down
9 changes: 8 additions & 1 deletion source/css/_partial/header.styl
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,10 @@ $nav-link-wrap
height: font-size
padding: 20px 15px
position: relative
cursor: pointer
if reimu_cursor
cursor: url(/images/cursor/reimu-cursor-pointer.cur), pointer
else
cursor: pointer

[data-theme="dark"]
.main-nav-link, .main-nav-icon, .nav-icon, .main-nav-link-wrap
Expand All @@ -174,6 +177,10 @@ $nav-link-wrap
background: url("/images/taichi.png") no-repeat center / 80%
transform: rotate(0deg)
transition: transform 1s ease
if reimu_cursor
cursor: url(/images/cursor/reimu-cursor-pointer.cur), pointer !important
else
cursor: pointer

#main-nav-toggle
display: none
Expand Down
15 changes: 12 additions & 3 deletions source/css/_partial/highlight.styl
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,10 @@ pre
margin: 5px
z-index: 1
filter: invert(50%)
cursor: pointer
if reimu_cursor
cursor: url(/images/cursor/reimu-cursor-pointer.cur), pointer
else
cursor: pointer
color: #fff

.code-lang
Expand All @@ -262,13 +265,19 @@ pre
font-weight: bold
z-index: 1
filter: invert(50%)
cursor: pointer
if reimu_cursor
cursor: url(/images/cursor/reimu-cursor-pointer.cur), pointer
else
cursor: pointer

.code-expand
margin: 5px
filter: invert(50%)
z-index: 1
cursor: pointer
if reimu_cursor
cursor: url(/images/cursor/reimu-cursor-pointer.cur), pointer
else
cursor: pointer
transition: all .3s
transform: rotate(0deg)
color: #fff
Expand Down
7 changes: 6 additions & 1 deletion source/css/_partial/search.styl
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@
font-size: 20px
font-weight: bold
text-transform: uppercase
cursor: pointer
if reimu_cursor
cursor: url(/images/cursor/reimu-cursor-pointer.cur), pointer
else
cursor: pointer
padding-left: 15px
top: 10px

Expand Down Expand Up @@ -78,6 +81,8 @@

.reimu-powered
float: right
if reimu_cursor
cursor: url(/images/cursor/reimu-cursor-default.cur), auto !important

img
display: inline-block
Expand Down
1 change: 1 addition & 0 deletions source/css/_variables.styl
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ subtitle-size = 18px
banner-height = 400px

sidebar = hexo-config("sidebar")
reimu_cursor = hexo-config("reimu_cursor")

// Layout
block-margin = 50px
Expand Down
20 changes: 18 additions & 2 deletions source/css/style.styl
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,31 @@ input, button

html, body, #container
height: 100%
if reimu_cursor
cursor: url(/images/cursor/reimu-cursor-default.cur), auto

body
background: var(--color-background)
-webkit-text-size-adjust: 100%
font-family: font-sans
transition: background 0.3s ease

if reimu_cursor
a
cursor: url(/images/cursor/reimu-cursor-pointer.cur), pointer !important

.site-search
input
cursor: url(/images/cursor/reimu-cursor-text.cur), text !important

#main
span, p, code, kbd, input, textarea
cursor: url(/images/cursor/reimu-cursor-text.cur), text !important

nav
span
cursor: url(/images/cursor/reimu-cursor-default.cur), auto !important

.outer
clearfix()
max-width: (column-width + gutter-width) * columns + gutter-width
Expand Down Expand Up @@ -123,12 +141,10 @@ if sidebar
height: 10px
background-color: #f5f5f5


::-webkit-scrollbar-track
border-radius: 10px
background-color: #f5f5f5


::-webkit-scrollbar-thumb
border-radius: 10px
background-color: var(--red-3)
Expand Down
Binary file added source/images/cursor/reimu-cursor-default.cur
Binary file not shown.
Binary file added source/images/cursor/reimu-cursor-pointer.cur
Binary file not shown.
Binary file added source/images/cursor/reimu-cursor-text.cur
Binary file not shown.

0 comments on commit e7f0c40

Please sign in to comment.