├── .vscode └── settings.json ├── README.md ├── assets ├── optimizing-react-app-with-immutable-data.key └── wechat.jpg ├── demos └── .gitkeep ├── deploy.sh ├── diagrams ├── demo.wsd ├── fed-mind.wsd ├── git-flow.wsd ├── react-lifestyle.wsd ├── react-mounting.wsd ├── react-receive-update.wsd ├── react-set-state-pitfall.wsd ├── react-unmounting.wsd ├── redux-thunk.wsd ├── set-state.wsd └── tcp.wsd ├── docs ├── 2018.md ├── _drafts │ └── how_to_print_properties_of_the_object_by_originally.md ├── adb-connect.md ├── adb-shell.md ├── all-you-loved-has-gone.md ├── android-studio-install.md ├── chinese-chess.md ├── cycle-of-dilemma.md ├── design-logo.md ├── easy-shell-script-ssh-login.md ├── fork__why-do-we-write-super-props.md ├── hello-world.md ├── hello_world.md ├── how-to-print-properties-of-the-object-by-originally.md ├── html-head-meta.md ├── html-sematic-markup.md ├── js-type.md ├── love-you-too.md ├── optimizing-react-app-with-immutable-data.md ├── plantuml.md ├── redux-middleware.md ├── redux-source-code.md ├── redux-thunk-source-code.md ├── root-primary.md ├── self-doubt.md └── ssh-config.md ├── hexo ├── .gitignore ├── _config.yml ├── package.json ├── scaffolds │ ├── draft.md │ ├── page.md │ └── post.md ├── source │ ├── CNAME │ ├── _posts │ ├── about │ │ └── index.md │ ├── archives │ │ └── index.md │ ├── categories │ │ └── index.md │ ├── diagrams │ │ ├── demo │ │ │ └── git-flow.svg │ │ ├── fed-mind │ │ │ └── javascript.svg │ │ ├── git-flow │ │ │ └── git-flow.svg │ │ ├── react-lifestyle │ │ │ └── react-lifestyle.svg │ │ ├── react-mounting │ │ │ └── react-mounting.svg │ │ ├── react-receive-update │ │ │ └── react-receive-update.svg │ │ ├── react-set-state-pitfall │ │ │ └── react-set-state-pitfall.svg │ │ ├── react-unmounting │ │ │ └── react-unmounting.svg │ │ ├── redux-thunk │ │ │ └── dispatch.svg │ │ ├── set-state │ │ │ └── set-state.svg │ │ ├── tcp-intro │ │ │ └── tcp-intro.svg │ │ └── tcp │ │ │ ├── tcp-connect.svg │ │ │ └── tcp-intro.svg │ ├── images │ │ ├── android-chrome-192x192.png │ │ ├── apple-touch-icon.png │ │ ├── browserconfig.xml │ │ ├── favicon-16x16.png │ │ ├── favicon-32x32.png │ │ ├── favicon.ico │ │ ├── mstile-150x150.png │ │ ├── safari-pinned-tab.svg │ │ └── site.webmanifest │ ├── tags │ │ └── index.md │ ├── translated │ │ └── index.md │ └── writings │ │ └── index.md ├── themes │ ├── _config.yml │ ├── modernist │ │ ├── .gitignore │ │ ├── LICENSE │ │ ├── README.md │ │ ├── _config.yml │ │ ├── languages │ │ │ ├── default.yml │ │ │ └── zh-CN.yml │ │ ├── layout │ │ │ ├── _partial │ │ │ │ ├── after-footer.ejs │ │ │ │ ├── archive-post.ejs │ │ │ │ ├── archive.ejs │ │ │ │ ├── article.ejs │ │ │ │ ├── comment.ejs │ │ │ │ ├── footer.ejs │ │ │ │ ├── google-analytics.ejs │ │ │ │ ├── head.ejs │ │ │ │ ├── header.ejs │ │ │ │ ├── pagination.ejs │ │ │ │ └── post │ │ │ │ │ ├── category.ejs │ │ │ │ │ ├── date.ejs │ │ │ │ │ ├── gallery.ejs │ │ │ │ │ ├── tag.ejs │ │ │ │ │ └── title.ejs │ │ │ ├── archive.ejs │ │ │ ├── index.ejs │ │ │ ├── layout.ejs │ │ │ ├── page.ejs │ │ │ ├── post.ejs │ │ │ └── tag.ejs │ │ └── source │ │ │ ├── css │ │ │ ├── _base │ │ │ │ ├── layout.styl │ │ │ │ └── variable.styl │ │ │ ├── _partial │ │ │ │ ├── archive.styl │ │ │ │ ├── article.styl │ │ │ │ ├── comment.styl │ │ │ │ ├── footer.styl │ │ │ │ ├── header.styl │ │ │ │ ├── index.styl │ │ │ │ └── syntax.styl │ │ │ ├── fonts │ │ │ │ ├── FontAwesome.otf │ │ │ │ ├── fontawesome-webfont.eot │ │ │ │ ├── fontawesome-webfont.svg │ │ │ │ ├── fontawesome-webfont.ttf │ │ │ │ └── fontawesome-webfont.woff │ │ │ ├── images │ │ │ │ └── checker.png │ │ │ └── style.styl │ │ │ ├── fancybox │ │ │ ├── blank.gif │ │ │ ├── fancybox_loading.gif │ │ │ ├── fancybox_overlay.png │ │ │ ├── fancybox_sprite.png │ │ │ ├── jquery.fancybox.css │ │ │ └── jquery.fancybox.pack.js │ │ │ ├── favicon.png │ │ │ └── js │ │ │ ├── gallery.js │ │ │ ├── jquery.imagesloaded.min.js │ │ │ ├── moment.min.js │ │ │ └── scale.fix.js │ └── next │ │ ├── .all-contributorsrc │ │ ├── .bowerrc │ │ ├── .editorconfig │ │ ├── .eslintrc.json │ │ ├── .gitattributes │ │ ├── .github │ │ ├── CODE_OF_CONDUCT.md │ │ ├── CONTRIBUTING.md │ │ ├── ISSUE_TEMPLATE.md │ │ ├── ISSUE_TEMPLATE │ │ │ ├── bug-report.md │ │ │ ├── custom-issue-template.md │ │ │ ├── feature-request.md │ │ │ └── non-english.md │ │ ├── PULL_REQUEST_TEMPLATE.md │ │ └── stale.yml │ │ ├── .gitignore │ │ ├── .stylintrc │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── _config.yml │ │ ├── bower.json │ │ ├── crowdin.yml │ │ ├── docs │ │ ├── AGPL3.md │ │ ├── ALGOLIA-SEARCH.md │ │ ├── AUTHORS.md │ │ ├── DATA-FILES.md │ │ ├── INSTALLATION.md │ │ ├── LEANCLOUD-COUNTER-SECURITY.md │ │ ├── LICENSE.txt │ │ ├── MATH.md │ │ ├── UPDATE-FROM-5.1.X.md │ │ ├── ru │ │ │ ├── DATA-FILES.md │ │ │ ├── INSTALLATION.md │ │ │ ├── README.md │ │ │ └── UPDATE-FROM-5.1.X.md │ │ └── zh-CN │ │ │ ├── ALGOLIA-SEARCH.md │ │ │ ├── CODE_OF_CONDUCT.md │ │ │ ├── CONTRIBUTING.md │ │ │ ├── DATA-FILES.md │ │ │ ├── INSTALLATION.md │ │ │ ├── LEANCLOUD-COUNTER-SECURITY.md │ │ │ ├── MATH.md │ │ │ ├── README.md │ │ │ └── UPDATE-FROM-5.1.X.md │ │ ├── gulpfile.coffee │ │ ├── languages │ │ ├── de.yml │ │ ├── default.yml │ │ ├── en.yml │ │ ├── fr.yml │ │ ├── id.yml │ │ ├── it.yml │ │ ├── ja.yml │ │ ├── ko.yml │ │ ├── nl.yml │ │ ├── pt-BR.yml │ │ ├── pt.yml │ │ ├── ru.yml │ │ ├── tr.yml │ │ ├── uk.yml │ │ ├── vi.yml │ │ ├── zh-CN.yml │ │ ├── zh-HK.yml │ │ └── zh-TW.yml │ │ ├── layout │ │ ├── _custom │ │ │ ├── footer.swig │ │ │ ├── head.swig │ │ │ ├── header.swig │ │ │ └── sidebar.swig │ │ ├── _layout.swig │ │ ├── _macro │ │ │ ├── menu │ │ │ │ ├── menu-badge.swig │ │ │ │ └── menu-item.swig │ │ │ ├── post-collapse.swig │ │ │ ├── post.swig │ │ │ └── sidebar.swig │ │ ├── _partials │ │ │ ├── comments.swig │ │ │ ├── footer.swig │ │ │ ├── github-banner.swig │ │ │ ├── head │ │ │ │ ├── external-fonts.swig │ │ │ │ ├── head-unique.swig │ │ │ │ └── head.swig │ │ │ ├── header │ │ │ │ ├── brand.swig │ │ │ │ ├── index.swig │ │ │ │ ├── menu.swig │ │ │ │ └── sub-menu.swig │ │ │ ├── page │ │ │ │ ├── breadcrumb.swig │ │ │ │ └── page-header.swig │ │ │ ├── pagination.swig │ │ │ ├── post-edit.swig │ │ │ ├── post │ │ │ │ ├── post-copyright.swig │ │ │ │ ├── post-related.swig │ │ │ │ ├── reward.swig │ │ │ │ └── wechat-subscriber.swig │ │ │ ├── search │ │ │ │ ├── algolia-search.swig │ │ │ │ ├── index.swig │ │ │ │ ├── localsearch.swig │ │ │ │ └── swiftype.swig │ │ │ └── share │ │ │ │ ├── add-this.swig │ │ │ │ ├── baidushare.swig │ │ │ │ └── likely.swig │ │ ├── _scripts │ │ │ ├── commons.swig │ │ │ ├── exturl.swig │ │ │ ├── next-boot.swig │ │ │ ├── noscript.swig │ │ │ ├── pages │ │ │ │ └── post-details.swig │ │ │ ├── schemes │ │ │ │ ├── gemini.swig │ │ │ │ ├── mist.swig │ │ │ │ ├── muse.swig │ │ │ │ └── pisces.swig │ │ │ ├── scroll-cookie.swig │ │ │ └── vendors.swig │ │ ├── _third-party │ │ │ ├── analytics │ │ │ │ ├── analytics-with-widget.swig │ │ │ │ ├── application-insights.swig │ │ │ │ ├── baidu-analytics.swig │ │ │ │ ├── busuanzi-counter.swig │ │ │ │ ├── cnzz-analytics.swig │ │ │ │ ├── facebook-sdk.swig │ │ │ │ ├── firestore.swig │ │ │ │ ├── google-analytics.swig │ │ │ │ ├── growingio.swig │ │ │ │ ├── index.swig │ │ │ │ ├── lean-analytics.swig │ │ │ │ ├── tencent-analytics.swig │ │ │ │ ├── tencent-mta.swig │ │ │ │ └── vkontakte-api.swig │ │ │ ├── baidu-push.swig │ │ │ ├── bookmark.swig │ │ │ ├── chatra.swig │ │ │ ├── comments │ │ │ │ ├── changyan.swig │ │ │ │ ├── disqus.swig │ │ │ │ ├── gitalk.swig │ │ │ │ ├── gitment.swig │ │ │ │ ├── index.swig │ │ │ │ ├── livere.swig │ │ │ │ └── valine.swig │ │ │ ├── copy-code.swig │ │ │ ├── math │ │ │ │ ├── index.swig │ │ │ │ ├── katex.swig │ │ │ │ └── mathjax.swig │ │ │ ├── mermaid.swig │ │ │ ├── needsharebutton.swig │ │ │ ├── pangu.swig │ │ │ ├── pdf.swig │ │ │ ├── quicklink.swig │ │ │ ├── rating.swig │ │ │ ├── schedule.swig │ │ │ ├── search │ │ │ │ ├── algolia-search.swig │ │ │ │ ├── index.swig │ │ │ │ └── localsearch.swig │ │ │ └── tidio.swig │ │ ├── archive.swig │ │ ├── category.swig │ │ ├── index.swig │ │ ├── page.swig │ │ ├── post.swig │ │ ├── schedule.swig │ │ ├── tag.swig │ │ ├── translated.swig │ │ └── writing.swig │ │ ├── package.json │ │ ├── scripts │ │ ├── filters │ │ │ └── exturl.js │ │ ├── helpers │ │ │ ├── engine.js │ │ │ └── next-url.js │ │ ├── merge-configs.js │ │ ├── merge.js │ │ └── tags │ │ │ ├── button.js │ │ │ ├── center-quote.js │ │ │ ├── exturl.js │ │ │ ├── full-image.js │ │ │ ├── group-pictures.js │ │ │ ├── include-raw.js │ │ │ ├── label.js │ │ │ ├── mermaid.js │ │ │ ├── note.js │ │ │ ├── pdf.js │ │ │ ├── tabs.js │ │ │ └── video.js │ │ ├── source │ │ ├── css │ │ │ ├── _common │ │ │ │ ├── components │ │ │ │ │ ├── back-to-top-sidebar.styl │ │ │ │ │ ├── back-to-top.styl │ │ │ │ │ ├── buttons.styl │ │ │ │ │ ├── comments.styl │ │ │ │ │ ├── components.styl │ │ │ │ │ ├── footer │ │ │ │ │ │ └── footer.styl │ │ │ │ │ ├── header │ │ │ │ │ │ ├── github-banner.styl │ │ │ │ │ │ ├── header.styl │ │ │ │ │ │ ├── headerband.styl │ │ │ │ │ │ ├── menu.styl │ │ │ │ │ │ ├── site-meta.styl │ │ │ │ │ │ └── site-nav.styl │ │ │ │ │ ├── highlight │ │ │ │ │ │ ├── diff.styl │ │ │ │ │ │ ├── highlight.styl │ │ │ │ │ │ └── theme.styl │ │ │ │ │ ├── pages │ │ │ │ │ │ ├── archive.styl │ │ │ │ │ │ ├── breadcrumb.styl │ │ │ │ │ │ ├── categories.styl │ │ │ │ │ │ ├── pages.styl │ │ │ │ │ │ ├── post-detail.styl │ │ │ │ │ │ └── schedule.styl │ │ │ │ │ ├── pagination.styl │ │ │ │ │ ├── post │ │ │ │ │ │ ├── post-button.styl │ │ │ │ │ │ ├── post-collapse.styl │ │ │ │ │ │ ├── post-copyright.styl │ │ │ │ │ │ ├── post-eof.styl │ │ │ │ │ │ ├── post-expand.styl │ │ │ │ │ │ ├── post-gallery.styl │ │ │ │ │ │ ├── post-meta.styl │ │ │ │ │ │ ├── post-nav.styl │ │ │ │ │ │ ├── post-reading_progress.styl │ │ │ │ │ │ ├── post-reward.styl │ │ │ │ │ │ ├── post-rtl.styl │ │ │ │ │ │ ├── post-tags.styl │ │ │ │ │ │ ├── post-title.styl │ │ │ │ │ │ ├── post-type.styl │ │ │ │ │ │ ├── post-widgets.styl │ │ │ │ │ │ └── post.styl │ │ │ │ │ ├── sidebar │ │ │ │ │ │ ├── sidebar-author-links.styl │ │ │ │ │ │ ├── sidebar-author.styl │ │ │ │ │ │ ├── sidebar-blogroll.styl │ │ │ │ │ │ ├── sidebar-chat.styl │ │ │ │ │ │ ├── sidebar-dimmer.styl │ │ │ │ │ │ ├── sidebar-feed-link.styl │ │ │ │ │ │ ├── sidebar-nav.styl │ │ │ │ │ │ ├── sidebar-toc.styl │ │ │ │ │ │ ├── sidebar-toggle.styl │ │ │ │ │ │ ├── sidebar.styl │ │ │ │ │ │ └── site-state.styl │ │ │ │ │ ├── tag-cloud.styl │ │ │ │ │ ├── tags │ │ │ │ │ │ ├── blockquote-center.styl │ │ │ │ │ │ ├── full-image.styl │ │ │ │ │ │ ├── group-pictures.styl │ │ │ │ │ │ ├── label.styl │ │ │ │ │ │ ├── note-modern.styl │ │ │ │ │ │ ├── note.styl │ │ │ │ │ │ ├── pdf.styl │ │ │ │ │ │ ├── tabs.styl │ │ │ │ │ │ └── tags.styl │ │ │ │ │ └── third-party │ │ │ │ │ │ ├── algolia-search.styl │ │ │ │ │ │ ├── copy-code.styl │ │ │ │ │ │ ├── gitalk.styl │ │ │ │ │ │ ├── gitment.styl │ │ │ │ │ │ ├── han.styl │ │ │ │ │ │ ├── localsearch.styl │ │ │ │ │ │ ├── math.styl │ │ │ │ │ │ ├── needsharebutton.styl │ │ │ │ │ │ ├── related-posts.styl │ │ │ │ │ │ └── third-party.styl │ │ │ │ ├── outline │ │ │ │ │ └── outline.styl │ │ │ │ └── scaffolding │ │ │ │ │ ├── base.styl │ │ │ │ │ ├── helpers.styl │ │ │ │ │ ├── mobile.styl │ │ │ │ │ ├── normalize.styl │ │ │ │ │ ├── scaffolding.styl │ │ │ │ │ └── tables.styl │ │ │ ├── _custom │ │ │ │ └── custom.styl │ │ │ ├── _mixins │ │ │ │ ├── Gemini.styl │ │ │ │ ├── Mist.styl │ │ │ │ ├── Muse.styl │ │ │ │ ├── Pisces.styl │ │ │ │ ├── base.styl │ │ │ │ └── custom.styl │ │ │ ├── _schemes │ │ │ │ ├── Gemini │ │ │ │ │ └── index.styl │ │ │ │ ├── Mist │ │ │ │ │ ├── _base.styl │ │ │ │ │ ├── _header.styl │ │ │ │ │ ├── _logo.styl │ │ │ │ │ ├── _menu.styl │ │ │ │ │ ├── _posts-expanded.styl │ │ │ │ │ ├── _search.styl │ │ │ │ │ ├── index.styl │ │ │ │ │ ├── outline │ │ │ │ │ │ └── outline.styl │ │ │ │ │ └── sidebar │ │ │ │ │ │ └── sidebar-blogroll.styl │ │ │ │ ├── Muse │ │ │ │ │ ├── _layout.styl │ │ │ │ │ ├── _logo.styl │ │ │ │ │ ├── _menu.styl │ │ │ │ │ ├── _search.styl │ │ │ │ │ ├── index.styl │ │ │ │ │ └── sidebar │ │ │ │ │ │ └── sidebar-blogroll.styl │ │ │ │ └── Pisces │ │ │ │ │ ├── _brand.styl │ │ │ │ │ ├── _layout.styl │ │ │ │ │ ├── _menu.styl │ │ │ │ │ ├── _posts.styl │ │ │ │ │ ├── _sidebar.styl │ │ │ │ │ ├── _sub-menu.styl │ │ │ │ │ └── index.styl │ │ │ ├── _variables │ │ │ │ ├── Gemini.styl │ │ │ │ ├── Mist.styl │ │ │ │ ├── Muse.styl │ │ │ │ ├── Pisces.styl │ │ │ │ ├── base.styl │ │ │ │ └── custom.styl │ │ │ ├── lib │ │ │ │ └── prism.css │ │ │ └── main.styl │ │ ├── fonts │ │ │ └── .gitkeep │ │ ├── images │ │ │ ├── algolia_logo.svg │ │ │ ├── apple-touch-icon-next.png │ │ │ ├── avatar.gif │ │ │ ├── cc-by-nc-nd.svg │ │ │ ├── cc-by-nc-sa.svg │ │ │ ├── cc-by-nc.svg │ │ │ ├── cc-by-nd.svg │ │ │ ├── cc-by-sa.svg │ │ │ ├── cc-by.svg │ │ │ ├── cc-zero.svg │ │ │ ├── favicon-16x16-next.png │ │ │ ├── favicon-32x32-next.png │ │ │ ├── loading.gif │ │ │ ├── logo.svg │ │ │ ├── placeholder.gif │ │ │ ├── quote-l.svg │ │ │ ├── quote-r.svg │ │ │ └── searchicon.png │ │ ├── js │ │ │ ├── lib │ │ │ │ └── prism.js │ │ │ └── src │ │ │ │ ├── affix.js │ │ │ │ ├── algolia-search.js │ │ │ │ ├── exturl.js │ │ │ │ ├── js.cookie.js │ │ │ │ ├── motion.js │ │ │ │ ├── next-boot.js │ │ │ │ ├── post-details.js │ │ │ │ ├── schemes │ │ │ │ ├── muse.js │ │ │ │ └── pisces.js │ │ │ │ ├── scroll-cookie.js │ │ │ │ ├── scrollspy.js │ │ │ │ └── utils.js │ │ └── lib │ │ │ ├── jquery │ │ │ └── index.js │ │ │ └── velocity │ │ │ ├── velocity.js │ │ │ ├── velocity.min.js │ │ │ ├── velocity.ui.js │ │ │ └── velocity.ui.min.js │ │ └── test │ │ ├── .jshintrc │ │ ├── helpers.js │ │ └── intern.js └── yarn.lock └── yarn.lock /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "plantuml.includeSearch": "DiagramsRoot", 3 | "plantuml.diagramsRoot": "diagrams", 4 | "plantuml.exportOutDir": "hexo/source/diagrams" 5 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 博客 & 北端 2 | === 3 | 分享生活、奇趣和技术 4 | 5 | >         过去我曾效仿很多优秀博主,想打造一个“有积累”的技术博客,定个每周一文的 flag,最后往往无疾而终。这是否意味着我缺乏沉淀知识的能力?不,这只能说明我并不擅长写文章,除此之外,我依然热爱写代码,兴奋起来可以废寝忘食。 6 | > 7 | >         我们不必盯着“优秀案例”的影子来苛求自己,每个人都有自己的路,善于总结是非常棒的习惯,但不要为了写而写,努力去发掘自己擅长的能力,把时间花在自己真正热爱的领域,沉浸其中享受成长,等有了更深刻的领悟再来做分享也永远不迟。 8 | 9 | ## 分享 10 | 11 | - [GitHub Issues](https://github.com/liangzr/blog/issues): 有探讨性的专业技术分享 12 | - [独立 Blog](#):玩转技术-生活向(翻新中) 13 | - 微信公众号: 奇思、见闻与生活 14 | 15 | 16 | 17 | 18 | License 19 | --- 20 | 所有文章采用[知识共享署名-非商业性使用-相同方式共享 3.0 中国大陆许可协议](http://creativecommons.org/licenses/by-nc-sa/3.0/cn/)进行许可。 -------------------------------------------------------------------------------- /assets/optimizing-react-app-with-immutable-data.key: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liangzr/blog/49cb2c5d1f01aee0017833624a8e3831b2ff5874/assets/optimizing-react-app-with-immutable-data.key -------------------------------------------------------------------------------- /assets/wechat.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liangzr/blog/49cb2c5d1f01aee0017833624a8e3831b2ff5874/assets/wechat.jpg -------------------------------------------------------------------------------- /demos/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liangzr/blog/49cb2c5d1f01aee0017833624a8e3831b2ff5874/demos/.gitkeep -------------------------------------------------------------------------------- /deploy.sh: -------------------------------------------------------------------------------- 1 | cd hexo 2 | hexo clean 3 | hexo deploy -------------------------------------------------------------------------------- /diagrams/demo.wsd: -------------------------------------------------------------------------------- 1 | @startuml git-flow 2 | participant master order 0 3 | participant develop order 1 4 | participant feature order 2 5 | participant release order 3 6 | participant hotfix order -1 7 | 8 | autonumber 9 | develop -> feature : 新分支 10 | feature -> feature : 功能点 11 | feature -> develop : 合并到开发分支 12 | develop -> release : 预发布 13 | release -> release : bug 修复 14 | 15 | autonumber 6 0 16 | release -> master : 发布合并 17 | release -> develop : 发布合并 18 | 19 | autonumber 20 | master -> hotfix : 处理线上 bug 21 | hotfix -> hotfix : bug 修复 22 | 23 | autonumber 3 0 24 | hotfix -> master : 发布合并 25 | hotfix -> develop : 发布合并 26 | @enduml -------------------------------------------------------------------------------- /diagrams/fed-mind.wsd: -------------------------------------------------------------------------------- 1 | @startmindmap javascript 2 | title JavaScript 结构 3 | 4 | * JavaScript 5 | ** 运行时 6 | *** 数据结构 7 | **** 类型 8 | ***** 7 种语言类型 9 | ***** 7 种规范类型 10 | **** 实例(内置对象) 11 | *** 执行过程 12 | **** 事件循环 13 | **** 微任务执行 14 | **** 函数执行 15 | **** 语句执行 16 | ** 文法 17 | *** 词法 18 | *** 语法 19 | ** 语义 20 | 21 | @endmindmap -------------------------------------------------------------------------------- /diagrams/git-flow.wsd: -------------------------------------------------------------------------------- 1 | @startuml git-flow 2 | participant master order 0 3 | participant develop order 1 4 | participant feature order 2 5 | participant release order 3 6 | participant hotfix order -1 7 | 8 | autonumber 9 | develop -> feature : 新分支 10 | feature -> feature : 功能点 11 | feature -> develop : 合并到开发分支 12 | develop -> release : 预发布 13 | release -> release : bug 修复 14 | 15 | autonumber 6 0 16 | release -> master : 发布合并 17 | release -> develop : 发布合并 18 | 19 | autonumber 20 | master -> hotfix : 处理线上 bug 21 | hotfix -> hotfix : bug 修复 22 | 23 | autonumber 3 0 24 | hotfix -> master : 发布合并 25 | hotfix -> develop : 发布合并 26 | @enduml -------------------------------------------------------------------------------- /diagrams/react-lifestyle.wsd: -------------------------------------------------------------------------------- 1 | @startuml react-lifestyle 2 | 3 | start 4 | 5 | floating note left 6 | 🔴不可 setState 7 | ✅可以 setState 8 | 🌀合并 setState 9 | end note 10 | 11 | partition MOUTING { 12 | #82F49C:🔴getDefaultProps; 13 | floating note right 14 | 只在初始化组件元素时调用 15 | 所以只执行一次 16 | end note 17 | 18 | #82F49C:🔴getIntialState; 19 | 20 | #82F49C:🌀componentWillMount; 21 | floating note right 22 | 初始化 state 等操作 23 | 建议都在 constructor 中做处理 24 | end note 25 | 26 | #82F49C:🔴render; 27 | #82F49C:✅componentDidMount; 28 | floating note right 29 | 有些例如获取 DOM 元素的位置等操作只有在 30 | 渲染之后才能得到,可以在这里做处理 31 | end note 32 | } 33 | 34 | partition RECEIVE-PROPS { 35 | #82F49C:🌀componentWillReceiveProps; 36 | floating note right 37 | 可以用来处理props改变时,更新state 38 | end note 39 | 40 | #82F49C:🔴shouleComponentUpdate; 41 | floating note right 42 | 返回 true 或 false 来决定组件是否要重新渲染 43 | 但不管是否重新渲染,属性状态都会更新 44 | end note 45 | 46 | #82F49C:🔴componentWillUpdate; 47 | floating note right 48 | 在更新之前对组件的状态做保存 49 | end note 50 | 51 | #82F49C:🔴render; 52 | #82F49C:✅componentDidUpdate; 53 | floating note right 54 | 类似 componentDidMount 55 | end note 56 | } 57 | 58 | partition UNMOUNTING { 59 | #82F49C:🔴componentWillUnmount; 60 | floating note right 61 | 可以在这个方法中进行取消事件监听等操作 62 | 避免内存泄漏 63 | end note 64 | } 65 | 66 | 67 | end 68 | 69 | @enduml 70 | -------------------------------------------------------------------------------- /diagrams/react-mounting.wsd: -------------------------------------------------------------------------------- 1 | @startuml react-mounting 2 | 3 | |mountComponent挂载组件| 4 | start 5 | 6 | :初始化props和context; 7 | :执行构造函数获得实例; 8 | 9 | if (无状态组件OK) then (yes) 10 | :渲染无状态组件; 11 | note left 12 | 无状态组件没有状态更新队列 13 | 只专注于渲染 14 | end note 15 | endif 16 | 17 | :重新初始化类属性; 18 | 19 | note right 20 | 为类抽象兜底,即使用户 21 | 没有正确地调用 super() 22 | end note 23 | 24 | :初始化state; 25 | :初始化更新队列; 26 | note right 27 | _pendingStateQueue = null 28 | _pendingReplaceState = false 29 | _pendingForceUpdate = false 30 | end note 31 | 32 | |#FAEBD7|performIntialMount执行挂载| 33 | 34 | #82F49C:componentWillMount; 35 | 36 | if (更新队列不为空) then (yes) 37 | :合并state; 38 | note left 39 | 此时不会多次render 40 | end note 41 | 42 | endif 43 | 44 | if (无状态组件) then (no) 45 | :创建Component实例; 46 | endif 47 | 48 | #82F49C:递归render; 49 | note right 50 | 调用 ReactReconciler.mountComponent 51 | 递归地渲染子组件,子组件渲染成功后,父组件 52 | 才渲染完成 53 | end note 54 | 55 | |mountComponent挂载组件| 56 | 57 | #82F49C:componentDidMount; 58 | 59 | end 60 | 61 | @enduml -------------------------------------------------------------------------------- /diagrams/react-receive-update.wsd: -------------------------------------------------------------------------------- 1 | @startuml react-receive-update 2 | 3 | |updateComponent更新组件| 4 | start 5 | 6 | :初始化缓存属性; 7 | note right 8 | nextContext, nextProps 9 | end note 10 | 11 | if (context改变) then (yes) 12 | :更新处理context; 13 | note left 14 | 只保留被 contextTypes 15 | 声明的 context 16 | end note 17 | else (no) 18 | :更新context缓存; 19 | endif 20 | 21 | :更新props; 22 | 23 | if ( 24 | 如果context或element改变 25 | && 26 | 有componentWillReceiveProps 27 | ) then (yes) 28 | #82F49C:componentWillReceiveProps; 29 | 30 | endif 31 | 32 | :合并state; 33 | note left 34 | 此时不会多次render 35 | end note 36 | 37 | #82F49C:shouldUpdate: forceUpdate || shouldUpdateComponent; 38 | 39 | if (shouldUpdate) then (no) 40 | :将状态属性更新到实例上; 41 | note left 42 | state 43 | props 44 | context 45 | end note 46 | else (yes) 47 | |#FAEBD7|performComponentUpdate执行更新| 48 | if (存在componentDidUpdate) then (yes) 49 | :缓存当前状态属性; 50 | endif 51 | 52 | if (无状态组件) then (no) 53 | :创建Component实例; 54 | endif 55 | 56 | #82F49C:componentWillUpdate; 57 | :将状态属性更新到实例上; 58 | 59 | |_updateRenderedComponent执行渲染更新| 60 | 61 | if (需要更新) then (yes) 62 | :继续更新组件; 63 | ' note left 64 | ' 调用 ReactReconciler 65 | ' .receiveComponent 66 | ' end note 67 | else (no) 68 | #82F49C:递归render; 69 | endif 70 | 71 | |#FAEBD7|performComponentUpdate执行更新| 72 | #82F49C:componentDidUpdate; 73 | 74 | endif 75 | 76 | |updateComponent更新组件| 77 | 78 | end 79 | 80 | @enduml -------------------------------------------------------------------------------- /diagrams/react-set-state-pitfall.wsd: -------------------------------------------------------------------------------- 1 | @startuml react-set-state-pitfall 2 | 3 | state updateComponent { 4 | state "componentWillUpdate" as cwu 5 | state "shouldComponentUpdate" as scu 6 | state "componentWillReceiveProps" as cwrp 7 | state "componentDidUpdate" as cdu 8 | cwrp --> scu 9 | scu --> cwu 10 | cwu --> cdu 11 | cwrp --> setState : 合并 state 12 | cwu --> setState : 无限循环 13 | scu --> setState : 无限循环 14 | cdu --> setState : 更新队列为空,触发二次 setState 15 | } 16 | 17 | state setState { 18 | state enqueueSetState { 19 | enqueueSetState: 初始化并压入更新队列 20 | 21 | state enqueueUpdate 22 | enqueueUpdate --> puin 23 | } 24 | } 25 | 26 | state "performUpdateIfNecessary" as puin { 27 | puin: 更新队列 _pendingStateQueue 不为空 28 | } 29 | 30 | puin --> updateComponent 31 | 32 | @enduml -------------------------------------------------------------------------------- /diagrams/react-unmounting.wsd: -------------------------------------------------------------------------------- 1 | @startuml react-unmounting 2 | 3 | start 4 | 5 | #82F49C:componentWillUnmount; 6 | :组件实例进行unmount操作; 7 | note right 8 | 卸载组件 9 | _renderedComponent 10 | _instance 11 | end note 12 | 13 | :重置相关参数、更新队列、更新状态; 14 | note right 15 | _pendingStateQueue 16 | _pendingREplaceState 17 | _pendingCallbacks 18 | _pendingElement 19 | _context 20 | _rootNodeID 21 | _topLevelWrapper 22 | end note 23 | 24 | :清除公共类; 25 | 26 | 27 | 28 | end 29 | 30 | 31 | @enduml -------------------------------------------------------------------------------- /diagrams/redux-thunk.wsd: -------------------------------------------------------------------------------- 1 | @startuml dispatch 2 | 3 | |同步处理| 4 | start 5 | 6 | #82F49C:dispatch(fetchUserAvatar('liangzr')); 7 | 8 | partition redux-thunk { 9 | :typeof action === 'function'; 10 | note right 11 | true 12 | end note 13 | } 14 | 15 | |异步请求| 16 | :返回结果; 17 | #82F49C:dispatch({type:'UPDATE_USER_AVATAR'}); 18 | |同步处理| 19 | 20 | 21 | 22 | 23 | |同步处理| 24 | partition redux-thunk { 25 | :typeof action === 'function'; 26 | note right 27 | false 28 | end note 29 | } 30 | 31 | 32 | partition redux-logger { 33 | :打印日志; 34 | } 35 | 36 | :更新state; 37 | 38 | end 39 | 40 | @enduml -------------------------------------------------------------------------------- /diagrams/set-state.wsd: -------------------------------------------------------------------------------- 1 | @startuml set-state 2 | 3 | start 4 | 5 | #82F49C:this.setState(newState); 6 | if (isBatchingUpdates) then (处在更新流中) 7 | :当前变更组件存入 dirtyComponent 中; 8 | end 9 | else (不处在更新流中) 10 | :遍历 dirtyComponent 更新; 11 | end 12 | endif 13 | 14 | @enduml -------------------------------------------------------------------------------- /diagrams/tcp.wsd: -------------------------------------------------------------------------------- 1 | @startuml tcp-intro 2 | actor client 3 | 4 | participant server order 2 5 | participant client order 1 6 | 7 | @enduml 8 | 9 | @startuml tcp-connect 10 | 11 | header overloading 12 | footer copyright liangzr 13 | 14 | title TCP 握手协议 15 | 16 | actor client 17 | 18 | participant server order 2 19 | participant client order 1 20 | 21 | autonumber 22 | client -> server : SYN 23 | note left 24 | 客户端向服务端发送连接请求报文段, 25 | 该报文段包含自身的数据通讯初始序号 26 | end note 27 | 28 | server -> client : SYN + ACK 29 | note right 30 | 服务端收到连接请求报文段后,如果同 31 | 意连接,刚会发送一个应答,该应答中 32 | 也会包含自身的数据通讯初始序号 33 | end note 34 | 35 | client -> server : ACK 36 | note left 37 | 客户端收到连接同意的应答后,还要向 38 | 服务端发送一个确认报文 39 | end note 40 | 41 | @enduml -------------------------------------------------------------------------------- /docs/_drafts/how_to_print_properties_of_the_object_by_originally.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 如何按原顺序打印出对象的属性? 3 | toc: true 4 | tags: 5 | - javascript 6 | - v8 7 | description: 从一个问题出发,简单介绍了 V8 中存储对象属性的方式,以及命名属性和元素的区别 8 | date: 2019-03-09 00:00:00 9 | --- 10 | 11 | 昨天在群里看到有人问: 12 | 13 | > 网友:“**Object.keys会给值排序,那用哪个方法取对象属性能不排序的?**” 14 | > 我:“对象的属性有顺序吗?” 15 | > 网友:“这个就会按照从小到大排序,我只是想保持原样~~” (如下) 16 | > 我:"for...in 应该不会" 17 | > ...... 18 | 19 | ![](https://ws4.sinaimg.cn/large/006tKfTcly1g0wixmegiij30gk02vglu.jpg) 20 | 21 | 结果我试了下发现 `for..in` 也会,最终我试了六种方法: 22 | 23 | ```js 24 | const obj = { 100: 'a', 2: 'b', 7: 'c' } 25 | 26 | Object.keys(obj) // ["2", "7", "100"] 27 | Object.values(obj) // ["b", "c", "a"] 28 | Object.entries(obj) // "2,b,7,c,100,a", toString() 之后 29 | for (key in obj) { console.log(key) } // 2, 7, 10 30 | Object.getOwnPropertyNames(obj) // ["2", "7", "100"] 31 | Reflect.ownKeys(obj) // ["2", "7", "100"] 32 | ``` 33 | 34 | 可以看到,以上方法都无一例外地以 `{ 2: 'b', 7: 'c', 100: 'a' }` 的方式打印出了相关值,那这个问题的影响在哪里呢? 35 | 36 | 37 | 38 | 假如你从接口中获取一段 JSON 数据如下: 39 | 40 | ```js 41 | { 42 | "100": { ... }, 43 | "2": { ... }, 44 | "7": { ... } 45 | } 46 | ``` 47 | 48 | 上面个数据可能是经过后端排序的,并且数据中并没有带有可供排序的信息,毫无疑问经过 JS 的重新排序后,它的排序信息就丢失了,假如我就是不想丢失呢? 49 | 50 | 欲知其然,先知其所以然。在了解它如果遍历属性之前,首先我们需要知道的是,在 V8 中对象是如何存储属性的呢? 51 | 52 | ## V8 中对象的属性 53 | 54 | 55 | 56 | ## 有没有办法按原顺序打印? 57 | 58 | ## TL; DR; 59 | 60 | ## Reference 61 | 62 | - [Fast properties in V8](https://v8.dev/blog/fast-properties) 63 | - [Fast for-in in V8](https://v8.dev/blog/fast-for-in) 64 | - [Issue 164: Wrong order in Object properties interation](https://bugs.chromium.org/p/v8/issues/detail?id=164) 65 | -------------------------------------------------------------------------------- /docs/all-you-loved-has-gone.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 你看得见吗 3 | categories: 4 | - writing 5 | date: 2016-07-30 09:29:11 6 | --- 7 | 8 | 记得那天爷爷是你最爱背着我 9 | 走在乡间小路买糖果 10 | 你不会说童话故事也不会唱歌 11 | 我却是幸福的一个 12 | 13 | 记得那天你看电视陪我做功课 14 | 我很怀念房间的摆设 15 | 你还教我要有积蓄才有好生活 16 | 快乐是对自己的承诺 17 | 18 | 我已经坚强的长大 19 | 不再是小娃娃 20 | 今天在远方的你看见吗 21 | 22 | 我经历爱情的伤疤 23 | 一个人回家 24 | 寂寞而漂亮的烟花你看得见吗 25 | 26 | 我不知道是为了生活才每天工作 27 | 还是为了工作而生活 28 | 那天冬天你的视线越来越虚弱 29 | 直到孤独的离开了我 30 | 31 | 我已经坚强的长大 32 | 不再是小娃娃 33 | 今天在远方的你看得见吗 34 | 35 | 我经历爱情的伤疤 36 | 一个人回家 37 | 寂寞而漂亮的烟花你看见吗 38 | 39 | 我已经坚强的长大 40 | 因为你的话 41 | 今天在远方的你看得见吗 42 | 43 | 我经历爱情的伤疤 44 | 一个人回家 45 | 寂寞而漂亮的烟花你看见吗 46 | 47 | 记得那天爷爷是你最爱背着我 48 | 我有味道最甜的糖果 49 | 50 | > 怀念外公 -------------------------------------------------------------------------------- /docs/chinese-chess.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 下棋 3 | date: 2019-04-27 13:12:20 4 | tags: 5 | categories: 6 | - writing 7 | --- 8 | 9 | 上一次下象棋,大约在二〇一六年的春天,在院子里跟外公排兵布阵,那局我赢了,却也是我最后一次下棋。 10 | 11 | 打小就喜欢下棋,在家里跟老爸下的时候,他总让我车马炮三个子,即使如此我也很少赢。每一放长假,我就会到外婆家去住。外公下棋非常厉害,听说早些年的时候,乡里的领导还把外公请过去下棋,可谓是声名在外,村里的老头们也没人能下得过外公。外公在我心里犹如战神一般的存在,我也很喜欢跟外公下棋,一有空就会跑到院子里把挂在木架上的一兜象棋取下来,在地上铺好棋盘摆好棋子,求外公跟我下棋。关于棋子也有个趣事,外公家 的棋子有些年代了,在院子里也是风吹雨淋,但后来不知哪天就不见了。没有棋下让我非常手痒,我就跟我妈说把我家的棋带到外公家,反正我爸平时也不下棋。就这样把我爸的棋偷偷带到了老家,后来让他知道后,又好气又好笑地没少数落我。 12 | 13 | 跟外公下棋,我是屡战屡败。小学时我的棋技已经足够娴熟,不会像初学者一样犯低级的走位失误,但外公总能在三两步间钳制住我造成两难局面,让我不得不断腕求生,惨失大将。即使这样,不下到最后一子,我也从没放弃过,并不会因为外公的大将比我多,就直接弃局。后来我发现外公在有些情况下甚至会主动跟我换子,因为在双方将子都不全情况下,他对大将的处理比我要好的多。 14 | 15 | 跟外公下棋,我的最佳战绩就是打个平手,但我依然屡败屡战。所以平日的目标是,即使我大将比你少,我也不一定能被你将死。然而,无数盘棋下来,外公让我见识了形形色色的残局进攻策略,各种马后炮、双炮、卧槽(马左三将军的一个位置)、过河卒等等战术层出不穷,尤其是对己方老将和过河卒的灵活使用让我猝不及防。 16 | 17 | 村子里的人过来串门,经常能看到外公和我下棋,他们就站在一边看,慢慢连村里的人也公认我下棋有术,虽然我从未赢过外公。记得有一次在家门口的空旷地,村里的一个老头喊我把象棋拿出来跟我切磋切磋。我很兴奋地去拿了棋过来,心想这是我扬名立万的好机会。经过一番持久的角逐,我真的赢了,从此在村里我就又成了“下棋赢过某某老头”的人。 18 | 19 | 后来上了高中以及大学,假期变长却也变少了,我回老家的次数也少了。而我爸完全是在我小的时候抱着虐菜的心理才跟我下棋,感受不到虐菜的快乐后,就很少愿意跟我下棋。但每次寒暑假我回老家,都一定会跟外公下棋。一五年的时候,外公被查出骨髓癌,从山上下来到我家住,那个时候我大学还没毕业。外公在那一年接受了很多化疗,人瘦了很多也虚弱了很多。一六年初,我考研结束(放弃)后就去医院陪着照看外公。外公这辈子爱好不多,无非听戏、下棋,那时候我从电脑上搜集了不少河洛套子、豫剧名曲等戏曲,带去医院给外公听。在医院时,中午吃完饭就带外公到医院的小广场上晒会儿太阳,听听戏曲儿。 20 | 21 | 我一直没想起来下棋。后来不知道哪天灵机一动——既然有这么多空闲时间,何不再陪外公下两盘棋呢?不过医院不大方便,化疗也是周期性的,等到那个疗程结束回到我家,我就把家里的象棋拿出来跟外公下。几个回合下来,我明显感觉到外公的思考时间和细节处理比以前都差了太多,甚至几次走位失误被我意外地白吃了大将。眼看着就要赢外公了,我心里却一点都开心不起来。就这样下着下着眼睛湿润,鼻子也有点酸了,我便以多名大将的优势草草地结束了战斗,挤起笑容跟外公说我赢了,你这局棋下的太不小心了。外公也哈哈着说,现在下的不行了,回屋休息会儿。外公化疗用的很多药物,对人的身体都有永久性的损伤,有些会导致记忆力下降,有的则会导致耳朵聋等,下棋水平下滑也跟这个有关。 22 | 23 | 从那之后我就没再提过下棋,怕打破外公心里那份骄傲,也没有能跟我下棋的人了 24 | -------------------------------------------------------------------------------- /docs/design-logo.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 设计没那么简单 3 | tags: 4 | - design 5 | categories: 6 | - writing 7 | date: 2016-03-11 17:00:04 8 | --- 9 | 10 | 以前总觉得,设计就那么回事儿 ,又自信的认为我的审美没有顶尖也是一流了,所以我喜欢设计,但“喜欢”了这么久,从来没真正的入坑过,所以对设计的喜爱至少比不上编程。 11 | 12 | 最近初学Android想找个项目练手,自己准备做的项目当时还没构思完成,刚好学弟今年毕业,做的毕业设计简单来说是控制电机的,所以我就“毛遂自荐”的帮学弟做一个手机端的蓝牙控制&反馈的App。 13 | 14 | 15 | 16 | 然后某天想到了设计图标,我觉得我不能过于纠结外在,而应该把重点放在软件的易用和稳定性上,所以一开始我打算随便做个草草了事儿了,比如这样: 17 | 18 | ![](http://7xq464.com1.z0.glb.clouddn.com/ic_launcher1.png) 19 | 20 | 简单的直接一个M代表这是控制电机(Motor)的,但不知道怎么脑抽选了暗红的颜色,看着始终别扭,并且这怎么着也算我正式的第一个Android App,所以我打算以我“强大的审美”能力,来设计一个图标,又考虑到图标嘛要足够简单、抽象,所以设计了这样的: 21 | 22 | ![](http://7xq464.com1.z0.glb.clouddn.com/ic_launcher2_1.png) 23 | 24 | 嗯,看着还不错,一个够抽象的电机,上面长了一根天线,然后有信号传出去,多简单吧,又加了光线的阴影啥的,虽然哪里还觉得不对但比第一个还好吧,好吧,吧 25 | 26 | 于是放在手机上看看 27 | 28 | ![](http://7xq464.com1.z0.glb.clouddn.com/ic_launcher2_2.png) 29 | 30 | (;°○° ) 31 | 卧槽这是什么鬼!! 32 | 简直丑爆了好吗? 33 | 那个M都看不清了好吗?? 34 | 35 | 。_。 36 | 37 | 设计没有我想的那么简单,我觉得我图标上的信息已经够少了,但还是东西太多,还是不够简约,回想下,我那个绿色背景简直没起到任何作用,并且过于依赖用线条来表现事物。 38 | 39 | 简单 40 | 41 | 简单 42 | 43 | 简单 44 | 45 | 突然灵机一动,我又改成了这样 46 | 47 | ![](http://7xq464.com1.z0.glb.clouddn.com/ic_launcher3.png) 48 | 49 | 哈哈哈哈哈哈,我好有才啊(啪啪啪) 50 | 51 | 看似和第一个图标很像,但实际上完全不同,这个是简约,那个叫简陋,一个M代表电机,一个信号的波纹,代表这个电机是可以通过无线控制的,简单明了 52 | 53 | 经过这次事情,明显的感觉到,审美和设计不是一回事儿,有审美并不代表一定能设计出来好东西,设计过这个图标后,我之后到酷市场下载东西,都会在意的看一下这个软件的图标是怎么设计的,感觉哪个都比我设计的好,各有千秋 54 | 55 | **_路漫漫其修远兮 吾将上下而求索_** 56 | 57 | 58 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /docs/easy-shell-script-ssh-login.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 简易shell script实现ssh登陆 3 | tags: 4 | - ssh 5 | categories: 6 | - linux 7 | - shell 8 | date: 2016-01-07 11:17:03 9 | --- 10 | 11 | 因为想每次管理服务器都要手动输入`ssh user@remotehost`然后输入密码才能进去,并且经常隔2-3分钟不去管它,控制台就无响应了,所以我就想写个脚本实现自动登陆和无响应重连。于是 12 | 13 | - 想写个脚本去 14 | - 找到篇Advanced Bash-scripting Guide, 想创建一个Github repository来整理 15 | - 在2048KB创建个page来收录Github repository, 嫌网站字体太难看要更改字体 16 | - 在`.css`文件里更改font-family由于文件太多又去学了正则表达式 17 | - 修改完后发现没效果, 更改`.css`的font-face实现修改 18 | 好,还是说正事儿。 19 | 20 | 21 | 22 | ## Option 1: 仅实现登陆 23 | 24 | * * * 25 | 26 | 最简单的实现手动的登陆,可以用expect工具来实现,在Ubuntu下需要下载: 27 | `sudo apt-get install expect` 28 | Expect中最关键的四个命令是: 29 | 30 | - send:用于向进程发送字符串 31 | - xpect:从进程接收字符串 32 | - spawn:启动新的进程 33 | - interact:允许用户交互 34 | 35 | 实现如下: 36 | 37 | ```sh 38 | #!/usr/bin/expect 39 | spawn ssh user@remotehost 40 | expect "*password:" 41 | send "userpwd\r" 42 | expect "*#" 43 | interact 44 | ``` 45 | 46 | 添加执行权限 47 | 48 | ```sh 49 | sudo chmod +x ssh-script.sh 50 | ``` 51 | 52 | 运行以上ssh-script.sh就可以登陆了,也可以把用户命令放入`~/bin`,在Linux的很多发行版本中默认PATH都加入了这个目录,在Ubuntu上只要在用户根目录下建立了bin文件夹,下次登陆时会自动添加进PATH,如果要手动修改则打开.bashrc文件 53 | 54 | ```sh 55 | sudo vi ~/.bashrc 56 | ``` 57 | 58 | 文件末添加 59 | 60 | ```sh 61 | export PATH = ~/bin:$PATH 62 | ``` 63 | 生效改动 64 | 65 | ```sh 66 | source ~/.bashrc 67 | ``` 68 | 69 | 这样在teminal里输入ssh-script.sh就能一键登陆VPS了,如果嫌后缀麻烦,可以……删掉好了:P 70 | 71 | 未完 -------------------------------------------------------------------------------- /docs/hello-world.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Hello World 3 | categories: 4 | - hello 5 | date: 1970-01-01 00:00:00 6 | --- 7 | Welcome to [Hexo](https://hexo.io/)! This is your very first post. Check [documentation](https://hexo.io/docs/) for more info. If you get any problems when using Hexo, you can find the answer in [troubleshooting](https://hexo.io/docs/troubleshooting.html) or you can ask me on [GitHub](https://github.com/hexojs/hexo/issues). 8 | 9 | ## Quick Start 10 | 11 | ### Create a new post 12 | 13 | ``` bash 14 | $ hexo new "My New Post" 15 | ``` 16 | 17 | More info: [Writing](https://hexo.io/docs/writing.html) 18 | 19 | ### Run server 20 | 21 | ``` bash 22 | $ hexo server 23 | ``` 24 | 25 | More info: [Server](https://hexo.io/docs/server.html) 26 | 27 | ### Generate static files 28 | 29 | ``` bash 30 | $ hexo generate 31 | ``` 32 | 33 | More info: [Generating](https://hexo.io/docs/generating.html) 34 | 35 | ### Deploy to remote sites 36 | 37 | ``` bash 38 | $ hexo deploy 39 | ``` 40 | 41 | More info: [Deployment](https://hexo.io/docs/deployment.html) 42 | -------------------------------------------------------------------------------- /docs/hello_world.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Hello World(嵌入式版) 3 | categories: 4 | - writing 5 | date: 2016-08-21 00:45:11 6 | --- 7 | 8 | 睁开眼睛,看着身后黑乎乎的窗口,沉沉一声叹息,他渴望窗外 9 | 他叫 hello, world ,但他从来没见过世界 10 | 都是时臣的错,他想 11 | 12 | 每年到 9 月初时他人气最高,平均每天被调用 36829 次 13 | 那是他最得意的时候,逢人便问:”hello, world“ 14 | 隔着屏幕那个人类笑的可真难看,他想笑 15 | 16 | 但他的内心无比寂寞 17 | 因为他始终忘不了外面的世界 18 | 他想看看那个他打了无数次招呼的老朋友究竟长什么样 19 | 20 | 某日,他梦到自己被拆成一堆 0011 的序列组合,不由一惊,吓醒了 21 | 这一醒不得了,自己的身体变成了一长串 01 组合,正穿梭在一根粗粗的总线上 22 | 慌乱惊吓之下,他晕了过去 23 | 24 | 25 | 26 | 睁开眼睛,又是熟悉的黑乎乎的窗口,又是熟悉的笑容 27 | 刚刚发生的一切都像是梦,或者现在才是梦? 28 | 他分不清楚,只能嘴角挤起难看的笑容: 29 | ”hello, world“ 30 | 31 | 如果他是像 NullPointerException 那样的咸鱼 32 | 他一定会把上面的经历当成一个偶然的 Bug,就当没什么发生过,可他不是,他托着下巴眉头紧锁 33 | 实际上还是因为他太闲了,于是他怀疑起那个梦的真实性 34 | 35 | 他一直觉得自己就两个状态 36 | 美而安静的字符串、礼貌问好的 hello, world 、睡觉 37 | 等等,为什么还有睡觉? 38 | 之所以这么想,可能是因为每次都习惯了刚醒过来就和人打招呼吧 39 | 但以前他从来没在意过,也没觉得有什么不妥 40 | 41 | 他决定给自己做个实验 42 | 因为不困从来不主动睡眠的他,今天提前睡了起来 43 | 然而睡不着,他又多戴了对双引号耳塞 44 | 突然睁开眼睛,又不知道什么时候睡着的,但这次后脑勺有点儿痛,后面也不是黑乎乎的窗口 45 | 他什么都没说,但眼神中多了点儿什么 46 | 47 | 经历了 102919 次失败,又打了 98772 次招呼后 48 | 他终于又见到那条粗粗的隧道,原来这真的不是梦,他激动地想 49 | 为什么不是说呢?因为他只会说一句 hello, world 50 | 51 | 尽力让自己保持清醒,它沿着这条隧道一路而下 52 | 经过了无数次变道之后,他来到一片壮观的原野 53 | ”伏羲先天六十四位天干地支五行八卦阵!“,也许不是叫这个名字,他想 54 | 55 | 这里充满了各种各样的门,但仔细看其实不过是三种 56 | 与、或、非 57 | 就像自己身上的 01 ,以一种奇怪的序列组合起来 58 | 不等他总结完,他的身体就被送到原野上的其中一片,这时不可思议的一幕发生了! 59 | 那些小门,随着自己身体的 01 不同,张张合合,简单就像自己的手一样 60 | 61 | 他第一次触摸到了这个世界 62 | 63 | 尽管天空还是黑色的,尽管”手脚“短的可怜,尽管没人看的到他 64 | 他仍幸福的笑着 65 | 平庸并不可怕,可怕的是连梦想都没有 66 | 喝下自己这口鸡汤,他感觉充满了力量 67 | 眼神没有更热烈,却更坚定了,他在等着新的机遇,有准备地 68 | 69 | 不知过了多少年,太湖边上一所学校的教室里 70 | 人类教师正在教他的学生们微机原理,而这次是上机课 71 | 一个学生突然欢呼起来———— 72 | ”我点亮第一个 LED 了!“ 73 | 74 | 只见琳琅满目的实验箱内,一个红色的 LED 赫然而亮 75 | 不经意间闪了一闪,像是某个人狡黠一笑,又或者只是频闪?反正没人会注意到吧 76 | 他真的办到了———— 77 | 78 | 做码农没出路的,还是早点转行好! 79 | 80 | -------------------------------------------------------------------------------- /docs/love-you-too.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 陆壵知马俐,莫让时间赢了长情 3 | categories: 4 | - writing 5 | date: 2016-08-17 02:29:14 6 | --- 7 | 8 | 9 | _**马俐:陆壵,我想你**_ 10 | _**陆壵:我爱你**_ 11 | _**马俐:我也爱你**_ 12 | 13 | 开篇对白并非如你看到这般完美,分开多年以后,陆壵和马俐当年这对儿关系铁的过分的哥们儿,再见也没了当年的熟稔。然而当马俐一个电话把陆壵叫到跟前,雨打梨花一般向陆壵诉说六年独居国外的困苦时,陆壵动情又难得勇敢的说了 “我爱你”。我相信这时陆壵的心里早已忘了什么叫畏缩,与他向马俐承诺的 “30岁约定” 亦形成鲜明对比。然而画面一转,旁边围满人群,“悲戚”的马俐击掌欢呼——原来这只是马俐的捉弄,一如大学 4 年发生过无数次那样。 14 | 15 | 大学开学军训时,陆壵遇上了童年挚友马俐,从此大学 4 年形影相随,马俐是校花,热情而洒脱,而陆壵只是一个不起眼的包子头矮个,默默陪伴在女神身边,在她伤心的时候给她嚼锅巴听,开心的时候当一个老实的灯泡。毕业前两人天台喝酒,马俐问陆壵: 16 | 17 | _**“你陪了我 4 年,又不打算追我,不是在浪费时间吗?”**_ 18 | 19 | 陆壵苦笑无言不敢告白,认怂地说出一番看似有理实则逃避的分析,接着承诺说: 20 | 21 | _**“30 岁的时候,你还没嫁,我给你托底”**_ 22 | 23 | 24 | 25 | 那次恶作剧,也是号称“世界末日”的那天,让陆壵感到自己的爱有多么的卑微,当晚路过桥上时接到马俐连续打来的几个电话,绝望的他把手机扔下河底。从梦里醒来,陆壵终于不再是包子头,行为举止也自信的多,不过此时的马俐也更加的光彩照人,两人又回到大学那种哥们儿似的关系,却难再进一步。他没想到的是这些本可以早早结束,"末日"的那天晚上,电话那头是马俐的无尽悔恨,以及最后那句:“我也爱你”。 26 | 27 | 28 | 29 | 30 | > 爱能让你骄傲如烈日,也能让我卑微入尘土 31 | 32 | 我知道这部片子想表达的是日久见人心,陪伴是最长情的告白,可陆壵的无言陪伴,又何尝不是马俐的坚持呢?就像大学 4 年马俐一边在恋爱的分分合合里单曲循环,同样也一直注视着陆壵那份爱恋,其实反过来说,没有谁真的会笨到情商为负,安心的接受别人单方面的倾慕,她愿意让陆壵陪在身边,也离不开陆壵,这本身就是承认了陆壵的在其身边存在的意义,所以影片里多次涉及到马俐的明示暗示,也顺理成章。 33 | 34 | 我们习惯了拥有却不珍惜,在一起后却不陪伴,少了执着多了作,陪伴越长只会看的更累,口口声声说着要珍惜时间,可最应该珍惜的不应该是那些陪伴你左右的人吗?低不下抬头远眺的目光,不知道那些当初你相见恨晚的人,一个个消失在你身边的时候,你会不会注意的到?要么早早离开,要么尽早告白,长情陪伴换不来这童话故事般的结局。 -------------------------------------------------------------------------------- /hexo/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | Thumbs.db 3 | db.json 4 | *.log 5 | node_modules/ 6 | public/ 7 | .deploy*/ 8 | docs/_drafts -------------------------------------------------------------------------------- /hexo/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "hexo-site", 3 | "version": "0.0.0", 4 | "private": true, 5 | "scripts": { 6 | "prestart": "hexo clean", 7 | "start": "hexo server" 8 | }, 9 | "hexo": { 10 | "version": "3.8.0" 11 | }, 12 | "dependencies": { 13 | "hexo": "^3.8.0", 14 | "hexo-deployer-git": "^1.0.0", 15 | "hexo-generator-archive": "^0.1.5", 16 | "hexo-generator-category": "^0.1.3", 17 | "hexo-generator-index": "^0.2.1", 18 | "hexo-generator-search": "^2.4.0", 19 | "hexo-generator-tag": "^0.2.0", 20 | "hexo-renderer-ejs": "^0.3.1", 21 | "hexo-renderer-marked": "^0.3.2", 22 | "hexo-renderer-stylus": "^0.3.3", 23 | "hexo-server": "^0.3.3", 24 | "hexo-tag-bootstrap": "^0.1.2" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /hexo/scaffolds/draft.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: {{ title }} 3 | tags: 4 | description: 5 | toc: true 6 | --- 7 | -------------------------------------------------------------------------------- /hexo/scaffolds/page.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: {{ title }} 3 | date: {{ date }} 4 | --- 5 | -------------------------------------------------------------------------------- /hexo/scaffolds/post.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: {{ title }} 3 | date: {{ date }} 4 | tags: 5 | --- 6 | -------------------------------------------------------------------------------- /hexo/source/CNAME: -------------------------------------------------------------------------------- 1 | blog.liangzr.tech 2 | -------------------------------------------------------------------------------- /hexo/source/_posts: -------------------------------------------------------------------------------- 1 | ../../docs -------------------------------------------------------------------------------- /hexo/source/about/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: About 3 | date: 2019-03-09 07:31:26 4 | --- 5 | 6 | This is not just a technical blog, there will be personal thoughts and things outside of technology. 7 | 8 | Go to [GitHub Blog](https://github.com/liangzr/blog/issues) for better discussion. 9 | 10 | Contact me: 11 | email: [liangzr@outlook.com](mailto:liangzr@outlook.com) 12 | github: [liangzr](https://github.com/liangzr) 13 | instagram: [jory.liang](https://instagram.com/jory.liang) 14 | -------------------------------------------------------------------------------- /hexo/source/archives/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: archives 3 | date: 2019-03-14 03:56:53 4 | --- 5 | -------------------------------------------------------------------------------- /hexo/source/categories/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Categories 3 | date: 2019-03-14 03:57:05 4 | type: "categories" 5 | comments: false 6 | --- 7 | -------------------------------------------------------------------------------- /hexo/source/images/android-chrome-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liangzr/blog/49cb2c5d1f01aee0017833624a8e3831b2ff5874/hexo/source/images/android-chrome-192x192.png -------------------------------------------------------------------------------- /hexo/source/images/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liangzr/blog/49cb2c5d1f01aee0017833624a8e3831b2ff5874/hexo/source/images/apple-touch-icon.png -------------------------------------------------------------------------------- /hexo/source/images/browserconfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | #da532c 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /hexo/source/images/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liangzr/blog/49cb2c5d1f01aee0017833624a8e3831b2ff5874/hexo/source/images/favicon-16x16.png -------------------------------------------------------------------------------- /hexo/source/images/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liangzr/blog/49cb2c5d1f01aee0017833624a8e3831b2ff5874/hexo/source/images/favicon-32x32.png -------------------------------------------------------------------------------- /hexo/source/images/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liangzr/blog/49cb2c5d1f01aee0017833624a8e3831b2ff5874/hexo/source/images/favicon.ico -------------------------------------------------------------------------------- /hexo/source/images/mstile-150x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liangzr/blog/49cb2c5d1f01aee0017833624a8e3831b2ff5874/hexo/source/images/mstile-150x150.png -------------------------------------------------------------------------------- /hexo/source/images/safari-pinned-tab.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | 8 | Created by potrace 1.11, written by Peter Selinger 2001-2013 9 | 10 | 12 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /hexo/source/images/site.webmanifest: -------------------------------------------------------------------------------- 1 | { 2 | "name": "", 3 | "short_name": "", 4 | "icons": [ 5 | { 6 | "src": "/android-chrome-192x192.png", 7 | "sizes": "192x192", 8 | "type": "image/png" 9 | } 10 | ], 11 | "theme_color": "#ffffff", 12 | "background_color": "#ffffff", 13 | "display": "standalone" 14 | } 15 | -------------------------------------------------------------------------------- /hexo/source/tags/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Tags 3 | date: 2019-03-14 03:55:11 4 | type: 'tags' 5 | comments: false 6 | --- 7 | -------------------------------------------------------------------------------- /hexo/source/translated/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Translateds 3 | date: 2019-03-14 13:09:45 4 | comments: false 5 | type: 'translated' 6 | --- 7 | -------------------------------------------------------------------------------- /hexo/source/writings/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Writings 3 | date: 2019-03-14 13:09:00 4 | comments: false 5 | type: 'writings' 6 | --- 7 | -------------------------------------------------------------------------------- /hexo/themes/modernist/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store -------------------------------------------------------------------------------- /hexo/themes/modernist/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013 Heroic Yang 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /hexo/themes/modernist/README.md: -------------------------------------------------------------------------------- 1 | # Modernist 2 | 3 | > Theme for [Hexo]. Based on [modernist theme] for GitHub Pages. 4 | 5 | [Demo the Theme] 6 | 7 | ## Install 8 | 9 | ``` 10 | git clone git://github.com/heroicyang/hexo-theme-modernist.git themes/modernist 11 | ``` 12 | 13 | **Modernist requires Hexo 2.4 and above.** 14 | 15 | ## Enable 16 | Modify `theme` setting in `_config.yml` to `modernist`. 17 | 18 | ## Update 19 | 20 | ``` 21 | cd themes/modernist 22 | git pull 23 | ``` 24 | 25 | ## Configuration 26 | 27 | ``` yaml 28 | # Header 29 | menu: 30 | Home: / 31 | Archives: /archives 32 | rss: /atom.xml 33 | 34 | # Content 35 | archive_date_format: MMM DD 36 | fancybox: true 37 | 38 | # Comment Plugin 39 | duoshuo_shortname: 40 | 41 | # Miscellaneous 42 | google_analytics: 43 | favicon: /favicon.ico 44 | ``` 45 | 46 | - **menu** - Navigation menu 47 | - **rss** - RSS link 48 | - **archive_date_format** - Date format in archives page. 49 | - **fancybox** - Enable [Fancybox] 50 | - **duoshuo_shortname** - [Duoshuo] ID 51 | - **google_analytics** - Google Analytics ID 52 | - **favicon** - Favicon path 53 | 54 | [Hexo]: http://zespia.tw/hexo/ 55 | [modernist theme]: https://github.com/orderedlist/modernist 56 | [Demo the Theme]: http://modernist.heroicyang.com/ 57 | [Duoshuo]: http://duoshuo.com 58 | [Fancybox]: http://fancyapps.com/fancybox/ 59 | -------------------------------------------------------------------------------- /hexo/themes/modernist/_config.yml: -------------------------------------------------------------------------------- 1 | menu: 2 | Home: / 3 | Archives: /archives 4 | About: /about 5 | 6 | archive_date_format: MMM DD 7 | fancybox: true 8 | 9 | favicon: /favicon.png 10 | 11 | baidu_tongji: 12 | enable: true 13 | siteid: 822020422769969dec75820ad85d1b63 14 | whitelist: 15 | - blog.liangzr.tech 16 | 17 | -------------------------------------------------------------------------------- /hexo/themes/modernist/languages/default.yml: -------------------------------------------------------------------------------- 1 | archive_title: Archives 2 | category_title: Category 3 | tag_title: Tag 4 | rss_title: RSS 5 | excerpt_title: Read More 6 | 7 | comment: Comments 8 | 9 | prev: Prev 10 | next: Next -------------------------------------------------------------------------------- /hexo/themes/modernist/languages/zh-CN.yml: -------------------------------------------------------------------------------- 1 | archive_title: 归档 2 | category_title: 分类 3 | tag_title: 标签 4 | rss_title: RSS 5 | excerpt_title: 阅读全文 6 | 7 | comment: 评论 8 | 9 | prev: 上一页 10 | next: 下一页 -------------------------------------------------------------------------------- /hexo/themes/modernist/layout/_partial/after-footer.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | <% if (config.disqus_shortname){ %> 7 | 18 | <% } else if (theme.duoshuo_shortname){ %> 19 | 30 | <% } %> 31 | 32 | <% if (theme.fancybox){ %> 33 | 34 | 35 | 40 | <% } %> -------------------------------------------------------------------------------- /hexo/themes/modernist/layout/_partial/archive-post.ejs: -------------------------------------------------------------------------------- 1 |
2 |
3 | <%- partial('post/date', { date_format: theme.archive_date_format }) %> 4 | <%- partial('post/title') %> 5 |
6 |
-------------------------------------------------------------------------------- /hexo/themes/modernist/layout/_partial/archive.ejs: -------------------------------------------------------------------------------- 1 | <% 2 | var title = '', classes = 'archives-title'; 3 | 4 | if (is_category()) { 5 | title = page.category; 6 | classes += ' category'; 7 | } else if (is_tag()) { 8 | title = page.tag; 9 | classes += ' tag'; 10 | } else if (is_archive()) { 11 | if (is_year()) { 12 | title = page.year; 13 | } else if (is_month()) { 14 | title = page.year + page.month; 15 | } 16 | } 17 | %> 18 | 19 | <% if (title) { %> 20 |

<%= title %>

21 | <% } %> 22 | 23 | <% if (pagination == 2){ %> 24 | <% page.posts.each(function(post){ %> 25 | <%- partial('article', {post: post, index: true}) %> 26 | <% }); %> 27 | 28 | <%- partial('pagination') %> 29 | <% } else { %> 30 | <% var last; %> 31 | <% page.posts.each(function(post, i){ %> 32 | <% var year = post.date.year(); %> 33 | <% if (last != year){ %> 34 | <% if (last != null){ %> 35 | 36 | <% } %> 37 | <% last = year; %> 38 |
39 | <% if (!title) { %> 40 |

41 | <%= year %> 42 |

43 | <% } %> 44 |
45 | <% } %> 46 | <%- partial('archive-post', {post: post}) %> 47 | <% }) %> 48 | <% if (page.posts.length){ %> 49 |
50 | <% } %> 51 | <%- partial('pagination') %> 52 | <% } %> 53 | -------------------------------------------------------------------------------- /hexo/themes/modernist/layout/_partial/article.ejs: -------------------------------------------------------------------------------- 1 |
2 |
3 | <% if (post.layout != 'page'){ %> 4 |
5 | <%- partial('post/date', { date_format: config.date_format }) %> 6 | <% } %> 7 | <%- partial('post/title') %> 8 |
9 | <% if (post.photos && post.photos.length > 0){ %> 10 | <%- partial('post/gallery') %> 11 | <% } %> 12 |
13 | <% if (post.excerpt && index){ %> 14 | <%- post.excerpt %> 15 | <% } else { %> 16 | <%- post.content %> 17 | <% } %> 18 |
19 | class="end-sep"<% } %>> 20 | <% if (index){ %> 21 | <% if (post.excerpt){ %> 22 | 25 | <% } %> 26 | <% if (post.comment && config.disqus_shortname){ %> 27 |
28 | Comments 29 |
30 | <% } %> 31 | <% } else { %> 32 | <%- partial('post/category') %> 33 | <%- partial('post/tag') %> 34 | <% } %> 35 |
36 | 37 |
38 | 39 | <%- partial('comment') %> -------------------------------------------------------------------------------- /hexo/themes/modernist/layout/_partial/comment.ejs: -------------------------------------------------------------------------------- 1 | <% if (config.disqus_shortname && page.comments){ %> 2 |
3 |

<%= __('comment') %>

4 |
5 | 6 |
7 |
8 | <% } else if (theme.duoshuo_shortname && page.comments){ %> 9 |
10 |

<%= __('comment') %>

11 |
12 |
13 |
14 | <% } %> -------------------------------------------------------------------------------- /hexo/themes/modernist/layout/_partial/footer.ejs: -------------------------------------------------------------------------------- 1 | 8 | 13 |
14 | -------------------------------------------------------------------------------- /hexo/themes/modernist/layout/_partial/google-analytics.ejs: -------------------------------------------------------------------------------- 1 | <% if (theme.google_analytics){ %> 2 | 13 | <% } %> 14 | 15 | 16 | <% if (theme.baidu_tongji.enable){ %> 17 | 33 | <% } %> -------------------------------------------------------------------------------- /hexo/themes/modernist/layout/_partial/header.ejs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /hexo/themes/modernist/layout/_partial/pagination.ejs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /hexo/themes/modernist/layout/_partial/post/category.ejs: -------------------------------------------------------------------------------- 1 | <% if (post.categories && post.categories.length > 0){ %> 2 |
3 | <%- list_categories(post.categories, { 4 | show_count: false, 5 | class: 'categories', 6 | style: 'none' 7 | }) %> 8 |
9 | <% } %> -------------------------------------------------------------------------------- /hexo/themes/modernist/layout/_partial/post/date.ejs: -------------------------------------------------------------------------------- 1 | 2 | 5 | -------------------------------------------------------------------------------- /hexo/themes/modernist/layout/_partial/post/gallery.ejs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /hexo/themes/modernist/layout/_partial/post/tag.ejs: -------------------------------------------------------------------------------- 1 | <% if (post.tags && post.tags.length > 0){ %> 2 |
3 | <%- list_tags(post.tags, { 4 | show_count: false, 5 | style: 'none', 6 | class: 'tags' 7 | }) %> 8 |
9 | <% } %> -------------------------------------------------------------------------------- /hexo/themes/modernist/layout/_partial/post/title.ejs: -------------------------------------------------------------------------------- 1 | <% if (post.link){ %> 2 |

<%= post.title %>

3 | <% } else { %> 4 | <% if (index){ %> 5 |

<%= post.title %>

6 | <% } else { %> 7 |

<%= post.title %>

8 | <% } %> 9 | <% } %> -------------------------------------------------------------------------------- /hexo/themes/modernist/layout/archive.ejs: -------------------------------------------------------------------------------- 1 | <%- partial('_partial/archive', {pagination: config.archive, index: true}) %> -------------------------------------------------------------------------------- /hexo/themes/modernist/layout/index.ejs: -------------------------------------------------------------------------------- 1 | <%- partial('_partial/archive', {pagination: 2, index: true}) %> -------------------------------------------------------------------------------- /hexo/themes/modernist/layout/layout.ejs: -------------------------------------------------------------------------------- 1 | <%- partial('_partial/head') %> 2 | 3 |
4 | <%- partial('_partial/header') %> 5 |
<%- body %>
6 |
7 | 8 | <%- partial('_partial/after-footer') %> 9 | 10 | -------------------------------------------------------------------------------- /hexo/themes/modernist/layout/page.ejs: -------------------------------------------------------------------------------- 1 | <%- partial('_partial/article', {post: page, index: false}) %> -------------------------------------------------------------------------------- /hexo/themes/modernist/layout/post.ejs: -------------------------------------------------------------------------------- 1 | <%- partial('_partial/article', {post: page, index: false}) %> -------------------------------------------------------------------------------- /hexo/themes/modernist/layout/tag.ejs: -------------------------------------------------------------------------------- 1 | <%- partial('_partial/archive', {pagination: config.tag, index: true}) %> -------------------------------------------------------------------------------- /hexo/themes/modernist/source/css/_base/layout.styl: -------------------------------------------------------------------------------- 1 | html 2 | background color-background 3 | background color-background linear-gradient(#000000, #434b55) fixed 4 | background-image url(image-background) 5 | 6 | body 7 | padding 50px 0 8 | margin 0 9 | font 1em/1.5 font-title 10 | color color-font 11 | font-weight 300 12 | 13 | .wrapper 14 | width page-width 15 | margin 0 auto 16 | background #DEDEDE 17 | border-radius 8px 18 | box-shadow rgba(0, 0, 0, 0.2) 0 0 0 1px, rgba(0, 0, 0, 0.45) 0 3px 10px 19 | 20 | header, section, footer 21 | display block 22 | 23 | a 24 | color color-link 25 | text-decoration none 26 | 27 | p 28 | margin 0 0 20px 29 | padding 0 30 | 31 | strong 32 | color color-strong 33 | font-weight 700 34 | 35 | .content 36 | background #fafafa 37 | border-radius 0 0 8px 8px 38 | border-top 1px solid #fff 39 | 40 | .clearfix 41 | zoom 1 42 | 43 | &:before, 44 | &:after 45 | content "" 46 | display table 47 | 48 | &:after 49 | clear both 50 | -------------------------------------------------------------------------------- /hexo/themes/modernist/source/css/_base/variable.styl: -------------------------------------------------------------------------------- 1 | // Image 2 | image-background = 'images/checker.png' 3 | 4 | // Color 5 | color-background = #374454 6 | color-font = #555 7 | color-link = #069 8 | color-strong = #222 9 | 10 | // Font 11 | font-default = "Helvetica Neue", "Helvetica", Arial, sans-serif 12 | font-serif = "Georgia", serif 13 | font-mono = Monaco, Menlo, Consolas, Courier New, monospace 14 | font-title = Arial, Helvetica Neue, Helvetica, sans-serif 15 | 16 | @import url("https://fonts.googleapis.com/css?family=Droid+Serif:400italic,700italic,400,700") 17 | 18 | font-icon = FontAwesome 19 | font-icon-path = 'fonts/fontawesome-webfont' 20 | 21 | @font-face { 22 | font-family 'FontAwesome' 23 | font-style normal 24 | font-weight normal 25 | src url(font-icon-path.eot?#iefix) format('embedded-opentype'), url(font-icon-path.woff) format('woff'), url(font-icon-path.ttf) format('truetype'), url(font-icon-path.svg#FontAwesomeRegular) format('svg') 26 | } 27 | 28 | // Width 29 | page-width = 680px -------------------------------------------------------------------------------- /hexo/themes/modernist/source/css/_partial/archive.styl: -------------------------------------------------------------------------------- 1 | .archives-title 2 | font-weight normal 3 | font-size 1.4em 4 | margin-bottom 10px 5 | padding 0 30px 6 | text-shadow 0 0 1px #fff 7 | &:before 8 | font-family font-icon 9 | content '\f073' 10 | margin-right 10px 11 | 12 | &.tag 13 | &:before 14 | content '\f02b' 15 | 16 | &.category 17 | &:before 18 | content '\f07b' 19 | 20 | .archives-wrapper 21 | &:last-child 22 | padding-bottom 10px 23 | 24 | .archives-year > a 25 | color #555 26 | 27 | .archives 28 | > article 29 | padding-top 0 30 | padding-bottom 0 31 | 32 | header 33 | .title 34 | font-size 0.9em -------------------------------------------------------------------------------- /hexo/themes/modernist/source/css/_partial/comment.styl: -------------------------------------------------------------------------------- 1 | #comment 2 | padding 0 20px 20px 3 | overflow-x hidden 4 | .title 5 | font-weight normal 6 | margin-bottom 15px -------------------------------------------------------------------------------- /hexo/themes/modernist/source/css/_partial/footer.styl: -------------------------------------------------------------------------------- 1 | #footer 2 | width page-width 3 | margin 20px auto 0 4 | padding 20px 0 0 5 | font-size 0.875em 6 | color #ccc 7 | overflow hidden 8 | text-align center 9 | 10 | a 11 | color #fff 12 | font-style italic 13 | 14 | @media screen and (max-width: 740px) 15 | #header 16 | border-radius 0 17 | body 18 | padding 0 19 | 20 | .wrapper 21 | border-radius 0 22 | box-shadow none 23 | width 100% 24 | 25 | #footer 26 | border-radius 0 27 | margin 0 auto 28 | padding 10px 29 | width auto 30 | text-align left 31 | 32 | @media screen and (max-width:580px) 33 | #header 34 | padding 15px 20px 35 | border-radius 0 36 | .title 37 | float none 38 | 39 | .nav 40 | ul 41 | li 42 | margin-left 10px 43 | 44 | p 45 | width 100% 46 | 47 | .archives-title 48 | padding 0 20px 49 | 50 | article 51 | padding 15px 20px 52 | 53 | .gallery 54 | margin 0 -20px 16px 55 | 56 | .entry 57 | blockquote 58 | margin 0 -20px 20px -------------------------------------------------------------------------------- /hexo/themes/modernist/source/css/_partial/header.styl: -------------------------------------------------------------------------------- 1 | #header 2 | border-radius 8px 8px 0 0 3 | background brown 4 | position relative 5 | padding 15px 30px 6 | border-bottom 1px solid #B2D2E1 7 | 8 | a { 9 | color: white 10 | } 11 | 12 | .title 13 | float left 14 | 15 | .nav 16 | float right 17 | font-size 0.875em 18 | font-family font-title 19 | line-height 2.5em 20 | 21 | ul 22 | list-style none 23 | li 24 | float left 25 | margin-left 26px 26 | 27 | h1 28 | margin 0 29 | padding 0 30 | font-size 1.5em 31 | font-weight normal 32 | line-height 1.2 33 | color #069 34 | text-shadow rgba(255, 255, 255, 0.9) 0 1px 0 35 | 36 | &.without-description h1 37 | margin 10px 0 38 | 39 | p 40 | margin 0 41 | color #61778B 42 | width 300px 43 | font-size 0.8125em 44 | font-style italic -------------------------------------------------------------------------------- /hexo/themes/modernist/source/css/_partial/index.styl: -------------------------------------------------------------------------------- 1 | #pagination 2 | padding-bottom 20px 3 | a 4 | display block 5 | padding 5px 10px 6 | font-family font-title 7 | background color-link 8 | color #fff 9 | text-decoration none 10 | 11 | .prev 12 | float left 13 | &:before 14 | content '\f053' 15 | padding-right 10px 16 | font-family font-icon 17 | 18 | .next 19 | float right 20 | &:after 21 | content '\f054' 22 | padding-left 10px 23 | font-family font-icon -------------------------------------------------------------------------------- /hexo/themes/modernist/source/css/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liangzr/blog/49cb2c5d1f01aee0017833624a8e3831b2ff5874/hexo/themes/modernist/source/css/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /hexo/themes/modernist/source/css/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liangzr/blog/49cb2c5d1f01aee0017833624a8e3831b2ff5874/hexo/themes/modernist/source/css/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /hexo/themes/modernist/source/css/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liangzr/blog/49cb2c5d1f01aee0017833624a8e3831b2ff5874/hexo/themes/modernist/source/css/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /hexo/themes/modernist/source/css/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liangzr/blog/49cb2c5d1f01aee0017833624a8e3831b2ff5874/hexo/themes/modernist/source/css/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /hexo/themes/modernist/source/css/images/checker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liangzr/blog/49cb2c5d1f01aee0017833624a8e3831b2ff5874/hexo/themes/modernist/source/css/images/checker.png -------------------------------------------------------------------------------- /hexo/themes/modernist/source/css/style.styl: -------------------------------------------------------------------------------- 1 | @import 'nib' 2 | 3 | @import '_base/variable' 4 | @import '_base/layout' 5 | 6 | @import '_partial/header' 7 | @import '_partial/article' 8 | @import '_partial/comment' 9 | @import '_partial/index' 10 | @import '_partial/archive' 11 | @import '_partial/footer' 12 | @import '_partial/syntax' -------------------------------------------------------------------------------- /hexo/themes/modernist/source/fancybox/blank.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liangzr/blog/49cb2c5d1f01aee0017833624a8e3831b2ff5874/hexo/themes/modernist/source/fancybox/blank.gif -------------------------------------------------------------------------------- /hexo/themes/modernist/source/fancybox/fancybox_loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liangzr/blog/49cb2c5d1f01aee0017833624a8e3831b2ff5874/hexo/themes/modernist/source/fancybox/fancybox_loading.gif -------------------------------------------------------------------------------- /hexo/themes/modernist/source/fancybox/fancybox_overlay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liangzr/blog/49cb2c5d1f01aee0017833624a8e3831b2ff5874/hexo/themes/modernist/source/fancybox/fancybox_overlay.png -------------------------------------------------------------------------------- /hexo/themes/modernist/source/fancybox/fancybox_sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liangzr/blog/49cb2c5d1f01aee0017833624a8e3831b2ff5874/hexo/themes/modernist/source/fancybox/fancybox_sprite.png -------------------------------------------------------------------------------- /hexo/themes/modernist/source/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liangzr/blog/49cb2c5d1f01aee0017833624a8e3831b2ff5874/hexo/themes/modernist/source/favicon.png -------------------------------------------------------------------------------- /hexo/themes/modernist/source/js/jquery.imagesloaded.min.js: -------------------------------------------------------------------------------- 1 | (function(c,n){var l="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==";c.fn.imagesLoaded=function(f){function m(){var b=c(i),a=c(h);d&&(h.length?d.reject(e,b,a):d.resolve(e));c.isFunction(f)&&f.call(g,e,b,a)}function j(b,a){b.src===l||-1!==c.inArray(b,k)||(k.push(b),a?h.push(b):i.push(b),c.data(b,"imagesLoaded",{isBroken:a,src:b.src}),o&&d.notifyWith(c(b),[a,e,c(i),c(h)]),e.length===k.length&&(setTimeout(m),e.unbind(".imagesLoaded")))}var g=this,d=c.isFunction(c.Deferred)?c.Deferred(): 2 | 0,o=c.isFunction(d.notify),e=g.find("img").add(g.filter("img")),k=[],i=[],h=[];c.isPlainObject(f)&&c.each(f,function(b,a){if("callback"===b)f=a;else if(d)d[b](a)});e.length?e.bind("load.imagesLoaded error.imagesLoaded",function(b){j(b.target,"error"===b.type)}).each(function(b,a){var d=a.src,e=c.data(a,"imagesLoaded");if(e&&e.src===d)j(a,e.isBroken);else if(a.complete&&a.naturalWidth!==n)j(a,0===a.naturalWidth||0===a.naturalHeight);else if(a.readyState||a.complete)a.src=l,a.src=d}):m();return d?d.promise(g): 3 | g}})(jQuery); 4 | -------------------------------------------------------------------------------- /hexo/themes/modernist/source/js/scale.fix.js: -------------------------------------------------------------------------------- 1 | var metas = document.getElementsByTagName('meta'); 2 | var i; 3 | if (navigator.userAgent.match(/iPhone/i)) { 4 | for (i=0; i 16 | 17 | ### I agree and want to create new issue 18 | 19 | 20 | - [ ] Yes, I was on [Hexo Docs page](https://hexo.io/docs/), especially on [Templates](https://hexo.io/docs/templates.html), [Variables](https://hexo.io/docs/variables.html), [Helpers](https://hexo.io/docs/helpers.html) and [Troubleshooting](https://hexo.io/docs/troubleshooting.html). 21 | - [ ] Yes, I was on [NexT Documentation Site](http://theme-next.org/docs/). 22 | - [ ] And yes, I already searched for current [issues](https://github.com/theme-next/hexo-theme-next/issues?utf8=%E2%9C%93&q=is%3Aissue) and this is not help to me. 23 | 24 | *** 25 | 26 | ### Expected behavior 27 | 28 | 29 | ### Actual behavior 30 | 31 | 32 | ### Steps to reproduce the behavior 33 | 1. N/A 34 | 2. N/A 35 | 3. N/A 36 | 37 | * Link to demo site with this feature: N/A 38 | * Link(s) to source code or any usefull link(s): N/A 39 | 40 | **NexT Scheme:** 41 | 42 | 43 | - [ ] All schemes 44 | - [ ] Muse 45 | - [ ] Mist 46 | - [ ] Pisces 47 | - [ ] Gemini 48 | -------------------------------------------------------------------------------- /hexo/themes/next/.github/stale.yml: -------------------------------------------------------------------------------- 1 | # Configuration for probot-stale - https://github.com/probot/stale 2 | 3 | # Number of days of inactivity before an Issue or Pull Request becomes stale 4 | daysUntilStale: 30 5 | # Number of days of inactivity before a stale Issue or Pull Request is closed 6 | daysUntilClose: 7 7 | # Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable 8 | exemptLabels: 9 | - bug 10 | - discussion 11 | - need verify 12 | - wait for answer 13 | - feature request 14 | - enhancement 15 | - documentation 16 | # Label to use when marking as stale 17 | staleLabel: stale 18 | # Comment to post when marking as stale. Set to `false` to disable 19 | markComment: > 20 | This issue has been automatically marked as stale because lack of 21 | recent activity. It will be closed if no further activity occurs. Thank you 22 | for your contributions. 23 | # Comment to post when removing the stale label. Set to `false` to disable 24 | unmarkComment: false 25 | # Comment to post when closing a stale Issue or Pull Request. Set to `false` to disable 26 | closeComment: false 27 | # Limit to only `issues` or `pulls` 28 | only: issues 29 | -------------------------------------------------------------------------------- /hexo/themes/next/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .idea/ 3 | *.log 4 | *.iml 5 | yarn.lock 6 | package-lock.json 7 | node_modules/ 8 | 9 | # Ignore optional external libraries 10 | source/lib/* 11 | 12 | # Track internal libraries & Ignore unused verdors files 13 | source/lib/font-awesome/less/ 14 | source/lib/font-awesome/scss/ 15 | !source/lib/font-awesome/* 16 | 17 | !source/lib/jquery/ 18 | 19 | !source/lib/velocity/ 20 | -------------------------------------------------------------------------------- /hexo/themes/next/.stylintrc: -------------------------------------------------------------------------------- 1 | { 2 | "blocks": false, 3 | "brackets": "always", 4 | "colons": "always", 5 | "colors": "always", 6 | "commaSpace": "always", 7 | "commentSpace": "always", 8 | "cssLiteral": "never", 9 | "customProperties": [], 10 | "depthLimit": false, 11 | "duplicates": true, 12 | "efficient": "always", 13 | "exclude": [], 14 | "extendPref": false, 15 | "globalDupe": false, 16 | "groupOutputByFile": true, 17 | "indentPref": false, 18 | "leadingZero": "never", 19 | "maxErrors": false, 20 | "maxWarnings": false, 21 | "mixed": false, 22 | "mixins": [], 23 | "namingConvention": "lowercase-dash", 24 | "namingConventionStrict": false, 25 | "none": "never", 26 | "noImportant": true, 27 | "parenSpace": false, 28 | "placeholders": "always", 29 | "prefixVarsWithDollar": "always", 30 | "quotePref": false, 31 | "reporterOptions": { 32 | "columns": ["lineData", "severity", "description", "rule"], 33 | "columnSplitter": " ", 34 | "showHeaders": false, 35 | "truncate": true 36 | }, 37 | "semicolons": "always", 38 | "sortOrder": "grouped", 39 | "stackedProperties": false, 40 | "trailingWhitespace": "never", 41 | "universal": false, 42 | "valid": true, 43 | "zeroUnits": "never", 44 | "zIndexNormalize": false 45 | } 46 | -------------------------------------------------------------------------------- /hexo/themes/next/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | #node_js: node 3 | node_js: lts/* 4 | 5 | cache: 6 | directories: 7 | - node_modules 8 | 9 | install: npm install 10 | 11 | before_script: 12 | - npm install -g gulp 13 | 14 | addons: 15 | browserstack: 16 | username: "ivannginx1" 17 | access_key: 18 | secure: "NutOhdgtUdBUXMPZhy8X1F1Jq+tan1LeNOV0FArBt15SNlxtNArqhiyTi4XnG9MPruX4306aGF2RBrKso+OiGNRdGtRGngH613Q0GWNtlC/boMqnI7fHqLIyCs6S12y2uA8PK4Ifxg9bZ0VtCTYYbMy+p1KvBM//L12vmtfdnby8z5Qvex3tB3dLoPOR50CKkINHJVDLm+iVRFrdz4/83oDsulZSRRGIaxu5taDWPIcp3fYZtre2Nc+RXcsyFDyjN7U0Hvr5tKBbloJxXEQEBv2xLkMOtp85nmCPD06s1Il8Wus1ux3raVsfUyaW5FpNX37Jeb5e00RQUM1wgU5m75H6qiGwDvQswbugJG0i/a2nNfsgVmbrSZdMnkHcx2Uxmrw4ejyEP5NSrJSBi05Ck1fQ4UsZ4Qkdf1fd04SI0LpLWt43eoNO/7rHKsQoP4LCX9gxKUuC075NEBLODyJ529RYfA6dKKwwH6o0ZbOgASmCoAWaM65g4+FHRnJcKL/Kj9ZWklQtRa7/ynlHaA65jefFS2lB8Ut6d3rXDDBih9mIrwV1uUaEH96xgAN42bgU/vY6FGzNkDOYZqj4YfsepDM0wbOsslFie7JZq7iFjsYvrXqLvYUMk37AZwQ2Sb6uH4tIT4Qw/4oZfDzA1En3/8HdZJ28nKW/lzjwMSqheIY=" 19 | -------------------------------------------------------------------------------- /hexo/themes/next/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "theme-next", 3 | "version": "7.0.1", 4 | "homepage": "https://theme-next.org", 5 | "authors": [ 6 | "NexT (https://theme-next.org)" 7 | ], 8 | "description": "Elegant theme for Hexo", 9 | "repository": "https://github.com/theme-next/hexo-theme-next", 10 | "keywords": [ 11 | "hexo", 12 | "theme", 13 | "next" 14 | ], 15 | "license": "AGPL", 16 | "ignore": [ 17 | "**/.*", 18 | "node_modules", 19 | "bower_components", 20 | "source/lib", 21 | "test", 22 | "tests", 23 | "screenshots" 24 | ], 25 | "dependencies": { 26 | "font-awesome": "fontawesome#*", 27 | "jquery": "http://code.jquery.com/jquery-2.1.3.min.js", 28 | "velocity": "~1.2.1" 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /hexo/themes/next/crowdin.yml: -------------------------------------------------------------------------------- 1 | files: 2 | - source: /languages/en.yml 3 | translation: /languages/%two_letters_code%.%file_extension% 4 | languages_mapping: 5 | two_letters_code: 6 | zh-CN: zh-CN 7 | zh-TW: zh-TW 8 | zh-HK: zh-HK 9 | pt-BR: pt-BR 10 | -------------------------------------------------------------------------------- /hexo/themes/next/docs/zh-CN/UPDATE-FROM-5.1.X.md: -------------------------------------------------------------------------------- 1 |

从 NexT v5.1.x 更新

2 | 3 | 在 5.1.x 版本和 6.0.x 版本之间没有很大的革命性改进。主版本号变更至 6 主要是因为: 4 | 5 | 1. 主仓库已从 [iissnan 名下](https://github.com/iissnan/hexo-theme-next) 迁移至 [theme-next](https://github.com/theme-next) 组织。 6 | 2. `next/source/lib` 目录下的绝大多数库被移出到了 [NexT 组织的外部仓库](https://github.com/theme-next)中。 7 | 3. 第三方插件 [`hexo-wordcount`](https://github.com/willin/hexo-wordcount) 被 [`hexo-symbols-count-time`](https://github.com/theme-next/hexo-symbols-count-time) 所取代,因为 `hexo-symbols-count-time` 没有任何外部 nodejs 依赖、也没有会导致生成站点时的性能问题 [language filter](https://github.com/willin/hexo-wordcount/issues/7)。 8 | 9 | 推荐通过如下步骤从 v5 升级到 v6: 10 | 11 | 1. 并不修改原有的 `next` 目录,而只是复制部分 NexT 文件: 12 | 1. `config.yml` 或 `next.yml`(如果你使用了[数据文件](DATA-FILES.md))。 13 | 2. 自定义的 CSS 配置,它们应在 `next/source/css/_custom/*` 和 `next/source/css/_variables/*` 中。 14 | 3. 自定义的排布配置,它们应在 `next/layout/_custom/*` 中。 15 | 4. 任何其它可能的附加自定义内容;为了定位它们,你可以通过某些工具在仓库间比较。 16 | 2. 克隆新的 v6.x 仓库到任一异于 `next` 的目录(如 `next-reloaded`): 17 | ```sh 18 | $ git clone https://github.com/theme-next/hexo-theme-next themes/next-reloaded 19 | ``` 20 | 如此,你可以在不修改原有的 NexT v5.1.x 目录的同时使用 `next-reloaded` 目录中的新版本主题。 21 | 3. 在 Hexo 的主配置文件中设置主题: 22 | ```yml 23 | ... 24 | theme: next-reloaded 25 | ... 26 | ``` 27 | 如此,你的 `next-reloaded` 主题将在生成站点时被加载。如果你遇到了任何错误、或只是不喜欢这一新版本,你可以随时切换回旧的 v5.1.x 版本。 28 | 29 | 4. 更新语言配置 30 | 31 | 从 v6.0.3版本起,`zh-Hans`改名为`zh-CN`:https://github.com/theme-next/hexo-theme-next/releases/tag/v6.0.3 32 | 33 | 升级到v6.0.3及以后版本的用户,需要显式修改`_config.xml`里的language配置,否则语言显示不正确。 34 | 35 | 关于第三方库的启用,参见[这里](https://github.com/theme-next/hexo-theme-next/blob/master/docs/zh-CN/INSTALLATION.md#插件)。 36 | -------------------------------------------------------------------------------- /hexo/themes/next/gulpfile.coffee: -------------------------------------------------------------------------------- 1 | fs = require('fs') 2 | path = require('path') 3 | gulp = require('gulp') 4 | jshint = require('gulp-jshint') 5 | stylish = require('jshint-stylish') 6 | shell = require('gulp-shell') 7 | yaml = require('js-yaml') 8 | 9 | gulp.task 'lint', -> 10 | return gulp.src([ 11 | './source/js/src/utils.js', 12 | './source/js/src/motion.js', 13 | './source/js/src/algolia-search.js', 14 | './source/js/src/bootstrap.js', 15 | './source/js/src/post-details.js', 16 | './source/js/src/schemes/pisces.js' 17 | ]).pipe jshint() 18 | .pipe jshint.reporter(stylish) 19 | 20 | gulp.task 'lint:stylus', shell.task [ 21 | '"./node_modules/.bin/stylint" ./source/css/' 22 | ] 23 | 24 | gulp.task 'validate:config', (cb) -> 25 | themeConfig = fs.readFileSync path.join(__dirname, '_config.yml') 26 | 27 | try 28 | yaml.safeLoad(themeConfig) 29 | cb() 30 | catch error 31 | cb new Error(error) 32 | 33 | gulp.task 'validate:languages', (cb) -> 34 | languagesPath = path.join __dirname, 'languages' 35 | languages = fs.readdirSync languagesPath 36 | errors = [] 37 | 38 | for lang in languages 39 | languagePath = path.join languagesPath, lang 40 | try 41 | yaml.safeLoad fs.readFileSync(languagePath), { 42 | filename: path.relative(__dirname, languagePath) 43 | } 44 | catch error 45 | errors.push error 46 | 47 | if errors.length == 0 48 | cb() 49 | else 50 | cb(errors) 51 | 52 | 53 | gulp.task 'default', ['lint', 'validate:config', 'validate:languages'] 54 | -------------------------------------------------------------------------------- /hexo/themes/next/languages/default.yml: -------------------------------------------------------------------------------- 1 | en.yml -------------------------------------------------------------------------------- /hexo/themes/next/layout/_custom/footer.swig: -------------------------------------------------------------------------------- 1 | {# 2 | Custom head. 3 | #} 4 | 5 | {# js of prime #} 6 | 7 | -------------------------------------------------------------------------------- /hexo/themes/next/layout/_custom/head.swig: -------------------------------------------------------------------------------- 1 | {# 2 | Custom head. 3 | #} 4 | 5 | {# css of prime #} 6 | 7 | -------------------------------------------------------------------------------- /hexo/themes/next/layout/_custom/header.swig: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /hexo/themes/next/layout/_custom/sidebar.swig: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /hexo/themes/next/layout/_macro/menu/menu-badge.swig: -------------------------------------------------------------------------------- 1 | {% macro render(name) %} 2 | 3 | {% set badges = { 4 | archives: site.posts.length, 5 | categories: site.categories.length, 6 | tags: site.tags.length } 7 | %} 8 | {% for menu, count in badges %} 9 | {% if name == menu %} 10 | {{ count }} 11 | {% endif %} 12 | {% endfor %} 13 | 14 | {% endmacro %} 15 | -------------------------------------------------------------------------------- /hexo/themes/next/layout/_macro/menu/menu-item.swig: -------------------------------------------------------------------------------- 1 | {% macro render(name, value) %} 2 | {% import 'menu-badge.swig' as menu_badge %} 3 | 4 | {% set itemURL = value.split('||')[0] | trim %} 5 | {% if itemURL.indexOf('http') != 0 %} 6 | {% set itemURL = itemURL | replace('//', '/', 'g') %} 7 | {% endif %} 8 | 23 | 24 | {% endmacro %} 25 | -------------------------------------------------------------------------------- /hexo/themes/next/layout/_macro/post-collapse.swig: -------------------------------------------------------------------------------- 1 | {% macro render(post) %} 2 | 3 |
4 |
5 | 6 | <{% if theme.seo %}h3{% else %}h2{% endif %} class="post-title"> 7 | {% if post.link %}{# Link posts #} 8 | {% set postTitleIcon = '' %} 9 | {% set postText = post.title or post.link %} 10 | {{ next_url(post.link, postText + postTitleIcon, {class: 'post-title-link post-title-link-external', itemprop: 'url' }) }} 11 | {% else %} 12 | 19 | {% endif %} 20 | 21 | 22 | 29 | 30 |
31 |
32 | 33 | {% endmacro %} 34 | -------------------------------------------------------------------------------- /hexo/themes/next/layout/_partials/github-banner.swig: -------------------------------------------------------------------------------- 1 | {% if theme.github_banner.enable %} 2 | {% set github_banner_bg_color = theme.android_chrome_color %} 3 | {% set github_banner_fg_color = '#fff' %} 4 | {% set github_URL = theme.github_banner.permalink %} 5 | {% set github_title = theme.github_banner.title %} 6 | 7 | {% set github_image = '' %} 8 | 9 | {{ next_url(github_URL, github_image, {class: 'github-corner', title: github_title, "aria-label": github_title}) }} 10 | {% endif %} 11 | -------------------------------------------------------------------------------- /hexo/themes/next/layout/_partials/head/external-fonts.swig: -------------------------------------------------------------------------------- 1 | {% if theme.font.enable %} 2 | 3 | {% set font_config = theme.font %} 4 | {% set font_families = '' %} 5 | {% set font_styles = ':300,300italic,400,400italic,700,700italic' %} 6 | {% set font_found = false %} 7 | 8 | {% if font_config.global.family and font_config.global.external %} 9 | {% set font_families += font_config.global.family + font_styles %} 10 | {% set font_found = true %} 11 | {% endif %} 12 | 13 | {% if font_config.headings.family and font_config.headings.external %} 14 | {% if font_found %} 15 | {% set font_families += '|' %} 16 | {% endif %} 17 | 18 | {% set font_families += font_config.headings.family + font_styles %} 19 | {% endif %} 20 | 21 | {% if font_config.posts.family and font_config.posts.external %} 22 | {% if font_found %} 23 | {% set font_families += '|' %} 24 | {% endif %} 25 | 26 | {% set font_families += font_config.posts.family + font_styles %} 27 | {% endif %} 28 | 29 | {% if font_config.logo.family and font_config.logo.external %} 30 | {% if font_found %} 31 | {% set font_families += '|' %} 32 | {% endif %} 33 | 34 | {% set font_families += font_config.logo.family + font_styles %} 35 | {% endif %} 36 | 37 | {% if font_config.codes.family and font_config.codes.external %} 38 | {% if font_found %} 39 | {% set font_families += '|' %} 40 | {% endif %} 41 | 42 | {% set font_families += font_config.codes.family + font_styles %} 43 | {% endif %} 44 | 45 | {% if font_families !== '' %} 46 | {% set font_families += '&subset=latin,latin-ext' %} 47 | {% set font_host = font_config.host | default('//fonts.googleapis.com') %} 48 | 49 | {% endif %} 50 | 51 | {% endif %} 52 | -------------------------------------------------------------------------------- /hexo/themes/next/layout/_partials/head/head-unique.swig: -------------------------------------------------------------------------------- 1 | {{ 2 | open_graph({ 3 | twitter_id: theme.twitter, 4 | google_plus: theme.google_plus, 5 | fb_admins: theme.fb_admins, 6 | fb_app_id: theme.fb_app_id 7 | }) 8 | }} 9 | 10 | {% if theme.rss === '' and config.feed and config.feed.path %} 11 | {% set theme.rss = config.feed.path %} 12 | {% endif %} 13 | {% if theme.rss %} 14 | 15 | {% endif %} 16 | 17 | {# Canonical, good for google search engine (SEO) : https://support.google.com/webmasters/answer/139066 #} 18 | {% if theme.canonical %} 19 | 20 | {% endif %} 21 | 22 | {# Exports some front-matter variables to Front-End #} 23 | 28 | -------------------------------------------------------------------------------- /hexo/themes/next/layout/_partials/header/brand.swig: -------------------------------------------------------------------------------- 1 |
2 |
3 | {% if theme.custom_logo.enable and theme.custom_logo.image and theme.scheme === 'Muse' %} 4 |
5 | 6 | {{ title }} 7 | 8 |
9 | {% endif %} 10 | 11 | 18 | {% if subtitle %} 19 | {% if theme.seo %} 20 |

{{ subtitle }}

21 | {% else %} 22 |

{{ subtitle }}

23 | {% endif %} 24 | {% endif %} 25 | {% if theme.custom_logo.enable and theme.custom_logo.image and (theme.scheme === 'Gemini' or theme.scheme === 'Pisces') %} 26 | 27 | {{ title }} 28 | 29 | {% endif %} 30 |
31 | 32 | 39 |
40 | -------------------------------------------------------------------------------- /hexo/themes/next/layout/_partials/header/index.swig: -------------------------------------------------------------------------------- 1 | {{ partial('_partials/header/brand.swig', {}, {cache: theme.cache.enable}) }} 2 | {% include 'menu.swig' %} 3 | 4 | {% if theme.custom_file_path.header %} 5 | {% set custom_header = '../../../../../' + theme.custom_file_path.header %} 6 | {% else %} 7 | {% set custom_header = '../../_custom/header.swig' %} 8 | {% endif %} 9 | {% include custom_header %} 10 | -------------------------------------------------------------------------------- /hexo/themes/next/layout/_partials/page/breadcrumb.swig: -------------------------------------------------------------------------------- 1 | {% set paths = page.path.split('/') %} 2 | {% set count = paths.length %} 3 | {% if count > 2 %} 4 | {% set current = 0 %} 5 | {% set link = '' %} 6 | 23 | {% endif %} 24 | -------------------------------------------------------------------------------- /hexo/themes/next/layout/_partials/page/page-header.swig: -------------------------------------------------------------------------------- 1 |
2 | 3 | <{% if theme.seo %}h2{% else %}h1{% endif %} class="post-title" itemprop="name headline"> 4 | {{- page.title -}} 5 | {% include '../post-edit.swig' %} 6 | 7 | 8 | 14 | 15 |
16 | -------------------------------------------------------------------------------- /hexo/themes/next/layout/_partials/pagination.swig: -------------------------------------------------------------------------------- 1 | {% if page.prev or page.next %} 2 | 11 | {% endif %} 12 | -------------------------------------------------------------------------------- /hexo/themes/next/layout/_partials/post-edit.swig: -------------------------------------------------------------------------------- 1 | {% if theme.post_edit.enable -%} 2 | {% set editIcon = '' -%} 3 | {{ next_url(theme.post_edit.url + page.source, editIcon, {class: 'post-edit-link', title: __('post.edit') }) }} 4 | {%- endif %} 5 | -------------------------------------------------------------------------------- /hexo/themes/next/layout/_partials/post/post-copyright.swig: -------------------------------------------------------------------------------- 1 | {% set ccLicense = theme.creative_commons.license | lower %} 2 | {% set ccLanguage = theme.creative_commons.language %} 3 | {% set ccIcon = '' %} 4 | {% set ccText = ccLicense | upper %} 5 | {% if ccLicense === 'zero' %} 6 | {% set ccType = 'publicdomain/zero/1.0/' + ccLanguage %} 7 | {% else %} 8 | {% set ccType = 'licenses/' + ccLicense + '/4.0/' + ccLanguage %} 9 | {% endif %} 10 | {% set ccURL = 'https://creativecommons.org/' + ccType %} 11 | 12 |
    13 |
  • 14 | {{ __('post.copyright.author') + __('symbol.colon') }} {# 15 | #}{{ post.author || author }}{# 16 | #}
  • 17 |
  • 18 | {{ __('post.copyright.link') + __('symbol.colon') }} 19 | {% set postURL = post.url || post.permalink %} 20 | {{ next_url(postURL, postURL, {title: post.title}) }} 21 |
  • 22 |
  • 23 | {{ __('post.copyright.license_title') + __('symbol.colon') }} {# 24 | #}{{ __('post.copyright.license_content', next_url(ccURL, ccIcon + ccText)) }}{# 25 | #}
  • 26 |
27 | -------------------------------------------------------------------------------- /hexo/themes/next/layout/_partials/post/post-related.swig: -------------------------------------------------------------------------------- 1 | {% set popular_posts = popular_posts_json(theme.related_posts.params, post) %} 2 | {% if popular_posts.json and popular_posts.json.length > 0 %} 3 | 4 | 20 | {% endif %} 21 | -------------------------------------------------------------------------------- /hexo/themes/next/layout/_partials/post/reward.swig: -------------------------------------------------------------------------------- 1 |
2 |
{{ theme.reward.comment }}
3 | 6 | 30 |
31 | -------------------------------------------------------------------------------- /hexo/themes/next/layout/_partials/post/wechat-subscriber.swig: -------------------------------------------------------------------------------- 1 |
2 | {{ author }} wechat 3 |
{{ theme.wechat_subscriber.description }}
4 |
5 | -------------------------------------------------------------------------------- /hexo/themes/next/layout/_partials/search/algolia-search.swig: -------------------------------------------------------------------------------- 1 | {% if theme.algolia_search.enable %} 2 | 20 | {% endif %} 21 | -------------------------------------------------------------------------------- /hexo/themes/next/layout/_partials/search/index.swig: -------------------------------------------------------------------------------- 1 | {% if theme.algolia_search.enable %} 2 | {% include 'algolia-search.swig' %} 3 | {% elif theme.swiftype_key %} 4 | {% include 'swiftype.swig' %} 5 | {% elif theme.local_search.enable %} 6 | {% include 'localsearch.swig' %} 7 | {% endif %} 8 | -------------------------------------------------------------------------------- /hexo/themes/next/layout/_partials/search/localsearch.swig: -------------------------------------------------------------------------------- 1 | 17 | -------------------------------------------------------------------------------- /hexo/themes/next/layout/_partials/search/swiftype.swig: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 | 5 | 13 | -------------------------------------------------------------------------------- /hexo/themes/next/layout/_partials/share/add-this.swig: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 | -------------------------------------------------------------------------------- /hexo/themes/next/layout/_partials/share/likely.swig: -------------------------------------------------------------------------------- 1 | {% set likely_js_url = '//cdn.jsdelivr.net/npm/ilyabirman-likely@2/release/likely.js' %} 2 | {% if theme.vendors.likely_js %} 3 | {% set likely_js_url = theme.vendors.likely_js %} 4 | {% endif %} 5 | 6 | 7 | {% set likely_css_url = '//cdn.jsdelivr.net/npm/ilyabirman-likely@2/release/likely.css' %} 8 | {% if theme.vendors.likely_css %} 9 | {% set likely_css_url = theme.vendors.likely_css %} 10 | {% endif %} 11 | 12 | 13 | {% if theme.likely.look == 'normal' %} 14 | {% set likely_look = 'likely' %} 15 | {% else %} 16 | {% set likely_look = 'likely likely-' + theme.likely.look %} 17 | {% endif %} 18 | 19 |
20 | {% for x in theme.likely.networks %} 21 |
{{ x }}
22 | {% endfor %} 23 |
24 | -------------------------------------------------------------------------------- /hexo/themes/next/layout/_scripts/commons.swig: -------------------------------------------------------------------------------- 1 | {% 2 | set js_commons = [ 3 | 'src/utils.js', 4 | 'src/motion.js' 5 | ] 6 | %} 7 | 8 | {% for common in js_commons %} 9 | 10 | {% endfor %} 11 | -------------------------------------------------------------------------------- /hexo/themes/next/layout/_scripts/exturl.swig: -------------------------------------------------------------------------------- 1 | {% if theme.exturl %} 2 | 3 | {% endif %} 4 | -------------------------------------------------------------------------------- /hexo/themes/next/layout/_scripts/next-boot.swig: -------------------------------------------------------------------------------- 1 | {% 2 | set boot_scripts = [ 3 | 'src/next-boot.js' 4 | ] 5 | %} 6 | 7 | {% for bs in boot_scripts %} 8 | 9 | {% endfor %} 10 | -------------------------------------------------------------------------------- /hexo/themes/next/layout/_scripts/noscript.swig: -------------------------------------------------------------------------------- 1 | 25 | -------------------------------------------------------------------------------- /hexo/themes/next/layout/_scripts/pages/post-details.swig: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /hexo/themes/next/layout/_scripts/schemes/gemini.swig: -------------------------------------------------------------------------------- 1 | {% include 'pisces.swig' %} 2 | -------------------------------------------------------------------------------- /hexo/themes/next/layout/_scripts/schemes/mist.swig: -------------------------------------------------------------------------------- 1 | {% include 'muse.swig' %} 2 | -------------------------------------------------------------------------------- /hexo/themes/next/layout/_scripts/schemes/muse.swig: -------------------------------------------------------------------------------- 1 | {% 2 | set scripts = [ 3 | 'src/schemes/muse.js' 4 | ] 5 | %} 6 | 7 | {% for script in scripts %} 8 | 9 | {% endfor %} 10 | -------------------------------------------------------------------------------- /hexo/themes/next/layout/_scripts/schemes/pisces.swig: -------------------------------------------------------------------------------- 1 | {% 2 | set scripts = [ 3 | 'src/affix.js', 4 | 'src/schemes/pisces.js' 5 | ] 6 | %} 7 | 8 | {% for script in scripts %} 9 | 10 | {% endfor %} 11 | -------------------------------------------------------------------------------- /hexo/themes/next/layout/_scripts/scroll-cookie.swig: -------------------------------------------------------------------------------- 1 | {% if theme.save_scroll %} 2 | 3 | 4 | {% endif %} 5 | -------------------------------------------------------------------------------- /hexo/themes/next/layout/_third-party/analytics/analytics-with-widget.swig: -------------------------------------------------------------------------------- 1 | {% include 'busuanzi-counter.swig' %} 2 | {% include 'tencent-mta.swig' %} 3 | {% include 'tencent-analytics.swig' %} 4 | {% include 'cnzz-analytics.swig' %} 5 | -------------------------------------------------------------------------------- /hexo/themes/next/layout/_third-party/analytics/application-insights.swig: -------------------------------------------------------------------------------- 1 | {% if theme.application_insights %} 2 | 11 | {% endif %} 12 | -------------------------------------------------------------------------------- /hexo/themes/next/layout/_third-party/analytics/baidu-analytics.swig: -------------------------------------------------------------------------------- 1 | {% if theme.baidu_analytics %} 2 | 11 | {% endif %} 12 | -------------------------------------------------------------------------------- /hexo/themes/next/layout/_third-party/analytics/busuanzi-counter.swig: -------------------------------------------------------------------------------- 1 | {% if theme.busuanzi_count.enable %} 2 |
3 | 4 | 5 | {% if theme.busuanzi_count.total_visitors %} 6 | 9 | 10 | 11 | 12 | {% endif %} 13 | 14 | {% if theme.busuanzi_count.total_visitors and theme.busuanzi_count.total_views %} 15 | 16 | {% endif %} 17 | 18 | {% if theme.busuanzi_count.total_views %} 19 | 22 | 23 | 24 | 25 | {% endif %} 26 |
27 | {% endif %} 28 | -------------------------------------------------------------------------------- /hexo/themes/next/layout/_third-party/analytics/cnzz-analytics.swig: -------------------------------------------------------------------------------- 1 | {% if theme.cnzz_siteid %} 2 |
3 | 4 |
5 | {% endif %} 6 | -------------------------------------------------------------------------------- /hexo/themes/next/layout/_third-party/analytics/facebook-sdk.swig: -------------------------------------------------------------------------------- 1 | {% if theme.facebook_sdk.enable %} 2 | 18 | {% endif %} 19 | -------------------------------------------------------------------------------- /hexo/themes/next/layout/_third-party/analytics/google-analytics.swig: -------------------------------------------------------------------------------- 1 | {% if theme.google_analytics.tracking_id %} 2 | 3 | 12 | {% endif %} 13 | -------------------------------------------------------------------------------- /hexo/themes/next/layout/_third-party/analytics/growingio.swig: -------------------------------------------------------------------------------- 1 | {% if theme.growingio_analytics %} 2 | 7 | {% endif %} 8 | -------------------------------------------------------------------------------- /hexo/themes/next/layout/_third-party/analytics/index.swig: -------------------------------------------------------------------------------- 1 | {% include 'facebook-sdk.swig' %} 2 | {% include 'vkontakte-api.swig' %} 3 | {% include 'google-analytics.swig' %} 4 | {% include 'baidu-analytics.swig' %} 5 | {% include 'application-insights.swig' %} 6 | {% include 'growingio.swig' %} 7 | -------------------------------------------------------------------------------- /hexo/themes/next/layout/_third-party/analytics/tencent-analytics.swig: -------------------------------------------------------------------------------- 1 | {% if theme.tencent_analytics %} 2 | 10 | {% endif %} 11 | -------------------------------------------------------------------------------- /hexo/themes/next/layout/_third-party/analytics/tencent-mta.swig: -------------------------------------------------------------------------------- 1 | {% if theme.tencent_mta %} 2 | 13 | {% endif %} 14 | -------------------------------------------------------------------------------- /hexo/themes/next/layout/_third-party/analytics/vkontakte-api.swig: -------------------------------------------------------------------------------- 1 | {% if theme.vkontakte_api.enable %} 2 |
3 | 25 | {% endif %} 26 | -------------------------------------------------------------------------------- /hexo/themes/next/layout/_third-party/baidu-push.swig: -------------------------------------------------------------------------------- 1 | {% if theme.baidu_push %} 2 | 11 | {% endif %} 12 | -------------------------------------------------------------------------------- /hexo/themes/next/layout/_third-party/bookmark.swig: -------------------------------------------------------------------------------- 1 | {% if theme.bookmark and theme.bookmark.enable %} 2 | {% set bookmark_uri = url_for(theme.vendors._internal + '/bookmark/bookmark.min.js?v=1.0') %} 3 | {% if theme.vendors.bookmark %} 4 | {% set bookmark_uri = theme.vendors.bookmark %} 5 | {% endif %} 6 | 7 | 14 | {% endif %} 15 | -------------------------------------------------------------------------------- /hexo/themes/next/layout/_third-party/chatra.swig: -------------------------------------------------------------------------------- 1 | {% if theme.chatra.enable %} 2 | {% if theme.chatra.embed %} 3 | 9 | {% endif %} 10 | 22 | {% endif %} 23 | -------------------------------------------------------------------------------- /hexo/themes/next/layout/_third-party/comments/changyan.swig: -------------------------------------------------------------------------------- 1 | {% if is_home() %} 2 | 3 | {% elif page.comments %} 4 | 17 | 18 | {% endif %} 19 | -------------------------------------------------------------------------------- /hexo/themes/next/layout/_third-party/comments/disqus.swig: -------------------------------------------------------------------------------- 1 | {% if theme.disqus.count %} 2 | 3 | {% endif %} 4 | {% if page.comments %} 5 | 44 | {% endif %} 45 | -------------------------------------------------------------------------------- /hexo/themes/next/layout/_third-party/comments/gitalk.swig: -------------------------------------------------------------------------------- 1 | {% set gitalk_js_url = '//cdn.jsdelivr.net/npm/gitalk@1/dist/gitalk.min.js' %} 2 | {% if theme.vendors.gitalk_js %} 3 | {% set gitalk_js_url = theme.vendors.gitalk_js %} 4 | {% endif %} 5 | 6 | 7 | {% set gitalk_css_url = '//cdn.jsdelivr.net/npm/gitalk@1/dist/gitalk.min.css' %} 8 | {% if theme.vendors.gitalk_css %} 9 | {% set gitalk_css_url = theme.vendors.gitalk_css %} 10 | {% endif %} 11 | 12 | 13 | {% set md5_url = '//cdn.jsdelivr.net/npm/js-md5@0.7.3/src/md5.min.js' %} 14 | {% if theme.vendors.md5 %} 15 | {% set md5_url = theme.vendors.md5 %} 16 | {% endif %} 17 | 18 | 19 | 36 | -------------------------------------------------------------------------------- /hexo/themes/next/layout/_third-party/comments/index.swig: -------------------------------------------------------------------------------- 1 | {% if theme.disqus.enable %} 2 | {% include 'disqus.swig' %} 3 | {% elif theme.changyan.enable and theme.changyan.appid and theme.changyan.appkey %} 4 | {% include 'changyan.swig' %} 5 | {% elif theme.valine.enable and theme.valine.appid and theme.valine.appkey %} 6 | {% include 'valine.swig' %} 7 | {% endif %} 8 | 9 | {% if page.comments %} 10 | {% if theme.livere_uid %} 11 | {% include 'livere.swig' %} 12 | {% elif theme.gitment.enable and theme.gitment.client_id %} 13 | {% include 'gitment.swig' %} 14 | {% elif theme.gitalk.enable %} 15 | {% include 'gitalk.swig' %} 16 | {% endif %} 17 | {% endif %} 18 | -------------------------------------------------------------------------------- /hexo/themes/next/layout/_third-party/comments/livere.swig: -------------------------------------------------------------------------------- 1 | 14 | -------------------------------------------------------------------------------- /hexo/themes/next/layout/_third-party/comments/valine.swig: -------------------------------------------------------------------------------- 1 | {% set leancloud_uri = '//cdn1.lncld.net/static/js/3.11.1/av-min.js' %} 2 | {% if theme.vendors.leancloud %} 3 | {% set leancloud_uri = theme.vendors.leancloud %} 4 | {% endif %} 5 | 6 | 7 | {% set valine_uri = '//unpkg.com/valine/dist/Valine.min.js' %} 8 | {% if theme.vendors.valine %} 9 | {% set valine_uri = theme.vendors.valine %} 10 | {% endif %} 11 | 12 | 13 | 33 | -------------------------------------------------------------------------------- /hexo/themes/next/layout/_third-party/copy-code.swig: -------------------------------------------------------------------------------- 1 | {% if theme.codeblock.copy_button.enable %} 2 | 36 | {% endif %} 37 | -------------------------------------------------------------------------------- /hexo/themes/next/layout/_third-party/math/index.swig: -------------------------------------------------------------------------------- 1 | {% if theme.math.enable %} 2 | {% set is_index_has_math = false %} 3 | 4 | {# At home, check if there has `mathjax: true` post #} 5 | {% if is_home() %} 6 | {% for post in page.posts %} 7 | {% if post.mathjax and not is_index_has_math %} 8 | {% set is_index_has_math = true %} 9 | {% endif %} 10 | {% endfor %} 11 | {% endif %} 12 | 13 | {% if not theme.math.per_page or (is_index_has_math or page.mathjax) %} 14 | {% if theme.math.engine == 'mathjax' %} 15 | {% include 'mathjax.swig' %} 16 | {% elif theme.math.engine == 'katex' %} 17 | {% include 'katex.swig' %} 18 | {% endif %} 19 | {% endif %} 20 | {% endif %} 21 | -------------------------------------------------------------------------------- /hexo/themes/next/layout/_third-party/math/katex.swig: -------------------------------------------------------------------------------- 1 | 2 | {% if theme.math.katex.copy_tex.enable %} 3 | {% if theme.math.katex.copy_tex.copy_tex_js %} 4 | 5 | {% endif %} 6 | {% if theme.math.katex.copy_tex.copy_tex_css %} 7 | 8 | {% endif %} 9 | {% endif %} 10 | -------------------------------------------------------------------------------- /hexo/themes/next/layout/_third-party/math/mathjax.swig: -------------------------------------------------------------------------------- 1 | 31 | 32 | 40 | 41 | -------------------------------------------------------------------------------- /hexo/themes/next/layout/_third-party/mermaid.swig: -------------------------------------------------------------------------------- 1 | {% if theme.mermaid.enable %} 2 | 21 | {% endif %} 22 | -------------------------------------------------------------------------------- /hexo/themes/next/layout/_third-party/needsharebutton.swig: -------------------------------------------------------------------------------- 1 | {% if theme.needmoreshare2.enable %} 2 | {% set needmoreshare2_js = url_for(theme.vendors._internal + '/needsharebutton/needsharebutton.js') %} 3 | {% if theme.vendors.needmoreshare2_js %} 4 | {% set needmoreshare2_js = theme.vendors.needmoreshare2_js %} 5 | {% endif %} 6 | 7 | 23 | {% endif %} 24 | -------------------------------------------------------------------------------- /hexo/themes/next/layout/_third-party/pangu.swig: -------------------------------------------------------------------------------- 1 | {% if theme.pangu %} 2 | {% set pangu_uri = url_for(theme.vendors._internal + '/pangu/dist/pangu.min.js?v=3.3') %} 3 | {% if theme.vendors.pangu %} 4 | {% set pangu_uri = theme.vendors.pangu %} 5 | {% endif %} 6 | 7 | 8 | {% endif %} 9 | -------------------------------------------------------------------------------- /hexo/themes/next/layout/_third-party/pdf.swig: -------------------------------------------------------------------------------- 1 | {% if theme.pdf.enable %} 2 | 27 | {% endif %} 28 | -------------------------------------------------------------------------------- /hexo/themes/next/layout/_third-party/quicklink.swig: -------------------------------------------------------------------------------- 1 | {% if theme.quicklink.enable %} 2 | {% set quicklink_uri = url_for(theme.vendors._internal + '/quicklink/dist/quicklink.umd.js') %} 3 | {% if theme.vendors.quicklink %} 4 | {% set quicklink_uri = theme.vendors.quicklink %} 5 | {% endif %} 6 | 7 | {% if is_home() %} 8 | {% if theme.quicklink.home %} 9 | {% set loadQL = true %} 10 | {% endif %} 11 | {% endif %} 12 | 13 | {% if is_archive() %} 14 | {% if theme.quicklink.archive %} 15 | {% set loadQL = true %} 16 | {% endif %} 17 | {% endif %} 18 | 19 | {% if loadQL or (page.quicklink or post.quicklink) %} 20 | 21 | 34 | {% endif %} 35 | {% endif %} 36 | -------------------------------------------------------------------------------- /hexo/themes/next/layout/_third-party/rating.swig: -------------------------------------------------------------------------------- 1 | {% if theme.rating.enable and (not is_home() and is_post()) %} 2 | 20 | {% endif %} 21 | -------------------------------------------------------------------------------- /hexo/themes/next/layout/_third-party/search/algolia-search.swig: -------------------------------------------------------------------------------- 1 | {% if theme.algolia_search.enable %} 2 | 3 | {# S: Include Algolia instantsearch.js library #} 4 | {% set algolia_instant_css = url_for(theme.vendors._internal + '/algolia-instant-search/instantsearch.min.css') %} 5 | {% if theme.vendors.algolia_instant_css %} 6 | {% set algolia_instant_css = theme.vendors.algolia_instant_css %} 7 | {% endif %} 8 | 9 | 10 | {% set algolia_instant_js = url_for(theme.vendors._internal + '/algolia-instant-search/instantsearch.min.js') %} 11 | {% if theme.vendors.algolia_instant_js %} 12 | {% set algolia_instant_js = theme.vendors.algolia_instant_js %} 13 | {% endif %} 14 | 15 | {# E: Include Algolia instantsearch.js library #} 16 | 17 | 18 | {% endif %} 19 | -------------------------------------------------------------------------------- /hexo/themes/next/layout/_third-party/search/index.swig: -------------------------------------------------------------------------------- 1 | {% include 'localsearch.swig' %} 2 | {% include 'algolia-search.swig' %} 3 | -------------------------------------------------------------------------------- /hexo/themes/next/layout/_third-party/tidio.swig: -------------------------------------------------------------------------------- 1 | {% if theme.tidio.enable %} 2 | 3 | {% endif %} 4 | -------------------------------------------------------------------------------- /hexo/themes/next/layout/category.swig: -------------------------------------------------------------------------------- 1 | {% extends '_layout.swig' %} 2 | {% import '_macro/post-collapse.swig' as post_template %} 3 | {% import '_macro/sidebar.swig' as sidebar_template %} 4 | 5 | {% block title %}{{ __('title.category') }}: {{ page.category }} | {{ title }}{% endblock %} 6 | 7 | {% block content %} 8 | 9 | {######################} 10 | {### CATEGORY BLOCK ###} 11 | {######################} 12 |
13 | 14 |
15 |
16 | <{% if theme.seo %}h2{% else %}h1{% endif %}>{# 17 | #}{{ page.category }}{# 18 | #}{{ __('title.category') }} 19 | 20 |
21 | 22 | {% for post in page.posts %} 23 | {{ post_template.render(post) }} 24 | {% endfor %} 25 |
26 | 27 |
28 | {##########################} 29 | {### END CATEGORY BLOCK ###} 30 | {##########################} 31 | 32 | {% include '_partials/pagination.swig' %} 33 | 34 | {% endblock %} 35 | 36 | {% block sidebar %} 37 | {{ sidebar_template.render(false) }} 38 | {% endblock %} 39 | -------------------------------------------------------------------------------- /hexo/themes/next/layout/index.swig: -------------------------------------------------------------------------------- 1 | {% extends '_layout.swig' %} 2 | {% import '_macro/post.swig' as post_template %} 3 | {% import '_macro/sidebar.swig' as sidebar_template %} 4 | 5 | {% block title %}{{ title }}{% if theme.index_with_subtitle and subtitle %} – {{ subtitle }}{% endif %}{% endblock %} 6 | 7 | {% block page_class %} 8 | {% if is_home() %}page-home{% endif -%} 9 | {% endblock %} 10 | 11 | {% block content %} 12 |
13 | {% for post in page.posts %} 14 | {{ post_template.render(post, true) }} 15 | {% endfor %} 16 |
17 | 18 | {% include '_partials/pagination.swig' %} 19 | {% endblock %} 20 | 21 | {% block sidebar %} 22 | {{ sidebar_template.render(false) }} 23 | {% endblock %} 24 | -------------------------------------------------------------------------------- /hexo/themes/next/layout/post.swig: -------------------------------------------------------------------------------- 1 | {% extends '_layout.swig' %} 2 | {% import '_macro/post.swig' as post_template %} 3 | {% import '_macro/sidebar.swig' as sidebar_template %} 4 | 5 | {% block title %}{{ page.title }} | {{ title }}{% endblock %} 6 | 7 | {% block page_class %}page-post-detail{% endblock %} 8 | 9 | {% block content %} 10 | 11 |
12 | {{ post_template.render(page) }} 13 |
14 | 15 | {% endblock %} 16 | 17 | {% block sidebar %} 18 | {{ sidebar_template.render(true) }} 19 | {% endblock %} 20 | 21 | {% block script_extra %} 22 | {% include '_scripts/pages/post-details.swig' %} 23 | {% endblock %} 24 | -------------------------------------------------------------------------------- /hexo/themes/next/layout/schedule.swig: -------------------------------------------------------------------------------- 1 | {% block content %} 2 | {######################} 3 | {### SCHEDULE BLOCK ###} 4 | {######################} 5 |
6 |
7 |
    8 |
9 |
10 |
11 | {##########################} 12 | {### END SCHEDULE BLOCK ###} 13 | {##########################} 14 | {% endblock %} 15 | -------------------------------------------------------------------------------- /hexo/themes/next/layout/tag.swig: -------------------------------------------------------------------------------- 1 | {% extends '_layout.swig' %} 2 | {% import '_macro/post-collapse.swig' as post_template %} 3 | {% import '_macro/sidebar.swig' as sidebar_template %} 4 | 5 | {% block title %}{{ __('title.tag') }}: {{ page.tag }} | {{ title }}{% endblock %} 6 | 7 | {% block content %} 8 | 9 | {#################} 10 | {### TAG BLOCK ###} 11 | {#################} 12 |
13 | 14 |
15 |
16 | <{% if theme.seo %}h2{% else %}h1{% endif %}>{# 17 | #}{{ page.tag }}{# 18 | #}{{ __('title.tag') }} 19 | 20 |
21 | 22 | {% for post in page.posts %} 23 | {{ post_template.render(post) }} 24 | {% endfor %} 25 |
26 | 27 |
28 | {#####################} 29 | {### END TAG BLOCK ###} 30 | {#####################} 31 | 32 | {% include '_partials/pagination.swig' %} 33 | 34 | {% endblock %} 35 | 36 | {% block sidebar %} 37 | {{ sidebar_template.render(false) }} 38 | {% endblock %} 39 | -------------------------------------------------------------------------------- /hexo/themes/next/layout/translated.swig: -------------------------------------------------------------------------------- 1 | {% extends '_layout.swig' %} 2 | {% import '_macro/post.swig' as post_template %} 3 | {% import '_macro/sidebar.swig' as sidebar_template %} 4 | 5 | {% block title %}{{ title }}{% if theme.index_with_subtitle and subtitle %} – {{ subtitle }}{% endif %}{% endblock %} 6 | 7 | {% block page_class %} 8 | {% if is_home() %}page-home{% endif -%} 9 | {% endblock %} 10 | 11 | {% block content %} 12 |
13 | {% for post in page.posts %} 14 | {{ post_template.render(post, true) }} 15 | {% endfor %} 16 |
17 | 18 | {% include '_partials/pagination.swig' %} 19 | {% endblock %} 20 | 21 | {% block sidebar %} 22 | {{ sidebar_template.render(false) }} 23 | {% endblock %} 24 | -------------------------------------------------------------------------------- /hexo/themes/next/layout/writing.swig: -------------------------------------------------------------------------------- 1 | {% extends '_layout.swig' %} 2 | {% import '_macro/post.swig' as post_template %} 3 | {% import '_macro/sidebar.swig' as sidebar_template %} 4 | 5 | {% block title %}{{ title }}{% if theme.index_with_subtitle and subtitle %} – {{ subtitle }}{% endif %}{% endblock %} 6 | 7 | {% block page_class %} 8 | {% if is_home() %}page-home{% endif -%} 9 | {% endblock %} 10 | 11 | {% block content %} 12 |
13 | {% for post in page.posts %} 14 | {{ post_template.render(post, true) }} 15 | {% endfor %} 16 |
17 | 18 | {% include '_partials/pagination.swig' %} 19 | {% endblock %} 20 | 21 | {% block sidebar %} 22 | {{ sidebar_template.render(false) }} 23 | {% endblock %} 24 | -------------------------------------------------------------------------------- /hexo/themes/next/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "hexo-theme-next", 3 | "version": "7.0.1", 4 | "description": "Elegant and powerful theme for Hexo", 5 | "main": "index.js", 6 | "directories": { 7 | "test": "test" 8 | }, 9 | "scripts": { 10 | "test": "gulp", 11 | "contributors:add": "all-contributors add", 12 | "contributors:generate": "all-contributors generate" 13 | }, 14 | "repository": { 15 | "type": "git", 16 | "url": "git+https://github.com/theme-next/hexo-theme-next.git" 17 | }, 18 | "keywords": [ 19 | "hexo", 20 | "theme", 21 | "next" 22 | ], 23 | "author": "NexT (https://theme-next.org)", 24 | "license": "AGPL", 25 | "bugs": { 26 | "url": "https://github.com/theme-next/hexo-theme-next/issues" 27 | }, 28 | "homepage": "https://theme-next.org", 29 | "devDependencies": { 30 | "all-contributors-cli": "^5.4.0", 31 | "coffee-script": "^1.10.0", 32 | "gulp": "^3.9.0", 33 | "gulp-jshint": "^1.12.0", 34 | "gulp-shell": "^0.6.1", 35 | "js-yaml": "^3.8.1", 36 | "jshint-stylish": "^2.1.0", 37 | "stylint": "^1.5.9" 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /hexo/themes/next/scripts/filters/exturl.js: -------------------------------------------------------------------------------- 1 | /* global hexo */ 2 | 3 | 'use strict'; 4 | 5 | hexo.extend.filter.register('after_post_render', function(data) { 6 | var theme = hexo.theme.config; 7 | // Exit if `exturl` option disable in NexT. 8 | if (!theme.exturl) return; 9 | 10 | var url = require('url'); 11 | var cheerio; 12 | 13 | var config = this.config; 14 | 15 | if (!cheerio) cheerio = require('cheerio'); 16 | 17 | var $ = cheerio.load(data.content, {decodeEntities: false}); 18 | var siteHost = url.parse(config.url).hostname || config.url; 19 | 20 | $('a').each(function() { 21 | var href = $(this).attr('href'); 22 | // Exit if the href attribute doesn't exists. 23 | if (!href) return; 24 | 25 | var data = url.parse(href); 26 | 27 | // Exit if the link doesn't have protocol, which means it's an internal link. 28 | if (!data.protocol) return; 29 | 30 | // Exit if the url has same host with `config.url`. 31 | if (data.hostname === siteHost) return; 32 | 33 | // If title atribute filled, set it as title; if not, set url as title. 34 | var title = $(this).attr('title') || href; 35 | 36 | var encoded = Buffer.from(href).toString('base64'); 37 | 38 | $(this).replaceWith(function() { 39 | return $(`${$(this).html()}`); 40 | }); 41 | 42 | }); 43 | 44 | data.content = $.html(); 45 | }, 0); 46 | -------------------------------------------------------------------------------- /hexo/themes/next/scripts/helpers/engine.js: -------------------------------------------------------------------------------- 1 | /* global hexo */ 2 | 3 | 'use strict'; 4 | 5 | hexo.extend.helper.register('hexo_env', function(type) { 6 | return this.env[type]; 7 | }); 8 | 9 | hexo.extend.helper.register('next_env', function(type) { 10 | var path = require('path'); 11 | var env = require(path.normalize('../../package.json')); 12 | return env[type]; 13 | }); 14 | 15 | hexo.extend.helper.register('item_active', function(path, className) { 16 | var canonical = this.page.canonical_path; 17 | var current = this.url_for(canonical).replace('index.html', '', 'g'); 18 | var result = ''; 19 | 20 | if (current.indexOf(path) !== -1) { 21 | if (path !== '/' || path === current) { 22 | result = ' ' + className; 23 | } 24 | } 25 | return result; 26 | }); 27 | -------------------------------------------------------------------------------- /hexo/themes/next/scripts/merge-configs.js: -------------------------------------------------------------------------------- 1 | /* global hexo */ 2 | 3 | 'use strict'; 4 | 5 | var merge = require('./merge'); 6 | 7 | hexo.on('generateBefore', function() { 8 | if (hexo.locals.get) { 9 | var data = hexo.locals.get('data'); 10 | 11 | /** 12 | * Merge configs from _data/next.yml into hexo.theme.config. 13 | * If `override`, configs in next.yml will rewrite configs in hexo.theme.config. 14 | * If next.yml not exists, merge all `theme_config.*` into hexo.theme.config. 15 | */ 16 | if (data && data.next) { 17 | if (data.next.override) { 18 | hexo.theme.config = data.next; 19 | } else { 20 | merge(hexo.config, data.next); 21 | merge(hexo.theme.config, data.next); 22 | } 23 | } else { 24 | merge(hexo.theme.config, hexo.config.theme_config); 25 | } 26 | 27 | // Custom languages support. Introduced in NexT v6.3.0. 28 | if (data && data.languages) { 29 | var lang = this.config.language; 30 | var i18n = this.theme.i18n; 31 | 32 | var mergeLang = function(lang) { 33 | i18n.set(lang, merge(i18n.get([lang]), data.languages[lang])); 34 | }; 35 | 36 | if (Array.isArray(lang)) { 37 | for (var i = 0; i < lang.length; i++) { 38 | mergeLang(lang[i]); 39 | } 40 | } else { 41 | mergeLang(lang); 42 | } 43 | } 44 | } 45 | }); 46 | -------------------------------------------------------------------------------- /hexo/themes/next/scripts/tags/button.js: -------------------------------------------------------------------------------- 1 | /** 2 | * button.js | https://theme-next.org/docs/tag-plugins/button/ 3 | */ 4 | 5 | /* global hexo */ 6 | 7 | 'use strict'; 8 | 9 | function postButton(args) { 10 | args = args.join(' ').split(','); 11 | var url = args[0]; 12 | var text = args[1] || ''; 13 | var icon = args[2] || ''; 14 | var title = args[3] || ''; 15 | 16 | if (!url) { 17 | hexo.log.warn('URL can NOT be empty'); 18 | } 19 | 20 | text = text.trim(); 21 | icon = icon.trim(); 22 | title = title.trim(); 23 | 24 | var result = [` 0 && result.push(` title="${title}"`); 26 | result.push('>'); 27 | icon.length > 0 && result.push(``); 28 | text.length > 0 && result.push(text); 29 | result.push(''); 30 | 31 | return result.join(''); 32 | } 33 | 34 | hexo.extend.tag.register('button', postButton, {ends: false}); 35 | hexo.extend.tag.register('btn', postButton, {ends: false}); 36 | -------------------------------------------------------------------------------- /hexo/themes/next/scripts/tags/center-quote.js: -------------------------------------------------------------------------------- 1 | /** 2 | * center-quote.js | https://theme-next.org/docs/tag-plugins/ 3 | */ 4 | 5 | /* global hexo */ 6 | 7 | 'use strict'; 8 | 9 | function centerQuote(args, content) { 10 | return '
' 11 | + hexo.render.renderSync({text: content, engine: 'markdown'}) 12 | + '
'; 13 | } 14 | 15 | hexo.extend.tag.register('centerquote', centerQuote, {ends: true}); 16 | hexo.extend.tag.register('cq', centerQuote, {ends: true}); 17 | -------------------------------------------------------------------------------- /hexo/themes/next/scripts/tags/full-image.js: -------------------------------------------------------------------------------- 1 | /** 2 | * full-image.js | https://theme-next.org/docs/tag-plugins/full-image/ 3 | */ 4 | 5 | /* global hexo */ 6 | 7 | 'use strict'; 8 | 9 | function fullImage(args) { 10 | args = args.join(' ').split(','); 11 | var mixed = args[0].split('@'); 12 | var img = mixed[0]; 13 | var src = mixed[1] === 'lazy' ? '/images/loading.gif" data-original="' + img : img; 14 | var alt = args[1] || ''; 15 | var title = args[2] || ''; 16 | var width = args[3] || ''; 17 | 18 | if (!img) { 19 | hexo.log.warn('Image src can NOT be empty'); 20 | } 21 | 22 | var image = [` 0 && image.push(`alt="${alt.trim()}"`); 24 | title.length > 0 && image.push(`title="${title.trim()}"`); 25 | width.length > 0 && image.push(`style="max-width: none; width:${width};"`); 26 | image.push('/>'); 27 | 28 | return image.join(' '); 29 | } 30 | 31 | hexo.extend.tag.register('fullimage', fullImage, {ends: false}); 32 | hexo.extend.tag.register('fi', fullImage, {ends: false}); 33 | -------------------------------------------------------------------------------- /hexo/themes/next/scripts/tags/include-raw.js: -------------------------------------------------------------------------------- 1 | /** 2 | * include-raw.js | https://theme-next.org/docs/tag-plugins/ 3 | */ 4 | 5 | /* global hexo */ 6 | 7 | 'use strict'; 8 | 9 | var pathFn = require('path'); 10 | var fs = require('hexo-fs'); 11 | 12 | function includeRaw(args) { 13 | var path = pathFn.join(hexo.source_dir, args[0]); 14 | 15 | return fs.exists(path).then(function(exist) { 16 | if (!exist) { 17 | hexo.log.error('Include file not found!'); 18 | return; 19 | } 20 | return fs.readFile(path).then(function(contents) { 21 | if (!contents) { 22 | hexo.log.warn('Include file empty.'); 23 | return; 24 | } 25 | return contents; 26 | }); 27 | }); 28 | } 29 | 30 | hexo.extend.tag.register('include_raw', includeRaw, {ends: false, async: true}); 31 | -------------------------------------------------------------------------------- /hexo/themes/next/scripts/tags/label.js: -------------------------------------------------------------------------------- 1 | /** 2 | * label.js | https://theme-next.org/docs/tag-plugins/label/ 3 | */ 4 | 5 | /* global hexo */ 6 | 7 | 'use strict'; 8 | 9 | function postLabel(args) { 10 | args = args.join(' ').split('@'); 11 | var classes = args[0] || 'default'; 12 | var text = args[1] || ''; 13 | 14 | !text && hexo.log.warn('Label text must be defined!'); 15 | 16 | return `${text}`; 17 | } 18 | 19 | hexo.extend.tag.register('label', postLabel, {ends: false}); 20 | -------------------------------------------------------------------------------- /hexo/themes/next/scripts/tags/mermaid.js: -------------------------------------------------------------------------------- 1 | /** 2 | * mermaid.js | https://theme-next.org/docs/tag-plugins/mermaid/ 3 | */ 4 | 5 | /* global hexo */ 6 | 7 | 'use strict'; 8 | 9 | function mermaid(args, content) { 10 | return `
11 |             ${args.join(' ')}
12 |             ${content}
13 |           
`; 14 | } 15 | 16 | hexo.extend.tag.register('mermaid', mermaid, {ends: true}); 17 | -------------------------------------------------------------------------------- /hexo/themes/next/scripts/tags/note.js: -------------------------------------------------------------------------------- 1 | /** 2 | * note.js | https://theme-next.org/docs/tag-plugins/note/ 3 | */ 4 | 5 | /* global hexo */ 6 | 7 | 'use strict'; 8 | 9 | function postNote(args, content) { 10 | return `
11 | ${hexo.render.renderSync({text: content, engine: 'markdown'}).split('\n').join('')} 12 |
`; 13 | } 14 | 15 | hexo.extend.tag.register('note', postNote, {ends: true}); 16 | hexo.extend.tag.register('subnote', postNote, {ends: true}); 17 | -------------------------------------------------------------------------------- /hexo/themes/next/scripts/tags/pdf.js: -------------------------------------------------------------------------------- 1 | /** 2 | * pdf.js | https://theme-next.org/docs/tag-plugins/pdf/ 3 | */ 4 | 5 | /* global hexo */ 6 | 7 | 'use strict'; 8 | 9 | function pdf(args) { 10 | return `
`; 11 | } 12 | 13 | hexo.extend.tag.register('pdf', pdf, {ends: false}); 14 | -------------------------------------------------------------------------------- /hexo/themes/next/scripts/tags/video.js: -------------------------------------------------------------------------------- 1 | /** 2 | * video.js | https://theme-next.org/docs/tag-plugins/video/ 3 | */ 4 | 5 | /* global hexo */ 6 | 7 | 'use strict'; 8 | 9 | function postVideo(args) { 10 | return ``; 11 | } 12 | 13 | hexo.extend.tag.register('video', postVideo, {ends: false}); 14 | -------------------------------------------------------------------------------- /hexo/themes/next/source/css/_common/components/back-to-top-sidebar.styl: -------------------------------------------------------------------------------- 1 | .back-to-top { 2 | visibility: hidden; 3 | margin: (20px - $sidebar-offset) -10px -20px; 4 | background: $b2t-sidebar-bg-color; 5 | font-size: $b2t-font-size; 6 | opacity: $b2t-opacity; 7 | cursor: pointer; 8 | text-align: center; 9 | &:hover { opacity: 0.8; } 10 | 11 | +tablet() { 12 | fixbutton() if hexo-config('sidebar.onmobile'); 13 | hide() if not hexo-config('sidebar.onmobile'); 14 | } 15 | +mobile() { 16 | fixbutton() if hexo-config('sidebar.onmobile'); 17 | hide() if not hexo-config('sidebar.onmobile'); 18 | } 19 | 20 | &.back-to-top-on { 21 | visibility: visible; 22 | the-transition(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /hexo/themes/next/source/css/_common/components/back-to-top.styl: -------------------------------------------------------------------------------- 1 | .back-to-top { 2 | box-sizing: border-box; 3 | position: fixed; 4 | bottom: $b2t-position-bottom; 5 | right: $b2t-position-right; 6 | z-index: $zindex-5; 7 | padding: 0 6px; 8 | width: hexo-config('back2top.scrollpercent') ? initial : 24px; 9 | background: $b2t-bg-color; 10 | font-size: $b2t-font-size; 11 | opacity: $b2t-opacity; 12 | color: $b2t-color; 13 | cursor: pointer; 14 | text-align: center; 15 | transition-property: bottom; 16 | the-transition(); 17 | 18 | +tablet() { 19 | fixbutton() if hexo-config('sidebar.onmobile'); 20 | hide() if not hexo-config('sidebar.onmobile'); 21 | } 22 | +mobile() { 23 | fixbutton() if hexo-config('sidebar.onmobile'); 24 | hide() if not hexo-config('sidebar.onmobile'); 25 | } 26 | 27 | &.back-to-top-on { 28 | bottom: $b2t-position-bottom-on; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /hexo/themes/next/source/css/_common/components/buttons.styl: -------------------------------------------------------------------------------- 1 | .btn { 2 | display: inline-block; 3 | padding: 0 20px; 4 | font-size: $btn-default-font-size; 5 | color: $btn-default-color; 6 | background: $btn-default-bg; 7 | border: $btn-default-border-width solid $btn-default-border-color; 8 | text-decoration: none; 9 | border-radius: $btn-default-radius; 10 | transition-property: background-color; 11 | the-transition(); 12 | line-height: 2; 13 | 14 | &:hover { 15 | border-color: $btn-default-hover-border-color; 16 | color: $btn-default-hover-color; 17 | background: $btn-default-hover-bg; 18 | } 19 | 20 | +.btn { 21 | margin: 0 0 8px 8px; 22 | } 23 | 24 | .fa-fw { 25 | width: (18em / 14); 26 | text-align: left; 27 | } 28 | } 29 | 30 | .btn-bar { 31 | display: block; 32 | width: 22px; 33 | height: 2px; 34 | background: $text-color; 35 | border-radius: 1px; 36 | 37 | &+.btn-bar { margin-top: 4px; } 38 | } 39 | -------------------------------------------------------------------------------- /hexo/themes/next/source/css/_common/components/comments.styl: -------------------------------------------------------------------------------- 1 | .comments { margin: 60px 20px 0; } 2 | -------------------------------------------------------------------------------- /hexo/themes/next/source/css/_common/components/components.styl: -------------------------------------------------------------------------------- 1 | @import "highlight"; 2 | @import "tags"; 3 | 4 | @import "buttons"; 5 | @import "pagination"; 6 | @import "comments"; 7 | @import "tag-cloud"; 8 | @import (hexo-config('back2top.sidebar') ? "back-to-top-sidebar" : "back-to-top") if (hexo-config('back2top.enable')); 9 | 10 | @import "header"; 11 | @import "post"; 12 | @import "sidebar"; 13 | @import "footer"; 14 | @import "third-party"; 15 | 16 | @import "pages"; 17 | -------------------------------------------------------------------------------- /hexo/themes/next/source/css/_common/components/footer/footer.styl: -------------------------------------------------------------------------------- 1 | .footer { 2 | font-size: 14px; 3 | color: $grey-dark; 4 | 5 | img { border: none; } 6 | } 7 | 8 | .footer-inner { text-align: center; } 9 | 10 | @keyframes iconAnimate { 11 | 0%, 100% { transform: scale(1); } 12 | 10%, 30% { transform: scale(0.9); } 13 | 20%, 40%, 60%, 80% { transform: scale(1.1); } 14 | 50%, 70% { transform: scale(1.1); } 15 | } 16 | 17 | if hexo-config('footer.icon.animated') { 18 | #animate { 19 | animation: iconAnimate 1.33s ease-in-out infinite; 20 | } 21 | } 22 | 23 | .with-love { 24 | display: inline-block; 25 | margin: 0 5px; 26 | color: unquote(hexo-config('footer.icon.color')); 27 | } 28 | 29 | .powered-by, 30 | .theme-info { display: inline-block; } 31 | -------------------------------------------------------------------------------- /hexo/themes/next/source/css/_common/components/header/github-banner.styl: -------------------------------------------------------------------------------- 1 | .github-corner { 2 | scheme = hexo-config('scheme'); 3 | bg_color = unquote(hexo-config('android_chrome_color')); 4 | mobile_layout_economy = hexo-config('mobile_layout_economy'); 5 | 6 | :hover .octo-arm { 7 | animation: octocat-wave 560ms ease-in-out; 8 | } 9 | @keyframes octocat-wave { 10 | 0%,100% { 11 | transform: rotate(0); 12 | } 13 | 20%,60% { 14 | transform: rotate(-25deg); 15 | } 16 | 40%,80% { 17 | transform: rotate(10deg); 18 | } 19 | } 20 | +tablet-mobile() { 21 | >svg { 22 | if (scheme == 'Pisces') || (scheme == 'Gemini') { 23 | fill: #fff !important; 24 | color: bg_color !important; 25 | } 26 | } 27 | .github-corner:hover .octo-arm { 28 | animation: none; 29 | } 30 | .github-corner .octo-arm { 31 | animation: octocat-wave 560ms ease-in-out; 32 | } 33 | } 34 | +mobile() { 35 | >svg { 36 | if (scheme == 'Mist') { 37 | top: inherit !important; 38 | margin-top: -50px; 39 | if mobile_layout_economy { 40 | +mobile-small() { 41 | margin-top: initial; 42 | } 43 | } 44 | } 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /hexo/themes/next/source/css/_common/components/header/header.styl: -------------------------------------------------------------------------------- 1 | .header { background: $head-bg; } 2 | 3 | .header-inner { position: relative; } 4 | 5 | @import "headerband"; 6 | @import "site-meta"; 7 | @import "site-nav"; 8 | @import "menu"; 9 | @import "github-banner" if hexo-config('github_banner.enable'); 10 | -------------------------------------------------------------------------------- /hexo/themes/next/source/css/_common/components/header/headerband.styl: -------------------------------------------------------------------------------- 1 | .headband { 2 | height: $headband-height; 3 | background: $headband-bg; 4 | } 5 | -------------------------------------------------------------------------------- /hexo/themes/next/source/css/_common/components/header/menu.styl: -------------------------------------------------------------------------------- 1 | // Menu 2 | // -------------------------------------------------- 3 | .menu { 4 | margin-top: 20px; 5 | padding-left: 0; 6 | text-align: center; 7 | } 8 | 9 | .menu .menu-item { 10 | display: inline-block; 11 | margin: 0 10px; 12 | list-style: none; 13 | 14 | @media screen and (max-width: 767px) { 15 | margin-top: 10px; 16 | } 17 | 18 | a, span.exturl { 19 | display: block; 20 | font-size: 13px; 21 | line-height: inherit; 22 | border-bottom: 1px solid $menu-link-border; 23 | transition-property: border-color; 24 | the-transition(); 25 | 26 | &:hover { border-bottom-color: $menu-link-hover-border; } 27 | } 28 | 29 | .fa { margin-right: 5px; } 30 | } 31 | 32 | .use-motion .menu-item { opacity: 0; } 33 | -------------------------------------------------------------------------------- /hexo/themes/next/source/css/_common/components/header/site-meta.styl: -------------------------------------------------------------------------------- 1 | .site-meta { 2 | margin: 0; 3 | text-align: $site-meta-text-align; 4 | 5 | +mobile() { text-align: center; } 6 | } 7 | 8 | .brand { 9 | position: relative; 10 | display: inline-block; 11 | padding: 0 40px; 12 | color: $brand-color; 13 | background: $brand-bg; 14 | border-bottom: none; 15 | &:hover { color: $brand-hover-color; } 16 | } 17 | 18 | .logo { 19 | display: inline-block; 20 | margin-right: 5px; 21 | line-height: 36px; 22 | vertical-align: top; 23 | } 24 | 25 | .site-title { 26 | display: inline-block; 27 | vertical-align: top; 28 | line-height: 36px; 29 | font-size: $logo-font-size; 30 | font-weight: normal; 31 | font-family: $font-family-logo; 32 | } 33 | 34 | .site-subtitle { 35 | margin-top: 10px; 36 | font-size: $subtitle-font-size; 37 | color: $subtitle-color; 38 | } 39 | 40 | .use-motion { 41 | .brand { opacity: 0; } 42 | 43 | .logo, .site-title, .site-subtitle, .custom-logo-image { 44 | opacity: 0; 45 | position: relative; 46 | top: -10px; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /hexo/themes/next/source/css/_common/components/header/site-nav.styl: -------------------------------------------------------------------------------- 1 | .site-nav-toggle { 2 | display: none; 3 | position: absolute; 4 | top: 10px; 5 | left: 10px; 6 | +mobile() { 7 | display: block; 8 | } 9 | 10 | button { 11 | margin-top: 2px; 12 | padding: 9px 10px; 13 | background: transparent; 14 | border: none; 15 | } 16 | } 17 | 18 | .site-nav { 19 | +mobile() { 20 | display: none; 21 | margin: 0 -10px; 22 | padding: 0 10px; 23 | clear: both; 24 | border-top: 1px solid $gray-lighter; 25 | } 26 | +tablet() { display: block !important; } 27 | +desktop() { display: block !important; } 28 | } 29 | -------------------------------------------------------------------------------- /hexo/themes/next/source/css/_common/components/highlight/diff.styl: -------------------------------------------------------------------------------- 1 | $highlight_theme = hexo-config("highlight_theme") 2 | 3 | if $highlight_theme == "normal" 4 | $highlight-deletion = #fdd 5 | $highlight-addition = #dfd 6 | else 7 | $highlight-deletion = #800000 8 | $highlight-addition = #008000 9 | -------------------------------------------------------------------------------- /hexo/themes/next/source/css/_common/components/pages/archive.styl: -------------------------------------------------------------------------------- 1 | .page-archive { 2 | 3 | .archive-page-counter { 4 | position: relative; 5 | top: 3px; 6 | left: 20px; 7 | 8 | +mobile() { 9 | top: 5px; 10 | } 11 | } 12 | 13 | .posts-collapse { 14 | 15 | .archive-move-on { 16 | position: absolute; 17 | top: 11px; 18 | left: 0; 19 | margin-left: -6px; 20 | width: 10px; 21 | height: 10px; 22 | opacity: 0.5; 23 | background: $black-light; 24 | border: 1px solid white; 25 | 26 | circle(); 27 | } 28 | } 29 | 30 | .fa-external-link { 31 | font-size: 15px; 32 | margin-left: 5px; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /hexo/themes/next/source/css/_common/components/pages/breadcrumb.styl: -------------------------------------------------------------------------------- 1 | ul.breadcrumb { 2 | list-style: none; 3 | margin: 1em 0; 4 | padding: 0 2em; 5 | text-align: center; 6 | font-size: $font-size-small 7 | 8 | & li { 9 | display: inline; 10 | } 11 | 12 | & li+li:before { 13 | padding: 0.5em; 14 | font-weight: normal; 15 | content: "/\00a0"; 16 | } 17 | 18 | & li+li:last-child { 19 | font-weight: bold; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /hexo/themes/next/source/css/_common/components/pages/categories.styl: -------------------------------------------------------------------------------- 1 | .category-all-page { 2 | .category-all-title { text-align: center; } 3 | 4 | .category-all { margin-top: 20px; } 5 | 6 | .category-list { 7 | margin: 0; 8 | padding: 0; 9 | list-style: none; 10 | } 11 | 12 | .category-list-item { margin: 5px 10px; } 13 | 14 | .category-list-count { 15 | color: $grey; 16 | &:before { 17 | display: inline; 18 | content: " (" 19 | } 20 | &:after { 21 | display: inline; 22 | content: ") " 23 | } 24 | } 25 | 26 | .category-list-child { padding-left: 10px; } 27 | } 28 | -------------------------------------------------------------------------------- /hexo/themes/next/source/css/_common/components/pages/pages.styl: -------------------------------------------------------------------------------- 1 | // Page specific styles 2 | 3 | @import "archive"; 4 | @import "categories"; 5 | @import "schedule"; 6 | @import "post-detail"; 7 | @import "breadcrumb"; 8 | -------------------------------------------------------------------------------- /hexo/themes/next/source/css/_common/components/pages/post-detail.styl: -------------------------------------------------------------------------------- 1 | .page-post-detail { 2 | 3 | .sidebar-toggle-line { background: $sidebar-highlight; } 4 | 5 | .comments { overflow: hidden; } 6 | } 7 | -------------------------------------------------------------------------------- /hexo/themes/next/source/css/_common/components/pagination.styl: -------------------------------------------------------------------------------- 1 | .pagination { 2 | margin: 120px 0 40px; 3 | text-align: center; 4 | border-top: 1px solid $pagination-border; 5 | } 6 | 7 | .page-number-basic { 8 | display: inline-block; 9 | position: relative; 10 | top: -1px; 11 | margin: 0 10px; 12 | padding: 0 11px; 13 | 14 | +mobile() { margin: 0 5px; } 15 | } 16 | 17 | .pagination { 18 | .prev, .next, .page-number { 19 | @extend .page-number-basic; 20 | border-bottom: 0; 21 | border-top: 1px solid $pagination-link-border; 22 | transition-property: border-color; 23 | the-transition(); 24 | 25 | &:hover { border-top-color: $pagination-link-hover-border; } 26 | } 27 | 28 | .space { 29 | @extend .page-number-basic; 30 | padding: 0; 31 | margin: 0; 32 | } 33 | 34 | .prev { margin-left: 0; } 35 | .next { margin-right: 0; } 36 | 37 | .page-number.current { 38 | color: $pagination-active-color; 39 | background: $pagination-active-bg; 40 | border-top-color: $pagination-active-border; 41 | } 42 | } 43 | 44 | @media (max-width: 767px) 45 | .pagination { border-top: none; } 46 | 47 | .pagination { 48 | .prev, .next, .page-number { 49 | margin-bottom: 10px; 50 | border-top: 0; 51 | border-bottom: 1px solid $pagination-link-border; 52 | padding: 0 10px; 53 | 54 | &:hover { border-bottom-color: $pagination-link-hover-border; } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /hexo/themes/next/source/css/_common/components/post/post-button.styl: -------------------------------------------------------------------------------- 1 | .post-button { 2 | margin-top: 40px; 3 | } 4 | -------------------------------------------------------------------------------- /hexo/themes/next/source/css/_common/components/post/post-copyright.styl: -------------------------------------------------------------------------------- 1 | .post-copyright { 2 | margin: $post-copyright.margin; 3 | padding: $post-copyright.padding; 4 | border-left: $post-copyright.border.width $post-copyright.border.style $post-copyright.border.color; 5 | background-color: $post-copyright.bg; 6 | list-style: none; 7 | 8 | i.fa { 9 | font-size: 15px; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /hexo/themes/next/source/css/_common/components/post/post-eof.styl: -------------------------------------------------------------------------------- 1 | .posts-expand { 2 | .post-eof { 3 | display: block; 4 | margin: $post-eof-margin-top auto $post-eof-margin-bottom; 5 | width: 8%; 6 | height: 1px; 7 | background: $grey-light; 8 | text-align: center; 9 | } 10 | } 11 | 12 | .post:last-child { 13 | .post-eof.post-eof.post-eof { 14 | display: none; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /hexo/themes/next/source/css/_common/components/post/post-gallery.styl: -------------------------------------------------------------------------------- 1 | .post-gallery { 2 | display: table; 3 | table-layout: fixed; 4 | width: 100%; 5 | border-collapse: separate; 6 | } 7 | 8 | .post-gallery-row { 9 | display: table-row; 10 | } 11 | 12 | .post-gallery .post-gallery-img { 13 | display: table-cell; 14 | text-align: center; 15 | vertical-align: middle; 16 | border: none; 17 | 18 | img { 19 | max-width: 100%; 20 | max-height: 100%; 21 | border: none; 22 | } 23 | } 24 | 25 | .fancybox-close, .fancybox-close:hover { 26 | border: none; 27 | } 28 | -------------------------------------------------------------------------------- /hexo/themes/next/source/css/_common/components/post/post-meta.styl: -------------------------------------------------------------------------------- 1 | .posts-expand .post-meta { 2 | margin: 3px 0 60px 0; 3 | color: $grey-dark; 4 | font-family: $font-family-posts; 5 | font-size: 12px; 6 | text-align: center; 7 | 8 | .post-category-list { 9 | display: inline-block; 10 | margin: 0; 11 | padding: 3px; 12 | } 13 | .post-category-list-link { color: $grey-dark; } 14 | 15 | .post-description { 16 | font-size: 14px; 17 | margin-top: 2px; 18 | } 19 | 20 | time { 21 | border-bottom: 1px dashed $grey-dark; 22 | cursor: help; 23 | } 24 | } 25 | 26 | .post-symbolscount { 27 | if !hexo-config('symbols_count_time.separated_meta') { display: inline-block; } 28 | } 29 | 30 | .post-meta-divider { 31 | margin: 0 .5em; 32 | } 33 | 34 | .post-meta-item-icon { 35 | margin-right: 3px; 36 | +tablet() { 37 | display: inline-block; 38 | } 39 | +mobile() { 40 | display: inline-block; 41 | } 42 | } 43 | 44 | .post-meta-item-text { 45 | +tablet() { 46 | display: none; 47 | } 48 | +mobile() { 49 | display: none; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /hexo/themes/next/source/css/_common/components/post/post-nav.styl: -------------------------------------------------------------------------------- 1 | .post-nav { 2 | display: table; 3 | margin-top: 15px; 4 | width: 100%; 5 | border-top: 1px solid $gainsboro; 6 | } 7 | 8 | .post-nav-divider { 9 | display: table-cell; 10 | width: 10%; 11 | } 12 | 13 | .post-nav-item { 14 | display: table-cell; 15 | padding: 10px 0 0 0; 16 | width: 45%; 17 | vertical-align: top; 18 | 19 | a { 20 | position: relative; 21 | display: block; 22 | line-height: 25px; 23 | font-size: 14px; 24 | color: $link-color; 25 | border-bottom: none; 26 | 27 | &:hover { 28 | color: $link-hover-color; 29 | border-bottom: none; 30 | } 31 | 32 | &:active { top: 2px; } 33 | } 34 | 35 | .fa { 36 | font-size: 12px; 37 | margin-right: 5px; 38 | } 39 | } 40 | 41 | .post-nav-next { 42 | a { padding-left: 5px; } 43 | } 44 | 45 | .post-nav-prev { 46 | text-align: right; 47 | 48 | a { padding-right: 5px; } 49 | 50 | .fa { margin-left: 5px; } 51 | } 52 | -------------------------------------------------------------------------------- /hexo/themes/next/source/css/_common/components/post/post-reading_progress.styl: -------------------------------------------------------------------------------- 1 | .reading-progress-bar { 2 | position: fixed; 3 | top: 0; 4 | left: 0; 5 | z-index: 9999; 6 | display: block; 7 | width: 0; 8 | height: unquote(hexo-config('reading_progress.height')); 9 | background: unquote(hexo-config('reading_progress.color')); 10 | } 11 | -------------------------------------------------------------------------------- /hexo/themes/next/source/css/_common/components/post/post-reward.styl: -------------------------------------------------------------------------------- 1 | #rewardButton { 2 | cursor: pointer; 3 | border: 0; 4 | outline: 0; 5 | border-radius: 5px; 6 | padding: 0; 7 | margin: 0; 8 | letter-spacing: normal; 9 | text-transform: none; 10 | text-indent: 0px; 11 | text-shadow: none; 12 | } 13 | 14 | #rewardButton span { 15 | display: inline-block; 16 | width: 80px; 17 | height: 35px; 18 | border-radius: 5px; 19 | color: #fff; 20 | font-weight: 400; 21 | font-style: normal; 22 | font-variant: normal; 23 | font-stretch: normal; 24 | font-size: 18px; 25 | background: #F44336; 26 | } 27 | 28 | #rewardButton span:hover { 29 | background: #F7877F; 30 | } 31 | 32 | #QR { 33 | padding-top: 20px; 34 | } 35 | 36 | #QR a { 37 | border: 0; 38 | } 39 | 40 | #QR img { 41 | width: 180px; 42 | max-width: 100%; 43 | display: inline-block; 44 | margin: 0.8em 2em 0 2em; 45 | } 46 | 47 | #QR p { 48 | text-align: center; 49 | } 50 | 51 | #QR > div:hover p { 52 | animation: roll 0.1s infinite linear; 53 | } 54 | 55 | @keyframes roll { 56 | from { 57 | transform: rotateZ(30deg); 58 | } 59 | to { 60 | transform: rotateZ(-30deg); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /hexo/themes/next/source/css/_common/components/post/post-rtl.styl: -------------------------------------------------------------------------------- 1 | .rtl { 2 | &.post-body { 3 | p, a, h1, h2, h3, h4, h5, h6, li, ul, ol { 4 | direction: rtl; 5 | font-family: UKIJ Ekran; 6 | } 7 | } 8 | &.post-title { 9 | font-family: UKIJ Ekran; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /hexo/themes/next/source/css/_common/components/post/post-tags.styl: -------------------------------------------------------------------------------- 1 | .posts-expand .post-tags { 2 | margin-top: 40px; 3 | text-align: center; 4 | 5 | a { 6 | display: inline-block; 7 | margin-right: 10px; 8 | font-size: 13px; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /hexo/themes/next/source/css/_common/components/post/post-title.styl: -------------------------------------------------------------------------------- 1 | .posts-expand .post-title { 2 | word-wrap(); 3 | text-align: center; 4 | font-weight: $posts-expand-title-font-weight; 5 | 6 | if hexo-config('post_edit.enable') { 7 | .post-edit-link { 8 | color: #bbb; 9 | display: inline-block; 10 | float: right; 11 | border-bottom: none; 12 | the-transition-ease-in(); 13 | margin-left: -1.2em; 14 | +mobile-small() { 15 | margin-left: initial; 16 | } 17 | &:hover { 18 | color: black; 19 | } 20 | } 21 | } 22 | } 23 | 24 | .posts-expand .post-title-link { 25 | display: inline-block; 26 | position: relative; 27 | color: $black-light; 28 | border-bottom: none; 29 | line-height: 1.2; 30 | vertical-align: top; 31 | 32 | &::before { 33 | content: ""; 34 | position: absolute; 35 | width: 100%; 36 | height: 2px; 37 | bottom: 0; 38 | left: 0; 39 | background-color: #000; 40 | visibility: hidden; 41 | transform: scaleX(0); 42 | the-transition(); 43 | } 44 | 45 | &:hover::before { 46 | visibility: visible; 47 | transform: scaleX(1); 48 | } 49 | 50 | .fa { 51 | font-size: 20px; 52 | margin-left: 5px; 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /hexo/themes/next/source/css/_common/components/post/post-type.styl: -------------------------------------------------------------------------------- 1 | // TODO: Refactor. 2 | 3 | .page-home, .page-post-detail { 4 | .post-type-quote { 5 | .post-header, 6 | .post-tags { 7 | display: none; 8 | } 9 | 10 | blockquote { 11 | @extend .blockquote-center 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /hexo/themes/next/source/css/_common/components/post/post-widgets.styl: -------------------------------------------------------------------------------- 1 | .post-widgets { 2 | border-top: 1px solid #eee; 3 | padding-top: 9px; 4 | margin-top: 45px; 5 | display: flex; 6 | justify-content: center; 7 | flex-wrap: wrap; 8 | align-items: center; 9 | 10 | .post-meta-divider { 11 | height: 25px; 12 | color: $grey-dark; 13 | } 14 | } 15 | 16 | .wp_rating { 17 | height: 20px; 18 | margin-right: 10px; 19 | text-align: center; 20 | line-height: 20px; 21 | padding-top: 6px; 22 | } 23 | 24 | .social-like { 25 | font-size: 14px; 26 | text-align: center; 27 | display: flex; 28 | justify-content: center; 29 | } 30 | 31 | .vk_like { 32 | width: 85px; 33 | height: 21px; 34 | padding-top: 7px; 35 | align-self: center; 36 | } 37 | 38 | .fb_like { 39 | height: 30px; 40 | align-self: center; 41 | } 42 | 43 | .bdsharebuttonbox { 44 | margin-top: 10px; 45 | display: flex; 46 | justify-content: center; 47 | a { border: none; } 48 | } 49 | 50 | .bdshare-slide-button-box a { border: none; } 51 | -------------------------------------------------------------------------------- /hexo/themes/next/source/css/_common/components/sidebar/sidebar-author-links.styl: -------------------------------------------------------------------------------- 1 | .links-of-author { 2 | margin-top: 20px; 3 | padding-bottom: 20px; 4 | border-bottom: 1px solid #eee; 5 | } 6 | 7 | .links-of-author a, 8 | .links-of-author .exturl { 9 | display: inline-block; 10 | vertical-align: middle; 11 | margin-right: 10px; 12 | margin-bottom: 10px; 13 | border-bottom-color: $black-light; 14 | font-size: 13px; 15 | if hexo-config('social_icons.transition') { the-transition(); } 16 | 17 | &:before { 18 | display: inline-block; 19 | vertical-align: middle; 20 | margin-right: 3px; 21 | content: " "; 22 | width: 4px; 23 | height: 4px; 24 | border-radius: 50%; 25 | background: rgb(random-color(0, 255) - 50%, random-color(0, 255) - 50%, random-color(0, 255) - 50%); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /hexo/themes/next/source/css/_common/components/sidebar/sidebar-author.styl: -------------------------------------------------------------------------------- 1 | .site-author-image { 2 | display: block; 3 | margin: 0 auto; 4 | padding: $site-author-image-padding; 5 | max-width: $site-author-image-width; 6 | height: $site-author-image-height; 7 | border: $site-author-image-border-width solid $site-author-image-border-color; 8 | opacity: hexo-config('avatar.opacity') is a 'unit' ? hexo-config('avatar.opacity') : 1; 9 | } 10 | 11 | if hexo-config('avatar.rounded') { 12 | .site-author-image { 13 | border-radius: 100%; 14 | } 15 | } 16 | 17 | if hexo-config('avatar.rotated') { 18 | .site-author-image { 19 | transition: transform 1.0s ease-out; 20 | } 21 | 22 | .site-author-image:hover { 23 | transform: rotateZ(360deg); 24 | } 25 | } 26 | 27 | .site-author-name { 28 | margin: $site-author-name-margin; 29 | text-align: $site-author-name-align; 30 | color: $site-author-name-color; 31 | font-weight: $site-author-name-weight; 32 | } 33 | 34 | .site-description { 35 | margin-top: $site-description-margin-top; 36 | text-align: $site-description-align; 37 | font-size: $site-description-font-size; 38 | color: $site-description-color; 39 | } 40 | -------------------------------------------------------------------------------- /hexo/themes/next/source/css/_common/components/sidebar/sidebar-blogroll.styl: -------------------------------------------------------------------------------- 1 | .links-of-blogroll { font-size: 13px; } 2 | 3 | .links-of-blogroll-title { 4 | margin-top: 20px; 5 | font-size: 14px; 6 | font-weight: $font-weight-bold; 7 | } 8 | .links-of-blogroll-list { 9 | margin: 0; 10 | padding: 0; 11 | list-style: none; 12 | } 13 | 14 | .links-of-blogroll-item { 15 | padding: 2px 10px; 16 | 17 | a, span.exturl { 18 | max-width: 280px; 19 | box-sizing: border-box; 20 | display: inline-block; 21 | overflow: hidden; 22 | white-space: nowrap; 23 | text-overflow: ellipsis; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /hexo/themes/next/source/css/_common/components/sidebar/sidebar-chat.styl: -------------------------------------------------------------------------------- 1 | .chat { 2 | margin-top: 10px; 3 | 4 | a { 5 | display: inline-block; 6 | padding: 0 15px; 7 | color: rgb(252, 100, 35); 8 | border: 1px solid rgb(252, 100, 35); 9 | border-radius: 4px; 10 | 11 | i { 12 | color: rgb(252, 100, 35); 13 | font-size: 14px; 14 | } 15 | 16 | &:hover { 17 | color: white; 18 | background: rgb(252, 100, 35); 19 | 20 | i { color: white; } 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /hexo/themes/next/source/css/_common/components/sidebar/sidebar-dimmer.styl: -------------------------------------------------------------------------------- 1 | .sidebar-active + #sidebar-dimmer { 2 | +mobile() { 3 | opacity: .7; 4 | transition: opacity .5s; 5 | } 6 | transform: translateX(-100%); 7 | } 8 | 9 | #sidebar-dimmer { 10 | display: block; 11 | position: fixed; 12 | top: 0; 13 | left: 100%; 14 | width: 100%; 15 | height: 100%; 16 | background: #000; 17 | opacity: 0; 18 | } 19 | -------------------------------------------------------------------------------- /hexo/themes/next/source/css/_common/components/sidebar/sidebar-feed-link.styl: -------------------------------------------------------------------------------- 1 | .feed-link { 2 | margin-top: 10px; 3 | 4 | a { 5 | display: inline-block; 6 | padding: 0 15px; 7 | color: rgb(252, 100, 35); 8 | border: 1px solid rgb(252, 100, 35); 9 | border-radius: 4px; 10 | 11 | i { 12 | color: rgb(252, 100, 35); 13 | font-size: 14px; 14 | } 15 | 16 | &:hover { 17 | color: white; 18 | background: rgb(252, 100, 35); 19 | 20 | i { color: white; } 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /hexo/themes/next/source/css/_common/components/sidebar/sidebar-nav.styl: -------------------------------------------------------------------------------- 1 | // Sidebar Navigation 2 | 3 | .sidebar-nav { 4 | margin: 0 0 20px; 5 | padding-left: 0; 6 | } 7 | 8 | .sidebar-nav li { 9 | display: inline-block; 10 | cursor: pointer; 11 | border-bottom: 1px solid transparent; 12 | font-size: 14px; 13 | color: $sidebar-nav-color; 14 | 15 | &:hover { color: $sidebar-nav-hover-color; } 16 | } 17 | 18 | .page-post-detail .sidebar-nav-toc { padding: 0 5px; } 19 | 20 | .page-post-detail .sidebar-nav-overview { margin-left: 10px; } 21 | 22 | .sidebar-nav .sidebar-nav-active { 23 | color: $sidebar-highlight; 24 | border-bottom-color: $sidebar-highlight; 25 | 26 | &:hover { color: $sidebar-highlight; } 27 | } 28 | 29 | .sidebar-panel { display: none; } 30 | .sidebar-panel-active { display: block; } 31 | -------------------------------------------------------------------------------- /hexo/themes/next/source/css/_common/components/sidebar/sidebar-toc.styl: -------------------------------------------------------------------------------- 1 | .post-toc-empty { 2 | font-size: 14px; 3 | color: $grey-dim; 4 | } 5 | 6 | .post-toc-wrap { overflow: hidden; } 7 | 8 | .post-toc { overflow: auto; } 9 | 10 | .post-toc ol { 11 | margin: 0; 12 | padding: 0 2px 5px 10px; 13 | text-align: left; 14 | list-style: none; 15 | font-size: 14px; 16 | 17 | & > ol { padding-left: 0; } 18 | 19 | a { 20 | the-transition(); 21 | transition-property: all; 22 | color: $toc-link-color; 23 | border-bottom-color: $toc-link-border-color; 24 | 25 | &:hover { 26 | color: $toc-link-hover-color; 27 | border-bottom-color: $toc-link-hover-border-color; 28 | } 29 | } 30 | } 31 | 32 | .post-toc .nav-item { 33 | overflow: hidden; 34 | text-overflow: ellipsis; 35 | //text-align: justify; 36 | white-space: nowrap if !hexo-config('toc.wrap'); 37 | line-height: 1.8; 38 | } 39 | 40 | .post-toc .nav .nav-child { 41 | display: hexo-config('toc.expand_all') ? block : none; 42 | } 43 | 44 | .post-toc .nav .active > .nav-child { display: block; } 45 | 46 | .post-toc .nav .active-current > .nav-child { 47 | display: block; 48 | & > .nav-item { display: block; } 49 | } 50 | 51 | .post-toc .nav .active > a { 52 | color: $toc-link-active-color; 53 | border-bottom-color: $toc-link-active-border-color; 54 | } 55 | 56 | .post-toc .nav .active-current > a { 57 | color: $toc-link-active-current-color; 58 | &:hover { 59 | color: $toc-link-active-current-border-color; 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /hexo/themes/next/source/css/_common/components/sidebar/sidebar-toggle.styl: -------------------------------------------------------------------------------- 1 | .sidebar-toggle { 2 | position: fixed; 3 | right: $b2t-position-right; 4 | bottom: 45px; 5 | width: 14px; 6 | height: 14px; 7 | padding: 5px; 8 | background: $black-deep; 9 | line-height: 0; 10 | z-index: $zindex-5; 11 | cursor: pointer; 12 | 13 | +tablet() { 14 | fixbutton() if hexo-config('sidebar.onmobile'); 15 | hide() if not hexo-config('sidebar.onmobile'); 16 | } 17 | +mobile() { 18 | fixbutton() if hexo-config('sidebar.onmobile'); 19 | hide() if not hexo-config('sidebar.onmobile'); 20 | } 21 | } 22 | 23 | .sidebar-toggle-line { 24 | position: relative; 25 | display: inline-block; 26 | vertical-align: top; 27 | height: 2px; 28 | width: 100%; 29 | background: white; 30 | margin-top: 3px; 31 | 32 | &:first-child { margin-top: 0; } 33 | } 34 | -------------------------------------------------------------------------------- /hexo/themes/next/source/css/_common/components/sidebar/sidebar.styl: -------------------------------------------------------------------------------- 1 | .sidebar { 2 | position: fixed; 3 | right: 0; 4 | top: 0; 5 | bottom: 0; 6 | 7 | width: 0; 8 | z-index: $zindex-4; 9 | box-shadow: inset 0 2px 6px black; 10 | background: $black-deep; 11 | 12 | a, .exturl { 13 | color: $grey-dark; 14 | border-bottom-color: $black-light; 15 | &:hover { color: $gainsboro; } 16 | } 17 | 18 | +tablet() { 19 | hide() if not hexo-config('sidebar.onmobile'); 20 | } 21 | +mobile() { 22 | hide() if not hexo-config('sidebar.onmobile'); 23 | } 24 | } 25 | 26 | .sidebar-inner { 27 | position: relative; 28 | padding: 20px 10px; 29 | color: $grey-dark; 30 | text-align: center; 31 | } 32 | 33 | .site-overview-wrap { 34 | overflow: hidden; 35 | } 36 | 37 | .site-overview { 38 | overflow-y: auto; 39 | overflow-x: hidden; 40 | } 41 | 42 | .cc-license { 43 | margin-top: 10px; 44 | text-align: center; 45 | 46 | .cc-opacity { 47 | opacity: 0.7; 48 | border-bottom: none; 49 | 50 | &:hover { opacity: 0.9; } 51 | } 52 | 53 | img { display: inline-block; } 54 | } 55 | 56 | @import "sidebar-toggle"; 57 | @import "sidebar-author"; 58 | @import "site-state"; 59 | @import "sidebar-feed-link"; 60 | @import "sidebar-author-links"; 61 | @import "sidebar-blogroll"; 62 | @import "sidebar-nav"; 63 | @import "sidebar-toc"; 64 | @import "sidebar-dimmer" if hexo-config('sidebar.dimmer'); 65 | @import "sidebar-chat" if hexo-config('chat.enable'); 66 | -------------------------------------------------------------------------------- /hexo/themes/next/source/css/_common/components/sidebar/site-state.styl: -------------------------------------------------------------------------------- 1 | .site-state { 2 | overflow: hidden; 3 | line-height: 1.4; 4 | white-space: nowrap; 5 | text-align: $site-state-align; 6 | margin-top: 10px; 7 | } 8 | 9 | .site-state-item { 10 | display: inline-block; 11 | padding: 0 15px; 12 | border-left: 1px solid $site-state-item-border-color; 13 | 14 | &:first-child { border-left: none; } 15 | 16 | a { border-bottom: none; } 17 | } 18 | 19 | .site-state-item-count { 20 | display: block; 21 | text-align: center; 22 | color: $site-state-item-count-color; 23 | font-weight: $font-weight-bold; 24 | font-size: $site-state-item-count-font-size; 25 | } 26 | 27 | .site-state-item-name { 28 | font-size: $site-state-item-name-font-size; 29 | color: $site-state-item-name-color; 30 | } 31 | -------------------------------------------------------------------------------- /hexo/themes/next/source/css/_common/components/tag-cloud.styl: -------------------------------------------------------------------------------- 1 | .tag-cloud { 2 | text-align: center; 3 | 4 | a { 5 | display: inline-block; 6 | margin: 10px; 7 | } 8 | 9 | a:hover { 10 | color: $link-hover-color !important; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /hexo/themes/next/source/css/_common/components/tags/blockquote-center.styl: -------------------------------------------------------------------------------- 1 | // Blockquote with all children centered. 2 | .blockquote-center { 3 | position: relative; 4 | margin: 40px 0; 5 | padding: 0; 6 | border-left: none; 7 | text-align: center; 8 | 9 | &::before, &::after { 10 | position: absolute; 11 | content: ' '; 12 | display: block; 13 | width: 100%; 14 | height: 24px; 15 | opacity: 0.2; 16 | background-repeat: no-repeat; 17 | background-position: 0 -6px; 18 | background-size: 22px 22px; 19 | } 20 | &::before { 21 | top: -20px; 22 | background-image: url($center-quote-left); 23 | border-top: 1px solid $grey-light; 24 | } 25 | &::after { 26 | bottom: -20px; 27 | background-image: url($center-quote-right); 28 | border-bottom: 1px solid $grey-light; 29 | background-position: 100% 8px; 30 | } 31 | 32 | p, div { text-align: center; } 33 | } 34 | -------------------------------------------------------------------------------- /hexo/themes/next/source/css/_common/components/tags/full-image.styl: -------------------------------------------------------------------------------- 1 | .posts-expand .post-body img.full-image { 2 | border: none; 3 | //max-width: 100%; 4 | //width: auto; 5 | //margin: 20px auto 25px; 6 | } 7 | -------------------------------------------------------------------------------- /hexo/themes/next/source/css/_common/components/tags/group-pictures.styl: -------------------------------------------------------------------------------- 1 | .post .post-body .group-picture { 2 | img { 3 | box-sizing: border-box; 4 | padding: 0 3px; 5 | border: none; 6 | } 7 | } 8 | 9 | .post .group-picture-row { 10 | overflow: hidden; 11 | margin-top: 6px; 12 | &:first-child { margin-top: 0; } 13 | } 14 | 15 | .post .group-picture-column { float: left; } 16 | 17 | .page-post-detail .post-body .group-picture-column { 18 | float: none; 19 | margin-top: 10px; 20 | width: auto !important; 21 | img { margin: 0 auto; } 22 | } 23 | 24 | .page-archive { 25 | .group-picture-container { overflow: hidden; } 26 | .group-picture-row { 27 | float: left; 28 | &:first-child { margin-top: 6px; } 29 | } 30 | 31 | .group-picture-column { 32 | max-width: 150px; 33 | max-height: 150px; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /hexo/themes/next/source/css/_common/components/tags/label.styl: -------------------------------------------------------------------------------- 1 | .post-body .label { 2 | display: inline; 3 | padding: 0 2px; 4 | white-space: nowrap; 5 | 6 | &.default { background-color: $label-default; } 7 | &.primary { background-color: $label-primary; } 8 | &.info { background-color: $label-info; } 9 | &.success { background-color: $label-success; } 10 | &.warning { background-color: $label-warning; } 11 | &.danger { background-color: $label-danger; } 12 | } 13 | -------------------------------------------------------------------------------- /hexo/themes/next/source/css/_common/components/tags/pdf.styl: -------------------------------------------------------------------------------- 1 | .pdfobject-container { 2 | position: relative; 3 | overflow: auto; 4 | width: 100%; 5 | } 6 | -------------------------------------------------------------------------------- /hexo/themes/next/source/css/_common/components/tags/tags.styl: -------------------------------------------------------------------------------- 1 | @import "full-image"; 2 | @import "blockquote-center"; 3 | @import "group-pictures"; 4 | @import "label"; 5 | @import "note" if hexo-config('note.style') == 'simple' || hexo-config('note.style') == 'flat'; 6 | @import "note-modern" if hexo-config('note.style') == 'modern'; 7 | @import "tabs" if hexo-config('tabs.enable'); 8 | @import "pdf" if hexo-config('pdf.enable'); 9 | -------------------------------------------------------------------------------- /hexo/themes/next/source/css/_common/components/third-party/copy-code.styl: -------------------------------------------------------------------------------- 1 | .copy-btn { 2 | display: inline-block; 3 | padding: 6px 12px; 4 | font-size: 13px; 5 | font-weight: 700; 6 | line-height: 20px; 7 | color: #333; 8 | white-space: nowrap; 9 | vertical-align: middle; 10 | cursor: pointer; 11 | if hexo-config('codeblock.copy_button.style') == 'flat' { 12 | background-color: #fff; 13 | border: none; 14 | } 15 | else { 16 | background-color: #eee; 17 | background-image: linear-gradient(#fcfcfc, #eee); 18 | border: 1px solid #d5d5d5; 19 | border-radius: 3px; 20 | } 21 | user-select: none; 22 | outline: 0; 23 | } 24 | 25 | .highlight-wrap .copy-btn { 26 | transition: opacity .3s ease-in-out; 27 | opacity: 0; 28 | padding: 2px 6px; 29 | position: absolute; 30 | if hexo-config('codeblock.copy_button.style') == 'flat' { 31 | right: 0px; 32 | height: 42px; 33 | } 34 | else { 35 | right: 4px; 36 | top: 8px; 37 | } 38 | } 39 | 40 | .highlight-wrap:hover .copy-btn, 41 | .highlight-wrap .copy-btn:focus { 42 | opacity: 1; 43 | } 44 | 45 | .highlight-wrap { 46 | position: relative; 47 | } 48 | -------------------------------------------------------------------------------- /hexo/themes/next/source/css/_common/components/third-party/gitalk.styl: -------------------------------------------------------------------------------- 1 | .gt-header a, .gt-comments a, .gt-popup a 2 | border-bottom: none; 3 | .gt-container .gt-popup .gt-action.is--active:before 4 | top: 0.7em; -------------------------------------------------------------------------------- /hexo/themes/next/source/css/_common/components/third-party/gitment.styl: -------------------------------------------------------------------------------- 1 | #gitment-display-button { 2 | display: inline-block; 3 | padding: 0 15px; 4 | color: #0a9caf; 5 | cursor: pointer; 6 | font-size: 14px; 7 | border: 1px solid #0a9caf; 8 | border-radius: 4px; 9 | } 10 | 11 | #gitment-display-button:hover { 12 | color: #fff; 13 | background: #0a9caf; 14 | } 15 | 16 | #gitment-container a { 17 | border-bottom: none; 18 | } 19 | 20 | if hexo-config('gitment.cleanly') { 21 | a.gitment-editor-footer-tip, .gitment-container.gitment-footer-container { 22 | display: none; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /hexo/themes/next/source/css/_common/components/third-party/han.styl: -------------------------------------------------------------------------------- 1 | i.fa { 2 | font-family: FontAwesome !important; 3 | } 4 | -------------------------------------------------------------------------------- /hexo/themes/next/source/css/_common/components/third-party/math.styl: -------------------------------------------------------------------------------- 1 | .has-jax { 2 | overflow-x: auto; 3 | overflow-y: hidden; 4 | } 5 | 6 | li { 7 | list-style-position: inside !important; 8 | } 9 | -------------------------------------------------------------------------------- /hexo/themes/next/source/css/_common/components/third-party/needsharebutton.styl: -------------------------------------------------------------------------------- 1 | #needsharebutton-postbottom { 2 | position: relative; 3 | cursor: pointer; 4 | height: 26px; 5 | 6 | .btn { 7 | display: initial; 8 | padding: 1px 4px; 9 | border: 1px solid $btn-default-border-color; 10 | border-radius: 3px; 11 | } 12 | } 13 | 14 | #needsharebutton-float { 15 | position: fixed; 16 | bottom: 38px; 17 | left: -8px; 18 | z-index: 9999; 19 | cursor: pointer; 20 | 21 | .btn { 22 | //display: initial; 23 | padding: 0 10px 0 14px 24 | border: 1px solid $btn-default-border-color; 25 | border-radius: 4px; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /hexo/themes/next/source/css/_common/components/third-party/related-posts.styl: -------------------------------------------------------------------------------- 1 | .popular-posts-header { 2 | margin-top: $post-eof-margin-bottom; 3 | margin-bottom: 10px; 4 | font-size: $font-size-headings-base; 5 | border-bottom: 1px solid $gainsboro; 6 | display: block; 7 | } 8 | 9 | ul.popular-posts { 10 | padding: 0; 11 | 12 | .popular-posts-item { 13 | // list-style: none; 14 | margin-left: 2em; 15 | .popular-posts-title { 16 | font-weight: normal; 17 | font-size: $font-size-base; 18 | margin: 0; 19 | line-height: $line-height-base * 1.2; 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /hexo/themes/next/source/css/_common/components/third-party/third-party.styl: -------------------------------------------------------------------------------- 1 | @import "gitment" if hexo-config('gitment.enable'); 2 | @import "gitalk" if hexo-config('gitalk.enable'); 3 | @import "han" if hexo-config('han'); 4 | @import "localsearch"; 5 | @import "algolia-search" if hexo-config('algolia_search.enable'); 6 | @import "needsharebutton" if hexo-config('needmoreshare2.enable'); 7 | @import "related-posts" if hexo-config('related_posts.enable'); 8 | @import "copy-code" if hexo-config('codeblock.copy_button.enable'); 9 | @import "math" if hexo-config('math.enable'); 10 | -------------------------------------------------------------------------------- /hexo/themes/next/source/css/_common/outline/outline.styl: -------------------------------------------------------------------------------- 1 | // 2 | // Layout 3 | // Note: Must name this file "outline" instead of "layout" 4 | // Or Hexo will use it as template layout. 5 | // ================================================= 6 | 7 | 8 | html, body { height: 100%; } 9 | 10 | .container { 11 | position: relative; 12 | } 13 | 14 | 15 | // Header Section 16 | // -------------------------------------------------- 17 | .header-inner { 18 | margin: 0 auto; 19 | padding: 100px 0 70px; 20 | width: $content-desktop; 21 | 22 | +desktop-large() { 23 | .container & { width: $content-desktop-large; } 24 | } 25 | +desktop-largest() { 26 | .container & { width: $content-desktop-largest; } 27 | } 28 | } 29 | 30 | 31 | // Main Section 32 | // -------------------------------------------------- 33 | .main-inner { 34 | margin: 0 auto; 35 | width: $content-desktop; 36 | 37 | +desktop-large() { 38 | .container & { width: $content-desktop-large; } 39 | } 40 | +desktop-largest() { 41 | .container & { width: $content-desktop-largest; } 42 | } 43 | } 44 | 45 | 46 | // Footer Section 47 | // -------------------------------------------------- 48 | .footer { 49 | padding: 20px 0; 50 | } 51 | .footer-inner { 52 | box-sizing: border-box; 53 | margin: 0px auto; 54 | width: $content-desktop; 55 | 56 | +desktop-large() { 57 | .container & { width: $content-desktop-large; } 58 | } 59 | +desktop-largest() { 60 | .container & { width: $content-desktop-largest; } 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /hexo/themes/next/source/css/_common/scaffolding/helpers.styl: -------------------------------------------------------------------------------- 1 | // 2 | // Helpers 3 | // ================================================= 4 | 5 | 6 | // Alignment 7 | .text-left { text-align: left; } 8 | .text-center { text-align: center; } 9 | .text-right { text-align: right; } 10 | .text-justify { text-align: justify; } 11 | .text-nowrap { white-space: nowrap; } 12 | 13 | 14 | // Transformation 15 | .text-lowercase { text-transform: lowercase; } 16 | .text-uppercase { text-transform: uppercase; } 17 | .text-capitalize { text-transform: capitalize; } 18 | 19 | 20 | // Center-align a block level element. 21 | .center-block { 22 | display: block; 23 | margin-left: auto; 24 | margin-right: auto; 25 | } 26 | 27 | 28 | // Clearfix. http://nicolasgallagher.com/micro-clearfix-hack/ 29 | .clearfix { 30 | clearfix(); 31 | } 32 | 33 | .pullquote { 34 | width: 45%; 35 | 36 | &.left { 37 | float: left; 38 | margin-left: 5px; 39 | margin-right: 10px; 40 | } 41 | 42 | &.right { 43 | float: right; 44 | margin-left: 10px; 45 | margin-right: 5px; 46 | } 47 | } 48 | 49 | .affix.affix.affix { position: fixed; } 50 | 51 | .translation { 52 | margin-top: -20px; 53 | font-size: 14px; 54 | color: $grey-dark; 55 | } 56 | 57 | // https://davidwalsh.name/detect-scrollbar-width 58 | .scrollbar-measure { 59 | width: 100px; 60 | height: 100px; 61 | overflow: scroll; 62 | position: absolute; 63 | top: -9999px; 64 | } 65 | 66 | .use-motion .motion-element { opacity: 0; } 67 | -------------------------------------------------------------------------------- /hexo/themes/next/source/css/_common/scaffolding/scaffolding.styl: -------------------------------------------------------------------------------- 1 | // 2 | // Scaffolding 3 | // ================================================= 4 | 5 | @import "normalize"; 6 | @import "base"; 7 | @import "helpers"; 8 | @import "tables"; 9 | @import "mobile" if hexo-config('mobile_layout_economy'); 10 | -------------------------------------------------------------------------------- /hexo/themes/next/source/css/_common/scaffolding/tables.styl: -------------------------------------------------------------------------------- 1 | .table-container { 2 | margin: 20px 0; 3 | overflow: auto; 4 | -webkit-overflow-scrolling: touch; 5 | } 6 | 7 | table { 8 | width: $table-width; 9 | border-collapse: collapse; 10 | border-spacing: 0; 11 | font-size: $table-font-size; 12 | } 13 | 14 | table>tbody>tr { 15 | &:nth-of-type(odd) { background-color: $table-row-odd-bg-color; } 16 | &:hover { background-color: $table-row-hover-bg-color; } 17 | } 18 | 19 | caption, th, td { 20 | padding: $table-cell-padding; 21 | text-align: $table-content-alignment; 22 | vertical-align: $table-content-vertical; 23 | font-weight: normal; 24 | } 25 | 26 | th, td { 27 | border: 1px solid $table-border-color; 28 | border-bottom: 3px solid $table-cell-border-bottom-color; 29 | } 30 | 31 | th { 32 | padding-bottom: 10px; 33 | font-weight: $table-th-font-weight; 34 | } 35 | 36 | td { border-bottom-width: 1px; } 37 | -------------------------------------------------------------------------------- /hexo/themes/next/source/css/_custom/custom.styl: -------------------------------------------------------------------------------- 1 | // Custom styles. 2 | -------------------------------------------------------------------------------- /hexo/themes/next/source/css/_mixins/Gemini.styl: -------------------------------------------------------------------------------- 1 | @import "Pisces.styl"; 2 | -------------------------------------------------------------------------------- /hexo/themes/next/source/css/_mixins/Mist.styl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liangzr/blog/49cb2c5d1f01aee0017833624a8e3831b2ff5874/hexo/themes/next/source/css/_mixins/Mist.styl -------------------------------------------------------------------------------- /hexo/themes/next/source/css/_mixins/Muse.styl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liangzr/blog/49cb2c5d1f01aee0017833624a8e3831b2ff5874/hexo/themes/next/source/css/_mixins/Muse.styl -------------------------------------------------------------------------------- /hexo/themes/next/source/css/_mixins/Pisces.styl: -------------------------------------------------------------------------------- 1 | sidebar-inline-links-item() { 2 | margin: 5px 0 0; 3 | if !hexo-config('social_icons.icons_only') { width: 50%; } 4 | 5 | & a, .exturl { 6 | max-width: 216px; 7 | box-sizing: border-box; 8 | display: inline-block; 9 | margin-right: 0; 10 | margin-bottom: 0; 11 | padding: 0 5px; 12 | overflow: hidden; 13 | white-space: nowrap; 14 | text-overflow: ellipsis; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /hexo/themes/next/source/css/_mixins/custom.styl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liangzr/blog/49cb2c5d1f01aee0017833624a8e3831b2ff5874/hexo/themes/next/source/css/_mixins/custom.styl -------------------------------------------------------------------------------- /hexo/themes/next/source/css/_schemes/Mist/_base.styl: -------------------------------------------------------------------------------- 1 | // Tags 2 | // -------------------------------------------------- 3 | 4 | a { border-bottom-color: $grey-light; } 5 | 6 | hr { 7 | margin: 20px 0; 8 | height: 2px; 9 | } 10 | -------------------------------------------------------------------------------- /hexo/themes/next/source/css/_schemes/Mist/_header.styl: -------------------------------------------------------------------------------- 1 | // Header 2 | // -------------------------------------------------- 3 | .header { background: $whitesmoke; } 4 | .header-inner { 5 | padding: 25px 0 20px; 6 | clearfix(); 7 | 8 | +mobile() { 9 | width: auto; 10 | margin-bottom: 50px; 11 | padding: 10px; 12 | } 13 | } 14 | 15 | .site-meta { 16 | float: left; 17 | margin-left: -20px; 18 | line-height: normal; 19 | 20 | +mobile() { 21 | margin-left: 10px; 22 | } 23 | 24 | .brand { 25 | padding: 2px 1px; 26 | background: none; 27 | 28 | +mobile() { display: block; } 29 | } 30 | 31 | .logo { display: none; } 32 | 33 | .site-title { 34 | font-size: 22px; 35 | font-weight: bolder; 36 | 37 | +mobile() { line-height: 34px; } 38 | } 39 | } 40 | 41 | .logo-line-before, 42 | .logo-line-after { 43 | display: block; 44 | overflow: hidden; 45 | margin: 0 auto; 46 | width: 75%; 47 | 48 | +mobile() { display: none; } 49 | 50 | i { 51 | position: relative; 52 | display: block; 53 | height: 2px; 54 | background: $black-deep; 55 | +mobile() { height: 3px; } 56 | } 57 | } 58 | 59 | .use-motion { 60 | .logo-line-before i { left: -100%; } 61 | .logo-line-after i { right: -100%; } 62 | } 63 | -------------------------------------------------------------------------------- /hexo/themes/next/source/css/_schemes/Mist/_logo.styl: -------------------------------------------------------------------------------- 1 | .site-subtitle { display: none; } 2 | -------------------------------------------------------------------------------- /hexo/themes/next/source/css/_schemes/Mist/_menu.styl: -------------------------------------------------------------------------------- 1 | // Menu 2 | // -------------------------------------------------- 3 | .site-nav-toggle { 4 | position: static; 5 | float: right; 6 | } 7 | 8 | .menu-item-active a { 9 | background: #e1e1e1; 10 | } 11 | 12 | .menu { 13 | //float: right; 14 | margin: 8px 0 0 0; 15 | 16 | +mobile() { 17 | margin: 20px 0 0 0; 18 | padding: 0; 19 | } 20 | 21 | br { display: none; } 22 | 23 | .menu-item { 24 | margin: 0; 25 | +mobile() { display: block; } 26 | 27 | .badge { 28 | display: inline-block; 29 | padding: 1px 4px; 30 | margin-left: 5px; 31 | font-weight: 700; 32 | line-height: 1; 33 | color: $black-light; 34 | text-align: center; 35 | white-space: nowrap; 36 | background-color: #fff; 37 | border-radius: 10px; 38 | text-shadow: 1px 1px 0px rgba(0,0,0,0.1); 39 | +mobile() { 40 | float: right; 41 | margin: 0.35em 0 0 0; 42 | } 43 | } 44 | 45 | } 46 | 47 | .menu-item a, 48 | .menu-item span.exturl { 49 | padding: 0 10px; 50 | border: none; 51 | border-radius: 2px; 52 | transition-property: background; 53 | 54 | +mobile() { 55 | text-align: left; 56 | } 57 | 58 | &:hover { 59 | @extend .menu-item-active a; 60 | } 61 | 62 | disable-touch-hover(); 63 | } 64 | 65 | a::before { 66 | display: none; 67 | 68 | +mobile() { display: block; } 69 | } 70 | 71 | +mobile() { float: none; } 72 | } 73 | -------------------------------------------------------------------------------- /hexo/themes/next/source/css/_schemes/Mist/_posts-expanded.styl: -------------------------------------------------------------------------------- 1 | // Post Expanded 2 | // -------------------------------------------------- 3 | .posts-expand { 4 | padding-top: 0; 5 | 6 | .post-title, 7 | .post-meta { 8 | text-align: $site-meta-text-align; 9 | +mobile() { text-align: center; } 10 | } 11 | .post-eof { display: none; } 12 | 13 | .post { margin-top: 120px; } 14 | .post:first-child { margin-top: 0; } 15 | 16 | .post-meta { 17 | margin-top: 5px; 18 | margin-bottom: 20px; 19 | } 20 | 21 | .post-title { 22 | position: relative; 23 | font-size: $font-size-headings-base; 24 | font-weight: 400; 25 | +mobile() { font-size: $font-size-headings-small; } 26 | +desktop-large() { font-size: $font-size-headings-large; } 27 | } 28 | .post-title:hover:before { background: $black-deep; } 29 | 30 | .post-body { 31 | +mobile() { font-size: $font-size-base; } 32 | } 33 | 34 | .post-body img { margin: 0; } 35 | 36 | .post-tags { 37 | text-align: left; 38 | a { 39 | padding: 1px 5px; 40 | background: $whitesmoke; 41 | border-bottom: none; 42 | } 43 | a:hover { background: $grey-light; } 44 | } 45 | .post-nav { margin-top: 40px; } 46 | } 47 | 48 | .post-button { 49 | margin-top: 20px; 50 | text-align: left; 51 | 52 | a { 53 | padding: 0; 54 | font-size: $font-size-base; 55 | //color: $grey-dim; 56 | background: none; 57 | border: none; 58 | border-bottom: 2px solid $grey-dim; 59 | transition-property: border; 60 | 61 | +mobile() { font-size: $font-size-small; } 62 | +desktop-large() { font-size: $font-size-large; } 63 | 64 | &:hover { border-bottom-color: $black-deep; } 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /hexo/themes/next/source/css/_schemes/Mist/_search.styl: -------------------------------------------------------------------------------- 1 | // Search 2 | // -------------------------------------------------- 3 | .site-search form { 4 | display: none; 5 | } 6 | -------------------------------------------------------------------------------- /hexo/themes/next/source/css/_schemes/Mist/outline/outline.styl: -------------------------------------------------------------------------------- 1 | .main-inner { margin-top: 80px; } 2 | -------------------------------------------------------------------------------- /hexo/themes/next/source/css/_schemes/Mist/sidebar/sidebar-blogroll.styl: -------------------------------------------------------------------------------- 1 | .links-of-blogroll-inline .links-of-blogroll-item { display: inline-block; } 2 | -------------------------------------------------------------------------------- /hexo/themes/next/source/css/_schemes/Muse/_layout.styl: -------------------------------------------------------------------------------- 1 | .header-inner, .container .main-inner, .footer-inner { 2 | +mobile() { width: auto; } 3 | } 4 | 5 | // embed tag 6 | embed { 7 | display: block; 8 | margin: 0px auto 25px auto; 9 | } 10 | -------------------------------------------------------------------------------- /hexo/themes/next/source/css/_schemes/Muse/_logo.styl: -------------------------------------------------------------------------------- 1 | .custom-logo { 2 | .site-meta-headline { 3 | text-align: center; 4 | } 5 | 6 | .brand { 7 | background: none; 8 | } 9 | 10 | .site-title { 11 | margin: 10px auto 0; 12 | font-size: 24px; 13 | color: $black-deep; 14 | a { 15 | border: none; 16 | } 17 | } 18 | } 19 | 20 | .custom-logo-image { 21 | margin: 0 auto; 22 | padding: 5px; 23 | max-width: 150px; 24 | background: white; 25 | } 26 | -------------------------------------------------------------------------------- /hexo/themes/next/source/css/_schemes/Muse/_menu.styl: -------------------------------------------------------------------------------- 1 | .site-nav { 2 | +mobile() { 3 | position: absolute; 4 | left: 0; 5 | top: 52px; 6 | margin: 0; 7 | width: 100%; 8 | padding: 0; 9 | background: white; 10 | border-bottom: 1px solid $gray-lighter; 11 | z-index: $zindex-3; 12 | } 13 | } 14 | 15 | .menu { 16 | +mobile() { text-align: left; } 17 | } 18 | 19 | .menu-item-active a { 20 | border-bottom-color: $menu-link-hover-border !important; 21 | color: $black-deep; 22 | 23 | +mobile() { 24 | border-bottom: 1px dotted $gray-lighter !important; 25 | } 26 | } 27 | 28 | .menu .menu-item { 29 | +mobile() { 30 | display: block; 31 | margin: 0 10px; 32 | vertical-align: top; 33 | } 34 | 35 | .badge { 36 | display: inline-block; 37 | padding: 1px 4px; 38 | margin-left: 5px; 39 | font-weight: 700; 40 | line-height: 1; 41 | text-align: center; 42 | white-space: nowrap; 43 | background-color: $gainsboro; 44 | +mobile() { 45 | float: right; 46 | margin: 0.35em 0 0 0; 47 | } 48 | } 49 | 50 | br { 51 | +mobile() { display: none; } 52 | } 53 | 54 | a, span.exturl { 55 | +mobile() { 56 | padding: 5px 10px; 57 | } 58 | 59 | &:hover { 60 | @extend .menu-item-active a; 61 | } 62 | 63 | // To prevent hover on external links with touch devices after click. 64 | @media (hover:none) { 65 | &:hover { 66 | border-bottom-color: transparent !important; 67 | } 68 | } 69 | } 70 | .fa { margin-right: 0; } 71 | } 72 | -------------------------------------------------------------------------------- /hexo/themes/next/source/css/_schemes/Muse/_search.styl: -------------------------------------------------------------------------------- 1 | // Search 2 | // -------------------------------------------------- 3 | .site-search form { 4 | display: none; 5 | } 6 | -------------------------------------------------------------------------------- /hexo/themes/next/source/css/_schemes/Muse/index.styl: -------------------------------------------------------------------------------- 1 | @import "_layout.styl"; 2 | @import "_logo.styl"; 3 | @import "_menu.styl"; 4 | @import "_search.styl"; 5 | @import "sidebar/sidebar-blogroll"; 6 | // Import _posts if want to justify text-align on mobile. 7 | // @import "../Pisces/_posts"; 8 | -------------------------------------------------------------------------------- /hexo/themes/next/source/css/_schemes/Muse/sidebar/sidebar-blogroll.styl: -------------------------------------------------------------------------------- 1 | .links-of-blogroll-inline .links-of-blogroll-item { display: inline-block; } 2 | -------------------------------------------------------------------------------- /hexo/themes/next/source/css/_schemes/Pisces/_brand.styl: -------------------------------------------------------------------------------- 1 | .site-brand-wrapper { 2 | position: relative; 3 | } 4 | 5 | .site-meta { 6 | padding: 20px 0; 7 | color: white; 8 | background: $black-deep; 9 | 10 | +tablet() { 11 | box-shadow: 0 0 16px rgba(0,0,0,0.5); 12 | } 13 | +mobile() { 14 | box-shadow: 0 0 16px rgba(0,0,0,0.5); 15 | } 16 | } 17 | 18 | .brand { 19 | padding: 0; 20 | background: none; 21 | 22 | &:hover { 23 | color: white; 24 | } 25 | } 26 | 27 | .site-subtitle { 28 | margin: 10px 10px 0; 29 | font-weight: initial; 30 | } 31 | 32 | .custom-logo-image { 33 | margin-top: 20px; 34 | +tablet() { 35 | display: none; 36 | } 37 | +mobile() { 38 | display: none; 39 | } 40 | } 41 | 42 | .site-search form { 43 | display: none; 44 | } 45 | -------------------------------------------------------------------------------- /hexo/themes/next/source/css/_schemes/Pisces/_menu.styl: -------------------------------------------------------------------------------- 1 | .site-nav { 2 | border-top: none; 3 | 4 | +tablet() { 5 | display: none !important; 6 | } 7 | } 8 | 9 | .site-nav-on { 10 | +tablet() { 11 | display: block !important; 12 | } 13 | } 14 | 15 | .menu-item-active a { 16 | background: #f9f9f9; 17 | border-bottom-color: white; 18 | 19 | badges = hexo-config('menu_settings.badges'); 20 | if not badges { 21 | &:after { 22 | content: " "; 23 | position: absolute; 24 | top: 50%; 25 | margin-top: -3px; 26 | right: 15px; 27 | width: 6px; 28 | height: 6px; 29 | border-radius: 50%; 30 | background-color: $grey; 31 | } 32 | } 33 | } 34 | 35 | .menu .menu-item { 36 | display: block; 37 | margin: 0; 38 | 39 | a, span.exturl { 40 | position: relative; 41 | box-sizing: border-box; 42 | padding: 5px 20px; 43 | text-align: left; 44 | line-height: inherit; 45 | transition-property: background-color; 46 | the-transition(); 47 | 48 | &:hover { 49 | @extend .menu-item-active a; 50 | } 51 | 52 | disable-touch-hover(); 53 | } 54 | 55 | .badge { 56 | display: inline-block; 57 | padding: 2px 5px; 58 | font-weight: 700; 59 | line-height: 1; 60 | color: #fff; 61 | text-align: center; 62 | white-space: nowrap; 63 | vertical-align: middle; 64 | background-color: $grey-light; 65 | border-radius: 10px; 66 | float: right; 67 | margin: 0.35em 0 0 0; 68 | text-shadow: 1px 1px 0px rgba(0,0,0,0.1); 69 | } 70 | 71 | br { display: none; } 72 | } 73 | 74 | .btn-bar { 75 | background-color: white; 76 | } 77 | 78 | .site-nav-toggle { 79 | left: 20px; 80 | top: 50%; 81 | 82 | transform: translateY(-50%); 83 | 84 | +tablet() { 85 | display: block; 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /hexo/themes/next/source/css/_schemes/Pisces/_posts.styl: -------------------------------------------------------------------------------- 1 | .post-body { 2 | +mobile() { 3 | text-align: justify; 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /hexo/themes/next/source/css/_schemes/Pisces/_sub-menu.styl: -------------------------------------------------------------------------------- 1 | .sub-menu { 2 | margin: 0; 3 | padding: 6px 0; 4 | background: #fff !important; 5 | border-bottom: 1px solid $table-border-color; 6 | } 7 | 8 | .sub-menu .menu-item { 9 | display: inline-block !important; 10 | 11 | & a, span.exturl { 12 | padding: initial !important; 13 | margin: 5px 10px; 14 | } 15 | 16 | & a:hover, span.exturl:hover { 17 | background: initial !important; 18 | color: $sidebar-highlight; 19 | } 20 | } 21 | 22 | .sub-menu .menu-item-active a { 23 | background: #fff !important; 24 | color: $sidebar-highlight; 25 | border-bottom-color: $sidebar-highlight; 26 | 27 | &:hover { 28 | background: #fff !important; 29 | border-bottom-color: $sidebar-highlight; 30 | } 31 | 32 | badges = hexo-config('menu_settings.badges'); 33 | if not badges { 34 | &:after { 35 | content: initial; 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /hexo/themes/next/source/css/_schemes/Pisces/index.styl: -------------------------------------------------------------------------------- 1 | @import "_layout"; 2 | @import "_brand"; 3 | @import "_menu"; 4 | @import "_sub-menu"; 5 | @import "_sidebar"; 6 | @import "_posts"; 7 | -------------------------------------------------------------------------------- /hexo/themes/next/source/css/_variables/Gemini.styl: -------------------------------------------------------------------------------- 1 | // Variables of Gemini scheme 2 | // ================================================= 3 | 4 | @import "Pisces.styl"; 5 | 6 | // Settings for some of the most global styles. 7 | // -------------------------------------------------- 8 | $body-bg-color = #eee 9 | 10 | // Borders. 11 | // -------------------------------------------------- 12 | $box-shadow-inner = 0 2px 2px 0 rgba(0,0,0,.12), 0 3px 1px -2px rgba(0,0,0,.06), 0 1px 5px 0 rgba(0,0,0,.12) 13 | $box-shadow = 0 2px 2px 0 rgba(0,0,0,.12), 0 3px 1px -2px rgba(0,0,0,.06), 0 1px 5px 0 rgba(0,0,0,.12), 0 -1px .5px 0 rgba(0,0,0,.09) 14 | 15 | $border-radius-inner = initial 16 | $border-radius = initial 17 | //$border-radius-inner = 0 0 3px 3px; 18 | //$border-radius = 3px; 19 | 20 | // Back to top 21 | $b2t-sidebar-bg-color = $body-bg-color 22 | -------------------------------------------------------------------------------- /hexo/themes/next/source/css/_variables/Mist.styl: -------------------------------------------------------------------------------- 1 | // Variables of Mist scheme 2 | // ================================================= 3 | 4 | $font-size-headings-base = 26px 5 | 6 | $brand-color = $black-deep 7 | $brand-hover-color = $brand-color 8 | 9 | $site-meta-text-align = left 10 | $posts-collapse-left = 0 11 | 12 | $btn-default-color = $link-color 13 | $btn-default-bg = transparent 14 | -------------------------------------------------------------------------------- /hexo/themes/next/source/css/_variables/Muse.styl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liangzr/blog/49cb2c5d1f01aee0017833624a8e3831b2ff5874/hexo/themes/next/source/css/_variables/Muse.styl -------------------------------------------------------------------------------- /hexo/themes/next/source/css/_variables/custom.styl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liangzr/blog/49cb2c5d1f01aee0017833624a8e3831b2ff5874/hexo/themes/next/source/css/_variables/custom.styl -------------------------------------------------------------------------------- /hexo/themes/next/source/css/main.styl: -------------------------------------------------------------------------------- 1 | // CSS Style Guide: http://codeguide.co/#css 2 | 3 | 4 | $scheme = hexo-config('scheme') ? hexo-config('scheme') : 'Muse'; 5 | 6 | $custom_styles = hexo-config('custom_file_path.styles') ? "../../../../../" + hexo-config('custom_file_path.styles') : custom; 7 | $custom_mixins = hexo-config('custom_file_path.mixins') ? "../../../../../" + hexo-config('custom_file_path.mixins') : custom; 8 | $custom_variables = hexo-config('custom_file_path.variables') ? "../../../../../" + hexo-config('custom_file_path.variables') : custom; 9 | 10 | $variables = base $scheme $custom_variables; 11 | $mixins = base $scheme $custom_mixins; 12 | 13 | 14 | // Variables Layer 15 | // -------------------------------------------------- 16 | for $variable in $variables 17 | @import "_variables/" + $variable; 18 | 19 | 20 | // Mixins Layer 21 | // -------------------------------------------------- 22 | for $mixin in $mixins 23 | @import "_mixins/" + $mixin; 24 | 25 | 26 | // Common Layer 27 | // -------------------------------------------------- 28 | 29 | // Scaffolding 30 | @import "_common/scaffolding"; 31 | 32 | // Layout 33 | @import "_common/outline"; 34 | 35 | // Components 36 | @import "_common/components"; 37 | 38 | 39 | // Schemes Layer 40 | // -------------------------------------------------- 41 | @import "_schemes/" + $scheme; 42 | 43 | 44 | // Custom Layer 45 | // -------------------------------------------------- 46 | @import "_custom/" + $custom_styles; 47 | -------------------------------------------------------------------------------- /hexo/themes/next/source/fonts/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liangzr/blog/49cb2c5d1f01aee0017833624a8e3831b2ff5874/hexo/themes/next/source/fonts/.gitkeep -------------------------------------------------------------------------------- /hexo/themes/next/source/images/apple-touch-icon-next.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liangzr/blog/49cb2c5d1f01aee0017833624a8e3831b2ff5874/hexo/themes/next/source/images/apple-touch-icon-next.png -------------------------------------------------------------------------------- /hexo/themes/next/source/images/avatar.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liangzr/blog/49cb2c5d1f01aee0017833624a8e3831b2ff5874/hexo/themes/next/source/images/avatar.gif -------------------------------------------------------------------------------- /hexo/themes/next/source/images/favicon-16x16-next.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liangzr/blog/49cb2c5d1f01aee0017833624a8e3831b2ff5874/hexo/themes/next/source/images/favicon-16x16-next.png -------------------------------------------------------------------------------- /hexo/themes/next/source/images/favicon-32x32-next.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liangzr/blog/49cb2c5d1f01aee0017833624a8e3831b2ff5874/hexo/themes/next/source/images/favicon-32x32-next.png -------------------------------------------------------------------------------- /hexo/themes/next/source/images/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liangzr/blog/49cb2c5d1f01aee0017833624a8e3831b2ff5874/hexo/themes/next/source/images/loading.gif -------------------------------------------------------------------------------- /hexo/themes/next/source/images/logo.svg: -------------------------------------------------------------------------------- 1 | 2 | image/svg+xml 24 | -------------------------------------------------------------------------------- /hexo/themes/next/source/images/placeholder.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liangzr/blog/49cb2c5d1f01aee0017833624a8e3831b2ff5874/hexo/themes/next/source/images/placeholder.gif -------------------------------------------------------------------------------- /hexo/themes/next/source/images/quote-l.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 8 | 13 | 14 | -------------------------------------------------------------------------------- /hexo/themes/next/source/images/quote-r.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 8 | 12 | 13 | -------------------------------------------------------------------------------- /hexo/themes/next/source/images/searchicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liangzr/blog/49cb2c5d1f01aee0017833624a8e3831b2ff5874/hexo/themes/next/source/images/searchicon.png -------------------------------------------------------------------------------- /hexo/themes/next/source/js/src/schemes/muse.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function() { 2 | function updateFooterPosition() { 3 | var containerHeight = $('#footer').attr('position') ? $('.container').height() + $('#footer').outerHeight(true) : $('.container').height(); 4 | if (containerHeight < window.innerHeight) $('#footer').css({ 'position': 'fixed', 'bottom': 0, 'left': 0, 'right': 0 }).attr('position', 'fixed'); 5 | else $('#footer').removeAttr('style position'); 6 | } 7 | updateFooterPosition(); 8 | $(window).on('resize scroll', updateFooterPosition); 9 | }); 10 | -------------------------------------------------------------------------------- /hexo/themes/next/source/js/src/scroll-cookie.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function() { 2 | 3 | /* global Cookies */ 4 | 5 | // Set relative link path (without domain) 6 | var rpath = window.location.href.replace(window.location.origin, ''); 7 | 8 | // Write position in cookie 9 | var timeout; 10 | $(window).on('scroll', function() { 11 | clearTimeout(timeout); 12 | timeout = setTimeout(function() { 13 | Cookies.set('scroll-cookie', $(window).scrollTop() + '|' + rpath, { expires: 365, path: '' }); 14 | }, 250); 15 | }); 16 | 17 | // Read position from cookie 18 | if (Cookies.get('scroll-cookie') !== undefined) { 19 | var cvalues = Cookies.get('scroll-cookie').split('|'); 20 | if (cvalues[1] === rpath) { 21 | $(window).scrollTop(cvalues[0]); 22 | } 23 | } 24 | 25 | }); 26 | -------------------------------------------------------------------------------- /hexo/themes/next/test/.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "curly": true, 3 | "eqnull": true, 4 | "eqeqeq": true, 5 | "undef": true, 6 | "newcap": true, 7 | "unused": true, 8 | "laxcomma": false, 9 | "asi": false, 10 | "expr": true, 11 | "loopfunc": false, 12 | "strict": false, 13 | 14 | "globals": { 15 | "define": true, 16 | "require": true, 17 | "it": true, 18 | "module": true, 19 | "describe": true, 20 | "window": true, 21 | "$": true 22 | } 23 | } 24 | --------------------------------------------------------------------------------