├── .gitignore ├── source ├── css │ ├── _components │ │ ├── widgets │ │ │ ├── music.styl │ │ │ ├── instantclick.styl │ │ │ ├── search.styl │ │ │ ├── toc_blog.styl │ │ │ ├── related.styl │ │ │ ├── tagcloud.styl │ │ │ ├── recent.styl │ │ │ ├── timeline.styl │ │ │ ├── ghrepo.styl │ │ │ ├── toc_wiki.styl │ │ │ ├── widgets.styl │ │ │ ├── toc_common.styl │ │ │ └── ghuser.styl │ │ ├── tag-plugins │ │ │ ├── index.styl │ │ │ ├── ghcard.styl │ │ │ ├── emoji.styl │ │ │ ├── mark.styl │ │ │ ├── media.styl │ │ │ ├── hashtag.styl │ │ │ ├── navbar.styl │ │ │ ├── copy.styl │ │ │ ├── toc.styl │ │ │ ├── split.styl │ │ │ ├── inline-labels.styl │ │ │ ├── image.styl │ │ │ ├── poetry.styl │ │ │ ├── note.styl │ │ │ ├── frame.styl │ │ │ ├── about.styl │ │ │ ├── folders.styl │ │ │ ├── friends.styl │ │ │ ├── folding.styl │ │ │ ├── quot.styl │ │ │ ├── tabs.styl │ │ │ └── link.styl │ │ ├── index.styl │ │ ├── darkmode.styl │ │ ├── main.styl │ │ ├── pages │ │ │ ├── error.styl │ │ │ └── archives.styl │ │ ├── partial │ │ │ ├── footer.styl │ │ │ ├── bread-nav.styl │ │ │ ├── article-footer.styl │ │ │ ├── navbar.styl │ │ │ ├── cover.styl │ │ │ └── related.styl │ │ ├── layout.styl │ │ └── sidebar │ │ │ ├── sidebar.styl │ │ │ └── footer.styl │ ├── _common │ │ ├── control.styl │ │ ├── image.styl │ │ ├── pre.styl │ │ ├── svg.styl │ │ ├── input.styl │ │ ├── span.styl │ │ ├── cap.styl │ │ ├── blockquote.styl │ │ ├── toast.styl │ │ ├── html.styl │ │ ├── loading.styl │ │ ├── title.styl │ │ ├── blur.styl │ │ ├── base.styl │ │ ├── button.styl │ │ └── device.styl │ ├── _plugins │ │ ├── scrollreveal.styl │ │ ├── comments │ │ │ ├── beaudar.styl │ │ │ ├── utterances.styl │ │ │ └── artalk.styl │ │ ├── fancybox.styl │ │ ├── copycode.styl │ │ ├── lazyload.styl │ │ ├── index.styl │ │ ├── swiper.styl │ │ └── search │ │ │ └── local-search.styl │ ├── main.styl │ └── _defines │ │ ├── const.styl │ │ └── theme.styl ├── images │ ├── sun-moon.svg │ ├── moon-fill.svg │ ├── sun-fill.svg │ ├── email.svg │ ├── link_icon.svg │ ├── telegram.svg │ ├── weibo.svg │ └── wechat.svg └── js │ ├── check_outdated_browser.js │ └── plugins │ ├── copycode.js │ └── linkcard.js ├── scripts ├── generators │ ├── 404.js │ ├── tags.js │ ├── categories.js │ └── wiki.js ├── helpers │ ├── category_color.js │ ├── scrollreveal.js │ ├── utils.js │ ├── stellar_info.js │ └── parse_config.js ├── filters │ ├── index.js │ ├── change_image.js │ ├── img_onerror.js │ └── img_lazyload.js ├── tags │ ├── lib │ │ ├── bvideo.js │ │ ├── mark.js │ │ ├── icon.js │ │ ├── checkbox.js │ │ ├── folding.js │ │ ├── border.js │ │ ├── emoji.js │ │ ├── note.js │ │ ├── swiper.js │ │ ├── read │ │ │ └── reel.js │ │ ├── poetry.js │ │ ├── split.js │ │ ├── ghcard.js │ │ ├── navbar.js │ │ ├── folders.js │ │ ├── about.js │ │ ├── quot.js │ │ ├── hashtag.js │ │ ├── copy.js │ │ ├── friends.js │ │ ├── frame.js │ │ ├── tabs.js │ │ ├── toc.js │ │ └── sites.js │ └── inline-labels.js └── events │ ├── index.js │ └── lib │ └── config.js ├── _data ├── links.yml └── widgets.yml ├── layout ├── components │ ├── main │ │ ├── header.jsx │ │ ├── post_list │ │ │ ├── paginator.jsx │ │ │ └── wiki_card.jsx │ │ ├── navbar │ │ │ ├── list_wiki.jsx │ │ │ └── list_categories.jsx │ │ └── article │ │ │ └── read_next.jsx │ ├── cover │ │ ├── cover.jsx │ │ ├── post_cover.jsx │ │ └── wiki_cover.jsx │ ├── widgets │ │ ├── markdown.jsx │ │ ├── timeline.jsx │ │ ├── tagcloud.jsx │ │ ├── ghissues.jsx │ │ ├── search.jsx │ │ └── related.jsx │ ├── plugins │ │ ├── comments │ │ │ ├── script.jsx │ │ │ ├── twikoo │ │ │ │ ├── layout.jsx │ │ │ │ └── script.jsx │ │ │ ├── waline │ │ │ │ ├── layout.jsx │ │ │ │ └── script.jsx │ │ │ ├── artalk │ │ │ │ ├── layout.jsx │ │ │ │ └── script.jsx │ │ │ ├── giscus │ │ │ │ ├── script.jsx │ │ │ │ └── layout.jsx │ │ │ ├── beaudar │ │ │ │ ├── script.jsx │ │ │ │ └── layout.jsx │ │ │ ├── utterances │ │ │ │ ├── script.jsx │ │ │ │ └── layout.jsx │ │ │ └── layout.jsx │ │ ├── katex │ │ │ └── script.jsx │ │ ├── mathjax │ │ │ └── script.jsx │ │ └── mermaid │ │ │ └── script.jsx │ ├── sidebar │ │ ├── menu.jsx │ │ ├── title.jsx │ │ └── header.jsx │ └── menu_button.jsx ├── 404.jsx ├── layout.jsx ├── tags.jsx ├── categories.jsx ├── post.jsx ├── page.jsx ├── wiki.jsx └── archive.jsx ├── .prettierrc ├── package.json ├── LICENSE ├── languages ├── zh-CN.yml ├── zh-TW.yml └── en.yml └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ -------------------------------------------------------------------------------- /source/css/_components/widgets/music.styl: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /source/css/_components/tag-plugins/index.styl: -------------------------------------------------------------------------------- 1 | @import 'read/*' -------------------------------------------------------------------------------- /source/css/_common/control.styl: -------------------------------------------------------------------------------- 1 | .dis-select 2 | disable-select() 3 | -------------------------------------------------------------------------------- /source/css/_plugins/scrollreveal.styl: -------------------------------------------------------------------------------- 1 | .reveal 2 | visibility: hidden -------------------------------------------------------------------------------- /source/css/_components/widgets/instantclick.styl: -------------------------------------------------------------------------------- 1 | div#instantclick-bar 2 | background: var(--theme-highlight); 3 | -------------------------------------------------------------------------------- /source/css/_components/widgets/search.styl: -------------------------------------------------------------------------------- 1 | .widgets .widget-wrapper.search 2 | margin-top: 0 3 | margin-bottom: 0 4 | -------------------------------------------------------------------------------- /source/css/_plugins/comments/beaudar.styl: -------------------------------------------------------------------------------- 1 | .cmt-body.beaudar 2 | margin: 0 -4px 3 | width: 'calc(100% + %s)' % 8px 4 | -------------------------------------------------------------------------------- /source/css/_plugins/comments/utterances.styl: -------------------------------------------------------------------------------- 1 | .cmt-body.utterances 2 | margin: 0 -4px 3 | width: 'calc(100% + %s)' % 8px 4 | -------------------------------------------------------------------------------- /source/css/_plugins/fancybox.styl: -------------------------------------------------------------------------------- 1 | img[fancybox='true'] 2 | cursor: zoom-in 3 | 4 | .swiper-slide 5 | cursor: zoom-in 6 | -------------------------------------------------------------------------------- /source/css/_components/tag-plugins/ghcard.styl: -------------------------------------------------------------------------------- 1 | .tag-plugin.ghcard 2 | line-height: 0 3 | a.ghcard 4 | display: inline-block 5 | -------------------------------------------------------------------------------- /source/css/_common/image.styl: -------------------------------------------------------------------------------- 1 | div.lazy.img 2 | width: 100% 3 | height: 100% 4 | background-position: center 5 | background-size: cover 6 | -------------------------------------------------------------------------------- /source/css/_common/pre.styl: -------------------------------------------------------------------------------- 1 | pre:not([class]):has(>code) 2 | display: block 3 | padding: 1rem 4 | overflow: auto 5 | code 6 | padding: 0 -------------------------------------------------------------------------------- /source/css/_common/svg.styl: -------------------------------------------------------------------------------- 1 | svg.icon 2 | width: 1em 3 | height: 1em 4 | vertical-align: middle 5 | fill: currentColor 6 | overflow: hidden 7 | -------------------------------------------------------------------------------- /source/css/_components/index.styl: -------------------------------------------------------------------------------- 1 | @import 'partial/*' 2 | @import 'tag-plugins/*' 3 | @import 'sidebar/*' 4 | @import 'widgets/*' 5 | @import 'pages/*' 6 | -------------------------------------------------------------------------------- /source/css/_components/widgets/toc_blog.styl: -------------------------------------------------------------------------------- 1 | .widget-wrapper.toc.single .doc-tree 2 | &.active>.toc 3 | border-left: 2px solid var(--block-hover) 4 | -------------------------------------------------------------------------------- /source/css/_plugins/comments/artalk.styl: -------------------------------------------------------------------------------- 1 | .cmt-body.artalk .artalk 2 | --at-color-main: $color-theme 3 | .atk-main-editor 4 | border-radius: $border-block -------------------------------------------------------------------------------- /source/css/_common/input.styl: -------------------------------------------------------------------------------- 1 | input 2 | background: none 3 | border: none 4 | 5 | input.copy-area 6 | display: block 7 | font-family: $ff-code 8 | font-size: $fs-12 9 | font-weight: 700 10 | color: var(--text-p3) 11 | -------------------------------------------------------------------------------- /source/css/_components/tag-plugins/emoji.styl: -------------------------------------------------------------------------------- 1 | .md-text .tag-plugin.emoji 2 | display: inline-block 3 | margin: -4px 2px 0 4 | vertical-align: middle 5 | img 6 | display: block 7 | object-fit: contain 8 | height: 1.75em 9 | -------------------------------------------------------------------------------- /source/css/_components/widgets/related.styl: -------------------------------------------------------------------------------- 1 | .widget-wrapper.related .widget-body a 2 | margin-top: 0.5rem 3 | margin-bottom: 1rem 4 | .title 5 | font-weight: 700 6 | font-size: $fs-14 7 | .excerpt 8 | -webkit-line-clamp: 3 9 | -------------------------------------------------------------------------------- /source/css/_common/span.styl: -------------------------------------------------------------------------------- 1 | span.dot,span.sep 2 | font-size: 0.9em 3 | margin: 0 .25em 4 | span.dot:before 5 | content: '·' 6 | font-weight: 900 7 | span.sep:before 8 | content: '/' 9 | padding-left: 2px 10 | padding-right: 2px 11 | -------------------------------------------------------------------------------- /source/css/_components/widgets/tagcloud.styl: -------------------------------------------------------------------------------- 1 | .widget-wrapper.tagcloud .widget-body 2 | margin-top: 0.25rem 3 | a 4 | word-break: break-word 5 | color: var(--text-p2) 6 | line-height: 1.5 7 | &:hover 8 | color: $color-hover 9 | -------------------------------------------------------------------------------- /scripts/generators/404.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 404 v1 | https://github.com/xaoxuu/hexo-theme-stellar/ 3 | */ 4 | 5 | hexo.extend.generator.register('404', function (locals) { 6 | return { 7 | path: '/404.html', 8 | layout: ['404'], 9 | } 10 | }) 11 | -------------------------------------------------------------------------------- /source/css/_components/tag-plugins/mark.styl: -------------------------------------------------------------------------------- 1 | .md-text .tag-plugin.mark 2 | padding: 0 1px 3 | border-radius: 2px 4 | background: var(--theme-bg) 5 | border: 1px solid var(--theme-border) 6 | color: var(--text-p0) 7 | &[color=dark] 8 | border-color: var(--theme-bg) 9 | -------------------------------------------------------------------------------- /_data/links.yml: -------------------------------------------------------------------------------- 1 | # 不要直接在这里写,要复制到 blog/source/_data/links.yml 位置 2 | '示例': 3 | - title: XAOXUU 4 | avatar: https://bu.dusays.com/2021/09/24/2f74810ceb3d3.png 5 | url: https://xaoxuu.com 6 | screenshot: https://bu.dusays.com/2022/10/23/63542895cfd29.png 7 | description: 8 | -------------------------------------------------------------------------------- /source/css/_common/cap.styl: -------------------------------------------------------------------------------- 1 | .cap 2 | font-weight: 500 3 | font-size: $fs-12 4 | scrollbar-width: none 5 | color: var(--text-p3) 6 | &.blue 7 | color: darken($color-md-blue, 6) 8 | &.cyan 9 | color: darken($color-mac-cyan, 6) 10 | &.theme 11 | color: var(--theme-cap) 12 | -------------------------------------------------------------------------------- /source/css/_components/tag-plugins/media.styl: -------------------------------------------------------------------------------- 1 | .tag-plugin.video 2 | line-height: 0 3 | margin: auto 4 | video, iframe 5 | border-radius: $border-card 6 | box-shadow: $boxshadow-card-float 7 | z-index 1 8 | background: var(--block) 9 | width: 100% 10 | height: 100% 11 | margin: 0 -------------------------------------------------------------------------------- /scripts/helpers/category_color.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | hexo.extend.helper.register('category_color', function (cat) { 4 | const cfg = hexo.theme.config 5 | if (cfg.article.category_color && cfg.article.category_color[cat]) { 6 | return { color: cfg.article.category_color[cat] } 7 | } 8 | return {} 9 | }) 10 | -------------------------------------------------------------------------------- /source/css/main.styl: -------------------------------------------------------------------------------- 1 | // 无需修改的常量 2 | @import '_defines/const' 3 | 4 | // 自定义参数 5 | @import '_custom' 6 | 7 | // 含自定义参数的常量以及函数 8 | @import '_defines/theme' 9 | @import '_defines/func' 10 | 11 | // 通用组件 12 | @import '_common/*' 13 | // 布局 14 | @import '_components/*' 15 | 16 | // 可选插件 17 | @import '_plugins/index' 18 | -------------------------------------------------------------------------------- /source/images/sun-moon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /source/css/_components/darkmode.styl: -------------------------------------------------------------------------------- 1 | .darkmode-switch 2 | display: none 3 | cursor: pointer 4 | :root[data-theme="dark"] #darkmode-switch-auto 5 | display: inline-block 6 | :root[data-theme="auto"] #darkmode-switch-light 7 | display: inline-block 8 | :root[data-theme="light"] #darkmode-switch-dark 9 | display: inline-block -------------------------------------------------------------------------------- /source/css/_common/blockquote.styl: -------------------------------------------------------------------------------- 1 | blockquote 2 | display: block 3 | margin-left: 0 4 | margin-right: 0 5 | padding: 1rem 6 | background: var(--card) 7 | border: 1px solid var(--card-border) 8 | border-left: 4px solid var(--theme-highlight) 9 | border-radius: $border-block 10 | box-shadow: $boxshadow-card 11 | color: var(--text-p2) 12 | -------------------------------------------------------------------------------- /layout/components/main/header.jsx: -------------------------------------------------------------------------------- 1 | const SidebarHeader = require('../sidebar/header.jsx') 2 | const Header = (props) => { 3 | const { page, partial } = props 4 | if (page.header !== 'auto' && page.header !== false) { 5 | return 6 | } else { 7 | return <> 8 | } 9 | } 10 | 11 | module.exports = Header 12 | -------------------------------------------------------------------------------- /scripts/filters/index.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | hexo.extend.filter.register( 4 | 'after_render:html', 5 | require('./img_lazyload').processSite 6 | ) 7 | hexo.extend.filter.register( 8 | 'after_render:html', 9 | require('./img_onerror').processSite 10 | ) 11 | hexo.extend.filter.register( 12 | 'before_post_render', 13 | require('./change_image').changeImage, 14 | 9 15 | ) 16 | -------------------------------------------------------------------------------- /source/css/_components/widgets/recent.styl: -------------------------------------------------------------------------------- 1 | .widget-wrapper.recent .widget-body 2 | display: flex 3 | flex-direction: column 4 | align-items: flex-start 5 | margin-top: 0.25rem 6 | a 7 | line-height: 1.2 8 | font-size: $fs-13 9 | margin: 0.25rem 0 10 | .title 11 | font-size: $fs-13 12 | color: var(--text-p2) 13 | &:hover 14 | color: $color-hover 15 | 16 | -------------------------------------------------------------------------------- /scripts/generators/tags.js: -------------------------------------------------------------------------------- 1 | /** 2 | * tags v1 | https://github.com/xaoxuu/hexo-theme-stellar/ 3 | */ 4 | 5 | hexo.extend.generator.register('tags', function (locals) { 6 | if (locals.tags && locals.tags.length > 0) { 7 | return { 8 | path: hexo.config.tag_dir + '/index.html', 9 | data: locals.posts, 10 | layout: ['tags'], 11 | } 12 | } else { 13 | return {} 14 | } 15 | }) 16 | -------------------------------------------------------------------------------- /source/css/_common/toast.styl: -------------------------------------------------------------------------------- 1 | div.toast 2 | max-width: 60% 3 | padding: 1rem 3rem 4 | line-height: 1.5 5 | color: var(--text-p1) 6 | font-weight: 500 7 | text-align: center 8 | border-radius: $border-card 9 | background: var(--card) 10 | position: fixed 11 | top: 50% 12 | left: 50% 13 | transform: translate(-50%, -50%) 14 | z-index: 9 15 | disable-select() 16 | box-shadow: $boxshadow-float 17 | -------------------------------------------------------------------------------- /layout/components/cover/cover.jsx: -------------------------------------------------------------------------------- 1 | const PostCover = require('./post_cover.jsx') 2 | const WikiCover = require('./wiki_cover.jsx') 3 | 4 | const Cover = (props) => { 5 | const { page } = props 6 | switch (page.layout) { 7 | case 'post': 8 | return 9 | case 'wiki': 10 | return 11 | default: 12 | return <> 13 | } 14 | } 15 | 16 | module.exports = Cover 17 | -------------------------------------------------------------------------------- /scripts/filters/change_image.js: -------------------------------------------------------------------------------- 1 | /** 2 | * change_image.js v1 | https://github.com/chiyuki0325/hexo-theme-stellaris/ 3 | * 4 | */ 5 | 6 | 'use strict' 7 | 8 | module.exports.changeImage = function (data) { 9 | if (this.theme.config.tag_plugins.image.parse_markdown) { 10 | data.content = data.content.replace( 11 | /!\[(.*?)\]\((.*?)\s*(?:"(.*?)")?\)/g, 12 | '{% image $2 $3 %}' 13 | ) 14 | } 15 | return data 16 | } 17 | -------------------------------------------------------------------------------- /scripts/generators/categories.js: -------------------------------------------------------------------------------- 1 | /** 2 | * categories v1 | https://github.com/xaoxuu/hexo-theme-stellar/ 3 | */ 4 | 5 | hexo.extend.generator.register('categories', function (locals) { 6 | if (locals.categories && locals.categories.length > 0) { 7 | return { 8 | path: hexo.config.category_dir + '/index.html', 9 | data: locals.posts, 10 | layout: ['categories'], 11 | } 12 | } else { 13 | return {} 14 | } 15 | }) 16 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "semi": false, 3 | "singleQuote": true, 4 | "jsxSingleQuote": true, 5 | "trailingComma": "es5", 6 | "tabWidth": 2, 7 | "useTabs": false, 8 | "arrowParens": "always", 9 | "printWidth": 80, 10 | "bracketSpacing": true, 11 | "jsxBracketSameLine": false, 12 | "endOfLine": "lf", 13 | "overrides": [ 14 | { 15 | "files": "*.jsx", 16 | "options": { 17 | "parser": "babel" 18 | } 19 | } 20 | ] 21 | } 22 | -------------------------------------------------------------------------------- /scripts/tags/lib/bvideo.js: -------------------------------------------------------------------------------- 1 | /* bvideo.js v3 | https://github.com/chiyuki0325/hexo-theme-stellaris 2 | * https://github.com/MaxChang3/hexo-bilibili-card 3 | * {% bvideo v_id %} 4 | */ 5 | 6 | 'use strict' 7 | 8 | module.exports = (ctx) => 9 | function (args) { 10 | const { v_id } = ctx.args.map(args, [], ['v_id']) 11 | return `` 13 | } 14 | -------------------------------------------------------------------------------- /source/css/_components/widgets/timeline.styl: -------------------------------------------------------------------------------- 1 | .widget-wrapper.timeline 2 | .widget-body 3 | margin-top: 0.5rem 4 | .tag-plugin.timeline .timenode 5 | .header 6 | margin-bottom: 0.5rem 7 | txt-ellipsis() 8 | .user-info 9 | background: var(--block) 10 | &:hover 11 | background: $color-hover 12 | color: var(--card) 13 | &:before 14 | display: none 15 | &+.timenode 16 | margin-top: 0.75rem 17 | -------------------------------------------------------------------------------- /scripts/events/index.js: -------------------------------------------------------------------------------- 1 | /* global hexo */ 2 | 3 | 'use strict' 4 | 5 | hexo.on('generateBefore', () => { 6 | // Merge config. 7 | require('./lib/config')(hexo) 8 | require('./lib/doc_tree')(hexo) 9 | require('./lib/utils')(hexo) 10 | }) 11 | 12 | hexo.on('ready', () => { 13 | const { version, homepage, repository } = require('../../package.json') 14 | hexo.log.info(`Welcome to Stellaris ${version} 15 | DOCS ${homepage} 16 | REPO ${repository.url} 17 | `) 18 | }) 19 | -------------------------------------------------------------------------------- /source/css/_components/tag-plugins/hashtag.styl: -------------------------------------------------------------------------------- 1 | .md-text .tag-plugin.hashtag 2 | padding: 0px 8px 3 | border-radius: 100px 4 | background: var(--theme-block) 5 | color: var(--text-p2) 6 | margin: 2px 0 7 | display: inline-flex 8 | align-items: center 9 | --fsp: $fsp2 10 | font-size: var(--fsp) 11 | font-weight: 500 12 | trans2 background color 13 | span 14 | margin: 0 2px 15 | &:hover 16 | background: var(--text-p2) 17 | color: var(--theme-block) 18 | -------------------------------------------------------------------------------- /scripts/helpers/scrollreveal.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | hexo.extend.helper.register('scroll_reveal', function (args) { 4 | const cfg = hexo.theme.config 5 | if (cfg.plugins.scrollreveal && cfg.plugins.scrollreveal.enabled) { 6 | return ' reveal' 7 | } 8 | return '' 9 | }) 10 | 11 | // 兼容 12 | 13 | hexo.extend.helper.register('scrollreveal', function (args) { 14 | const cfg = hexo.theme.config 15 | if (cfg.plugins.scrollreveal && cfg.plugins.scrollreveal.enabled) { 16 | return ' reveal' 17 | } 18 | return '' 19 | }) 20 | -------------------------------------------------------------------------------- /source/css/_common/html.styl: -------------------------------------------------------------------------------- 1 | * 2 | outline: none 3 | html 4 | color-scheme: var(--color-scheme) 5 | font-family: $ff-body 6 | font-size: $fs-root 7 | -webkit-text-size-adjust: 100% 8 | -ms-text-size-adjust: 100% 9 | if hexo-config('style.smooth_scroll') 10 | scroll-behavior: smooth 11 | body 12 | background: var(--site-bg) 13 | margin: 0 14 | -webkit-font-smoothing: antialiased 15 | -moz-osx-font-smoothing: grayscale 16 | text-rendering: optimizelegibility 17 | -webkit-tap-highlight-color: rgba(0, 0, 0, 0) 18 | -------------------------------------------------------------------------------- /source/css/_components/main.styl: -------------------------------------------------------------------------------- 1 | .l_main 2 | position: relative 3 | padding-bottom: "calc(1 * %s)" % var(--gap-l) 4 | @media screen and (min-width: 1400px) 5 | margin-left: "calc(2 * %s)" % var(--gap-l) 6 | margin-right: "calc(2 * %s + %s / 2)" % (var(--gap-l) var(--width-left)) 7 | @media screen and (min-width: $device-mobile-max) 8 | padding-top: "calc(2 * %s)" % var(--gap-l) 9 | @media screen and (max-width: $device-mobile-max) 10 | padding-top: 1rem 11 | header 12 | margin: 2rem 1rem 1rem 13 | .logo-wrap 14 | margin: 0 15 | -------------------------------------------------------------------------------- /layout/components/main/post_list/paginator.jsx: -------------------------------------------------------------------------------- 1 | const Paginator = (props) => { 2 | const { paginator, page, is_home } = props 3 | if (is_home() && page.total > 1) { 4 | return ( 5 |
15 | ) 16 | } else { 17 | return <> 18 | } 19 | } 20 | 21 | module.exports = Paginator 22 | -------------------------------------------------------------------------------- /scripts/helpers/utils.js: -------------------------------------------------------------------------------- 1 | /** 2 | * utils v1 | https://github.com/xaoxuu/hexo-theme-stellar/ 3 | */ 4 | 5 | 'use strict' 6 | 7 | hexo.extend.helper.register('get_page', function (id) { 8 | const pages = hexo.locals.get('pages') 9 | let page = pages.data.find((element) => element._id == id) 10 | if (page && page._id == id) { 11 | return page 12 | } else { 13 | const posts = hexo.locals.get('posts') 14 | let post = posts.data.find((element) => element._id == id) 15 | if (post && post._id == id) { 16 | return post 17 | } 18 | } 19 | return null 20 | }) 21 | -------------------------------------------------------------------------------- /source/css/_plugins/copycode.styl: -------------------------------------------------------------------------------- 1 | .highlight 2 | position: relative 3 | 4 | .highlight .code .copy-btn 5 | position: absolute 6 | top: 0 7 | right: 0 8 | padding: 4px 0.5rem 9 | opacity: 0 10 | font-weight: 700 11 | color: var(--theme) 12 | cursor: pointer 13 | 14 | .highlight:hover .copy-btn 15 | opacity 0.25 16 | 17 | .highlight .code .copy-btn:hover 18 | color: var(--theme) 19 | opacity: 0.75 20 | 21 | .highlight .code .copy-btn.success 22 | color: $c-green 23 | opacity: 0.75 24 | 25 | .highlight .code .copy-btn.warning 26 | color: $c-orange 27 | opacity: 0.75 -------------------------------------------------------------------------------- /source/css/_components/tag-plugins/navbar.styl: -------------------------------------------------------------------------------- 1 | .md-text .tag-plugin.navbar 2 | text-align: center 3 | nav.cap 4 | margin: 0 5 | padding: 1px 6 | background: var(--card) 7 | box-shadow: $boxshadow-button 8 | border-radius: 6px 9 | display: inline-flex 10 | max-width: 100% 11 | a 12 | margin: 1px 13 | padding: 0.25em 0.75rem 14 | color: var(--text-p2) 15 | &:after 16 | display: none 17 | &:hover 18 | background: var(--block) 19 | &.active 20 | background: var(--block) 21 | box-shadow: none 22 | color: var(--text-p1) -------------------------------------------------------------------------------- /layout/components/widgets/markdown.jsx: -------------------------------------------------------------------------------- 1 | const Markdown = (props) => { 2 | const { markdown } = props 3 | if (!props.content?.length) return <> 4 | return ( 5 | 6 | {props.title?.length > 0 && ( 7 |
8 | {props.title} 9 |
10 | )} 11 |
15 | 16 | ) 17 | } 18 | 19 | module.exports = Markdown 20 | -------------------------------------------------------------------------------- /source/css/_components/pages/error.styl: -------------------------------------------------------------------------------- 1 | .md-text.error-page 2 | text-align: center 3 | margin-top: 2rem 4 | img#error 5 | width: 30vw 6 | max-height: 150px 7 | margin-bottom: 2rem 8 | h1 9 | font-size: 4rem 10 | margin-bottom: 0 11 | p.what,p.why 12 | margin: 0.5em 13 | p.why 14 | font-size: $fs-13 15 | a#back 16 | margin: 2rem 0 17 | display: inline-block 18 | background: #FDB62F 19 | color: black 20 | border-radius: 4px 21 | border: 2px solid black 22 | 23 | @media screen and (max-width: $device-tablet) 24 | .md-text.error-page 25 | margin-top: 4rem 26 | -------------------------------------------------------------------------------- /layout/components/plugins/comments/script.jsx: -------------------------------------------------------------------------------- 1 | const { Fragment } = require('react') 2 | 3 | const CommentsScript = (props) => { 4 | const commentService = props.theme.comments.service 5 | if (commentService === false || commentService === null) { 6 | return 7 | } else { 8 | try { 9 | const CommentScript = require(`./${commentService}/script.jsx`) 10 | return 11 | } catch (e) { 12 | if (e.code === 'MODULE_NOT_FOUND') { 13 | return 14 | } else { 15 | throw e 16 | } 17 | } 18 | } 19 | } 20 | 21 | module.exports = CommentsScript 22 | -------------------------------------------------------------------------------- /layout/components/plugins/katex/script.jsx: -------------------------------------------------------------------------------- 1 | const KatexScripts = (props) => { 2 | const { theme } = props 3 | const { plugins } = theme 4 | const { katex } = plugins 5 | const { enabled, css } = katex 6 | 7 | if (enabled) { 8 | const loadMathStylesheet = ` 9 | function loadKatex() { 10 | console.log('KaTeX enabled') 11 | stellar.loadCSS('${css}') 12 | } 13 | loadKatex() 14 | ` 15 | return ( 16 | <> 17 |