lensfrex 1 year ago
commit 4bfb0a9360
Signed by: lensfrex
GPG Key ID: 0F69A0A2FBEE98A0
  1. 11
      .editorconfig
  2. 22
      _config.yml
  3. 54
      layout/archive.pug
  4. 11
      layout/category.pug
  5. 8
      layout/includes/_partials/button.pug
  6. 0
      layout/includes/_partials/footer.pug
  7. 7
      layout/includes/_partials/header.pug
  8. 3
      layout/includes/_partials/left_declaration.pug
  9. 37
      layout/includes/layout.pug
  10. 9
      layout/includes/recent-posts.pug
  11. 4
      layout/index.pug
  12. 7
      layout/page.pug
  13. 7
      layout/post.pug
  14. 11
      layout/tag.pug
  15. 6
      package.json
  16. 74
      source/css/_partials/button.styl
  17. 10
      source/css/_partials/header/header.styl
  18. 11
      source/css/_partials/left_declaration.styl
  19. 29
      source/css/common.styl
  20. 1
      source/css/hexo-theme-yorha.styl
  21. BIN
      source/favicon.ico
  22. 0
      source/js/hexo-theme-yorha.js

@ -0,0 +1,11 @@
root = true
[*]
indent_style = space
indent_size = 2
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[*.md]
trim_trailing_whitespace = false

@ -0,0 +1,22 @@
# html lang
language: zh-cn
# main menu navigation
menu:
首页: /
存档: /archives
扩展: /extends
nginx文档: /nginx-docs
IPV6: /ipv6
传送门: /teleport-public
大佬们: /giants
# stylesheets loaded in the <head>
stylesheets:
- /css/hexo-theme-yorha.css
- /css/common.css
# scripts loaded in the end of the body
scripts:
- /js/hexo-theme-yorha.js

@ -0,0 +1,54 @@
extends includes/layout.pug
block content
- var categoriesList = list_categories({ show_count: false })
- var tagsList = list_tags({ show_count: false })
- var archivesList = list_archives({ show_count: false })
div.archive
if !is_year()
h1 Archives
if theme.atom
p The feed is available via&nbsp;
a(href=theme.atom) atom
span .
br
aside
h2 Categories
if categoriesList
!= categoriesList
else
p None.
br
aside
h2 Tags
if tagsList
!= tagsList
else
p None.
br
aside
h2 Archives
if archivesList
!= archivesList
else
p None.
br
else
h1= page.month + '/' + page.year
- page.posts.each(function(article){
.archive-list-item
a(href=url_for(article.path))= article.title
time(datetime=date_xml(article.date))= date(article.date)
- })
#paginator!= paginator()

@ -0,0 +1,11 @@
extends includes/layout.pug
block content
#category
h1= page.category
- page.posts.each(function(article){
.category-item
a(href=url_for(article.path))= article.title
time(datetime=date_xml(article.date))= date(article.date)
- })
#paginator!= paginator()

@ -0,0 +1,8 @@
mixin button (target_href, active, text)
.button-component
.button-component-box
.button-container
a.button-anchor(href=target_href)
.button-anchor-box
.button-item-icon
= text

@ -0,0 +1,7 @@
include ./button.pug
#menu-container.menu-container
.menu-items-container
include ./left_declaration.pug
each target, name in theme.menu
+button(target, true, name)

@ -0,0 +1,3 @@
.left-declaration()
.declaration()
.declaration()

@ -0,0 +1,37 @@
- var pageTitle = page.title || config.subtitle || ''
- if (is_archive()) pageTitle = 'Archives'
- if (is_tag()) pageTitle = 'Tag: ' + page.tag
- if (is_category()) pageTitle = 'Category: ' + page.category
- if (is_month()) pageTitle += ': ' + page.month + '/' + page.year
- if (is_year()) pageTitle += ': ' + page.year
- pageTitle += ' [ ' + config.title + ' ]'
doctype html
html(lang='zh-cn')
head
meta(charset='UTF-8')
title= pageTitle
if theme.stylesheets !== undefined && theme.stylesheets.length > 0
//- stylesheets list from _config.yml
each url in theme.stylesheets
link(rel='stylesheet', href=url)
body
#container.container
header#header.header
.header-box
include ./_partials/header.pug
hr
.bottom-declaration
main#main.main
.main-box
#content.content
block content
footer#footer.footer
.footer-box
include ./_partials/footer.pug

@ -0,0 +1,9 @@
if page.posts.length > 0
#recent-posts
h1 Recent Posts
each post in page.posts.sort('date', -1).limit(10).toArray()
.recent-post-item
a(href=url_for(post.path))= post.title
if post.date
time(datetime=post.date.toJSON())= date(post.date, date_format)

@ -0,0 +1,4 @@
extends includes/layout.pug
block content

@ -0,0 +1,7 @@
extends includes/layout.pug
block content
article#page
h1= page.title
!= page.content
#paginator!= paginator()

@ -0,0 +1,7 @@
extends includes/layout.pug
block content
article#post
h1= page.title
!= page.content
#paginator!= paginator()

@ -0,0 +1,11 @@
extends includes/layout.pug
block content
div#tag
h1= 'Tag: ' + page.tag
- page.posts.each(function(article){
a(href=url_for(article.path))= article.title
time(datetime=date_xml(article.date))= date(article.date)
br.clear
- })
#paginator!= paginator()

@ -0,0 +1,6 @@
{
"name": "hexo-theme-yorha",
"version": "0.1.0",
"description": "",
"private": true
}

@ -0,0 +1,74 @@
.button-component
width: 100%
.button-component-box
.button-container
padding: 0px;
width: 100%;
height: 100%;
background-color: transparent;
display: flex;
flex-direction: column;
gap: 5px;
border: none;
a.button-anchor
font-size: 1rem;
height: 100%;
width: 100%;
text-decoration: none;
display: flex;
flex-direction: column;
color: rgb(87, 84, 74);
align-items: flex-start;
background-image: linear-gradient(90deg, rgb(180, 175, 154) 50%, rgb(180, 175, 154) 50%, rgb(87, 84, 74) 50%, rgb(87, 84, 74) 100%);
background-size: 200%;
transition: all 0.2s linear 0s;
z-index: 2;
&:hover
background-position: -100% center;
color: rgb(180, 175, 154);
// line over the button
&::before
background-color: rgb(87, 84, 74);
transition: all 0.2s ease 0s;
&:hover::before
height: 2px;
z-index: -1;
width: 100%;
content: "";
transform: translate(0px, -8px);
pointer-events: none;
// line under the button
&::after
background-color: rgb(87, 84, 74);
transition: all 0.2s ease 0s;
&:hover::after
height: 2px;
z-index: -1;
width: 100%;
content: "";
transform: translate(0px, 8px);
pointer-events: none;
.button-anchor-box
padding: 10px;
display: flex;
flex-direction: row;
gap: 10px;
-webkit-box-align: center;
align-items: center;
color: inherit;
font-family: Manrope, sans-serif;
font-weight: 500;
font-size: 18px;
.button-item-icon
width: 5%;
height: 5%;
min-width: 20px;
min-height: 20px;
background-image: linear-gradient(90deg, rgb(87, 84, 74) 50%, rgb(87, 84, 74) 50%, rgb(218, 212, 187) 50%, rgb(218, 212, 187) 100%);
background-size: 200%;
transition: all 0.1s linear 0s;
&:hover .button-anchor-box .button-item-icon
background-position: -100% center;

@ -0,0 +1,10 @@
.menu-items-container
display: flex;
flex-direction: row;
gap: 1.3rem;
height: 2.5rem;
justify-content: space-between;
position: relative;
width: 100%;
// white-space:nowrap;

@ -0,0 +1,11 @@
.left-declaration
display: flex
flex-direction: row
height: 100%
.declaration
background-color: rgb(180, 175, 154);
width: 10px;
height: 100%;
margin-right: 5px;
&:nth-child(2)
width: 4px

@ -0,0 +1,29 @@
$backgroundColor=#c6c2a5
body
background-color: #c6c2a5
background-image:
linear-gradient(90deg, #c6c2a5 2px, rgba(255 255 255 0) 0),
linear-gradient(180deg, #c6c2a5 2px, rgb(209 205 178) 0);
background-size: .4rem .4rem
#container
padding: 1.5% 2% 2% 2%
hr
border: 1.3px solid #000;
margin-left: -4.4%;
margin-right: 4%;
margin-top: 1.5em;
width: 107%;
.bottom-declaration
background-image: linear-gradient(90deg,#333 14%,hsla(0,0%,100%,0) 0);
background-repeat: repeat-x;
background-size: 72px 4px;
width: 100%;
height: 4px;
*
box-sizing: border-box
@import '_partials/header/*'
@import '_partials/*'

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Loading…
Cancel
Save