{{ post.description }}
{%- if theme.read_more_btn %} {%- endif %} {% elif post.excerpt %} {{ post.excerpt }} {%- if theme.read_more_btn %} {%- endif %} {% else %} {{ post.content }} {%- endif %} {% else %} {{ post.content }} {%- endif %}Repository: theme-next/hexo-theme-next Branch: master Commit: b062274e94d2 Files: 275 Total size: 532.3 KB Directory structure: gitextract_z3btu9dz/ ├── .editorconfig ├── .eslintrc.json ├── .gitattributes ├── .github/ │ ├── CODE_OF_CONDUCT.md │ ├── CONTRIBUTING.md │ ├── ISSUE_TEMPLATE/ │ │ ├── bug-report.md │ │ ├── feature-request.md │ │ ├── other.md │ │ └── question.md │ ├── PULL_REQUEST_TEMPLATE.md │ ├── config.yml │ ├── issue-close-app.yml │ ├── issue_label_bot.yaml │ ├── lock.yml │ ├── mergeable.yml │ ├── release-drafter.yml │ ├── stale.yml │ └── support.yml ├── .gitignore ├── .stylintrc ├── .travis.yml ├── LICENSE.md ├── README.md ├── _config.yml ├── 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.js ├── languages/ │ ├── ar.yml │ ├── de.yml │ ├── en.yml │ ├── es.yml │ ├── fa.yml │ ├── fr.yml │ ├── hu.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/ │ ├── _layout.swig │ ├── _macro/ │ │ ├── post-collapse.swig │ │ ├── post.swig │ │ └── sidebar.swig │ ├── _partials/ │ │ ├── comments.swig │ │ ├── footer.swig │ │ ├── head/ │ │ │ ├── head-unique.swig │ │ │ └── head.swig │ │ ├── header/ │ │ │ ├── brand.swig │ │ │ ├── index.swig │ │ │ ├── menu-item.swig │ │ │ ├── menu.swig │ │ │ └── sub-menu.swig │ │ ├── languages.swig │ │ ├── page/ │ │ │ ├── breadcrumb.swig │ │ │ └── page-header.swig │ │ ├── pagination.swig │ │ ├── post/ │ │ │ ├── post-copyright.swig │ │ │ ├── post-followme.swig │ │ │ ├── post-footer.swig │ │ │ ├── post-related.swig │ │ │ └── post-reward.swig │ │ ├── search/ │ │ │ ├── algolia-search.swig │ │ │ ├── index.swig │ │ │ └── localsearch.swig │ │ ├── sidebar/ │ │ │ └── site-overview.swig │ │ └── widgets.swig │ ├── _scripts/ │ │ ├── index.swig │ │ ├── noscript.swig │ │ ├── pages/ │ │ │ └── schedule.swig │ │ ├── pjax.swig │ │ ├── schemes/ │ │ │ ├── gemini.swig │ │ │ ├── mist.swig │ │ │ ├── muse.swig │ │ │ └── pisces.swig │ │ ├── three.swig │ │ └── vendors.swig │ ├── _third-party/ │ │ ├── analytics/ │ │ │ ├── baidu-analytics.swig │ │ │ ├── google-analytics.swig │ │ │ ├── growingio.swig │ │ │ └── index.swig │ │ ├── baidu-push.swig │ │ ├── chat/ │ │ │ ├── chatra.swig │ │ │ └── tidio.swig │ │ ├── comments/ │ │ │ ├── changyan.swig │ │ │ ├── disqus.swig │ │ │ ├── disqusjs.swig │ │ │ ├── gitalk.swig │ │ │ ├── livere.swig │ │ │ └── valine.swig │ │ ├── index.swig │ │ ├── math/ │ │ │ ├── index.swig │ │ │ ├── katex.swig │ │ │ └── mathjax.swig │ │ ├── quicklink.swig │ │ ├── rating.swig │ │ ├── search/ │ │ │ ├── algolia-search.swig │ │ │ ├── localsearch.swig │ │ │ └── swiftype.swig │ │ ├── statistics/ │ │ │ ├── busuanzi-counter.swig │ │ │ ├── cnzz-analytics.swig │ │ │ ├── firestore.swig │ │ │ ├── index.swig │ │ │ └── lean-analytics.swig │ │ └── tags/ │ │ ├── mermaid.swig │ │ └── pdf.swig │ ├── archive.swig │ ├── category.swig │ ├── index.swig │ ├── page.swig │ ├── post.swig │ └── tag.swig ├── package.json ├── scripts/ │ ├── events/ │ │ ├── index.js │ │ └── lib/ │ │ ├── config.js │ │ ├── injects-point.js │ │ └── injects.js │ ├── filters/ │ │ ├── comment/ │ │ │ ├── changyan.js │ │ │ ├── common.js │ │ │ ├── default-config.js │ │ │ ├── disqus.js │ │ │ ├── disqusjs.js │ │ │ ├── gitalk.js │ │ │ ├── livere.js │ │ │ └── valine.js │ │ ├── default-injects.js │ │ ├── front-matter.js │ │ ├── locals.js │ │ ├── minify.js │ │ └── post.js │ ├── helpers/ │ │ ├── engine.js │ │ ├── font.js │ │ ├── next-config.js │ │ └── next-url.js │ ├── renderer.js │ └── tags/ │ ├── button.js │ ├── caniuse.js │ ├── center-quote.js │ ├── group-pictures.js │ ├── label.js │ ├── mermaid.js │ ├── note.js │ ├── pdf.js │ ├── tabs.js │ └── video.js └── source/ ├── css/ │ ├── _colors.styl │ ├── _common/ │ │ ├── components/ │ │ │ ├── back-to-top-sidebar.styl │ │ │ ├── back-to-top.styl │ │ │ ├── components.styl │ │ │ ├── pages/ │ │ │ │ ├── breadcrumb.styl │ │ │ │ ├── categories.styl │ │ │ │ ├── pages.styl │ │ │ │ ├── schedule.styl │ │ │ │ └── tag-cloud.styl │ │ │ ├── post/ │ │ │ │ ├── post-collapse.styl │ │ │ │ ├── post-copyright.styl │ │ │ │ ├── post-eof.styl │ │ │ │ ├── post-expand.styl │ │ │ │ ├── post-followme.styl │ │ │ │ ├── post-gallery.styl │ │ │ │ ├── post-header.styl │ │ │ │ ├── post-nav.styl │ │ │ │ ├── post-reward.styl │ │ │ │ ├── post-rtl.styl │ │ │ │ ├── post-tags.styl │ │ │ │ ├── post-widgets.styl │ │ │ │ └── post.styl │ │ │ ├── reading-progress.styl │ │ │ └── third-party/ │ │ │ ├── gitalk.styl │ │ │ ├── math.styl │ │ │ ├── related-posts.styl │ │ │ ├── search.styl │ │ │ └── third-party.styl │ │ ├── outline/ │ │ │ ├── footer/ │ │ │ │ └── footer.styl │ │ │ ├── header/ │ │ │ │ ├── bookmark.styl │ │ │ │ ├── github-banner.styl │ │ │ │ ├── header.styl │ │ │ │ ├── headerband.styl │ │ │ │ ├── menu.styl │ │ │ │ ├── site-meta.styl │ │ │ │ └── site-nav.styl │ │ │ ├── mobile.styl │ │ │ ├── outline.styl │ │ │ └── sidebar/ │ │ │ ├── sidebar-author-links.styl │ │ │ ├── sidebar-author.styl │ │ │ ├── sidebar-blogroll.styl │ │ │ ├── sidebar-button.styl │ │ │ ├── sidebar-dimmer.styl │ │ │ ├── sidebar-nav.styl │ │ │ ├── sidebar-toc.styl │ │ │ ├── sidebar-toggle.styl │ │ │ ├── sidebar.styl │ │ │ └── site-state.styl │ │ └── scaffolding/ │ │ ├── base.styl │ │ ├── buttons.styl │ │ ├── comments.styl │ │ ├── highlight/ │ │ │ ├── copy-code.styl │ │ │ ├── diff.styl │ │ │ ├── highlight.styl │ │ │ └── theme.styl │ │ ├── normalize.styl │ │ ├── pagination.styl │ │ ├── scaffolding.styl │ │ ├── tables.styl │ │ ├── tags/ │ │ │ ├── blockquote-center.styl │ │ │ ├── group-pictures.styl │ │ │ ├── label.styl │ │ │ ├── note.styl │ │ │ ├── pdf.styl │ │ │ ├── tabs.styl │ │ │ └── tags.styl │ │ └── toggles.styl │ ├── _mixins.styl │ ├── _schemes/ │ │ ├── Gemini/ │ │ │ └── index.styl │ │ ├── Mist/ │ │ │ ├── _header.styl │ │ │ ├── _layout.styl │ │ │ ├── _menu.styl │ │ │ ├── _posts-expand.styl │ │ │ └── index.styl │ │ ├── Muse/ │ │ │ ├── _header.styl │ │ │ ├── _layout.styl │ │ │ ├── _menu.styl │ │ │ ├── _sidebar.styl │ │ │ ├── _sub-menu.styl │ │ │ └── index.styl │ │ └── Pisces/ │ │ ├── _header.styl │ │ ├── _layout.styl │ │ ├── _menu.styl │ │ ├── _sidebar.styl │ │ ├── _sub-menu.styl │ │ └── index.styl │ ├── _variables/ │ │ ├── Gemini.styl │ │ ├── Mist.styl │ │ ├── Muse.styl │ │ ├── Pisces.styl │ │ └── base.styl │ └── main.styl ├── js/ │ ├── algolia-search.js │ ├── bookmark.js │ ├── local-search.js │ ├── motion.js │ ├── next-boot.js │ ├── schemes/ │ │ ├── muse.js │ │ └── pisces.js │ └── utils.js └── lib/ └── anime.min.js ================================================ FILE CONTENTS ================================================ ================================================ FILE: .editorconfig ================================================ # editorconfig.org root = true [*] charset = utf-8 end_of_line = lf insert_final_newline = true trim_trailing_whitespace = true indent_style = space indent_size = 2 ================================================ FILE: .eslintrc.json ================================================ { "extends": "theme-next", "root": true } ================================================ FILE: .gitattributes ================================================ source/lib/* linguist-vendored ================================================ FILE: .github/CODE_OF_CONDUCT.md ================================================
# [NexT](https://theme-next.org) is an elegant and powerful theme for [Hexo](https://hexo.io/). With it, you can build a static blog hosted on [GitHub Pages](https://pages.github.com/) to share your life and communicate with new friends. A CODE_OF_CONDUCT dictates how conversation during code updates, issue communication, and pull requests should happen within [NexT](https://github.com/theme-next/hexo-theme-next) repository. We expect all users to show respect and courtesy to others through our repositories. Anyone violating these rules will not be reviewed and will be blocked and expelled from our repositories immediately upon discovery. ## Table Of Contents - [Our Pledge](#our-pledge) - [Our Responsibilities](#our-responsibilities) - [Our Standards](#our-standards) - [Scope](#scope) - [Enforcement](#enforcement) - [Contacting Maintainers](#contacting-maintainers) - [Attribution](#attribution) ## Our Pledge As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities. In the interest of fostering an open and welcoming environment, we are committed to making participation in our community a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual identity and orientation, disability, personal appearance, body size, race, ethnicity, age, religion, or nationality. ## Our Responsibilities Project maintainers have the right and responsibility to clarify the standards of acceptable behavior and are expected to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to block temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. ## Our Standards As a project on GitHub, this project is overed by the [GitHub Community Guidelines](https://help.github.com/articles/github-community-guidelines/). Additionally, as a project hosted on npm, it is covered by [npm Inc's Code of Conduct](https://www.npmjs.com/policies/conduct). Examples of behavior that contributes to creating a positive environment include: * Using welcoming and inclusive language. * Being respectful of differing viewpoints and experiences. * Gracefully accepting constructive feedback. * Focusing on what is best for the community. * Showing empathy and kindness towards other community members. Examples of unacceptable behavior by participants include: * The use of sexualized language or imagery and unwelcome sexual attention or advances * Trolling, insulting/derogatory comments, and personal or political attacks * Public or private harassment * Publishing others’ private information, such as a physical or electronic address, without explicit permission * Other conduct which could reasonably be considered inappropriate in a professional setting ## Scope This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Depending on the violation, the maintainers may decide that violations of this code of conduct that have happened outside of the scope of the community may deem an individual unwelcome, and take appropriate action to maintain the comfort and safety of its members. ## Enforcement If you see a Code of Conduct violation, follow these steps: 1. Let the person know that what they did is not appropriate and ask them to stop and/or edit their message(s) or commits. That person should immediately stop the behavior and correct the issue. 2. If this doesn’t happen, or if you're uncomfortable speaking up, [contact the maintainers](#contacting-maintainers). When reporting, please include any relevant details, links, screenshots, context, or other information that may be used to better understand and resolve the situation. 3. As soon as available, a maintainer will look into the issue, and take further action. Once the maintainers get involved, they will follow a documented series of steps and do their best to preserve the well-being of project members. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. Thesehese are the steps maintainers will take for further enforcement, as needed: 1. Repeat the request to stop. 2. If the person doubles down, they will have offending messages removed or edited by a maintainers given an official warning. The PR or Issue may be locked. 3. If the behavior continues or is repeated later, the person will be blocked from participating for 24 hours. 4. If the behavior continues or is repeated after the temporary block, a long-term (6-12 months) ban will be used. On top of this, maintainers may remove any offending messages, images, contributions, etc, as they deem necessary. Maintainers reserve full rights to skip any of these steps, at their discretion, if the violation is considered to be a serious and/or immediate threat to the well-being of members of the community. These include any threats, serious physical or verbal attacks, and other such behavior that would be completely unacceptable in any social setting that puts our members at risk. Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. ## Contacting Maintainers You may get in touch with the maintainer team through any of the following methods: * Through Email: * [support@theme-next.org](mailto:support@theme-next.org) * Through Chat: * [Gitter](https://gitter.im/theme-next) * [Riot](https://riot.im/app/#/room/#NexT:matrix.org) * [Telegram](https://t.me/joinchat/GUNHXA-vZkgSMuimL1VmMw) ## Attribution This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org/) and [WeAllJS Code of Conduct](https://wealljs.org/code-of-conduct). ================================================ FILE: .github/CONTRIBUTING.md ================================================ # First of all, thanks for taking your time to contribute and help make our project even better than it is today! The following is a set of guidelines for contributing to [Theme-Next](https://github.com/theme-next) and its libs submodules. These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request. ## Table Of Contents [How Can I Contribute?](#how-can-i-contribute) * [Before Submitting An Issue](#before-submitting-an-issue) * [Read the docs](#read-the-docs) * [Quick debug instructions](quick-debug-instructions) * [Reporting Bugs](#reporting-bugs) * [Reporting Security Bugs](#reporting-security-bugs) * [Suggesting Enhancements](#suggesting-enhancements) * [Submitting a Pull Request](#submitting-a-pull-request) * [Creating Releases](#creating-releases) [Guides](#guides) * [Coding Rules](#coding-rules) * [Coding Standards](#coding-standards) * [Labels Rules](#labels-rules) * [Commit Messages Rules](#commit-messages-rules) ## How Can I Contribute? ### Before Submitting An Issue #### Read the docs If you just have a question, you'll get faster results by checking the [FAQs for a list of common questions and problems](https://theme-next.org/docs/faqs) or the [troubleshooting part of «NexT» Documentation Site](https://theme-next.org/docs/troubleshooting). Also, you can perform a [cursory search](https://github.com/theme-next/hexo-theme-next/search?q=&type=Issues&utf8=%E2%9C%93) to see if the problem has already been reported or solved. You don't want to duplicate effort. You might be able to find the cause of the problem and fix things yourself, or add comments to the existed issue. #### Quick debug instructions Before submitting an Issue on GitHub, you can follow the steps below to debug: * Execute `hexo clean`, clear the browser cache and disable all CDN services (e.g. Cloudflare Rocket Loader) * Switch to another theme and check if the bug still exists (e.g. default theme landscape). In other words, prove that this is a NexT issue, not a issue from Hexo. * Upgrade theme NexT to the latest version. * Upgrade Hexo and Hexo plugins to the latest version. * Upgrade Node.js and `npm` to the latest version. * Uninstall all non-essential Hexo plugins, or reinstall all plugins using `npm install --save`. If you get an error message from Hexo or your browser, please search in Google / Stackoverflow / GitHub Issues, or report it to us when submitting a new Issue. If you find a bug in the source code, most importantly, please check carefully if you can reproduce the problem [in the latest release version of Next](https://github.com/theme-next/hexo-theme-next/releases/latest). Then, you can help us by [Reporting Bugs](#reporting-bugs) or [Suggesting Enhancements](#suggesting-enhancements) to our [Repository](https://github.com/theme-next/hexo-theme-next). Even better, you can [submit a Pull Request](#submitting-a-pull-request) with a fix. ### Reporting Bugs Before creating bug reports, please check [this list](#before-submitting-an-issue) as you might find out that you don't need to create one. After you've determined the repository your bug is related to, create an issue on that repository and provide the information as many details as possible by filling in [the required template](ISSUE_TEMPLATE.md). Following these guidelines helps maintainers and the community understand your report :pencil:, reproduce the behavior, and find related reports: * Use a clear and descriptive title for the issue to identify the problem. * Provide more context by answering these questions: * Can you reproduce the problem? Can you reliably reproduce the issue? If not, provide details about how often the problem happens and under which conditions it normally happens. * Did the problem start happening recently or was this always a problem? * If the problem started happening recently, can you reproduce the problem in an older version of Next? What's the most recent version in which the problem doesn't happen? You can download older versions of Next from [the releases page](https://github.com/theme-next/hexo-theme-next/releases). * Which version of Node, Hexo and Next are you using? You can get the exact version by running `node -v`, `hexo version` in your terminal, or copy the contents in site's`package.json`. * Which packages do you have installed? You can get that list by copying the contents in site's`package.json`. * Describe the exact steps which reproduce the problem in as many details as possible. When listing steps, don't just say what you did, but explain how you did it, e.g. which command exactly you used. If you're providing snippets in the issue, use [Markdown code blocks](https://help.github.com/articles/creating-and-highlighting-code-blocks/) or [a permanent link to a code snippet](https://help.github.com/articles/creating-a-permanent-link-to-a-code-snippet/), or a [Gist link](https://gist.github.com/). * Provide specific examples to demonstrate the steps. Include links to files (screenshots or GIFs) or live demo. * Describe the behavior you observed after following the steps and point out what exactly is the problem with that behavior. * Explain which behavior you expected to see instead and why. #### Reporting Security Bugs If you find a security issue, please act responsibly and report it not in the public issue tracker, but directly to us, so we can fix it before it can be exploited. Please send the related information to security@theme-next.com (desirable with using PGP for e-mail encryption). We will gladly special thanks to anyone who reports a vulnerability so that we can fix it. If you want to remain anonymous or pseudonymous instead, please let us know that; we will gladly respect your wishes. ### Suggesting Enhancements Before creating enhancement suggestions, please check [this list](#before-submitting-an-issue) as you might find out that you don't need to create one. After you've determined the repository your enhancement suggestion is related to, create an issue on that repository and provide the information as many details as possible by filling in [the required template](ISSUE_TEMPLATE.md). Following these guidelines helps maintainers and the community understand your suggestion :pencil: and find related suggestions. * Use a clear and descriptive title for the issue to identify the suggestion. * Describe the current behavior and explain which behavior you expected to see instead and Explain why this enhancement would be useful to most users. * Provide specific examples to demonstrate the suggestion. Include links to files (screenshots or GIFs) or live demo. ### Submitting a Pull Request Before creating a Pull Request (PR), please check [this list](#before-submitting-an-issue) as you might find out that you don't need to create one. After you've determined the repository your pull request is related to, create a pull request on that repository. The detailed document of creating a pull request can be found [here](https://help.github.com/articles/creating-a-pull-request/). Following these guidelines helps maintainers and the community understand your pull request :pencil:: * Follow our [Coding Rules](#coding-rules) and [commit message conventions](#commit-messages-rules). * Use a clear and descriptive title for the issue to identify the pull request. Do not include issue numbers in the PR title. * Fill in [the required template](PULL_REQUEST_TEMPLATE.md) as many details as possible. * All features or bug fixes must be tested in all schemes. And provide specific examples to demonstrate the pull request. Include links to files (screenshots or GIFs) or live demo. ### Creating Releases Releases are a great way to ship projects on GitHub to your users. 1. On GitHub, navigate to the main page of the repository. Under your repository name, click **Releases**. Click **Draft a new release**. 2. Type a version number for your release. Versions are based on [Git tags](https://git-scm.com/book/en/Git-Basics-Tagging). We recommend naming tags that fit within [About Major and Minor NexT versions](https://github.com/theme-next/hexo-theme-next/issues/187). 3. Select a branch that contains the project you want to release. Usually, you'll want to release against your `master` branch, unless you're releasing beta software. 4. Type a title and description that describes your release. - Use the version as the title. - The types of changes include **Breaking Changes**, **Updates**, **Features**, and **Bug Fixes**. In the section of Breaking Changes, use multiple secondary headings, and use item list in other sections. - Use the passive tense and subject-less sentences. - All changes must be documented in release notes. If commits happen without pull request (minimal changes), just add this commit ID into release notes. If commits happen within pull request alreay, just add the related pull request ID including all possible commits. 5. If you'd like to include binary files along with your release, such as compiled programs, drag and drop or select files manually in the binaries box. 6. If the release is unstable, select **This is a pre-release** to notify users that it's not ready for production. If you're ready to publicize your release, click **Publish release**. Otherwise, click **Save draft** to work on it later. ## Guides ### Coding Rules This project and everyone participating in it is governed by the [Code of Conduct](CODE_OF_CONDUCT.md) to keep open and inclusive. By participating, you are expected to uphold this code. ### Coding Standards We use ESLint and Stylint for identifying and reporting on patterns in JavaScript and Stylus, with the goal of making code more consistent and avoiding bugs. These specifications should be followed when coding. ### Labels Rules We use "labels" in the issue tracker to help classify Pull requests and Issues. Using labels enables maintainers and users to quickly find issues they should look into, either because they experience them, or because it meets their area of expertise. If you are unsure what a label is about or which labels you should apply to a PR or issue, look no further! Issues related: - By types - `Bug`: A detected bug that needs to be confirmed - `Feature Request`: An issue that wants a new feature - `Question`: An issue about questions - `Meta`: Denoting a change of usage conditions - `Support`: An issue labeled as support requests - `Polls`: An issue that initiated a poll - By results - `Duplicate`: An issue which had been mentioned - `Irrelevant`: An irrelevant issue for Next - `Invalid`: An issue that cannot be reproduced - `Expected Behavior`: An issue that corresponds to expected behavior - `Need More Info`: Need more information for solving the issue - `Verified`: An issue that has been verified - `Solved`: An issue that has been solved - `Backlog`: An issue that is to be completed and later compensated - `Stale`: This issue has been automatically marked as stale because lack of recent activity Pull requests related: - `Breaking Change`: A pull request that makes breaking change - `Bug Fix`: A pull request that fixes the related bug - `New Feature`: A pull request that provides a new feature - `Feature`: A pull request that provides an option or addition to existing feature - `i18n`: A pull request that makes new languages translation - `Work in Progress`: A pull request that is still working in progress - `Skip Release`: A pull request that should be excluded from release note Both: - `Roadmap`: An issue / pull request about future development - `Help Wanted`: An issue / pull request that needs help - `Discussion`: An issue / pull request that needs to be discussed - `Improvement`: An issue that needs improvement or a pull request that improves NexT - `Performance`: An issue / pull request that improves the performance - `Hexo`: An issue / pull request related to Hexo or Hexo plugins - `Template Engine`: An issue / pull request related to template engine - `CSS`: An issue / pull request related to CSS - `Fonts`: An issue / pull request related to fonts - `PJAX`: An issue / pull request related to PJAX - `3rd Party Plugin`: An issue / pull request related to 3rd party plugins & service - `Docs`: An issue / pull request related to instruction document - `Configurations`: An issue / pull request related to configurations ### Commit Messages Rules We have very precise rules over how our git commit messages can be formatted. Each commit message consists of a `type` and a `subject`. This leads to more readable messages that are easy to follow when looking through the project history. - `type` describes the meaning of this commit including but not limited to the following items, and capitalize the first letter. * `Build`: Changes that affect the build system or external dependencies * `Ci`: Changes to our CI configuration files and scripts * `Docs`: Documentation only changes * `Feat`: A new feature * `Fix`: A bug fix * `Perf`: A code change that improves performance * `Refactor`: A code change that neither fixes a bug nor adds a feature * `Style`: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc) * `Revert`: Revert some existing commits * `Release`: Commit a release for a conventional changelog project - The `subject` contains a succinct description of the change, like `Update code highlighting in readme.md`. * No dot (.) at the end. * Use the imperative, present tense: "change" not "changed" nor "changes". ================================================ FILE: .github/ISSUE_TEMPLATE/bug-report.md ================================================ --- name: Bug Report about: Something isn't working as expected title: '' labels: Bug assignees: '' --- Please follow this Issue template to provide relevant information, such as source code repositories, blog links, and screenshots, which will help us investigate. 请按照此 Issue 模版提供相关信息,例如源码仓库、博客链接和屏幕截图,这将有助于我们进行调查。 ## Issue Checklist - [ ] I am using [the latest](https://github.com/theme-next/hexo-theme-next/releases/latest) version of NexT. - [ ] I have read the relevant documents of [Hexo](https://hexo.io/docs/) and [NexT](https://theme-next.org/docs/). - [ ] I have reviewed the latest Roadmap on GitHub and searched for current [issues](https://github.com/theme-next/hexo-theme-next/issues), which does not help me. *** ## Expected behavior ## Actual behavior - Links to demo site with this issue: N/A - Links to repository or source code of the blog: N/A ## Steps to reproduce the behavior 1. N/A 2. N/A 3. N/A ## Environment Information ### Node.js and NPM Information ``` ``` ### Package dependencies Information ``` ``` ### Hexo Configuration ```yml ``` ### NexT Configuration ```yml ``` ## Other Information ================================================ FILE: .github/ISSUE_TEMPLATE/feature-request.md ================================================ --- name: Feature Request about: Suggest an idea for this project title: '' labels: Feature Request assignees: '' --- Please follow this Issue template to provide relevant information, such as source code repositories, blog links, and screenshots, which will help us investigate. 请按照此 Issue 模版提供相关信息,例如源码仓库、博客链接和屏幕截图,这将有助于我们进行调查。 ## Issue Checklist - [ ] I am using [the latest](https://github.com/theme-next/hexo-theme-next/releases/latest) version of NexT. - [ ] I have read the relevant documents of [Hexo](https://hexo.io/docs/) and [NexT](https://theme-next.org/docs/). - [ ] I have reviewed the latest Roadmap on GitHub and searched for current [issues](https://github.com/theme-next/hexo-theme-next/issues), which does not help me. *** ## Expected behavior ## Actual behavior - Links to demo site with this feature: N/A - Links to repository or source code of the blog: N/A ## Steps to reproduce the behavior 1. N/A 2. N/A 3. N/A ## Other Information ================================================ FILE: .github/ISSUE_TEMPLATE/other.md ================================================ --- name: Other about: Not a question, feature request or bug report title: '' labels: '' assignees: '' --- Please follow this Issue template to provide relevant information, such as source code repositories, blog links, and screenshots, which will help us investigate. 请按照此 Issue 模版提供相关信息,例如源码仓库、博客链接和屏幕截图,这将有助于我们进行调查。 ## Issue Checklist - [ ] I am using [the latest](https://github.com/theme-next/hexo-theme-next/releases/latest) version of NexT. - [ ] I have read the relevant documents of [Hexo](https://hexo.io/docs/) and [NexT](https://theme-next.org/docs/). - [ ] I have reviewed the latest Roadmap on GitHub and searched for current [issues](https://github.com/theme-next/hexo-theme-next/issues), which does not help me. *** ## Other Information ================================================ FILE: .github/ISSUE_TEMPLATE/question.md ================================================ --- name: Question about: I have a question for NexT (e.g. Customize) title: '' labels: Custom assignees: '' --- Please follow this Issue template to provide relevant information, such as source code repositories, blog links, and screenshots, which will help us investigate. 请按照此 Issue 模版提供相关信息,例如源码仓库、博客链接和屏幕截图,这将有助于我们进行调查。 ## Issue Checklist - [ ] I am using [the latest](https://github.com/theme-next/hexo-theme-next/releases/latest) version of NexT. - [ ] I have read the relevant documents of [Hexo](https://hexo.io/docs/) and [NexT](https://theme-next.org/docs/). - [ ] I have reviewed the latest Roadmap on GitHub and searched for current [issues](https://github.com/theme-next/hexo-theme-next/issues), which does not help me. *** ## Expected behavior ## Actual behavior - Links to demo site with this issue: N/A - Links to repository or source code of the blog: N/A ## Steps to reproduce the behavior 1. N/A 2. N/A 3. N/A ## Environment Information ### Node.js and NPM Information ``` ``` ### Package dependencies Information ``` ``` ### Hexo Configuration ```yml ``` ### NexT Configuration ```yml ``` ## Other Information ================================================ FILE: .github/PULL_REQUEST_TEMPLATE.md ================================================ ## PR Checklist - [ ] The commit message follows [guidelines for NexT](https://github.com/theme-next/hexo-theme-next/blob/master/.github/CONTRIBUTING.md). - [ ] Tests for the changes was maked (for bug fixes / features). - [ ] Muse | Mist have been tested. - [ ] Pisces | Gemini have been tested. - [ ] [Docs](https://github.com/theme-next/theme-next.org/tree/source/source/docs) in [NexT website](https://theme-next.org/docs/) have been added / updated (for features). ## PR Type - [ ] Bugfix. - [ ] Feature. - [ ] Code style update (formatting, local variables). - [ ] Refactoring (no functional changes, no api changes). - [ ] Build & CI related changes. - [ ] Documentation. - [ ] Translation. - [ ] Other... Please describe: ## What is the current behavior? Issue resolved: N/A ## What is the new behavior? - Screenshots with this changes: N/A - Link to demo site with this changes: N/A ### How to use? In NexT `_config.yml`: ```yml ``` ================================================ FILE: .github/config.yml ================================================ # =============================================================================================== # # Configuration for welcome - https://github.com/behaviorbot/welcome # Comment to be posted to on first time issues newIssueWelcomeComment: > Thanks for opening this issue, maintainers will get back to you as soon as possible! # Comment to be posted to on PRs from first time contributors in your repository newPRWelcomeComment: > Thanks so much for opening your first PR here! # Comment to be posted to on pull requests merged by a first time user firstPRMergeComment: > Congrats on merging your first pull request here! :tada: How awesome! # =============================================================================================== # # Configuration for request-info - https://github.com/behaviorbot/request-info # *OPTIONAL* Label to be added to Issues and Pull Requests with insufficient information given requestInfoLabelToAdd: Need More Info # *OPTIONAL* Add a list of people whose Issues/PRs will not be commented on # keys must be GitHub usernames requestInfoUserstoExclude: - 1v9 - Acris - flashlab - geekrainy - iissnan - ivan-nginx - JiangTJ - LEAFERx - liolok - maple3142 - Raincal - sli1989 - stevenjoezhang - tsanie - wafer-li # =============================================================================================== # lockThreads: toxicityThreshold: .7 numComments: 2 setTimeInHours: 72 replyComment: > This thread is being locked due to exceeding the toxicity minimums. cc/ @theme-next/next ================================================ FILE: .github/issue-close-app.yml ================================================ # Comment that will be sent if an issue is judged to be closed. comment: "This issue has been closed because it does not meet our Issue template. Please read our [guidelines for contributing](https://github.com/theme-next/hexo-theme-next/blob/master/.github/CONTRIBUTING.md#how-can-i-contribute)." issueConfigs: # There can be several configs for different kind of issues. - content: - "Issue Checklist" # Optional configuration: # # whether the keywords are case-insensitive # default value is false, which means keywords are case-sensitive caseInsensitive: true # the label that will be added when the bot close an issue # The bot will only add a label if this property is set. label: "Invalid" # The issue is judged to be legal if it includes all keywords from any of these two configs. # Or it will be closed by the app. ================================================ FILE: .github/issue_label_bot.yaml ================================================ label-alias: bug: 'Bug' feature_request: 'Feature Request' question: 'Question' ================================================ FILE: .github/lock.yml ================================================ # Configuration for Lock Threads - https://github.com/dessant/lock-threads # Number of days of inactivity before a closed issue or pull request is locked daysUntilLock: 365 # Skip issues and pull requests created before a given timestamp. Timestamp must # follow ISO 8601 (`YYYY-MM-DD`). Set to `false` to disable skipCreatedBefore: false # Issues and pull requests with these labels will be ignored. Set to `[]` to disable exemptLabels: [] # Label to add before locking, such as `outdated`. Set to `false` to disable lockLabel: false # Comment to post before locking. Set to `false` to disable lockComment: > This thread has been automatically locked since there has not been any recent activity after it was closed. It is possible issue was solved or at least outdated. Feel free to open new for related bugs. # Assign `resolved` as the reason for locking. Set to `false` to disable setLockReason: true # Limit to only `issues` or `pulls` only: issues # Optionally, specify configuration settings just for `issues` or `pulls` # issues: # exemptLabels: # - help-wanted # lockLabel: outdated # pulls: # daysUntilLock: 30 # Repository to extend settings from # _extends: repo ================================================ FILE: .github/mergeable.yml ================================================ # Configuration for Mergeable - https://github.com/jusx/mergeable version: 2 mergeable: - when: pull_request.* validate: - do: description no_empty: enabled: false - do: title must_exclude: regex: ^\[WIP\] - do: label must_include: regex: 'change|feat|imp|fix|doc|i18n' must_exclude: regex: 'wip|work in progress' #- do: project # no_empty: # enabled: true # must_include: # regex: 'change|feat|imp|fix|doc|loc' - do: milestone no_empty: enabled: true ================================================ FILE: .github/release-drafter.yml ================================================ # Configuration for Release Drafter - https://github.com/toolmantim/release-drafter name-template: 'v$NEXT_MINOR_VERSION' tag-template: 'v$NEXT_MINOR_VERSION' categories: - title: '💥 Breaking Changes' label: '💥 Breaking Change' - title: '🌟 New Features' label: '🌟 New Feature' - title: '⭐ Features' label: '⭐ Feature' - title: '🐞 Bug Fixes' label: '🐞 Bug Fix' - title: '🛠 Improvements' label: '🛠 Improvement' - title: '🌀 External Changes' label: '🔌 3rd Party Plugin' - title: '📖 Documentation' label: '📖 Docs' - title: '🌍 Localization' label: '🌍 i18n' change-template: '- $TITLE (#$NUMBER)' no-changes-template: '- No changes' template: | $CHANGES *** For full changes, see the [comparison between $PREVIOUS_TAG and v$NEXT_MINOR_VERSION](https://github.com/theme-next/hexo-theme-next/compare/$PREVIOUS_TAG...v$NEXT_MINOR_VERSION) exclude-labels: - 'Skip Release' ================================================ FILE: .github/stale.yml ================================================ # Configuration for probot-stale - https://github.com/probot/stale # Number of days of inactivity before an Issue or Pull Request becomes stale daysUntilStale: 30 # Number of days of inactivity before a stale Issue or Pull Request is closed daysUntilClose: 7 # Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable exemptLabels: - Bug - Feature Request - Discussion - Help Wanted - Question # Label to use when marking as stale staleLabel: stale # Comment to post when marking as stale. Set to `false` to disable markComment: > This issue has been automatically marked as stale because lack of recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You can also use our [support channels](https://github.com/theme-next/hexo-theme-next#feedback) to get help with the project. # Comment to post when removing the stale label. Set to `false` to disable unmarkComment: false # Comment to post when closing a stale Issue or Pull Request. Set to `false` to disable closeComment: false # Limit to only `issues` or `pulls` only: issues ================================================ FILE: .github/support.yml ================================================ # Configuration for Support Requests - https://github.com/dessant/support-requests # Label used to mark issues as support requests supportLabel: Support # Comment to post on issues marked as support requests, `{issue-author}` is an # optional placeholder. Set to `false` to disable supportComment: > :wave: @{issue-author}, we use the issue tracker exclusively for bug reports and feature requests. However, this issue appears to be a support request. Please use our [support channels](https://github.com/theme-next/hexo-theme-next/tree/master#feedback) to get help with the project. # Close issues marked as support requests close: true # Lock issues marked as support requests lock: false # Assign `off-topic` as the reason for locking. Set to `false` to disable setLockReason: true # Repository to extend settings from # _extends: repo ================================================ FILE: .gitignore ================================================ .DS_Store .idea/ *.log *.iml yarn.lock package-lock.json node_modules/ # Ignore optional external libraries source/lib/* # Track internal libraries & Ignore unused verdors files !source/lib/font-awesome/ !source/lib/anime.min.js !source/lib/velocity/ ================================================ FILE: .stylintrc ================================================ { "blocks": false, "brackets": "always", "colons": "always", "colors": "always", "commaSpace": "always", "commentSpace": "always", "cssLiteral": "never", "customProperties": [], "depthLimit": false, "duplicates": true, "efficient": "always", "exclude": [], "extendPref": false, "globalDupe": false, "groupOutputByFile": true, "indentPref": false, "leadingZero": "never", "maxErrors": false, "maxWarnings": false, "mixed": false, "mixins": [], "namingConvention": "lowercase-dash", "namingConventionStrict": false, "none": "never", "noImportant": true, "parenSpace": false, "placeholders": "always", "prefixVarsWithDollar": "always", "quotePref": false, "reporterOptions": { "columns": ["lineData", "severity", "description", "rule"], "columnSplitter": " ", "showHeaders": false, "truncate": true }, "semicolons": "always", "sortOrder": "alphabetical", "stackedProperties": false, "trailingWhitespace": "never", "universal": false, "valid": true, "zeroUnits": "never", "zIndexNormalize": false } ================================================ FILE: .travis.yml ================================================ language: node_js node_js: node cache: npm: true install: npm install ================================================ FILE: LICENSE.md ================================================ #Copyright © 2017 «NexT».
Detail attribution information for «NexT»
is contained in the 'docs/AUTHORS.md' file.
This license also available in text format.
[AUTHORS]: docs/AUTHORS.md [AGPL3]: docs/AGPL3.md [AGPL3-7]: docs/AGPL3.md/#7-additional-terms [AGPL3-15]: docs/AGPL3.md/#15-disclaimer-of-warranty ================================================ FILE: README.md ================================================ #
«NexT» is a high quality elegant Hexo theme. It is crafted from scratch with love.
💟 Muse | 🔯 Mist | ♓️ Pisces | ♊️ Gemini
More «NexT» examples here.
«NexT» send special thanks to these great services that sponsor our core infrastructure:
GitHub allows us to host the Git repository, Netlify allows us to distribute the documentation.
Crowdin allows us to translate conveniently the documentation.
Codacy allows us to monitor code quality, Travis CI allows us to run the test suite.
and code blocks.
codes:
external: true
family:
# ---------------------------------------------------------------
# SEO Settings
# ---------------------------------------------------------------
# Disable Baidu transformation on mobile devices.
disable_baidu_transformation: false
# If true, site-subtitle will be added to index page.
# Remember to set up your site-subtitle in Hexo `_config.yml` (e.g. subtitle: Subtitle)
index_with_subtitle: false
# Automatically add external URL with Base64 encrypt & decrypt.
exturl: false
# Google Webmaster tools verification.
# See: https://www.google.com/webmasters
google_site_verification:
# Bing Webmaster tools verification.
# See: https://www.bing.com/webmaster
bing_site_verification:
# Yandex Webmaster tools verification.
# See: https://webmaster.yandex.ru
yandex_site_verification:
# Baidu Webmaster tools verification.
# See: https://ziyuan.baidu.com/site
baidu_site_verification:
# Enable baidu push so that the blog will push the url to baidu automatically which is very helpful for SEO.
baidu_push: false
# ---------------------------------------------------------------
# Third Party Plugins & Services Settings
# See: https://theme-next.org/docs/third-party-services/
# More plugins: https://github.com/theme-next/awesome-next
# You may need to install dependencies or set CDN URLs in `vendors`
# There are two different CDN providers by default:
# - jsDelivr (cdn.jsdelivr.net), works everywhere even in China
# - CDNJS (cdnjs.cloudflare.com), provided by cloudflare
# ---------------------------------------------------------------
# Math Formulas Render Support
math:
# Default (true) will load mathjax / katex script on demand.
# That is it only render those page which has `mathjax: true` in Front-matter.
# If you set it to false, it will load mathjax / katex srcipt EVERY PAGE.
per_page: true
# hexo-renderer-pandoc (or hexo-renderer-kramed) required for full MathJax support.
mathjax:
enable: false
# See: https://mhchem.github.io/MathJax-mhchem/
mhchem: false
# hexo-renderer-markdown-it-plus (or hexo-renderer-markdown-it with markdown-it-katex plugin) required for full Katex support.
katex:
enable: false
# See: https://github.com/KaTeX/KaTeX/tree/master/contrib/copy-tex
copy_tex: false
# Easily enable fast Ajax navigation on your website.
# Dependencies: https://github.com/theme-next/theme-next-pjax
pjax: false
# FancyBox is a tool that offers a nice and elegant way to add zooming functionality for images.
# For more information: https://fancyapps.com/fancybox
fancybox: false
# A JavaScript library for zooming images like Medium.
# Do not enable both `fancybox` and `mediumzoom`.
# For more information: https://github.com/francoischalifour/medium-zoom
mediumzoom: false
# Vanilla JavaScript plugin for lazyloading images.
# For more information: https://github.com/ApoorvSaxena/lozad.js
lazyload: false
# Pangu Support
# For more information: https://github.com/vinta/pangu.js
pangu: false
# Quicklink Support
# Do not enable both `pjax` and `quicklink`.
# For more information: https://github.com/GoogleChromeLabs/quicklink
# Front-matter (unsupport home archive).
quicklink:
enable: false
# Home page and archive page can be controlled through home and archive options below.
# This configuration item is independent of `enable`.
home: false
archive: false
# Default (true) will initialize quicklink after the load event fires.
delay: true
# Custom a time in milliseconds by which the browser must execute prefetching.
timeout: 3000
# Default (true) will enable fetch() or falls back to XHR.
priority: true
# For more flexibility you can add some patterns (RegExp, Function, or Array) to ignores.
# See: https://github.com/GoogleChromeLabs/quicklink#custom-ignore-patterns
ignores:
# ---------------------------------------------------------------
# Comments Settings
# See: https://theme-next.org/docs/third-party-services/comments
# ---------------------------------------------------------------
# Multiple Comment System Support
comments:
# Available values: tabs | buttons
style: tabs
# Choose a comment system to be displayed by default.
# Available values: changyan | disqus | disqusjs | gitalk | livere | valine
active:
# Setting `true` means remembering the comment system selected by the visitor.
storage: true
# Lazyload all comment systems.
lazyload: false
# Modify texts or order for any navs, here are some examples.
nav:
#disqus:
# text: Load Disqus
# order: -1
#gitalk:
# order: -2
# Disqus
disqus:
enable: false
shortname:
count: true
#post_meta_order: 0
# DisqusJS
# Alternative Disqus - Render comment component using Disqus API.
# Demo: https://suka.js.org/DisqusJS/
# For more information: https://github.com/SukkaW/DisqusJS
disqusjs:
enable: false
# API Endpoint of Disqus API (https://disqus.com/api/).
# Leave api empty if you are able to connect to Disqus API. Otherwise you need a reverse proxy for it.
# For example:
# api: https://disqus.skk.moe/disqus/
api:
apikey: # Register new application from https://disqus.com/api/applications/
shortname: # See: https://disqus.com/admin/settings/general/
# Changyan
changyan:
enable: false
appid:
appkey:
#post_meta_order: 0
# Valine
# For more information: https://valine.js.org, https://github.com/xCss/Valine
valine:
enable: false
appid: # Your leancloud application appid
appkey: # Your leancloud application appkey
notify: false # Mail notifier
verify: false # Verification code
placeholder: Just go go # Comment box placeholder
avatar: mm # Gravatar style
guest_info: nick,mail,link # Custom comment header
pageSize: 10 # Pagination size
language: # Language, available values: en, zh-cn
visitor: false # Article reading statistic
comment_count: true # If false, comment count will only be displayed in post page, not in home page
recordIP: false # Whether to record the commenter IP
serverURLs: # When the custom domain name is enabled, fill it in here (it will be detected automatically by default, no need to fill in)
#post_meta_order: 0
# LiveRe comments system
# You can get your uid from https://livere.com/insight/myCode (General web site)
livere_uid: #
# Gitalk
# For more information: https://gitalk.github.io, https://github.com/gitalk/gitalk
gitalk:
enable: false
github_id: # GitHub repo owner
repo: # Repository name to store issues
client_id: # GitHub Application Client ID
client_secret: # GitHub Application Client Secret
admin_user: # GitHub repo owner and collaborators, only these guys can initialize gitHub issues
distraction_free_mode: true # Facebook-like distraction free mode
# Gitalk's display language depends on user's browser or system environment
# If you want everyone visiting your site to see a uniform language, you can set a force language value
# Available values: en | es-ES | fr | ru | zh-CN | zh-TW
language:
# ---------------------------------------------------------------
# Post Widgets & Content Sharing Services
# See: https://theme-next.org/docs/third-party-services/post-widgets
# ---------------------------------------------------------------
# Star rating support to each article.
# To get your ID visit https://widgetpack.com
rating:
enable: false
id: #
color: fc6423
# AddThis Share. See: https://www.addthis.com
# Go to https://www.addthis.com/dashboard to customize your tools.
add_this_id:
# ---------------------------------------------------------------
# Statistics and Analytics
# See: https://theme-next.org/docs/third-party-services/statistics-and-analytics
# ---------------------------------------------------------------
# Google Analytics
google_analytics:
tracking_id: #
# By default, NexT will load an external gtag.js script on your site.
# If you only need the pageview feature, set the following option to true to get a better performance.
only_pageview: false
# Baidu Analytics
baidu_analytics: #
# Growingio Analytics
growingio_analytics: #
# CNZZ count
cnzz_siteid:
# Show number of visitors of each article.
# You can visit https://leancloud.cn to get AppID and AppKey.
# AppID and AppKey are recommended to be the same as valine's for counter compatibility.
# Do not enable both `valine.visitor` and `leancloud_visitors`.
leancloud_visitors:
enable: false
app_id: #
app_key: #
# Required for apps from CN region
server_url: #
# Dependencies: https://github.com/theme-next/hexo-leancloud-counter-security
# If you don't care about security in leancloud counter and just want to use it directly
# (without hexo-leancloud-counter-security plugin), set `security` to `false`.
security: true
# Another tool to show number of visitors to each article.
# Visit https://console.firebase.google.com/u/0/ to get apiKey and projectId.
# Visit https://firebase.google.com/docs/firestore/ to get more information about firestore.
firestore:
enable: false
collection: articles # Required, a string collection name to access firestore database
apiKey: # Required
projectId: # Required
# Show Views / Visitors of the website / page with busuanzi.
# Get more information on http://ibruce.info/2015/04/04/busuanzi
busuanzi_count:
enable: false
total_visitors: true
total_visitors_icon: fa fa-user
total_views: true
total_views_icon: fa fa-eye
post_views: true
post_views_icon: fa fa-eye
# ---------------------------------------------------------------
# Search Services
# See: https://theme-next.org/docs/third-party-services/search-services
# ---------------------------------------------------------------
# Algolia Search
# For more information: https://www.algolia.com
algolia_search:
enable: false
hits:
per_page: 10
labels:
input_placeholder: Search for Posts
hits_empty: "We didn't find any results for the search: ${query}"
hits_stats: "${hits} results found in ${time} ms"
# Local Search
# Dependencies: https://github.com/theme-next/hexo-generator-searchdb
local_search:
enable: false
# If auto, trigger search by changing input.
# If manual, trigger search by pressing enter key or search button.
trigger: auto
# Show top n results per article, show all results by setting to -1
top_n_per_article: 1
# Unescape html strings to the readable one.
unescape: false
# Preload the search data when the page loads.
preload: false
# Swiftype Search API Key
swiftype_key:
# ---------------------------------------------------------------
# Chat Services
# See: https://theme-next.org/docs/third-party-services/chat-services
# ---------------------------------------------------------------
# Chatra Support
# See: https://chatra.io
# Dashboard: https://app.chatra.io/settings/general
chatra:
enable: false
async: true
id: # Visit Dashboard to get your ChatraID
#embed: # Unfinished experimental feature for developers. See: https://chatra.io/help/api/#injectto
# Tidio Support
# See: https://www.tidiochat.com
# Dashboard: https://www.tidiochat.com/panel/dashboard
tidio:
enable: false
key: # Public Key, get it from dashboard. See: https://www.tidiochat.com/panel/settings/developer
# ---------------------------------------------------------------
# Tags Settings
# See: https://theme-next.org/docs/tag-plugins/
# ---------------------------------------------------------------
# Note tag (bs-callout)
note:
# Note tag style values:
# - simple bs-callout old alert style. Default.
# - modern bs-callout new (v2-v3) alert style.
# - flat flat callout style with background, like on Mozilla or StackOverflow.
# - disabled disable all CSS styles import of note tag.
style: simple
icons: false
# Offset lighter of background in % for modern and flat styles (modern: -12 | 12; flat: -18 | 6).
# Offset also applied to label tag variables. This option can work with disabled note tag.
light_bg_offset: 0
# Tabs tag
tabs:
transition:
tabs: false
labels: true
# PDF tag
# NexT will try to load pdf files natively, if failed, pdf.js will be used.
# So, you have to install the dependency of pdf.js if you want to use pdf tag and make it available to all browsers.
# See: https://github.com/theme-next/theme-next-pdf
pdf:
enable: false
# Default height
height: 500px
# Mermaid tag
mermaid:
enable: false
# Available themes: default | dark | forest | neutral
theme: forest
# ---------------------------------------------------------------
# Animation Settings
# ---------------------------------------------------------------
# Use velocity to animate everything.
# For more information: http://velocityjs.org
motion:
enable: true
async: false
transition:
# Transition variants:
# fadeIn | flipXIn | flipYIn | flipBounceXIn | flipBounceYIn
# swoopIn | whirlIn | shrinkIn | expandIn
# bounceIn | bounceUpIn | bounceDownIn | bounceLeftIn | bounceRightIn
# slideUpIn | slideDownIn | slideLeftIn | slideRightIn
# slideUpBigIn | slideDownBigIn | slideLeftBigIn | slideRightBigIn
# perspectiveUpIn | perspectiveDownIn | perspectiveLeftIn | perspectiveRightIn
post_block: fadeIn
post_header: slideDownIn
post_body: slideDownIn
coll_header: slideLeftIn
# Only for Pisces | Gemini.
sidebar: slideUpIn
# Progress bar in the top during page loading.
# Dependencies: https://github.com/theme-next/theme-next-pace
# For more information: https://github.com/HubSpot/pace
pace:
enable: false
# Themes list:
# big-counter | bounce | barber-shop | center-atom | center-circle | center-radar | center-simple
# corner-indicator | fill-left | flat-top | flash | loading-bar | mac-osx | material | minimal
theme: minimal
# JavaScript 3D library.
# Dependencies: https://github.com/theme-next/theme-next-three
three:
enable: false
three_waves: false
canvas_lines: false
canvas_sphere: false
# Canvas-ribbon
# Dependencies: https://github.com/theme-next/theme-next-canvas-ribbon
# For more information: https://github.com/zproo/canvas-ribbon
canvas_ribbon:
enable: false
size: 300 # The width of the ribbon
alpha: 0.6 # The transparency of the ribbon
zIndex: -1 # The display level of the ribbon
#! ---------------------------------------------------------------
#! DO NOT EDIT THE FOLLOWING SETTINGS
#! UNLESS YOU KNOW WHAT YOU ARE DOING
#! See: https://theme-next.org/docs/advanced-settings
#! ---------------------------------------------------------------
# Script Vendors. Set a CDN address for the vendor you want to customize.
# Be aware that you would better use the same version as internal ones to avoid potential problems.
# Remember to use the https protocol of CDN files when you enable https on your site.
vendors:
# Internal path prefix.
_internal: lib
# Internal version: 3.1.0
# anime: //cdn.jsdelivr.net/npm/animejs@3.1.0/lib/anime.min.js
anime:
# Internal version: 5.13.0
# fontawesome: //cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5/css/all.min.css
# fontawesome: //cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/css/all.min.css
fontawesome:
# MathJax
# mathjax: //cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js
mathjax:
# KaTeX
# katex: //cdn.jsdelivr.net/npm/katex@0/dist/katex.min.css
# katex: //cdnjs.cloudflare.com/ajax/libs/KaTeX/0.11.1/katex.min.css
# copy_tex_js: //cdn.jsdelivr.net/npm/katex@0/dist/contrib/copy-tex.min.js
# copy_tex_css: //cdn.jsdelivr.net/npm/katex@0/dist/contrib/copy-tex.min.css
katex:
copy_tex_js:
copy_tex_css:
# Internal version: 0.2.8
# pjax: //cdn.jsdelivr.net/gh/theme-next/theme-next-pjax@0/pjax.min.js
pjax:
# FancyBox
# jquery: //cdn.jsdelivr.net/npm/jquery@3/dist/jquery.min.js
# fancybox: //cdn.jsdelivr.net/gh/fancyapps/fancybox@3/dist/jquery.fancybox.min.js
# fancybox_css: //cdn.jsdelivr.net/gh/fancyapps/fancybox@3/dist/jquery.fancybox.min.css
jquery:
fancybox:
fancybox_css:
# Medium-zoom
# mediumzoom: //cdn.jsdelivr.net/npm/medium-zoom@1/dist/medium-zoom.min.js
mediumzoom:
# Lazyload
# lazyload: //cdn.jsdelivr.net/npm/lozad@1/dist/lozad.min.js
# lazyload: //cdnjs.cloudflare.com/ajax/libs/lozad.js/1.14.0/lozad.min.js
lazyload:
# Pangu
# pangu: //cdn.jsdelivr.net/npm/pangu@4/dist/browser/pangu.min.js
# pangu: //cdnjs.cloudflare.com/ajax/libs/pangu/4.0.7/pangu.min.js
pangu:
# Quicklink
# quicklink: //cdn.jsdelivr.net/npm/quicklink@1/dist/quicklink.umd.js
quicklink:
# DisqusJS
# disqusjs_js: //cdn.jsdelivr.net/npm/disqusjs@1/dist/disqus.js
# disqusjs_css: //cdn.jsdelivr.net/npm/disqusjs@1/dist/disqusjs.css
disqusjs_js:
disqusjs_css:
# Valine
# valine: //cdn.jsdelivr.net/npm/valine@1/dist/Valine.min.js
# valine: //cdnjs.cloudflare.com/ajax/libs/valine/1.3.10/Valine.min.js
valine:
# Gitalk
# gitalk_js: //cdn.jsdelivr.net/npm/gitalk@1/dist/gitalk.min.js
# gitalk_css: //cdn.jsdelivr.net/npm/gitalk@1/dist/gitalk.min.css
gitalk_js:
gitalk_css:
# Algolia Search
# algolia_search: //cdn.jsdelivr.net/npm/algoliasearch@4/dist/algoliasearch-lite.umd.js
# instant_search: //cdn.jsdelivr.net/npm/instantsearch.js@4/dist/instantsearch.production.min.js
algolia_search:
instant_search:
# Mermaid
# mermaid: //cdn.jsdelivr.net/npm/mermaid@8/dist/mermaid.min.js
# mermaid: //cdnjs.cloudflare.com/ajax/libs/mermaid/8.4.8/mermaid.min.js
mermaid:
# Internal version: 1.2.1
# velocity: //cdn.jsdelivr.net/npm/velocity-animate@1/velocity.min.js
# velocity: //cdnjs.cloudflare.com/ajax/libs/velocity/1.2.1/velocity.min.js
# velocity_ui: //cdn.jsdelivr.net/npm/velocity-animate@1/velocity.ui.min.js
# velocity_ui: //cdnjs.cloudflare.com/ajax/libs/velocity/1.2.1/velocity.ui.min.js
velocity:
velocity_ui:
# Internal version: 1.0.2
# pace: //cdn.jsdelivr.net/npm/pace-js@1/pace.min.js
# pace: //cdnjs.cloudflare.com/ajax/libs/pace/1.0.2/pace.min.js
# pace_css: //cdn.jsdelivr.net/npm/pace-js@1/themes/blue/pace-theme-minimal.css
# pace_css: //cdnjs.cloudflare.com/ajax/libs/pace/1.0.2/themes/blue/pace-theme-minimal.min.css
pace:
pace_css:
# Internal version: 1.0.0
# three: //cdn.jsdelivr.net/gh/theme-next/theme-next-three@1/three.min.js
# three_waves: //cdn.jsdelivr.net/gh/theme-next/theme-next-three@1/three-waves.min.js
# canvas_lines: //cdn.jsdelivr.net/gh/theme-next/theme-next-three@1/canvas_lines.min.js
# canvas_sphere: //cdn.jsdelivr.net/gh/theme-next/theme-next-three@1/canvas_sphere.min.js
three:
three_waves:
canvas_lines:
canvas_sphere:
# Internal version: 1.0.0
# canvas_ribbon: //cdn.jsdelivr.net/gh/theme-next/theme-next-canvas-ribbon@1/canvas-ribbon.js
canvas_ribbon:
# Assets
css: css
js: js
images: images
================================================
FILE: crowdin.yml
================================================
files:
- source: /languages/en.yml
translation: /languages/%two_letters_code%.%file_extension%
languages_mapping:
two_letters_code:
zh-CN: zh-CN
zh-TW: zh-TW
zh-HK: zh-HK
pt-BR: pt-BR
================================================
FILE: docs/AGPL3.md
================================================
# GNU Affero General Public License
Version 3, 19 November 2007 Copyright © 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
## Preamble
The GNU Affero General Public License is a free, copyleft license for
software and other kinds of works, specifically designed to ensure
cooperation with the community in the case of network server software.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
our General Public Licenses are intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
Developers that use our General Public Licenses protect your rights
with two steps: **(1)** assert copyright on the software, and **(2)** offer
you this License which gives you legal permission to copy, distribute
and/or modify the software.
A secondary benefit of defending all users' freedom is that
improvements made in alternate versions of the program, if they
receive widespread use, become available for other developers to
incorporate. Many developers of free software are heartened and
encouraged by the resulting cooperation. However, in the case of
software used on network servers, this result may fail to come about.
The GNU General Public License permits making a modified version and
letting the public access it on a server without ever releasing its
source code to the public.
The GNU Affero General Public License is designed specifically to
ensure that, in such cases, the modified source code becomes available
to the community. It requires the operator of a network server to
provide the source code of the modified version running there to the
users of that server. Therefore, public use of a modified version, on
a publicly accessible server, gives the public access to the source
code of the modified version.
An older license, called the Affero General Public License and
published by Affero, was designed to accomplish similar goals. This is
a different license, not a version of the Affero GPL, but Affero has
released a new version of the Affero GPL which permits relicensing under
this license.
The precise terms and conditions for copying, distribution and
modification follow.
## TERMS AND CONDITIONS
### 0. Definitions
“This License” refers to version 3 of the GNU Affero General Public License.
“Copyright” also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
“The Program” refers to any copyrightable work licensed under this
License. Each licensee is addressed as “you”. “Licensees” and
“recipients” may be individuals or organizations.
To “modify” a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a “modified version” of the
earlier work or a work “based on” the earlier work.
A “covered work” means either the unmodified Program or a work based
on the Program.
To “propagate” a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To “convey” a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays “Appropriate Legal Notices”
to the extent that it includes a convenient and prominently visible
feature that **(1)** displays an appropriate copyright notice, and **(2)**
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
### 1. Source Code
The “source code” for a work means the preferred form of the work
for making modifications to it. “Object code” means any non-source
form of a work.
A “Standard Interface” means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The “System Libraries” of an executable work include anything, other
than the work as a whole, that **(a)** is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and **(b)** serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
“Major Component”, in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The “Corresponding Source” for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
### 2. Basic Permissions
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
### 3. Protecting Users' Legal Rights From Anti-Circumvention Law
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
### 4. Conveying Verbatim Copies
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
### 5. Conveying Modified Source Versions
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
* **a)** The work must carry prominent notices stating that you modified
it, and giving a relevant date.
* **b)** The work must carry prominent notices stating that it is
released under this License and any conditions added under section 7.
This requirement modifies the requirement in section 4 to
“keep intact all notices”.
* **c)** You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
* **d)** If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
“aggregate” if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
### 6. Conveying Non-Source Forms
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
* **a)** Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
* **b)** Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either **(1)** a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or **(2)** access to copy the
Corresponding Source from a network server at no charge.
* **c)** Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
* **d)** Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
* **e)** Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A “User Product” is either **(1)** a “consumer product”, which means any
tangible personal property which is normally used for personal, family,
or household purposes, or **(2)** anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, “normally used” refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
“Installation Information” for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
### 7. Additional Terms
“Additional permissions” are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
* **a)** Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
* **b)** Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
* **c)** Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
* **d)** Limiting the use for publicity purposes of names of licensors or
authors of the material; or
* **e)** Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
* **f)** Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered “further
restrictions” within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
### 8. Termination
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated **(a)**
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and **(b)** permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
### 9. Acceptance Not Required for Having Copies
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
### 10. Automatic Licensing of Downstream Recipients
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An “entity transaction” is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
### 11. Patents
A “contributor” is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's “contributor version”.
A contributor's “essential patent claims” are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, “control” includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a “patent license” is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To “grant” such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either **(1)** cause the Corresponding Source to be so
available, or **(2)** arrange to deprive yourself of the benefit of the
patent license for this particular work, or **(3)** arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. “Knowingly relying” means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is “discriminatory” if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license **(a)** in connection with copies of the covered work
conveyed by you (or copies made from those copies), or **(b)** primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
### 12. No Surrender of Others' Freedom
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
### 13. Remote Network Interaction; Use with the GNU General Public License
Notwithstanding any other provision of this License, if you modify the
Program, your modified version must prominently offer all users
interacting with it remotely through a computer network (if your version
supports such interaction) an opportunity to receive the Corresponding
Source of your version by providing access to the Corresponding Source
from a network server at no charge, through some standard or customary
means of facilitating copying of software. This Corresponding Source
shall include the Corresponding Source for any work covered by version 3
of the GNU General Public License that is incorporated pursuant to the
following paragraph.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the work with which it is combined will remain governed by version
3 of the GNU General Public License.
### 14. Revised Versions of this License
The Free Software Foundation may publish revised and/or new versions of
the GNU Affero General Public License from time to time. Such new versions
will be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU Affero General
Public License “or any later version” applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU Affero General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU Affero General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
### 15. Disclaimer of Warranty
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
### 16. Limitation of Liability
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
### 17. Interpretation of Sections 15 and 16
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
## END OF TERMS AND CONDITIONS
### How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the “copyright” line and a pointer to where the full notice is found.
Copyright (C)
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see .
Also add information on how to contact you by electronic and paper mail.
If your software can interact with users remotely through a computer
network, you should also make sure that it provides a way for users to
get its source. For example, if your program is a web application, its
interface could display a “Source” link that leads users to an archive
of the code. There are many ways you could offer source, and different
solutions will be better for different programs; see section 13 for the
specific requirements.
You should also get your employer (if you work as a programmer) or school,
if any, to sign a “copyright disclaimer” for the program, if necessary.
For more information on this, and how to apply and follow the GNU AGPL, see
< >.
================================================
FILE: docs/ALGOLIA-SEARCH.md
================================================
Algolia Search
NexT provides Algolia search plugin for index your hexo website content. To use this feature, make sure that the version of NexT you are using is after the v5.1.0 release. What you should note here is that only turn on `enable` of `algolia_search` in `next/_config.yml` cannot let you use the algolia search correctly, you need to install corresponding [Hexo Algolia](https://github.com/oncletom/hexo-algolia) plugin to seach your website with Algolia. Follow the steps described below to complete the installation of Algolia search.
1. Register at [Algolia](https://www.algolia.com/), you can log in directly using GitHub or Google Account. Upon Customer’s initial sign-up for an Account, Customer will have a free, fourteen (14) day evaluation period (the “Evaluation Period”) for the Algolia Services commencing on the Effective Date, subject to the limitations on Algolia’s website. After that, Algolia offers a free, branded version for up to 10k records and 100k operations per month.
1. If a tutorial pops up, you can skip it. Go straight to create an `Index` which will be used later.

1. Go to the `API Keys` page and find your credentials. You will need the `Application ID` and the `Search-only API key` in the following sections. The `Admin API key` need to keep confidential. Never store your Admin API Key as apiKey in the` _config.yml` file: it would give full control of your Algolia index to others and you don't want to face the consequences.

1. In your site's `_config.yml`, add the following configuration and replace the `applicationID` & `apiKey` & `indexName` with corresponding fields obtained at Algolia.
```yml
algolia:
applicationID: 'Application ID'
apiKey: 'Search-only API key'
indexName: 'indexName'
chunkSize: 5000
```
1. In the `API Keys` page, click the `All API Keys` button to switch to the corresponding tab. Then click the `New API Key` button to activate a pop-up box where you can setup authorizations and restrictions with a great level of precision. Enter `addObject`, `deleteObject`, `listIndexes`, `deleteIndex` features in ACL permissions that will be allowed for the given API key. And then click the `Create` button. Copy this newly created key to the clipboard, we call it a `High-privilege API key`.


1. Algolia requires users to upload their search index data either manually or via provided APIs. Install and configure [Hexo Algolia](https://github.com/oncletom/hexo-algolia) in your Hexo directory. This plugin will index your site and upload selected data to Algolia.
```
$ cd hexo
$ npm install hexo-algolia
```
1. Run the following command to upload index data, keep a weather eye out the output of the command.
```
$ export HEXO_ALGOLIA_INDEXING_KEY=High-privilege API key # Use Git Bash
# set HEXO_ALGOLIA_INDEXING_KEY=High-privilege API key # Use Windows command line
$ hexo clean
$ hexo algolia
```

1. In `next/_config.yml`, turn on `enable` of `algolia_search`. At the same time, you need to **turn off other search plugins** like Local Search. You can also adjust the text in `labels` according to your needs.
```yml
# Algolia Search
algolia_search:
enable: true
hits:
per_page: 10
labels:
input_placeholder: Search for Posts
hits_empty: "We didn't find any results for the search: ${query}"
hits_stats: "${hits} results found in ${time} ms"
```
1. If you want to use a different version from CDN, please follow the instructions below.
You need to **set vendors** in NexT `_config.yml` file:
```yml
vendors:
...
# Algolia Search
# algolia_search: //cdn.jsdelivr.net/npm/algoliasearch@4/dist/algoliasearch-lite.umd.js
# instant_search: //cdn.jsdelivr.net/npm/instantsearch.js@4/dist/instantsearch.production.min.js
algolia_search: //cdn.jsdelivr.net/npm/algoliasearch@4/dist/algoliasearch-lite.umd.js
instant_search: //cdn.jsdelivr.net/npm/instantsearch.js@4/dist/instantsearch.production.min.js
...
```
Known Issues
1. The latest version of the [Hexo-Algolia](https://github.com/oncletom/hexo-algolia) plugin removes the content indexing feature, given Algolia's free account limitation.
1. The [Hexo-Algoliasearch](https://github.com/LouisBarranqueiro/hexo-algoliasearch) plugin provides content indexing functionality, but requires the replacement of keywords in the NEXT theme. The same problem exists with `Record Too Big` for Algolia's free account.
- Replace all `applicationID` in `source/js/algolia-search.js` with `appId`
- Replace all `applicationID` in `layout/_partials/head/head.swig` with `appId`
================================================
FILE: docs/AUTHORS.md
================================================
# «NexT» Authors
NexT theme was initially developed by:
- **IIssNaN**: [NexT](https://github.com/iissnan/hexo-theme-next) (2014 - 2017)
With collaborators from initially repository:
- **Ivan.Nginx**: [DIFF highlight](https://github.com/iissnan/hexo-theme-next/pull/1079),
[HyperComments](https://github.com/iissnan/hexo-theme-next/pull/1155),
[`{% note %}` tag](https://github.com/iissnan/hexo-theme-next/pull/1160),
[`seo` option](https://github.com/iissnan/hexo-theme-next/pull/1311),
[`{% button %}` tag](https://github.com/iissnan/hexo-theme-next/pull/1328),
[VK API](https://github.com/iissnan/hexo-theme-next/pull/1381),
[WordCount plugin support](https://github.com/iissnan/hexo-theme-next/pull/1381),
[Yandex verification option](https://github.com/iissnan/hexo-theme-next/pull/1381),
[`{% exturl %}` tag](https://github.com/iissnan/hexo-theme-next/pull/1438),
[`b2t` option](https://github.com/iissnan/hexo-theme-next/pull/1438),
[`scrollpercent` option](https://github.com/iissnan/hexo-theme-next/pull/1438),
[`save_scroll` option](https://github.com/iissnan/hexo-theme-next/pull/1574),
[Star rating](https://github.com/iissnan/hexo-theme-next/pull/1649),
[`mobile_layout_economy` option](https://github.com/iissnan/hexo-theme-next/pull/1697),
[`{% tabs %}` tag](https://github.com/iissnan/hexo-theme-next/pull/1697),
[`{% label %}` tag](https://github.com/iissnan/hexo-theme-next/pull/1697),
[**`Gemini`** scheme](https://github.com/iissnan/hexo-theme-next/pull/1697),
[Menu & Sidebar icons in 1 line](https://github.com/iissnan/hexo-theme-next/pull/1830),
[Sidebar scrollable](https://github.com/iissnan/hexo-theme-next/pull/1898),
[Responsive favicons](https://github.com/iissnan/hexo-theme-next/pull/1898)
and many other [PR's with fixes and enhancements](https://github.com/iissnan/hexo-theme-next/pulls?utf8=%E2%9C%93&q=is%3Apr%20author%3Aivan-nginx)
- **Acris**: [Many PR's with fixes and updates](https://github.com/iissnan/hexo-theme-next/pulls?utf8=%E2%9C%93&q=is%3Apr%20author%3AAcris)
And best contributors from initially repository:
- **Rainy**: [Gentie comments](https://github.com/iissnan/hexo-theme-next/pull/1301),
[Han](https://github.com/iissnan/hexo-theme-next/pull/1598)
and many [PR's with fixes and optimizations](https://github.com/iissnan/hexo-theme-next/pulls?utf8=%E2%9C%93&q=is%3Apr%20author%3Ageekrainy)
- **Jeff**: [Local search](https://github.com/iissnan/hexo-theme-next/pull/694)
and many [PR's with fixes and improvements](https://github.com/iissnan/hexo-theme-next/pulls?utf8=%E2%9C%93&q=is%3Apr%20author%3Aflashlab)
- **Haocen**: [Footer enhancements](https://github.com/iissnan/hexo-theme-next/pull/1886)
and some other [PR's with improvements](https://github.com/iissnan/hexo-theme-next/pulls?utf8=%E2%9C%93&q=is%3Apr%20author%3AHaocen)
- **uchuhimo**: [Greatest enhancements for local search](https://github.com/iissnan/hexo-theme-next/pulls?utf8=%E2%9C%93&q=is%3Apr%20author%3Auchuhimo)
- **Kei**: [Change static file setting to support subdirectory](https://github.com/iissnan/hexo-theme-next/pull/4)
- **Jolyon**: [Swiftype](https://github.com/iissnan/hexo-theme-next/pull/84)
- **xirong**: [404 page](https://github.com/iissnan/hexo-theme-next/pull/126)
- **PinkyJie**: [Fix Swiftype](https://github.com/iissnan/hexo-theme-next/pull/132)
- **Tim Kuijsten**: [Split javascript into separate files](https://github.com/iissnan/hexo-theme-next/pull/152)
- **iamwent**: [Friendly links](https://github.com/iissnan/hexo-theme-next/pull/250)
- **arao lin**: [Option to lazyload images](https://github.com/iissnan/hexo-theme-next/pull/269)
- **Konstantin Pavlov**: [Microdata, opengraph and other semantic features](https://github.com/iissnan/hexo-theme-next/pull/276)
- **Gary**: [FastClick](https://github.com/iissnan/hexo-theme-next/pull/324)
- **Octavian**: [Baidu site vertification](https://github.com/iissnan/hexo-theme-next/pull/367)
- **Henry Chang**: [Facebook SDK](https://github.com/iissnan/hexo-theme-next/pull/410)
- **XiaMo**: [LeanCloud visitors](https://github.com/iissnan/hexo-theme-next/pull/439)
- **iblogc**: [Fix UA in Duoshuo](https://github.com/iissnan/hexo-theme-next/pull/489)
- **Vincent**: [Automatic headline ID's](https://github.com/iissnan/hexo-theme-next/pull/588)
- **cissoid**: [Tencent analytics](https://github.com/iissnan/hexo-theme-next/pull/603)
- **CosmoX**: [AddThis](https://github.com/iissnan/hexo-theme-next/pull/660)
- **Jason Guo**: [Reward for post](https://github.com/iissnan/hexo-theme-next/pull/687)
- **Jerry Bendy**: [CNZZ counter](https://github.com/iissnan/hexo-theme-next/pull/712)
- **Hui Wang**: [Wechat subscriber](https://github.com/iissnan/hexo-theme-next/pull/788)
- **PoonChiTim**: [Busuanzi counter](https://github.com/iissnan/hexo-theme-next/pull/809)
- **hydai**: [Facebook comments](https://github.com/iissnan/hexo-theme-next/pull/925)
- **OAwan**: [`canonical` option](https://github.com/iissnan/hexo-theme-next/pull/931)
- **Jim Zenn**: [Google Calendar](https://github.com/iissnan/hexo-theme-next/pull/1167)
- **Abner Chou**: [Disqus improvements](https://github.com/iissnan/hexo-theme-next/pull/1173)
- **Igor Fesenko**: [Application Insights](https://github.com/iissnan/hexo-theme-next/pull/1257)
- **jinfang**: [Youyan comments](https://github.com/iissnan/hexo-theme-next/pull/1324)
- **AlynxZhou**: [`canvas_nest` option](https://github.com/iissnan/hexo-theme-next/pull/1327)
- **aleon**: [Tencent MTA](https://github.com/iissnan/hexo-theme-next/pull/1408)
- **asmoker**: [LiveRe comments](https://github.com/iissnan/hexo-theme-next/pull/1415)
- **Jacksgong**: [Copyright on posts](https://github.com/iissnan/hexo-theme-next/pull/1497)
- **zhaiqianfeng**: [Changyan comments](https://github.com/iissnan/hexo-theme-next/pull/1514)
- **zproo**: [`canvas_ribbon` option](https://github.com/iissnan/hexo-theme-next/pull/1565)
- **jjandxa**: [`three_waves`](https://github.com/iissnan/hexo-theme-next/pull/1534),
[`canvas_lines` and `canvas_sphere`](https://github.com/iissnan/hexo-theme-next/pull/1595) options
- **shenzekun**: [Load bar at the top](https://github.com/iissnan/hexo-theme-next/pull/1689)
- **elkan1788**: [Upgrade jiathis share](https://github.com/iissnan/hexo-theme-next/pull/1796)
- **xCss**: [Valine comment system support](https://github.com/iissnan/hexo-theme-next/pull/1811)
- **Julian Xhokaxhiu**: [`override` option](https://github.com/iissnan/hexo-theme-next/pull/1861)
- **LEAFERx**: [NeedMoreShare2](https://github.com/iissnan/hexo-theme-next/pull/1913)
- **aimingoo & LEAFERx**: [Gitment supported with Mint](https://github.com/iissnan/hexo-theme-next/pull/1919)
- **LeviDing**: [Fix the bug of Gitment](https://github.com/iissnan/hexo-theme-next/pull/1944)
- **maple3142**: [Firestore visitor counter](https://github.com/iissnan/hexo-theme-next/pull/1978)
It lives on as an open source project with many contributors, a self updating list is [here](https://github.com/theme-next/hexo-theme-next/graphs/contributors).
P.S. If you did some useful pulls/commits in original repository and you are not in the list, let us know and you will be added here.
================================================
FILE: docs/DATA-FILES.md
================================================
Data Files
Currently, it is not smooth to update NexT theme from pulling or downloading new releases. It is quite often running into conflict status when updating NexT theme via `git pull`, or need to merge configurations manually when upgrading to new releases.
At present, NexT encourages users to store some options in site's `/_config.yml` and other options in theme's `/themes/next/_config.yml`. This approach is applicable, but has some drawbacks:
1. Configurations are splitted into two pieces
2. Users may be confused which place should be for options
In order to resolve this issue, NexT provides the following two solutions.
Option 1: Hexo-Way
With this way, all your configurations locate in main Hexo config file (`/_config.yml`), you don't need to touch `/themes/next/_config.yml` or create any new files. But you must preserve double spaces indents within `theme_config` option.
If there are any new options in new releases, you just need to copy those options from `/themes/next/_config.yml`, paste into `/_config.yml` and set their values to whatever you want.
### Usage
1. Please confirm that the `/source/_data/next.yml` file does not exist (delete it if exists).
2. Copy needed NexT theme options from theme's `/themes/next/_config.yml` into `/_config.yml`, then\
2.1. Move all this settings to the right with two spaces (in Visual Studio Code: select all strings, CTRL + ]).\
2.2. Add `theme_config:` parameter above all this settings.
### Useful links
* [Hexo Configuration](https://hexo.io/docs/configuration.html)
* [Hexo Pull #757](https://github.com/hexojs/hexo/pull/757)
Option 2: NexT-Way
With this way, you can put all your configurations into one place (`/source/_data/next.yml`), you don't need to touch `/themes/next/_config.yml`.
But option may not accurately procces all hexo external libraries with their additional options (for example, `hexo-server` module options may be readed only in default hexo config).
If there are any new options in new releases, you just need to copy those options from `/themes/next/_config.yml`, paste into `/source/_data/next.yml` and set their values to whatever you want.
This method relies on Hexo [Data files](https://hexo.io/docs/data-files.html). Because Data files is introduced in Hexo 3, so you need upgrade Hexo to 3.0 (or above) to use this feature.
### Usage
1. Please ensure you are using Hexo 3 (or above).
2. Create an file named `next.yml` in site's `/source/_data` directory (create `_data` directory if it does not exist).
And after that steps there are 2 variants, need to choose only one of them and resume next steps.
* **Variant 1: `override: false` (default)**:
1. Check your `override` option in default NexT config, it must set on `false`.\
In `next.yml` it must not be defined or set on `false` too.
2. Copy needed options from both site's `/_config.yml` and theme's `/themes/next/_config.yml` into `/source/_data/next.yml`.
* **Variant 2: `override: true`**:
1. In `next.yml` set `override` option on `true`.
2. Copy **all** NexT theme options from theme's `/themes/next/_config.yml` into `/source/_data/next.yml`.
3. Then, in main site's `/_config.yml` need to define `theme: next` option (and if needed, `source_dir: source`).
4. Use standard parameters to start server, generate or deploy (`hexo clean && hexo g -d && hexo s`).
### Useful links
* [NexT Issue #328](https://github.com/iissnan/hexo-theme-next/issues/328)
================================================
FILE: docs/INSTALLATION.md
================================================
Installation
Step 1 → Go to Hexo dir
Change dir to **Hexo root** directory. There must be `node_modules`, `source`, `themes` and other directories:
```sh
$ cd hexo
$ ls
_config.yml node_modules package.json public scaffolds source themes
```
Step 2 → Get NexT
Download theme from GitHub.
There are 3 options to do it, need to choose only one of them.
### Option 1: Download [latest release version][releases-latest-url]
At most cases **stable**. Recommended for beginners.
* Install with [curl & tar & wget][curl-tar-wget-url]:
```sh
$ mkdir themes/next
$ curl -s https://api.github.com/repos/theme-next/hexo-theme-next/releases/latest | grep tarball_url | cut -d '"' -f 4 | wget -i - -O- | tar -zx -C themes/next --strip-components=1
```
This variant will give to you **only latest release version** (without `.git` directory inside).\
So, there is impossible to update this version with `git` later.\
Instead you always can use separate configuration (e.g. [data-files][docs-data-files-url]) and download new version inside old directory (or create new directory and redefine `theme` in Hexo config), without losing your old configuration.
### Option 2: Download [tagged release version][releases-url]
In rare cases useful, but not recommended.\
You must define version. Replace `v6.0.0` with any version from [tags list][tags-url].
* Variant 1: Install with [curl & tar][curl-tar-url]:
```sh
$ mkdir themes/next
$ curl -L https://api.github.com/repos/theme-next/hexo-theme-next/tarball/v6.0.0 | tar -zxv -C themes/next --strip-components=1
```
Same as above under `curl & tar & wget` variant, but will download **only concrete version**.
* Variant 2: Install with [git][git-url]:
```sh
$ git clone --branch v6.0.0 https://github.com/theme-next/hexo-theme-next themes/next
```
This variant will give to you the **defined release version** (with `.git` directory inside).\
And in any time you can switch to any tagged release, but with limit to defined version.
### Option 3: Download [latest master branch][download-latest-url]
May be **unstable**, but includes latest features. Recommended for advanced users and for developers.
* Variant 1: Install with [curl & tar][curl-tar-url]:
```sh
$ mkdir themes/next
$ curl -L https://api.github.com/repos/theme-next/hexo-theme-next/tarball | tar -zxv -C themes/next --strip-components=1
```
Same as above under `curl & tar & wget` variant, but will download **only latest master branch version**.\
At some cases useful for developers.
* Variant 2: Install with [git][git-url]:
```sh
$ git clone https://github.com/theme-next/hexo-theme-next themes/next
```
This variant will give to you the **whole repository** (with `.git` directory inside).\
And in any time you can [update current version with git][update-with-git-url] and switch to any tagged release or on latest master or any other branch.\
At most cases useful as for users and for developers.
Get tags list:
```sh
$ cd themes/next
$ git tag -l
…
v6.0.0
v6.0.1
v6.0.2
```
For example, you want to switch on `v6.0.1` [tagged release version][tags-url]. Input the following command:
```sh
$ git checkout tags/v6.0.1
Note: checking out 'tags/v6.0.1'.
…
HEAD is now at da9cdd2... Release v6.0.1
```
And if you want to switch back on [master branch][commits-url], input this command:
```sh
$ git checkout master
```
Step 3 → Set it up
Set theme in main **Hexo root config** `_config.yml` file:
```yml
theme: next
```
[download-latest-url]: https://github.com/theme-next/hexo-theme-next/archive/master.zip
[releases-latest-url]: https://github.com/theme-next/hexo-theme-next/releases/latest
[releases-url]: https://github.com/theme-next/hexo-theme-next/releases
[tags-url]: https://github.com/theme-next/hexo-theme-next/tags
[commits-url]: https://github.com/theme-next/hexo-theme-next/commits/master
[git-url]: http://lmgtfy.com/?q=linux+git+install
[curl-tar-url]: http://lmgtfy.com/?q=linux+curl+tar+install
[curl-tar-wget-url]: http://lmgtfy.com/?q=linux+curl+tar+wget+install
[update-with-git-url]: https://github.com/theme-next/hexo-theme-next/blob/master/README.md#update
[docs-data-files-url]: https://github.com/theme-next/hexo-theme-next/blob/master/docs/DATA-FILES.md
================================================
FILE: docs/LEANCLOUD-COUNTER-SECURITY.md
================================================
Fix LeanCloud Counter Plugin Security Vulnerability
Before you make the config, please upgrade your NexT version to v6.0.6 or greater.
Please note the difference between **site config file** and **theme config file**
---
# Sign up to LeanCloud and create an app
- Go to LeanCloud website [leancloud.app](https://leancloud.app) and sign up to LeanCloud. Then login.
- Click `1` to enter the console:

- Then click `1` to create an app:

- Type your app name in `1` in the pop up window(eg. "test"), then choose `2`, which means developer's plan, and then click `3` to create the app:

# Create Counter class and enable plugin in NexT
- Click `1` (app name) to enter the app manage page:

- then click `1` to create a class for counter:

- Type `Counter` in the pop up window in `1`, check `2`, then click `3`:

- Click `1` to enter the app setting, then click `2`:

- Paste `App ID` and `App Key` to **theme config file** `_config.yml` like this:
```yml
leancloud_visitors:
enable: true
app_id: #
app_key: #
# Required for apps from CN region
server_url: #
# Dependencies: https://github.com/theme-next/hexo-leancloud-counter-security
security: true
```
- Set domain whitelist: Click `1`, then type your domain into `2` (**protocol, domain and port should be exactly the same**):

# Deploy web engine to avoid your data being changed illegally
- Click `1 -> 2 -> 3` by order

- Click `1`:

- In the pop up window, click `1` to choose type `Hook`, then choose`beforeUpdate` in `2`, choose `Counter` in `3`. Paste code below into `4`, then click `5` to save it:
```javascript
var query = new AV.Query("Counter");
if (request.object.updatedKeys.includes('time')) {
return query.get(request.object.id).then(function (obj) {
if (obj.get("time") > request.object.get("time")) {
throw new AV.Cloud.Error('Invalid update!');
}
return request.object.save();
});
}
```

- Click `1` to deploy after the message in the red rect shows up:

- Click `1` in the pop up:

- Click `1` to close the pop up window after the message in the red rect shows up:

# Set access control for your database
- Open **theme config file** `_config.yml`, set `leancloud_visitors: security` to `true`:
```yml
leancloud_visitors:
enable: true
app_id: #
app_key: #
# Required for apps from CN region
server_url: #
# Dependencies: https://github.com/theme-next/hexo-leancloud-counter-security
security: true
```
- Open cmd then switch to **root path of site**, type commands to install `hexo-leancloud-counter-security` plugin:
```
npm install hexo-leancloud-counter-security
```
- Open **site config file** `_config.yml`, add those config:
```yml
leancloud_counter_security:
enable_sync: true
app_id:
app_key:
username:
password:
```
- Type command:
```
hexo lc-counter register
```
or
```
hexo lc-counter r
```
Change `` and `` to your own username and password (no need to be the same as leancloud account). They will be used in the hexo deploying.
- Open **site config file** `_config.yml`, change `` and ``to those you set above:
```yml
leancloud_counter_security:
enable_sync: true
app_id:
app_key:
username: # will be asked while deploying if be left blank
password: # recommend to leave it blank for security, will be asked while deploying if be left blank
```
- Add the deployer in the `deploy` of **site config file** `_config.yml`:
```yml
deploy:
- type: git
repo: // your repo
...
- type: leancloud_counter_security_sync
```
- Return to the LeanCloud console. Click `1 -> 2`, check if there is a record added in the `_User` (the img below is using username "admin" for example):

- Click `1 -> 2 -> 3` by order:

- Click `1` (add_fields), then choose `2`: Do as below "create" setting(choose the user you create):

- click `1` (create), then choose `2`, type the username in `3`, then click `4 -> 5`:

Now your page should be similar to this img after finishing the step.

- Click `1` (delete), then choose `2`:

Now the bug is fixed.
---
See detailed version here: https://leaferx.online/2018/03/16/lc-security-en/
================================================
FILE: docs/LICENSE.txt
================================================
«NexT» – Elegant and powerful theme for Hexo.
Copyright © 2017 «NexT» (github.com/theme-next/hexo-theme-next).
Detail attribution information for «NexT»
is contained in the 'docs/AUTHORS.md' file.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation with the addition of the
following permission added to Section 15 as permitted in Section 7(a):
FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY «NEXT»,
«NEXT» DISCLAIMS THE WARRANTY OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program; if not, see: https://www.gnu.org/licenses/agpl.txt
In accordance with Section 7(b) of the GNU Affero General Public License:
a) It is not necessary to specify copyright in each source file of
this program because GitHub fully save commits of all modified files
with their authors and provides to see for this changes publicly.
b) For any part of the covered work in which the copyright not specified,
except of third party libraries ('source/lib/*') and '*custom.*' files,
will mean this part owned by «NexT» in accord with terms in this file.
* c) A covered work must retain «NexT» official website link
(https://theme-next.org) in footer section of every website created,
modified or manipulated by using «NexT».
«NexT» theme configuration must be:
```
footer:
theme:
enable: true
```
Collaborators, best contributors and all authors specified in the
'docs/AUTHORS.md' file of «NexT» repository under the
'https://github.com/theme-next' organization can ignore theme info link
requirements.
Anyone can be released from the requirements of the license by purchasing
a commercial license. Buying such a license is mandatory as soon as you
develop commercial activities involving the «NexT» software without
disclosing the source code of your own applications.
These activities include:
1. Access to private repository with various premium features.
2. Priority support for resolve all possible issues with «NexT».
3. Priority support for implement all possible features to «NexT».
For more information, please contact «NexT» Organization at this
address: support@theme-next.org
================================================
FILE: docs/MATH.md
================================================
Math Equations
NexT provides two render engines for displaying Math Equations.
If you choose to use this feature, you don't need to manually import any JS or CSS. You just need to choose a render engine and turn on `enable` for it (located in `next/_config.yml`).
Notice: only turning on `enable` **cannot let you see the displayed equations correctly**, you need to install the **corresponding Hexo Renderer** to fully support the display of Math Equations. The corresponding Hexo Renderer per engine will be provided below.
Provided Render Engine
For now, NexT provides two Render Engines: [MathJax](https://www.mathjax.org/) and [Katex](https://khan.github.io/KaTeX/).
### MathJax
If you use MathJax to render Math Equations, you need to use one of them: [hexo-renderer-pandoc](https://github.com/wzpan/hexo-renderer-pandoc) or [hexo-renderer-kramed](https://github.com/sun11/hexo-renderer-kramed) (Not recommended) as the renderer for Markdown.
Firstly, you need to uninstall the original renderer `hexo-renderer-marked`, and install **one of the renderer above**:
```sh
npm uninstall hexo-renderer-marked
npm install hexo-renderer-pandoc # or hexo-renderer-kramed
```
Secondly, in `next/_config.yml`, turn on `enable` of `mathjax`.
```yml
math:
...
mathjax:
enable: true
```
Finally, run standard Hexo generate, deploy process or start the server:
```sh
hexo clean && hexo g -d
# or hexo clean && hexo s
```
#### Numbering and referring equations in MathJax
In the new version of NexT, we have added feature to automatically number equations and to refer to equations. We briefly describe how to use this feature below.
In general, to make the automatic equation numbering work, you have to wrap your LaTeX equations in `equation` environment. Using the plain old style (i.e., wrap an equation with two dollar signs in each side) will not work. How to refer to an equation? Just give a `\label{}` tag and then in your later text, use `\ref{}` or `\eqref{}` to refer it. Using `\eqref{}` is preferred since if you use `\ref{}`, there are no parentheses around the equation number. Below are some of the common scenarios for equation numbering.
For simple equations, use the following form to give a tag,
```latex
$$\begin{equation}\label{eq1}
e=mc^2
\end{equation}$$
```
Then, you can refer to this equation in your text easily by using something like
```
the famous matter-energy equation $\eqref{eq1}$ proposed by Einstein ...
```
For multi-line equations, inside the `equation` environment, you can use the `aligned` environment to split it into multiple lines:
```latex
$$\begin{equation}\label{eq2}
\begin{aligned}
a &= b + c \\
&= d + e + f + g \\
&= h + i
\end{aligned}
\end{equation}$$
```
We can use `align` environment to align multiple equations. Each of these equations will get its own numbers.
```
$$\begin{align}
a &= b + c \label{eq3} \\
x &= yz \label{eq4}\\
l &= m - n \label{eq5}
\end{align}$$
```
In the `align` environment, if you do not want to number one or some equations, just [use `\nonumber`](https://tex.stackexchange.com/questions/17528/show-equation-number-only-once-in-align-environment) right behind these equations. Like the following:
```latex
$$\begin{align}
-4 + 5x &= 2+y \nonumber \\
w+2 &= -1+w \\
ab &= cb
\end{align}$$
```
Sometimes, you want to use more “exotic” style to refer your equation. You can use `\tag{}` to achieve this. For example:
```latex
$$x+1\over\sqrt{1-x^2} \tag{i}\label{eq_tag}$$
```
For more information, you can visit the [official MathJax documentation on equation numbering](https://docs.mathjax.org/en/latest/input/tex/eqnumbers.html). You can also visit this [post](https://theme-next.org/docs/third-party-services/math-equations) for more details.
### Katex
The Katex engine is a **much faster** math render engine compared to MathJax. And it could survive without JavaScript.
But, what Katex supports is not as full as MathJax. You could check it from the Useful Links below.
If you use Katex to render Math Equations, you need to use **only one of those renderer**: [hexo-renderer-markdown-it-plus](https://github.com/CHENXCHEN/hexo-renderer-markdown-it-plus) or [hexo-renderer-markdown-it](https://github.com/hexojs/hexo-renderer-markdown-it).
Firstly, you need to uninstall the original renderer `hexo-renderer-marked`, and **install one of selected above**.
```sh
npm uninstall hexo-renderer-marked
npm install hexo-renderer-markdown-it-plus
# or hexo-renderer-markdown-it
```
Secondly, in `next/_config.yml`, turn on `enable` option of `katex`.
```yml
math:
...
katex:
enable: true
```
Finally, run the standard Hexo generate, deploy process or start the server:
```sh
hexo clean && hexo g -d
# or hexo clean && hexo s
```
#### If you use hexo-renderer-markdown-it
If you use `hexo-renderer-markdown-it`,you also need to add `markdown-it-katex` as its plugin:
```
npm install markdown-it-katex
```
And then in `hexo/_config.yml` you need to add `markdown-it-katex` as a plugin for `hexo-renderer-markdown-it`:
```yml
# config of hexo-renderer-markdown-it
markdown:
render:
html: true
xhtmlOut: false
breaks: true
linkify: true
typographer: true
quotes: '“”‘’'
plugins:
- markdown-it-katex
```
#### Known Bugs
1. Firstly, please check [Common Issues](https://github.com/Khan/KaTeX#common-issues) of Katex.
2. Displayed Math (i.e. `$$...$$`) needs to started with new clear line.\
In other words: you must not have any characters (except of whitespaces) **before the opening `$$` and after the ending `$$`** ([comment #32](https://github.com/theme-next/hexo-theme-next/pull/32#issuecomment-357489509)).
3. Don't support Unicode ([comment #32](https://github.com/theme-next/hexo-theme-next/pull/32#issuecomment-357489509)).
4. Inline Math (..`$...$`) must not have white spaces **after the opening `$` and before the ending `$`** ([comment #32](https://github.com/theme-next/hexo-theme-next/pull/32#issuecomment-357489509)).
5. If you use math in Heading (i.e. `## Heading`).\
Then in corresponding TOC item it will show the related LaTex code 3 times ([comment #32](https://github.com/theme-next/hexo-theme-next/pull/32#issuecomment-359018694)).
6. If you use math in your post's title, it will not be rendered ([comment #32](https://github.com/theme-next/hexo-theme-next/pull/32#issuecomment-359142879)).
We currently use Katex 0.11.1, some of those bugs might be caused by the outdated version of Katex we use.
But, as what is described in the beginning, the render of Math Equations relies on Hexo Renderer. Currently, Katex-related renderers only support Katex version until 0.11.1.
We will continuously monitor the updates of corresponding renderers, if there is a renderer which supports newer version of Katex, we will update the Katex we use.
### Useful Links
* [Speed test between Katex and MathJax](https://www.intmath.com/cg5/katex-mathjax-comparison.php)
* [Function support by Katex](https://khan.github.io/KaTeX/function-support.html)
Configuration Specifications
ATTENTION! When you edit those configs, **don't change indentation!**
Currently, all NexT config use **2 spaces indents**.
If your content of config is put just directly after the config name, then a space is needed between the colon and the config content (i.e. `enable: true`)
```yml
# Math Formulas Render Support
math:
# Default (true) will load mathjax / katex script on demand.
# That is it only render those page which has `mathjax: true` in Front-matter.
# If you set it to false, it will load mathjax / katex srcipt EVERY PAGE.
per_page: true
# hexo-renderer-pandoc (or hexo-renderer-kramed) required for full MathJax support.
mathjax:
enable: true
# See: https://mhchem.github.io/MathJax-mhchem/
mhchem: false
# hexo-renderer-markdown-it-plus (or hexo-renderer-markdown-it with markdown-it-katex plugin) required for full Katex support.
katex:
enable: false
# See: https://github.com/KaTeX/KaTeX/tree/master/contrib/copy-tex
copy_tex: false
```
### `per_page`
`true` or `false`, default is `true`.
This option is to control whether to render Math Equations every page.
The behavior of default (`true`) is to render Math Equations **on demand**.
It will only render those posts which have `mathjax: true` in their Front-matter.
For example:
```md
---
title: 'Will Render Math'
mathjax: true
---
....
```
```md
---
title: 'Not Render Math'
mathjax: false
---
....
```
```md
---
title: 'Not Render Math Either'
---
....
```
When you set it to `false`, the math will be rendered on **EVERY PAGE**.
================================================
FILE: docs/UPDATE-FROM-5.1.X.md
================================================
Update from NexT v5.1.x
NexT version 5 works fine with Hexo 3, but for frequent users, you maybe need to upgrade version 5 to 7 to get features and supports in new [Theme-Next](https://github.com/theme-next/hexo-theme-next) repository.
There are no hard breaking changes between 5.1.x and the latest version. It's change major version to 7 because:
1. Main repo was rebased from [iissnan's](https://github.com/iissnan/hexo-theme-next) profile to [theme-next](https://github.com/theme-next) organization.
2. Most libraries under the `next/source/lib` directory was moved out to [external repos under NexT organization](https://github.com/theme-next).
3. 3rd-party plugin [`hexo-wordcount`](https://github.com/willin/hexo-wordcount) was replaced by [`hexo-symbols-count-time`](https://github.com/theme-next/hexo-symbols-count-time) because `hexo-symbols-count-time` no have any external Node.js dependencies, no have [language filter](https://github.com/willin/hexo-wordcount/issues/7) which causes better performance on speed at site generation.
So, we suggest to update from version 5 to version 7 in this way:
1. You don't touch old `next` dir and just do some copies of NexT files:\
1.1. `_config.yml` or `next.yml` (if you used [data-files](DATA-FILES.md)).\
1.2. Custom CSS styles what placed in `next/source/css/_custom/*` and `next/source/css/_variables/*` directories.\
1.3. Custom layout styles what placed in `next/layout/_custom/*`.\
1.4. Any another possible custom additions which can be finded by compare tools between repos.
2. Clone new repo to any another directory instead of `next`. For example, in `next-reloaded` directory: `git clone https://github.com/theme-next/hexo-theme-next themes/next-reloaded`. So, you don't touch your old NexT 5.1.x directory and can work with new `next-reloaded` dir.
3. Go to Hexo main config and set theme parameter: `theme: next-reloaded`. So, your `next-reloaded` directory must loading with your generation. If you may see any bugs or you simply not like this version, you anytime can switch for 5.1.x version back.
4. Update language configuration (For Chinese)
Since v6.0.3, `zh-Hans` has been renamed to `zh-CN`: https://github.com/theme-next/hexo-theme-next/releases/tag/v6.0.3
Users upgrading to v6.0.3 and later need to explicitly modify the `language` configuration in the Hexo main config file `_config.yml`, otherwise the language display is incorrect.
5. Update Hexo and Hexo plugin
If after completing the above steps, an error occurs when executing `hexo s` or` hexo g`, it means that there may be a conflict between the old version of Hexo / Hexo plugin and the new version of the theme NexT. We recommend upgrading Hexo to versions 4.0 and higher and upgrading Hexo plugins to the latest version. You can run `npm outdated` to see all the upgradeable plugins.
And how to enable 3rd-party libraries see [here](https://github.com/theme-next/hexo-theme-next/blob/master/docs/INSTALLATION.md#plugins).
================================================
FILE: docs/ru/DATA-FILES.md
================================================
Дата Файлы
Обновление темы NexT через пулы проходит не слишком гладко. Часто происходит конфликтная ситуация при обновлении по команде `git pull`, хотя её и можно обойти, если смерджить настройки в файле конфигурации вручную.
На данный момент, пользователи хранят одни настройки в корневом `_config.yml` (Hexo), а другие настройки в конфиге темы `_config.yml` (NexT). И всё вроде бы ничего, но имеются некоторые недостатки:
1. Конфигурация разделяется на две части.
2. Пользователи могут запутаться, в каком файле какие должны быть настройки.
Во избежании проблемы, NexT предлагает два варианта.
Способ 1: Hexo-Путь
Используя этот способ, вся конфигурация будет раположена в корневом конфиге hexo (`/_config.yml`), благодаря чему нет необходимости изменять оригинальный конфиг темы (`/themes/next/_config.yml`) или создавать какие-либо новые файлы. Но в этом случае необходимо сохранять двойные отступы внутри `theme_config` параметра.
Если в новых версиях появятся какие-то новые настройки, нужно просто скопировать эти настройки из оригинального `next/_config.yml` в редактируемый `/_config.yml` и настроить по своему усмотрению.
### Использование
1. Проверяем на существование `/source/_data/next.yml` файл (удаляем, если существует).
2. Копируем необходимые опции из конфига темы NexT `/themes/next/_config.yml` в `/_config.yml`, затем\
2.1. Сдвигаем все опции вправо на 2 пробела (в Visual Studio Code: выделяем все строки, CTRL + ]).\
2.2. Добавляем `theme_config:` параметр перед всеми этими настройками.
### Полезные ссылки
* [Конфигурация Hexo](https://hexo.io/ru/docs/configuration.html)
* [Hexo Pull #757](https://github.com/hexojs/hexo/pull/757)
Способ 2: NexT-Путь
Используя этот способ, вся конфигурация будет храниться в одном файле (`/source/_data/next.yml`), благодаря чему нет необходимости изменять оригинальный конфиг темы (`/themes/next/_config.yml`).
Но с этим способом могут не корректно обрабатываться все внешние библиотеки hexo при использовании их дополнительных опций (например, опции модуля `hexo-server` могут быть считаны только из стандартного конфига hexo).
Если в новых версиях появятся какие-то новые настройки, нужно просто скопировать эти настройки из оригинального `/themes/next/_config.yml` во внешний `_data/next.yml` и настроить по своему усмотрению.
Этот метод опирается на Hexo [дата-файлов](https://hexo.io/docs/data-files.html). И т.к. дата-файлы были представлены в Hexo 3, необходимо обновиться до Hexo 3.0 (или выше) для использования этой возможности.
### Использование
1. Убеждаемся, что Hexo версии 3 (или выше).
2. Создаём файл под именем `next.yml` в корневой директории сайта — `/source/_data` (создаём директорию `_data`, если отсутствует).
И после этих шагов есть 2 варианта, нужно выбрать только 1 из них и продолжить следующие шаги.
* **Вариант 1: `override: false` (по-умолчанию)**:
1. Проверяем опцию `override` в стандартном конфиге NexT'а, должно быть установлено в `false`.\
В файле `next.yml` эта опция не должна быть вписана вовсе или вписана и установлена в `false`.
2. Копируем настройки из конфига темы NexT (`_config.yml`) и из корневого конфига сайта (`_config.yml`) в файл `/source/_data/next.yml`.
* **Вариант 2: `override: true`**:
1. В файле `next.yml` ставим опцию `override` в `true`.
2. Копируем **все** опции из оригинального конфига NexT'а `/themes/next/_config.yml` в `/source/_data/next.yml`.
3. Затем, в корневом конфиге сайта `/_config.yml` необходимо установить опцию `theme: next` (и если требуется, `source_dir: source`).
4. Используем станадартные параметры для запускаь генерации или развёртывания (`hexo clean && hexo g -d && hexo s`).
### Полезные ссылки
* [NexT Issue #328](https://github.com/iissnan/hexo-theme-next/issues/328)
================================================
FILE: docs/ru/INSTALLATION.md
================================================
Установка
Шаг 1 → Идём в директорию Hexo
Меняем каталог на **корневой hexo**. Там должны находиться `node_modules`, `source`, `themes` и другие папки:
```sh
$ cd hexo
$ ls
_config.yml node_modules package.json public scaffolds source themes
```
Шаг 2 → Скачиваем NexT
Скачиваем тему с GitHub.
Имеются 3 способа как зделать это, нужно выбрать только 1 из них.
### Способ 1: Скачиваем [последнюю версию релиза][releases-latest-url]
В большинстве случаев **стабильна**. Рекомендуется для начинающих пользователей.
* Установка с помощью [curl & tar & wget][curl-tar-wget-url]:
```sh
$ mkdir themes/next
$ curl -s https://api.github.com/repos/theme-next/hexo-theme-next/releases/latest | grep tarball_url | cut -d '"' -f 4 | wget -i - -O- | tar -zx -C themes/next --strip-components=1
```
Этим способом Вы скачаете **только последнюю версию релиза** (без директории `.git` внутри).\
Поэтому, в дальнейшем будет невозможно обновить эту версию через `git`.\
Зато всегда можно использовать отдельную конфигурацию (т.е. [дата-файлы][docs-data-files-url]) и скачивать новую версию перезаписывая старую (или создать новый каталог и переопределить параметр `theme` в конфиге Hexo), без потери старой конфигурации.
### Способ 2: Скачиваем [указанную версию релиза][releases-url]
В редких случаях полезно, но не рекомендуется.\
Необходимо указать версию. Замените `v6.0.0` на любую версию из [списка тэгов][tags-url].
* Вариант 1: Установка с помощью [curl & tar][curl-tar-url]:
```sh
$ mkdir themes/next
$ curl -L https://api.github.com/repos/theme-next/hexo-theme-next/tarball/v6.0.0 | tar -zxv -C themes/next --strip-components=1
```
То же, что и описано выше в способе `curl & tar & wget`, но скачает **только конкретную версию**.
* Вариант 2: Установка с помощью [git][git-url]:
```sh
$ git clone --branch v6.0.0 https://github.com/theme-next/hexo-theme-next themes/next
```
Этот вариант скачает **указанную версию релиза** (включая директорию `.git` внутри).\
И в любой момент Вы можете переключиться на любую весию тэга, но с лимитом до указанной версии.
### Способ 3: Скачиваем [последнюю мастер-ветку][download-latest-url]
Иногда может быть **нестабильна**, но включает самые последние нововведения. Рекомендуется для продвинутых пользователей и для разработчиков.
* Вариант 1: Установка с помощью [curl & tar][curl-tar-url]:
```sh
$ mkdir themes/next
$ curl -L https://api.github.com/repos/theme-next/hexo-theme-next/tarball | tar -zxv -C themes/next --strip-components=1
```
То же, что и описано выше в варианте `curl & tar & wget`, но скачает **только последнюю мастер-ветку**.\
В некоторых случаях полезно для разработчиков.
* Вариант 2: Установка с помощью [git][git-url]:
```sh
$ git clone https://github.com/theme-next/hexo-theme-next themes/next
```
Этот вариант скачает **весь репозиторий** (включая директорию `.git` внутри).\
И в любой момент Вы можете [обновить текущую версию через git][update-with-git-url] и переключиться на любую версию тэга или на последнюю мастер или любую другую ветку.\
В большинстве случаев полезно как для пользователей, так и для разработчиков.
Смотрим список тэгов:
```sh
$ cd themes/next
$ git tag -l
…
v6.0.0
v6.0.1
v6.0.2
```
Например, Вы хотите переключиться на [версию релиза][tags-url] `v6.0.1`. Вводим следующую команду:
```sh
$ git checkout tags/v6.0.1
Note: checking out 'tags/v6.0.1'.
…
HEAD is now at da9cdd2... Release v6.0.1
```
И если вы хотите переключиться обратно на [мастер-ветку][commits-url], вводим следующее:
```sh
$ git checkout master
```
Шаг 3 → Конфигурируем
Устанавливаем параметр темы в конфиге `_config.yml` **корневой директории hexo**:
```yml
theme: next
```
[download-latest-url]: https://github.com/theme-next/hexo-theme-next/archive/master.zip
[releases-latest-url]: https://github.com/theme-next/hexo-theme-next/releases/latest
[releases-url]: https://github.com/theme-next/hexo-theme-next/releases
[tags-url]: https://github.com/theme-next/hexo-theme-next/tags
[commits-url]: https://github.com/theme-next/hexo-theme-next/commits/master
[git-url]: http://lmgtfy.com/?q=linux+git+install
[curl-tar-url]: http://lmgtfy.com/?q=linux+curl+tar+install
[curl-tar-wget-url]: http://lmgtfy.com/?q=linux+curl+tar+wget+install
[update-with-git-url]: https://github.com/theme-next/hexo-theme-next/blob/master/docs/ru/README.md#%D0%A3%D1%81%D1%82%D0%B0%D0%BD%D0%BE%D0%B2%D0%BA%D0%B0
[docs-data-files-url]: https://github.com/theme-next/hexo-theme-next/blob/master/docs/ru/DATA-FILES.md
================================================
FILE: docs/ru/README.md
================================================
#
«NexT» — элегантная высококачественная тема под Hexo. Сделана с нуля, с любовью.
## Демо
💟 Muse | 🔯 Mist | ♓️ Pisces | ♊️ Gemini
Больше примеров «NexT» здесь.
## Установка
Простейший вариант установки — склонировать весь репозиторий:
```sh
$ cd hexo
$ git clone https://github.com/theme-next/hexo-theme-next themes/next
```
Или предлагаю почитать [детальные инструкции по установке][docs-installation-url], если вариант выше не устраивает.
## Плагины
В конфиге NexT'а теперь можно найти зависимости на каждый модуль, который был вынесен во внешние репозитории, которые могут быть найдены по [ссылке основной организации][official-plugins-url].
Например, Вы хотите использовать `pjax` для своего сайта. Открываем конфиг NexT'а и находим:
```yml
# Easily enable fast Ajax navigation on your website.
# Dependencies: https://github.com/theme-next/theme-next-pjax
pjax: true
```
Затем включаем параметр `pjax` и переходим по ссылке «Dependencies» с дальнейшеми инструкциями по установке этого модуля.
## Обновление
NexT выпускает новые версии каждый месяц. Можно обновить до последней мастер-ветки следующей командой:
```sh
$ cd themes/next
$ git pull
```
А если всплывают ошибки во время обновления (что-то наподобии **«Commit your changes or stash them before you can merge»**), рекомендуется ознакомиться с особенностью хранения [дата-файлов в Hexo][docs-data-files-url].\
Как бы то ни было, можно обойти ошибки при обновлении если «Закомитить», «Стэшнуть» или «Откатить» локальные изменения. Смотрим [здесь](https://stackoverflow.com/a/15745424/5861495) как это сделать.
**Если нужно обновиться с версии v5.1.x на последней версиями, читаем [здесь][docs-update-5-1-x-url].**
## Обратная связь
* Посетите [Awesome NexT][awesome-next-url] список.
* Вступить в наши [Telegram][t-chat-url] / [Gitter][gitter-url] / [Riot][riot-url] чаты.
* [Добавить или улучшить перевод][i18n-url] за несколько секунд.
* Сообщить об ошибке в разделе [GitHub Issues][issues-bug-url].
* Запросить новую возможность на [GitHub][issues-feat-url].
* Голосовать за [популярные запросы возможностей][feat-req-vote-url].
## Содействие
[![][contributors-image]][contributors-url]
Приветсвуется любое содействие, не стесняйтесь сообщать «Баги», брать «Форки» и вливать «Пулы».
## Благодарности
«NexT» выражает особую благодарность этим замечательным сервисам, которые спонсируют нашу основную инфраструктуру:
GitHub позволяет нам хостить Git-репозиторий, Netlify позволяет нам деплоить документацию.
Crowdin позволяет нам удобно переводить документацию.
Codacy позволяет нам контролировать качество кода, Travis CI позволяет нам запускать набор тестов.
[docs-installation-url]: https://github.com/theme-next/hexo-theme-next/blob/master/docs/ru/INSTALLATION.md
[docs-data-files-url]: https://github.com/theme-next/hexo-theme-next/blob/master/docs/ru/DATA-FILES.md
[docs-update-5-1-x-url]: https://github.com/theme-next/hexo-theme-next/blob/master/docs/ru/UPDATE-FROM-5.1.X.md
[t-news-url]: https://t.me/theme_next_news
[t-chat-url]: https://t.me/theme_next
[gitter-url]: https://gitter.im/theme-next
[riot-url]: https://riot.im/app/#/room/#theme-next:matrix.org
[i18n-url]: https://i18n.theme-next.org
[awesome-next-url]: https://github.com/theme-next/awesome-next
[issues-bug-url]: https://github.com/theme-next/hexo-theme-next/issues/new?assignees=&labels=Bug&template=bug-report.md
[issues-feat-url]: https://github.com/theme-next/hexo-theme-next/issues/new?assignees=&labels=Feature+Request&template=feature-request.md
[feat-req-vote-url]: https://github.com/theme-next/hexo-theme-next/issues?q=is%3Aopen+is%3Aissue+label%3A%22Feature+Request%22
[contributing-document-url]: https://github.com/theme-next/hexo-theme-next/blob/master/.github/CONTRIBUTING.md
[official-plugins-url]: https://github.com/theme-next
[contributors-image]: https://opencollective.com/theme-next/contributors.svg?width=890
[contributors-url]: https://github.com/theme-next/hexo-theme-next/graphs/contributors
================================================
FILE: docs/ru/UPDATE-FROM-5.1.X.md
================================================
Обновление из-под NexT v5.1.x
Между версией 5.1.x и последней версиями нет жёстких изменений. Версия сменилась на мажорную 7 по следующим причинам:
1. Основной репозиторий перебазировался из профиля [iissnan'а](https://github.com/iissnan/hexo-theme-next) в [theme-next](https://github.com/theme-next) организацию.
2. Большинство библиотек в `next/source/lib` директории были вынесены в [отдельные репозитории под организацией NexT](https://github.com/theme-next).
3. 3rd-party плагин [`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` не имеет никаких сторонних Node.js зависимостей, не имеет [языкового фильтра](https://github.com/willin/hexo-wordcount/issues/7) что обеспечивает улучшенную производительность при генерации сайта.
Поэтому, я предлагаю обновиться с версии 5 на версию 7 следующим способом:
1. Вы не трогаете старую директорию `next`, а всего-лишь делаете резервные копии файлов NexT:\
1.1. `config.yml` или `next.yml` (если Вы использовали [дата-файлы](DATA-FILES.md)).\
1.2. Пользовательских CSS-стилей, которые расположены в `next/source/css/_custom/*` и `next/source/css/_variables/*` директориях.\
1.3. Пользовательских layout-стилей, которые расположены в `next/layout/_custom/*`.\
1.4. Любые другие всевозможные пользовательские изменения, которые могут быть найдены любым инструментом для сравнения файлов.
2. Склонировать новый репозиторий в любую другую директорию, отличную от `next`. Например, в директорию `next-reloaded`: `git clone https://github.com/theme-next/hexo-theme-next themes/next-reloaded`. Итак, нет необходимости трогать старую NexT 5.1.x директорию и можно работать с новой `next-reloaded`.
3. Открываем главную Hexo-конфигурацию и устанавливаем параметр темы: `theme: next-reloaded`. Так Ваша директория `next-reloaded` должна грузиться при генерации. Если Вы будете наблюдать какие-либо баги или Вам попросту не нравится эта новая версия, в любой момент Вы можете использовать старую 5.1.x.
А как активировать 3rd-party библиотеки, смотрим здесь [здесь](https://github.com/theme-next/hexo-theme-next/blob/master/docs/ru/INSTALLATION.md#%D0%9F%D0%BB%D0%B0%D0%B3%D0%B8%D0%BD%D1%8B).
================================================
FILE: docs/zh-CN/ALGOLIA-SEARCH.md
================================================
Algolia 搜索
NexT 内部提供 Algolia 的搜索功能,要使用此功能请确保所使用的 NexT 版本在 `v5.1.0` 之后。需要注意的是,仅仅将 `next/_config.yml` 中 `algolia_search` 的 `enable` 打开**并不能让你使用 Algolia 搜索**,你还需要**使用对应的 Hexo-Algolia 插件** 才能真正在博客页面中使用 Algolia 搜索。按照下面介绍的步骤操作即可完成 Algolia 搜索的安装。
1. 前往 [Algolia 注册页面](https://www.algolia.com/),注册一个新账户。 可以使用 GitHub 或者 Google 账户直接登录,注册后的 14 天内拥有所有功能(包括收费类别的)。之后若未续费会自动降级为免费账户,免费账户 总共有 10,000 条记录,每月有 100,000 的可以操作数。注册完成后,创建一个新的 Index,这个 Index 将在后面使用。

1. 在 `API Keys` 页面找到需要使用的一些配置的值,包括 `Application ID` 和 `Search-Only API Key`。注意,`Admin API Key` 需要保密保存,不要外泄。

1. 编辑 `站点配置文件`,新增以下配置,除了 `chunkSize` 字段,替换成在 Algolia 获取到的值:
```yml
algolia:
applicationID: 'Application ID'
apiKey: 'Search-Only API Key'
indexName: 'indexName'
chunkSize: 5000
```
1. 在 `API Keys` 页面,点击 `All API Keys` 切换到对应的页面中。接着点击 `New API Key` 按钮,来**编辑权限**。在弹出框中找到 ACL ,**输入 addObject、 deleteObject、listIndexes、deleteIndex 权限**,然后点击最下方的 `Create` 按钮。将这个新创建的 API Key 复制到剪贴板,我们称之为 `High-privilege API key`。


1. 在 Index 和 API Key 创建完成后,此时这个 Index 里未包含任何数据。接下来需要安装 [Hexo Algolia](https://github.com/oncletom/hexo-algolia) 扩展,这个扩展的功能是搜集站点的内容并通过 API 发送给 Algolia。前往站点根目录,执行命令安装:
```
$ cd hexo
$ npm install hexo-algolia
```
1. 当配置完成,在站点根目录下执行以下命令来更新上传 Index。请注意观察命令的输出。
```
$ export HEXO_ALGOLIA_INDEXING_KEY=High-privilege API key # 使用 Git Bash
# set HEXO_ALGOLIA_INDEXING_KEY=High-privilege API key # 使用 Windows CMD 命令行
$ hexo clean
$ hexo algolia
```

1. 更改`主题配置文件`,找到 Algolia Search 配置部分,将 `enable` 改为 `true`。同时你需要**关闭**其他搜索插件,如 Local Search 等。你也可以根据需要调整 `labels` 中的文本:
```yml
# Algolia Search
algolia_search:
enable: true
hits:
per_page: 10
labels:
input_placeholder: Search for Posts
hits_empty: "We didn't find any results for the search: ${query}"
hits_stats: "${hits} results found in ${time} ms"
```
1. 如果你需要通过 CDN 使用其它版本的 algolia-instant-search ,请根据以下步骤操作。
你需要在`主题配置文件`中的 vendors 字段进行设置:
```yml
vendors:
...
# Algolia Search
# algolia_search: //cdn.jsdelivr.net/npm/algoliasearch@4/dist/algoliasearch-lite.umd.js
# instant_search: //cdn.jsdelivr.net/npm/instantsearch.js@4/dist/instantsearch.production.min.js
algolia_search: //cdn.jsdelivr.net/npm/algoliasearch@4/dist/algoliasearch-lite.umd.js
instant_search: //cdn.jsdelivr.net/npm/instantsearch.js@4/dist/instantsearch.production.min.js
...
```
已知的问题
1. 考虑到 Algolia 免费账户的限制,目前 [Hexo-Algolia](https://github.com/oncletom/hexo-algolia) 插件最新版本去掉了正文索引功能。
1. [Hexo-Algoliasearch](https://github.com/LouisBarranqueiro/hexo-algoliasearch) 插件提供了正文索引功能,不过需要替换 NEXT 主题中的关键字。对于免费账户,`Record Too Big` 的问题同样存在。
- 替换 `source/js/algolia-search.js` 中所有的 `applicationID` 为 `appId`
- 替换 `layout/_partials/head/head.swig` 中所有的 `applicationID` 为 `appId`
================================================
FILE: docs/zh-CN/CODE_OF_CONDUCT.md
================================================
#
[NexT](https://theme-next.org) 是一个优雅而强大的 [Hexo](https://hexo.io/)主题。在这里,您可以构建一个托管在 [GitHub Pages](https://pages.github.com/) 上的静态博客,分享您的生活,并与新朋友进行交流。
参与者公约用来约束在 [NexT](https://github.com/theme-next/hexo-theme-next) 社区中代码更新、问题交流、请求合并等行为。我们期望所有用户相互尊重,礼貌待人。任何违反这些规则的人都将不会被审核,并会在发现后立即被阻止和驱逐。
## 目录
- [我们的保证](#我们的保证)
- [我们的责任](#我们的责任)
- [我们的标准](#我们的标准)
- [使用范围](#使用范围)
- [强制执行](#强制执行)
- [联系项目维护者](#联系项目维护者)
- [来源](#来源)
## 我们的保证
作为此项目的贡献者和维护者,我们承诺尊重所有做出贡献的用户,这些贡献包括了报告问题、发布功能请求、更新文档、提交合并请求以及其他活动。
为了促进一个开放透明且友好的环境,我们作为贡献者和维护者保证:无论年龄、种族、民族、性别认同和表达(方式)、体型、身体健全与否、经验水平、国籍、个人表现、宗教或性别取向,参与者在我们项目和社区中都免于骚扰。
## 我们的责任
项目维护者有责任为「可接受的行为」标准做出诠释,有权利及责任去删除、编辑、拒绝与本行为标准有所违背的评论(comments)、提交(commits)、代码、wiki 编辑、问题(issues)和其他贡献,以及项目维护者可暂时或永久性的禁止任何他们认为有不适当、威胁、冒犯、有害行为的贡献者。
## 我们的标准
作为 GitHub 上的一个项目,本项目受到 [GitHub 社区准则](https://help.github.com/articles/github-community-guidelines/)的约束。 此外,作为 npm 托管的项目,[npm 公司的行为准则](https://www.npmjs.com/policies/conduct)也涵盖了本项目。
有助于创造正面环境的行为包括但不限于:
* 使用友好和包容性语言
* 尊重不同的观点和经历
* 耐心地接受建设性批评
* 关注对社区最有利的事情
* 友善对待其他社区成员
身为参与者不能接受的行为包括但不限于:
* 使用与性有关的言语或是图像,以及不受欢迎的性骚扰
* 捣乱/煽动/造谣的行为或进行侮辱/贬损的评论,人身攻击及政治攻击
* 公开或私下的骚扰
* 未经许可地发布他人的个人资料,例如住址或是电子地址
* 其他可以被合理地认定为不恰当或者违反职业操守的行为
## 使用范围
当一个人代表该项目或是其社区时,本行为标准适用于其项目社区和公共社区。
根据某人在本社区范围以外发生的违规情况,项目维护者可以认为其不受欢迎,并采取适当措施来保证所有成员的安全性和舒适性。
## 强制执行
如果您看到违反行为准则的行为,请按以下步骤操作:
1. 让这个人知道他所做的并不合适,并要求他停止或编辑他们的提交信息。该人应立即停止行为并纠正问题。
2. 如果该人没有纠正其行为,或者您不方便与其沟通,请[联系项目维护者](#联系项目维护者)。上报时,请尽可能多的提供详细信息,链接,截图,上下文或可用于更好地理解和解决情况的其他信息。
3. 收到上报信息后,项目维护者会查看问题,并采取进一步的措施。
一旦项目维护者参与其中,他们将遵循以下一系列步骤,并尽力保护项目成员的利益。任何维护团队认为有必要且适合的所有投诉都将进行审查及调查,并做出相对应的回应。项目小组有对事件回报者有保密的义务。具体执行的方针近一步细节可能会单独公布。
以下是项目维护者根据需要采取的进一步执法步骤:
1. 再次要求停止违规行为。
2. 如果违规者还是没有回应,将会受到正式的警告,并收到项目维护者的移除或修改消息。同时,相关的问题或合并请求将会被锁定。
3. 如果警告后违规行为继续出现,违规者将会被禁言 24 小时。
4. 如果禁言后违规行为继续出现,违规者将会被处罚长期(6-12个月)禁言。
除此之外,项目维护者可以根据需要删除任何违规的消息,图片,贡献等。如果违规行为被认为是对社区成员的严重或直接威胁,包括任何置社区成员于风险的威胁、身体或言语攻击,项目维护者有充分权利自行决定跳过上述任何步骤。
没有切实地遵守或是执行本行为标准的项目维护人员,可能会因项目领导人或是其他成员的决定,暂时或是永久地取消其参与资格。
## 联系项目维护者
您可以通过以下任何方法与维护人员联系
* 电子邮件:
* [support@theme-next.org](mailto:support@theme-next.org)
* 即时通信:
* [Gitter](https://gitter.im/theme-next)
* [Riot](https://riot.im/app/#/room/#NexT:matrix.org)
* [Telegram](https://t.me/joinchat/GUNHXA-vZkgSMuimL1VmMw)
## 来源
本行为标准改编自[Contributor Covenant](https://www.contributor-covenant.org/) 和 [WeAllJS Code of Conduct](https://wealljs.org/code-of-conduct)。
================================================
FILE: docs/zh-CN/CONTRIBUTING.md
================================================
#
首先,非常感谢大家抽出宝贵时间来让我们的 NexT 主题越变越好。在这里,我们介绍一下 [NexT 主题及其子模块](https://github.com/theme-next) 的开源贡献指南。不过,我们希望大家不要局限于此,更欢迎大家随时进行补充。
## 目录
[如何为 NexT 做贡献](#如何为-next-做贡献)
* [你需要了解的](#你需要了解的)
* [阅读文档](#阅读文档)
* [快速调试指南](#快速调试指南)
* [反馈 Bug](#反馈-bug)
* [提交漏洞](#提交漏洞)
* [提交功能需求](#提交功能需求)
* [提交合并请求](#提交合并请求)
* [发布版本](#发布版本)
[规范](#规范)
* [行为规范](#行为规范)
* [编码规范](#编码规范)
* [标签规范](#标签规范)
* [提交信息规范](#提交信息规范)
## 如何为 NexT 做贡献
### 你需要了解的
#### 阅读文档
如果你在使用过程中遇到了问题,你可以查阅 [FAQs](https://theme-next.org/docs/faqs) 或者 [NexT 帮助文档](https://theme-next.org/docs/troubleshooting)。
另外,你也可以通过 [这里](https://github.com/theme-next/hexo-theme-next/search?q=&type=Issues&utf8=%E2%9C%93) 进行大致检索,有些问题已经得到解答,你可以自行解决。对于没有解决的 Issue,你也可以继续提问。
#### 快速调试指南
在 GitHub 上提交 Issue 前,请先通过以下方法 debug:
* 执行`hexo clean`,清除浏览器缓存,并禁用 CDN 服务(例如 Cloudflare Rocket Loader);
* 切换到其它主题并检查 bug 是否仍然存在(例如使用默认主题 landscape)。换言之,证明这是 NexT 主题而非来自 Hexo 的 bug;
* 将 NexT 主题升级到最新版;
* 将 Hexo 和 Hexo 插件升级到最新版;
* 将 Node.js 和 `npm` 升级到最新版;
* 卸载不必要的 Hexo 插件,或重新通过 `npm install --save` 安装插件。
如果你得到了来自 Hexo 或浏览器控制台的报错信息,请在 Google / Stackoverflow / GitHub Issue 中搜寻,或在提交 Issue 时报告给我们。
如果你在使用过程中发现了 Bug,请再次确认 Bug 在 [最新发布版本](https://github.com/theme-next/hexo-theme-next/releases/latest) 中是否重现。如果 Bug 重现,欢迎你到我们的 [主题仓库](https://github.com/theme-next/hexo-theme-next) 中 [反馈 Bug](#reporting-bugs) 或者 [提交功能需求](#提交功能需求),也更期待您 [提交合并请求](#提交合并请求)。
### 反馈 Bug
反馈 Bug 前,请再次确认您已经查看了 [你需要了解的](#你需要了解的) 内容,避免提交重复的 Issue。确定相关仓库后,创建 Issue 并按照 [模板](../../.github/ISSUE_TEMPLATE.md) 尽可能的详细填写相关信息。
请认真遵守如下指南,这样我们才能更好地理解问题,重现问题和解决问题。
* 在标题中清晰准确地描述你的问题。
* 参照如下问题尽可能多的提供信息:
* Bug 是否能够重现?是一直出现还是偶尔出现?
* Bug 是从什么时候开始发生的?
* 如果 Bug 突然发生,使用 [旧版本主题](https://github.com/theme-next/hexo-theme-next/releases) 是否能够重现 Bug?又是从哪个版本开始出现 Bug?
* 你所使用 Node,Hexo 以及 Next 的版本号多少?你可以运行 `node -v` 和 `hexo version` 获取版本号,或者查看文件 `package.json` 的内容。
* 你使用了哪些插件包?查看文件 `package.json` 的内容即可获取。
* 一步步详细你是如何重现 Bug 的,做了什么,使用了哪些功能等等。如果你需要展示代码段,请使用 [Markdown 代码块](https://help.github.com/articles/creating-and-highlighting-code-blocks/) 或 [Github 预览链接](https://help.github.com/articles/creating-a-permanent-link-to-a-code-snippet/) 或 [Gist 链接](https://gist.github.com/)。
* 提供 Bug 的样例,如图像文件、在线演示网址等等。
* 详细描述通过上述重现过程出现的问题。
* 详细描述你期待的结果。
#### 提交漏洞
如果你发现安全问题,请以负责任的方式行事,即不要在公共 Issue 中提交而是直接向我们反馈,这样我们就可以在漏洞被利用之前对其进行修复。请将相关信息发送到 security@theme-next.com(可接受 PGP 加密邮件)。
我们很乐意对任何提交漏洞的人予以特别感谢以便我们修复它。如果你想保持匿名性或使用笔名替代,请告诉我们。我们将充分尊重你的意愿。
### 提交功能需求
提交功能需求前,请再次确认您已经查看了 [你需要了解的](#你需要了解的) 内容,避免提交重复的 Issue。确定相关仓库后,创建 Issue 并按照 [模板](../../.github/ISSUE_TEMPLATE.md) 尽可能的详细填写相关信息。
请认真遵守如下指南,这样我们才能更好地理解和开发功能需求:pencil::
* 在标题中清晰准确地描述你的功能需求。
* 详细描述目前所具有的功能和你所期待的功能,并解释为什么需要该功能。
* 提供功能需求的样例,如图像文件、在线演示网址等等。
### 提交合并请求
提交合并请求前,请再次确认您已经查看了 [你需要了解的](#你需要了解的) 内容,避免提交重复的合并请求。确定相关仓库后,创建合并请求。更多详细操作过程可以查看 [帮助文档](https://help.github.com/articles/creating-a-pull-request/)。
请认真遵守如下指南,这样我们才能更好地理解你的合并请求:
* 创建合并请求时,请遵守 [编码规范](#编码规范) 和 [提交信息规范](#提交信息规范)。
* 在标题中清晰准确地描述你的合并请求,不要加入 Issue 编号。
* 按照 [模板](../../.github/PULL_REQUEST_TEMPLATE.md) 尽可能的详细填写相关信息。
* 合并请求需要在所有主题样式中测试通过,并提供所表现功能的样例,如图像文件、在线演示网址等等。
### 发布版本
版本发布是将项目发布给用户的一种很好的方式。
1. 进入 GitHub 项目主页,点击 **Releases** 和 **Draft a new release**。
2. 输入你需要发布的版本号。版本控制是基于 [Git tags](https://git-scm.com/book/en/Git-Basics-Tagging) 工作的,建议按照 [About Major and Minor NexT versions](https://github.com/theme-next/hexo-theme-next/issues/187) 确定版本号。
3. 确定你需要发布的分支。除非发布测试版本,通常情况下选择 `master` 分支。
4. 输入发布版本的标题和说明。
- 标题为版本号。
- 所有内容更改的类型包括了 **Breaking Changes**, **Updates**, **Features** 和 **Bug Fixes**。在描述 Breaking Changes 时,使用二级标题分别陈述,描述其他类型时,使用项目列表陈述。
- 使用被动语态,省略主语。
- 所有的变化都需要记录在版本说明中。对于没有使用 PR 的更改,需要添加相应的 commit 编号。如果使用了 PR 进行合并修改,则直接添加相应的 PR 编号即可。
5. 如果您希望随版本一起发布二进制文件(如编译的程序),请在上传二进制文件对话框中手动拖放或选择文件。
6. 如果版本不稳定,请选择 **This is a pre-release**,以通知用户它尚未完全准备好。如果您准备公布您的版本,请点击 **Publish release**。否则,请单击 **Save draft** 以稍后处理。
## 规范
### 行为规范
为了保证本项目的顺利运作,所有参与人都需要遵守 [行为规范](CODE_OF_CONDUCT.md)。
### 编码规范
我们使用 ESLint 和 Stylint 来识别和报告 JavaScript 和 Stylus 中的模式,目的是使代码更加一致并避免错误。编码时应遵循这些规范。
### 标签规范
为了方便维护人员和用户能够快速找到他们想要查看的问题,我们使用“标签”功能对 Pull requests 和 Issues 进行分类。
如果您不确定某个标签的含义,或者不知道将哪些标签应用于 PR 或 issue,千万别错过这个。
Issue 的标签:
- 类型
- `Bug`: 检测到需要进行确认的 Bug
- `Feature Request`: 提出了新功能请求的 Issue
- `Question`: 提出疑问的 Issue
- `Meta`: 表明使用条款变更的 Issue
- `Support`: 被标记为支持请求的 Issue
- `Polls`: 发起投票的 Issue
- 结果
- `Duplicate`: 重复提及的 Issue
- `Irrelevant`: 与 NexT 主题无关的 Issue
- `Invalid`: 无法复现的 Issue
- `Expected Behavior`: 与预期行为相符的 Issue
- `Need More Info`: 需要更多信息的 Issue
- `Verified`: 已经被确认的 Issue
- `Solved`: 已经解决的 Issue
- `Backlog`: 待解决的 Issue
- `Stale`: 由于长期无人回应被封存的 Issue
Pull Request 的标签:
- `Breaking Change`: 产生重大变动的 Pull Request
- `Bug Fix`: 修复相关 Bug 的 Pull Request
- `New Feature`: 添加了新功能的 Pull Request
- `Feature`: 为现有功能提供选项或加成的 Pull Request
- `i18n`: 更新了翻译的 Pull Request
- `Work in Progress`: 仍在进行改动和完善的 Pull Request
- `Skip Release`: 无需在 Release Note 中展现的 Pull Request
两者兼有:
- `Roadmap`: 与 NexT 主题发展相关的 Issue 或者 Pull Request
- `Help Wanted`: 需要帮助的 Issue 或者 Pull Request
- `Discussion`: 需要进行讨论的 Issue 或者 Pull Request
- `Improvement`: 需要改进的 Issue 或者改进了 NexT 主题的 Pull Request
- `Performance`: 提出性能问题的 Issue 或者提高了 NexT 主题性能的 Pull Request
- `Hexo`: 与 Hexo 和 Hexo 插件相关的 Issue 或者 Pull Request
- `Template Engine`: 与模版引擎相关的 Issue 或者 Pull Request
- `CSS`: 与 NexT 主题 CSS 文件相关的 Issue 或者 Pull Request
- `Fonts`: 与 NexT 主题字体相关的 Issue 或者 Pull Request
- `PJAX`: 与 PJAX 相关的 Issue 或者 Pull Request
- `3rd Party Plugin`: 与第三方插件和服务相关的 Issue 或者 Pull Request
- `Docs`: 与文档说明相关的 Issue 或者 Pull Request
- `Configurations`: 与 NexT 主题设置相关的 Issue 或者 Pull Request
### 提交信息规范
我们对项目的 git 提交信息格式进行统一格式约定,每条提交信息由 `type`+`subject` 组成,这将提升项目日志的可读性。
- `type` 用于表述此次提交信息的意义,首写字母大写,包括但不局限于如下类型:
* `Build`:基础构建系统或依赖库的变化
* `Ci`:CI 构建系统及其脚本变化
* `Docs`:文档内容变化
* `Feat`:新功能
* `Fix`:Bug 修复
* `Perf`:性能优化
* `Refactor`:重构(即不是新增功能,也不是修改 Bug 的代码变动)
* `Style`:格式(不影响代码运行的变动)
* `Revert`:代码回滚
* `Release`:版本发布
- `subject` 用于简要描述修改变更的内容,如 `Update code highlighting in readme.md`。
* 句尾不要使用符号。
* 使用现在时、祈使句语气。
================================================
FILE: docs/zh-CN/DATA-FILES.md
================================================
数据文件
目前,通过 pull 或下载新的 release 版本来更新 NexT 主题的体验并不平滑。当用户使用 `git pull` 更新 NexT 主题时经常需要解决冲突问题,而在手动下载 release 版本时也经常需要手动合并配置。
现在来说,NexT 推荐用户存储部分配置在 Hexo 站点配置文件(`/_config.yml`),而另一部分在主题配置文件(`/themes/next/_config.yml`)。这一方式固然可用,但也有一些缺点:
1. 配置项被分裂为两部分;
2. 用户难以弄清何处存放配置选项。
为了解决这一问题,NexT 提供了以下两种方案。
选择 1:Hexo 方式
使用这一方式,你的全部配置都将置于 Hexo 站点配置文件(`/_config.yml`),并且不需要修改 `/themes/next/_config.yml`,或者创建什么其他的文件。但是所有用到的主题选项必须放置在 `theme_config` 后,并全部增加两个空格的缩进。
如果在新的 release 中新增了选项,那么你只需要从 `/themes/next/_config.yml` 中将他们复制到 `/_config.yml` 中并将它们的值设置为你想要的。
### 用法
1. 请确认不存在 `/source/_data/next.yml` 文件(如果已存在,请删除)
2. 从主题的 `/themes/next/_config.yml` 文件中复制你需要的 NexT 配置项到 `/_config.yml` 中,然后\
2.1. 所有这些配置项右移两个空格(在 Visual Studio Code 中:选中这些文字,CTRL + ])。\
2.2. 在这些参数最上方添加一行 `theme_config:`。
### 相关链接
* [Hexo 配置](https://hexo.io/zh-cn/docs/configuration.html)
* [Hexo Pull #757](https://github.com/hexojs/hexo/pull/757)
选择 2: NexT 方式
使用这一方式,你现在可以将你的全部配置置于同一位置(`/source/_data/next.yml`),并且不需要修改 `/themes/next/_config.yml`。
但是可能无法让所有 Hexo 外部库都准确处理它们的附加选项(举个例子,`hexo-server` 模块只会从 Hexo 默认配置文件中读取选项)。
如果在新的 release 中出现了任何新的选项,那么你只需要从 `/themes/next/_config.yml` 中将他们复制到 `/source/_data/next.yml` 中并设置它们的值为你想要的选项。
这一方法依赖于 Hexo 的[数据文件](https://hexo.io/docs/data-files.html)特性。因为数据文件是在 Hexo 3 中被引入,所以你需要更新至 Hexo 3.0 以后的版本来使用这一特性。
### 用法
1. 请确认你的 Hexo 版本为 3.0 或更高。
2. 在你站点的 `/source/_data` 目录创建一个 `next.yml` 文件(如果 `_data` 目录不存在,请创建之)。
以上步骤之后有 两种选择,请任选其一然后继续后面的步骤。
* **选择 1:`override: false`(默认)**:
1. 检查默认 NexT 配置中的 `override` 选项,必须设置为 `false`。\
在 `next.yml` 文件中,也要设置为 `false`,或者不定义此选项。
2. 从站点配置文件(`/_config.yml`)与主题配置文件(`/themes/next/_config.yml`)中复制你需要的选项到 `/source/_data/next.yml` 中。
* **选择 2:`override: true`**:
1. 在 `next.yml` 中设置 `override` 选项为 `true`。
2. 从 `/themes/next/_config.yml` 配置文件中复制**所有**的 NexT 主题选项到 `/source/_data/next.yml` 中。
3. 然后,在站点的 `/_config.yml` 中需要定义 `theme: next` 选项(如果需要的话,`source_dir: source`)。
4. 使用标准参数来启动服务器,生成或部署(`hexo clean && hexo g -d && hexo s`)。
### 相关链接
* [NexT Issue #328](https://github.com/iissnan/hexo-theme-next/issues/328)
================================================
FILE: docs/zh-CN/INSTALLATION.md
================================================
安装
步骤 1 → 进入 Hexo 目录
进入 **Hexo 根**目录。这一目录中应当有 `node_modules`、`source`、`themes` 等若干子目录:
```sh
$ cd hexo
$ ls
_config.yml node_modules package.json public scaffolds source themes
```
步骤 2 → 获取 NexT
从 GitHub 下载主题。
为了下载这一主题,共有 3 种选项可选。你需要选择其中唯一一个方式。
### 选项 1:下载[最新 release 版本][releases-latest-url]
通常情况下请选择 **stable** 版本。推荐不熟悉的用户按此方式进行。
* 使用 [curl、tar 和 wget][curl-tar-wget-url] 安装:
```sh
$ mkdir themes/next
$ curl -s https://api.github.com/repos/theme-next/hexo-theme-next/releases/latest | grep tarball_url | cut -d '"' -f 4 | wget -i - -O- | tar -zx -C themes/next --strip-components=1
```
这种方式将**仅提供最新的 release 版本**(其中不附带 `.git` 目录)。\
因此,将来你将不可能通过 `git` 更新这一方式安装的主题。\
取而代之的,为了能不丢失你的自定义配置,你可以使用独立的配置文件(例如 [数据文件][docs-data-files-url])并下载最新版本到旧版本的目录中(或者下载到新的主题目录中并修改 Hexo 配置中的主题名)。
### 选项 2:下载 [tag 指向的 release 版本][releases-url]
在少数情况下将有所帮助,但这并非推荐方式。\
你必须指定一个版本:使用 [tags 列表][tags-url]中的任意 tag 替换 `v6.0.0`。
* 方式 1:使用 [curl 和 tar][curl-tar-url] 安装:
```sh
$ mkdir themes/next
$ curl -L https://api.github.com/repos/theme-next/hexo-theme-next/tarball/v6.0.0 | tar -zxv -C themes/next --strip-components=1
```
和上述的 `curl、tar 和 wget` 方法相同,但只会下载**指定的 release 版本**。
* 方式 2:使用 [git][git-url] 安装:
```sh
$ git clone --branch v6.0.0 https://github.com/theme-next/hexo-theme-next themes/next
```
这一方式将为你下载**指定的 release 版本**(其中包含 `.git` 目录)。\
并且,你可以随时切换到任何已定义的版本号所对应的 tag 的版本。
### 选项 3:下载[最新 master 分支][download-latest-url]
可能**不稳定**,但包含最新的特性。推荐进阶用户和开发者按此方式进行。
* 方式 1:使用 [curl 和 tar][curl-tar-url] 安装:
```sh
$ mkdir themes/next
$ curl -L https://api.github.com/repos/theme-next/hexo-theme-next/tarball | tar -zxv -C themes/next --strip-components=1
```
和上述的 `curl、tar 和 wget` 方法相同,但只会下载**最新 master 分支版本**。\
在有些情况对开发者有所帮助。
* 方式 2:使用 [git][git-url] 安装:
```sh
$ git clone https://github.com/theme-next/hexo-theme-next themes/next
```
这一方式将为你下载**完整仓库**(其中包含 `.git` 目录)。\
你可以随时[使用 git 更新至最新版本][update-with-git-url]并切换至任何有 tag 标记的 release 版本、最新的 master 分支版本、甚至其他分支。\
在绝大多数情况下对用户和开发者友好。
获取 tags 列表:
```sh
$ cd themes/next
$ git tag -l
…
v6.0.0
v6.0.1
v6.0.2
```
例如,假设你想要切换到 `v6.0.1` 这一 [tag 指向的 release 版本][tags-url]。输入如下指令:
```sh
$ git checkout tags/v6.0.1
Note: checking out 'tags/v6.0.1'.
…
HEAD is now at da9cdd2... Release v6.0.1
```
然后,假设你想要切换回 [master 分支][commits-url],输入如下指令即可:
```sh
$ git checkout master
```
步骤 3 → 完成配置
在 **Hexo 站点配置文件**(`/_config.yml`)中设置你的主题:
```yml
theme: next
```
[download-latest-url]: https://github.com/theme-next/hexo-theme-next/archive/master.zip
[releases-latest-url]: https://github.com/theme-next/hexo-theme-next/releases/latest
[releases-url]: https://github.com/theme-next/hexo-theme-next/releases
[tags-url]: https://github.com/theme-next/hexo-theme-next/tags
[commits-url]: https://github.com/theme-next/hexo-theme-next/commits/master
[git-url]: http://lmgtfy.com/?q=linux+git+install
[curl-tar-url]: http://lmgtfy.com/?q=linux+curl+tar+install
[curl-tar-wget-url]: http://lmgtfy.com/?q=linux+curl+tar+wget+install
[update-with-git-url]: https://github.com/theme-next/hexo-theme-next/blob/master/docs/zh-CN/README.md#update
[docs-data-files-url]: https://github.com/theme-next/hexo-theme-next/blob/master/docs/zh-CN/DATA-FILES.md
================================================
FILE: docs/zh-CN/LEANCLOUD-COUNTER-SECURITY.md
================================================
修复 LeanCloud 统计插件安全漏洞
在配置前,请升级 NexT 至 **v6.0.6** 以上。
在配置过程中请注意**博客配置文件**和**主题配置文件**的区别。
---
# 注册 LeanCloud 并创建应用
- 首先,前往 LeanCloud 官网 [leancloud.cn](https://leancloud.cn) 进行注册,并登录。
请注意,目前华东节点和华北节点创建应用需要先在账号设置完成实名认证,并且官方表明“[在国内市场将只服务于可验证的商业客户](https://leancloudblog.com/domain-incident/)”;美国节点暂无上述要求,并且账号系统与华东节点和华北节点是独立的,如需使用请前往 LeanCloud 国际版官网 [leancloud.app](https://leancloud.app) 注册登录。
- 然后点击图示 `1` 处,进入控制台:

- 接着,点击图示 `1` 处,创建应用:

- 在弹出窗口 `1` 处输入应用名称(可随意输入,可更改,为演示方便取名为test),并选择 `2` 处“开发版”,然后点击 `3` 处创建:

到这里应用创建完成。
# 建立 Counter 类并在 NexT 中启用插件
- 点击 `1` 处应用名称进入应用管理界面:

- 如图,点击侧边栏 `1` 处创建 Class:

- 在弹出窗口 `1` 处填入 `Counter`,勾选 `2` 处无限制,并点击 `3` 处创建 Class:

- 此时类已创建完成。接下来点击图示 `1` 处进入设置,然后点击 `2` 处进入应用 Key:

- 粘贴 `App ID` 和 `App Key` 到 **NexT主题配置文件** `_config.yml` 对应位置。此时配置文件应如下:
```yml
leancloud_visitors:
enable: true
app_id: #
app_key: #
# Required for apps from CN region
server_url: #
# Dependencies: https://github.com/theme-next/hexo-leancloud-counter-security
security: true
```
- 设置Web安全域名确保域名调用安全。点击 `1` 处进入安全中心,然后在 `2` 处填写自己博客对应的域名(**注意协议、域名和端口号需严格一致**):

到这里内容均与 Doublemine 的[为NexT主题添加文章阅读量统计功能](https://notes.wanghao.work/2015-10-21-%E4%B8%BANexT%E4%B8%BB%E9%A2%98%E6%B7%BB%E5%8A%A0%E6%96%87%E7%AB%A0%E9%98%85%E8%AF%BB%E9%87%8F%E7%BB%9F%E8%AE%A1%E5%8A%9F%E8%83%BD.html#%E9%85%8D%E7%BD%AELeanCloud)这篇文章相同,只不过截图为新版的Leancloud的界面。
# 部署云引擎以保证访客数量不被随意篡改
- 点击左侧 `1` 处云引擎,然后点击 `2` 处部署,再点击 `3` 处在线编辑:

- 点击 `1` 处创建函数:

- 在弹出窗口选择 `1` 处 `Hook` 类型,然后 `2` 处选择 `beforeUpdate`,`3` 处选择刚才建立的 `Counter` 类。在 `4` 中粘贴下方代码后,点 `5` 处保存。
```javascript
var query = new AV.Query("Counter");
if (request.object.updatedKeys.includes('time')) {
return query.get(request.object.id).then(function (obj) {
if (obj.get("time") > request.object.get("time")) {
throw new AV.Cloud.Error('Invalid update!');
}
return request.object.save();
});
}
```
如图所示:

- 点击保存后应出现类似红框处函数。此时点击 `1` 处部署:

- 在弹出窗口点击 `1` 处部署:

- 等待出现红框处的成功部署信息后,点击 `1` 处关闭:

至此云引擎已成功部署,任何非法的访客数量更改请求都将失败。
# 进一步设置权限
- 打开**NexT主题配置文件** `_config.yml`,将 `leancloud_visitors` 下的 `security` 设置为 `true`(如没有则新增):
```yml
leancloud_visitors:
enable: true
app_id: #
app_key: #
# Required for apps from CN region
server_url: #
# Dependencies: https://github.com/theme-next/hexo-leancloud-counter-security
security: true
```
- 打开 cmd 并切换至**博客根目录**,键入以下命令以安装 `hexo-leancloud-counter-security` 插件:
```
npm install hexo-leancloud-counter-security
```
- 打开**博客配置文件** `_config.yml`,新增以下配置:
```yml
leancloud_counter_security:
enable_sync: true
app_id:
app_key:
username:
password:
```
- 在相同目录键入以下命令:
```
hexo lc-counter register
```
或
```
hexo lc-counter r
```
将 `` 和 `` 替换为你自己的用户名和密码(不必与 LeanCloud 的账号相同)。此用户名和密码将在 Hexo 部署时使用。
- 打开**博客配置文件** `_config.yml`,将 `` 和 `` 替换为你刚刚设置的用户名和密码:
```yml
leancloud_counter_security:
enable_sync: true
app_id:
app_key:
username: #如留空则将在部署时询问
password: #建议留空以保证安全性,如留空则将在部署时询问
```
- 在**博客配置文件** `_config.yml` 的 `deploy` 下添加项:
```yml
deploy:
# other deployer
- type: leancloud_counter_security_sync
```
- 返回 LeanCloud 控制台的应用内。依次点击 `1` `2`,检查 `_User` 表中是否出现一条记录(图示以用户名为 `admin` 为例):

- 点击 `1` 处进入 `Counter` 表,依次点击 `2` `3`,打开权限设置:

- 点击 `1` `add_field` 后选择 `2` 指定用户, 并将下两栏留空: 此处应与下条 `create` 设置相同(选择你所创建的用户):

- 点击 `1` `create` 后选择 `2` 指定用户, 在 `3` 处键入用户名,点击 `4` 处后点击 `5` 处添加:

完成此步操作后,界面应与图示类似:

- 点击 `1` `delete` 后选择 `2` 指定用户, 并将下两栏留空:

至此权限已设置完成,数据库记录只能在本地增删。
每次运行 `hexo d` 部署的时候,插件都会扫描本地 `source/_posts` 下的文章并与数据库对比,然后在数据库创建没有录入数据库的文章记录。
如果在**博客配置文件**中留空 `username` 或 `password` ,则在部署过程中程序会要求输入。
---
原文链接:https://leaferx.online/2018/02/11/lc-security/
================================================
FILE: docs/zh-CN/MATH.md
================================================
数学公式
NexT 内部提供数学公式渲染的引擎,这样你就不需要自己手动在模板中引入 JS 或者 CSS;
只需要选择对应的渲染引擎,并在 `next/_config.yml` 中将其 `enable` 选项改为 `true` 即可。
需要注意的是,仅仅将 `enable` 打开**并不能让你看到数学公式**,你还需要**使用对应的 Hexo 渲染器(Renderer)** 才能真正在博客页面中显示出数学公式。引擎对应使用的 Hexo 渲染器会在引擎相关的部分介绍。
提供的渲染引擎
目前,NexT 提供两种数学公式渲染引擎,分别为 [MathJax](https://www.mathjax.org/) 和 [Katex](https://khan.github.io/KaTeX/)。
### MathJax
如果你选择使用 MathJax 进行数学公式渲染,你需要使用 [hexo-renderer-pandoc](https://github.com/wzpan/hexo-renderer-pandoc) 或者 [hexo-renderer-kramed](https://github.com/sun11/hexo-renderer-kramed) (不推荐)作为 Hexo 的 Markdown 渲染器。
首先,卸载原有的渲染器 `hexo-renderer-marked`,并安装这两种渲染器的**其中一个**:
```sh
npm uninstall hexo-renderer-marked
npm install hexo-renderer-pandoc # 或者 hexo-renderer-kramed
```
然后在 `next/_config.yml` 中将 `mathjax` 的 `enable` 打开。
```yml
math:
...
mathjax:
enable: true
```
执行 Hexo 生成,部署,或者启动服务器:
```sh
hexo clean && hexo g -d
# 或者 hexo clean && hexo s
```
#### 使用 MathJax 给公式编号并引用公式
在新版本的 NexT 主题中,我们加入了公式自动编号和引用功能。下面简要介绍一下如何使用这项功能。
为了使用这项功能,一般来说,你必须把所使用的 LaTeX 公式放在 `equation` 环境里面,采用旧的方法(也就是说,仅仅把公式的每一边用两个 $ 符号包含起来)是无效的。如何引用公式?你只需要在书写公式的时候给公式一个 `\label{}` 标记(tag),然后在正文中,可以使用 `\ref{}` 或者 `\eqref{}` 命令来引用对应的公式。使用 `\eqref{}` 是推荐的方式,因为如果你使用 `\ref{}`,公式在文中的引用编号将没有圆括号包围。下面介绍几种常见的公式编号例子。
对于简单的公式,使用下面的方式给公式一个标记,
```latex
$$\begin{equation}\label{eq1}
e=mc^2
\end{equation}$$
```
然后,在正文中,你可以轻松引用上述公式,一个简单的例子如下:
```
著名的质能方程 $\eqref{eq1}$ 由爱因斯坦提出 ...
```
对于多行公式,在 `equation` 环境中,你可以使用 `aligned` 环境把公式分成多行,
```latex
$$\begin{equation}\label{eq2}
\begin{aligned}
a &= b + c \\
&= d + e + f + g \\
&= h + i
\end{aligned}
\end{equation}$$
```
要对齐多个公式,我们需要使用 `align` 环境。align 环境中的每个公式都有自己的编号:
```
$$\begin{align}
a &= b + c \label{eq3} \\
x &= yz \label{eq4}\\
l &= m - n \label{eq5}
\end{align}$$
```
在 `align` 环境中,如果你不想给某个或某几个公式编号,那么在这些公式后面使用 [`\nonumber`](https://tex.stackexchange.com/questions/17528/show-equation-number-only-once-in-align-environment) 命令即可。例如:
```latex
$$\begin{align}
-4 + 5x &= 2+y \nonumber \\
w+2 &= -1+w \\
ab &= cb
\end{align}$$
```
有时,你可能会希望采用更加奇特的方式来标记和引用你的公式,你可以通过使用 `\tag{}` 命令来实现,例如:
```latex
$$x+1\over\sqrt{1-x^2} \tag{i}\label{eq_tag}$$
```
如果你想要了解更多信息,请访问 [MathJax 关于公式编号的官方文档](https://docs.mathjax.org/en/latest/input/tex/eqnumbers.html)。同时,你也可以阅读 [这篇文档](https://theme-next.org/docs/third-party-services/math-equations) 来获取更多细节信息。
### Katex
Katex 渲染引擎相对于 MathJax 来说**大大提高了速度**,而且在关掉 JavaScript 时也能渲染数学公式。
但是 Katex 所支持的东西没有 MathJax 全面,你可以从下面的相关链接中获取更多的信息。
如果你选择使用 Katex 进行数学公式渲染,你需要使用 [hexo-renderer-markdown-it-plus](https://github.com/CHENXCHEN/hexo-renderer-markdown-it-plus) 或者 [hexo-renderer-markdown-it](https://github.com/hexojs/hexo-renderer-markdown-it) 这两种渲染器的其中一个。
首先,卸载原有的渲染器 `hexo-renderer-marked`,并安装这两种渲染器的**其中一个**:
```sh
npm uninstall hexo-renderer-marked
npm install hexo-renderer-markdown-it-plus
# 或者 hexo-renderer-markdown-it
```
然后在 `next/_config.yml` 中将 `katex` 的 `enable` 打开。
```yml
math:
...
katex:
enable: true
```
执行 Hexo 生成,部署,或者启动服务器:
```sh
hexo clean && hexo g -d
# 或者 hexo clean && hexo s
```
#### 如果你使用 hexo-renderer-markdown-it
如果你使用 `hexo-renderer-markdown-it`,你还需要为其加上 `markdown-it-katex` 作为插件:
```
npm install markdown-it-katex
```
然后在 `hexo/_config.yml` 中将 `markdown-it-katex` 作为插件写入 `hexo-renderer-markdown-it` 的配置中:
```yml
markdown:
render:
html: true
xhtmlOut: false
breaks: true
linkify: true
typographer: true
quotes: '“”‘’'
plugins:
- markdown-it-katex
```
#### 已知的问题
1. 首先请查阅 Katex 的 [Common Issue](https://github.com/Khan/KaTeX#common-issues)
2. 块级公式(例如 `$$...$$`)必须位于空行。\
即在开头的 `$$` 前和在结尾的 `$$` 后不能有除了空白字符以外的其他字符。([#32comment](https://github.com/theme-next/hexo-theme-next/pull/32#issuecomment-357489509))
3. 不支持 Unicode。([#32comment](https://github.com/theme-next/hexo-theme-next/pull/32#issuecomment-357489509))
4. 行内公式(例如 `$...$`)在开头的 `$` 后面和结尾的 `$` 前面**不能含有空格**。([#32comment](https://github.com/theme-next/hexo-theme-next/pull/32#issuecomment-357489509))
5. 如果你在文章的各级标题中(例如 `## 标题`)使用公式。\
那么文章目录中的这个标题会出现 3 次未渲染的公式代码([#32comment](https://github.com/theme-next/hexo-theme-next/pull/32#issuecomment-359018694))
6. 如果你在文章 Title 中使用公式,那么公式将不会被渲染。([#32comment](https://github.com/theme-next/hexo-theme-next/pull/32#issuecomment-359142879))
我们目前使用的 Katex 版本为 0.11.1,这里面可能有某些问题是因为 Katex 版本老旧导致的;
但是,就像上面所说的,数学公式的渲染必须依靠渲染器来支持,目前的 Katex 相关的渲染器仅支持到 Katex 0.11.1;
我们会持续关注相关渲染器的更新,如果有渲染器支持更高版本的 Katex,我们会及时更新我们的 Katex 版本。
### 相关链接
* [Katex 与 MathJax 渲染速度对比](https://www.intmath.com/cg5/katex-mathjax-comparison.php)
* [Katex 支持的功能列表](https://khan.github.io/KaTeX/function-support.html)
相关配置说明
注意,在修改配置选项时,**不要更改配置的缩进**;
目前,NexT 的所有配置都采用**2 空格的缩进**;
如果配置的内容接在冒号后面,那么内容和冒号之间必须有一个空格(例如`enable: true`)
```yml
# Math Formulas Render Support
math:
# Default (true) will load mathjax / katex script on demand.
# That is it only render those page which has `mathjax: true` in Front-matter.
# If you set it to false, it will load mathjax / katex srcipt EVERY PAGE.
per_page: true
# hexo-renderer-pandoc (or hexo-renderer-kramed) required for full MathJax support.
mathjax:
enable: true
# See: https://mhchem.github.io/MathJax-mhchem/
mhchem: false
# hexo-renderer-markdown-it-plus (or hexo-renderer-markdown-it with markdown-it-katex plugin) required for full Katex support.
katex:
enable: false
# See: https://github.com/KaTeX/KaTeX/tree/master/contrib/copy-tex
copy_tex: false
```
### `per_page`
`true` 或者 `false`,默认为 `true`。
这个选项是控制是否在每篇文章都渲染数学公式;
默认(`true`) 的行为是**只对 Front-matter 中含有 `mathjax: true` 的文章进行数学公式渲染**。
如果 Front-matter 中不含有 `mathjax: true`,或者 `mathjax: false`,那么 NexT 将不会对这些文章进行数学公式渲染。
例如:
```md
---
title: 'Will Render Math'
mathjax: true
---
....
```
```md
---
title: 'Not Render Math'
mathjax: false
---
....
```
```md
---
title: 'Not Render Math Either'
---
....
```
当你将它设置为 `false` 时,它就会在每个页面都加载 MathJax 或者 Katex 来进行数学公式渲染。
================================================
FILE: docs/zh-CN/README.md
================================================
#
«NexT» 是一款风格优雅的高质量 Hexo 主题,自点点滴滴中用爱雕琢而成。
## 即时预览
💟 Muse | 🔯 Mist | ♓️ Pisces | ♊️ Gemini
更多 «NexT» 的例子参见这里。
## 安装
最简单的安装方式是直接克隆整个仓库:
```sh
$ cd hexo
$ git clone https://github.com/theme-next/hexo-theme-next themes/next
```
此外,如果你想要使用其他方式,你也可以参见[详细安装步骤][docs-installation-url]。
## 插件
NexT 支持大量的第三方插件,它们可以被轻松地配置。
例如,你想要在你的站点中使用 `pjax` 插件,请进入 NexT 配置文件,启用 `pjax` 配置项:
```yml
# Easily enable fast Ajax navigation on your website.
# Dependencies: https://github.com/theme-next/theme-next-pjax
pjax: true
```
然后,打开它上面的 «Dependencies» 链接以查看它的安装步骤。
### 设置 CDN
如果你想要通过 CDN 来加载插件脚本,那么需要设置相关的 CDN 链接。
例如,你想要使用 `mediumzoom` 插件并通过 CDN 加载,进入 Next 配置文件并找到如下内容:
```yml
vendors:
# ...
# Some contents...
# ...
mediumzoom: # Set or update mediumzoom CDN URL.
```
## 更新
NexT 每个月都会发布新版本。你可以通过如下命令更新到最新的 master 分支:
```sh
$ cd themes/next
$ git pull
```
如果你在此过程中收到了任何错误报告 (例如 **«Commit your changes or stash them before you can merge»**),我们推荐你使用 [Hexo 数据文件][docs-data-files-url]特性。\
然而你也可以通过提交(`Commit`)、贮藏(`Stash`)或忽视(`Discard`)本地更改以绕过这种更新错误。具体方法请参考[这里](https://stackoverflow.com/a/15745424/5861495)。
**如果你想要从 v5.1.x 更新到最新版本,阅读[这篇文档][docs-update-5-1-x-url]。**
## 反馈
* 浏览 [Awesome NexT][awesome-next-url] 列表,与其它用户分享插件和教程。
* 加入我们的 [Telegram][t-chat-url] / [Gitter][gitter-url] / [Riot][riot-url] 聊天。
* 请花几秒钟来[添加或修正翻译][i18n-url]。
* 在 [GitHub Issues][issues-bug-url] 报告Bug。
* 在 [GitHub][issues-feat-url] 请求新的功能。
* 为 [受欢迎的 Feature request][feat-req-vote-url] 投票。
## 贡献你的代码
我们欢迎你加入 NexT 的开发,贡献出你的一份力量。请看[开源贡献指南][contributing-document-url]。 🤗
你也可以随时向我们的[官方插件][official-plugins-url]提交 Issue 或 Pull Request。
## 贡献者
[![][contributors-image]][contributors-url]
## 鸣谢
«NexT» 特别感谢这些支持我们核心基础设施的优质服务:
GitHub 容许我们托管 Git 仓库,Netlify 容许我们分发文档。
Crowdin 容许我们方便地翻译文档。
Codacy 容许我们监控代码质量,Travis CI 容许我们运行测试套件。
[docs-installation-url]: https://github.com/theme-next/hexo-theme-next/blob/master/docs/zh-CN/INSTALLATION.md
[docs-data-files-url]: https://github.com/theme-next/hexo-theme-next/blob/master/docs/zh-CN/DATA-FILES.md
[docs-update-5-1-x-url]: https://github.com/theme-next/hexo-theme-next/blob/master/docs/zh-CN/UPDATE-FROM-5.1.X.md
[t-news-url]: https://t.me/theme_next_news
[t-chat-url]: https://t.me/theme_next_chinese
[gitter-url]: https://gitter.im/theme-next
[riot-url]: https://riot.im/app/#/room/#theme-next:matrix.org
[i18n-url]: https://i18n.theme-next.org
[awesome-next-url]: https://github.com/theme-next/awesome-next
[issues-bug-url]: https://github.com/theme-next/hexo-theme-next/issues/new?assignees=&labels=Bug&template=bug-report.md
[issues-feat-url]: https://github.com/theme-next/hexo-theme-next/issues/new?assignees=&labels=Feature+Request&template=feature-request.md
[feat-req-vote-url]: https://github.com/theme-next/hexo-theme-next/issues?q=is%3Aopen+is%3Aissue+label%3A%22Feature+Request%22
[contributing-document-url]: https://github.com/theme-next/hexo-theme-next/blob/master/docs/zh-CN/CONTRIBUTING.md
[official-plugins-url]: https://github.com/theme-next
[contributors-image]: https://opencollective.com/theme-next/contributors.svg?width=890
[contributors-url]: https://github.com/theme-next/hexo-theme-next/graphs/contributors
================================================
FILE: docs/zh-CN/UPDATE-FROM-5.1.X.md
================================================
从 NexT v5.1.x 更新
在使用 Hexo 3 时,NexT V5 版本仍然能够正常运行,但是如果你想获得更多的功能和帮助,还是建议您升级到 NexT V7+ 版本,并移步 [Theme-Next](https://github.com/theme-next/hexo-theme-next) 仓库。
在 5.1.x 版本和新版本之间没有很大的革命性改进。主版本号变更至 7 主要是因为:
1. 主仓库已从 [iissnan 名下](https://github.com/iissnan/hexo-theme-next) 迁移至 [theme-next](https://github.com/theme-next) 组织。
2. `next/source/lib` 目录下的绝大多数库被移出到了 [NexT 组织的外部仓库](https://github.com/theme-next)中。
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` 没有任何外部 Node.js 依赖、也没有会导致生成站点时的性能问题 [language filter](https://github.com/willin/hexo-wordcount/issues/7)。
我们推荐通过如下步骤从 v5 升级到 v7:
1. 并不修改原有的 `next` 目录,而只是复制部分 NexT 文件:
1. `_config.yml` 或 `next.yml`(如果你使用了[数据文件](DATA-FILES.md))。
2. 自定义的 CSS 配置,它们应在 `next/source/css/_custom/*` 和 `next/source/css/_variables/*` 中。
3. 自定义的排布配置,它们应在 `next/layout/_custom/*` 中。
4. 任何其它可能的附加自定义内容;为了定位它们,你可以通过某些工具在仓库间比较。
2. 克隆新的仓库到任一异于 `next` 的目录(如 `next-reloaded`):
```sh
$ git clone https://github.com/theme-next/hexo-theme-next themes/next-reloaded
```
如此,你可以在不修改原有的 NexT v5.1.x 目录的同时使用 `next-reloaded` 目录中的新版本主题。
3. 在 Hexo 的主配置文件中设置主题:
```yml
...
theme: next-reloaded
...
```
如此,你的 `next-reloaded` 主题将在生成站点时被加载。如果你遇到了任何错误、或只是不喜欢这一新版本,你可以随时切换回旧的 v5.1.x 版本。
4. 更新语言配置
从 v6.0.3 版本起,`zh-Hans` 改名为 `zh-CN`:https://github.com/theme-next/hexo-theme-next/releases/tag/v6.0.3
升级到 v6.0.3 及以后版本的用户,需要显式修改 Hexo 主配置文件 `_config.yml` 里的 `language` 配置,否则语言显示不正确。
5. 更新 Hexo 和 Hexo 插件
如果完成了以上步骤后,执行 `hexo s` 或 `hexo g` 出现错误,这意味着可能是旧版的 Hexo 和 Hexo 插件与新版的 NexT 主题产生了冲突。我们建议将 Hexo 升级至 4.0 以上的版本,将 Hexo 插件升级到最新版本。你可以执行 `npm outdated` 查看所有可以升级的插件。
关于第三方库的启用,参见[这里](https://github.com/theme-next/hexo-theme-next/blob/master/docs/zh-CN/INSTALLATION.md#插件)。
================================================
FILE: gulpfile.js
================================================
const fs = require('fs');
const path = require('path');
const gulp = require('gulp');
const eslint = require('gulp-eslint');
const shell = require('gulp-shell');
const yaml = require('js-yaml');
gulp.task('lint', () => gulp.src([
'./source/js/**/*.js',
'./scripts/**/*.js'
]).pipe(eslint())
.pipe(eslint.format()));
gulp.task('lint:stylus', shell.task([
'npx stylint ./source/css/'
]));
gulp.task('validate:config', cb => {
const themeConfig = fs.readFileSync(path.join(__dirname, '_config.yml'));
try {
yaml.safeLoad(themeConfig);
return cb();
} catch (error) {
return cb(new Error(error));
}
});
gulp.task('validate:languages', cb => {
const languagesPath = path.join(__dirname, 'languages');
const languages = fs.readdirSync(languagesPath);
const errors = [];
languages.forEach(lang => {
const languagePath = path.join(languagesPath, lang);
try {
yaml.safeLoad(fs.readFileSync(languagePath), {
filename: path.relative(__dirname, languagePath)
});
} catch (error) {
errors.push(error);
}
});
return errors.length === 0 ? cb() : cb(errors);
});
gulp.task('default', gulp.series('lint', 'validate:config', 'validate:languages'));
================================================
FILE: languages/ar.yml
================================================
---
name: عربي
title:
archive: الأرشيف
category: تصنيف
tag: وسم
schedule: التقويم
menu:
home: Home
archives: الأرشيفات
categories: التصنيفات
tags: الوسوم
about: معلومات
search: بحث
schedule: التقويم
sitemap: خريطة الموقع
commonweal: Commonweal 404
sidebar:
overview: عام
toc: المحتويات
post:
posted: نُشر في
edited: عُدل في
created: أُنشأ
modified: عُدل
edit: تحرير هذا المقال
in: في
read_more: تابع القراءة
untitled: بدون عنوان
sticky: مثبت
views: مشاهدات
related_posts: مقالات مشابهة
copyright:
author: مؤلف المقال
link: رابط المقال
license_title: حقوق الملكية
license_content: "حميع المقالات في هذه المدوّنة منشورة تحت رخصة %s إلا عند التنويه بخلافه."
footer:
powered: "تطبيق الموقع %s"
total_views: إجمالي المشاهدات
total_visitors: إجمالي الزوار
counter:
tag_cloud:
zero: لا وسوم
one: وسمٌ واحدٌ
other: "%d وسماً بالمُجمل"
categories:
zero: لا تصنيفات
one: تصنيفٌ واحد
other: "%d تصنيفات بالمُجمل"
archive_posts:
zero: لا مقالات.
one: مقالٌ واحد.
other: "%d مقالاً بالمُجمل."
state:
posts: المقالات
tags: الوسوم
categories: التصنيفات
search:
placeholder: بحث...
cheers:
um: هِم..
ok: حسناً
nice: جميل
good: جيد
great: عظيم
excellent: ممتاز
keep_on: واصل الكتابة.
symbol:
comma: "، "
period: ". "
colon: ": "
reward:
donate: تبرّع
wechatpay: WeChat Pay
alipay: Alipay
paypal: PayPal
bitcoin: Bitcoin
follow_me:
welcome: مرحباً بك حيثُ أنشر أيضاً
accessibility:
nav_toggle: تشغيل شريط التصفح
prev_page: الصفحة السابقة
next_page: الصفحة التالية
symbols_count_time:
count: عدد الحروف في المقال
count_total: مُجمل عدد الحروف
time: زمن القراءة
time_total: مُجمل زمن القراءة
time_minutes: دقائق.
================================================
FILE: languages/de.yml
================================================
---
name: Deutsch
title:
archive: Archiv
category: Kategorie
tag: Schlagwort
schedule: Zeitplan
menu:
home: Startseite
archives: Archiv
categories: Kategorien
tags: Schlagwörter
about: Über
search: Suche
schedule: Zeitplan
sitemap: Sitemap
commonweal: Commonweal 404
sidebar:
overview: Übersicht
toc: Inhaltsverzeichnis
post:
posted: Veröffentlicht am
edited: Bearbeitet am
created: Erstellt
modified: Geändert am
edit: Diesen Beitrag bearbeiten
in: in
read_more: Weiterlesen
untitled: Unbenannt
sticky: Angepinnt
views: Aufrufe
related_posts: Ähnliche Beiträge
copyright:
author: Beitragsautor
link: Beitragslink
license_title: Urheberrechtshinweis
license_content: "Alle Artikel in diesem Blog sind unter %s lizenziert, außer es wird anders angegeben."
footer:
powered: "Erstellt mit %s"
total_views: Alle Aufrufe
total_visitors: Alle Besucher
counter:
tag_cloud:
zero: Keine Schlagworte
one: Insgesamt ein Schlagwort
other: "Insgesamt %d Schlagwörter"
categories:
zero: Keine Kategorien
one: Insgesamt eine Kategorie
other: "Insgesamt %d Kategorien"
archive_posts:
zero: Keine Artikel vorhanden.
one: Ein Artikel.
other: "Insgesamt %d Artikel."
state:
posts: Artikel
tags: schlagwörter
categories: Kategorien
search:
placeholder: Suche...
cheers:
um: Öhm..
ok: OK
nice: Schön
good: Gut
great: Wunderbar
excellent: Exzellent
keep_on: Bleib dran.
symbol:
comma: ". "
period: ", "
colon: ": "
reward:
donate: Spenden
wechatpay: WeChat Bezahlung
alipay: Alipay
paypal: PayPal
bitcoin: Bitcoin
follow_me:
welcome: Welcome to my other publishing channels
accessibility:
nav_toggle: Navigationsleiste an/ausschalten
prev_page: Vorherige Seite
next_page: Nächste Seite
symbols_count_time:
count: Symbole im Artikel gezählt
count_total: Insgesamt gezählte Symbole
time: Lesezeit
time_total: Insgesamte Lesezeit
time_minutes: minuten.
================================================
FILE: languages/en.yml
================================================
name: English
title:
archive: Archive
category: Category
tag: Tag
schedule: Schedule
menu:
home: Home
archives: Archives
categories: Categories
tags: Tags
about: About
search: Search
schedule: Schedule
sitemap: Sitemap
commonweal: Commonweal 404
sidebar:
overview: Overview
toc: Table of Contents
post:
posted: Posted on
edited: Edited on
created: Created
modified: Modified
edit: Edit this post
in: In
read_more: Read more
untitled: Untitled
sticky: Sticky
views: Views
related_posts: Related Posts
copyright:
author: Post author
link: Post link
license_title: Copyright Notice
license_content: "All articles in this blog are licensed under %s unless stating additionally."
footer:
powered: "Powered by %s"
total_views: Total Views
total_visitors: Total Visitors
counter:
tag_cloud:
zero: No tags
one: 1 tag in total
other: "%d tags in total"
categories:
zero: No categories
one: 1 category in total
other: "%d categories in total"
archive_posts:
zero: No posts.
one: 1 post.
other: "%d posts in total."
state:
posts: posts
tags: tags
categories: categories
search:
placeholder: Searching...
cheers:
um: Um..
ok: OK
nice: Nice
good: Good
great: Great
excellent: Excellent
keep_on: Keep on posting.
symbol:
comma: ", "
period: ". "
colon: ": "
reward:
donate: Donate
wechatpay: WeChat Pay
alipay: Alipay
paypal: PayPal
bitcoin: Bitcoin
follow_me:
welcome: Welcome to my other publishing channels
accessibility:
nav_toggle: Toggle navigation bar
prev_page: Previous page
next_page: Next page
symbols_count_time:
count: Symbols count in article
count_total: Symbols count total
time: Reading time
time_total: Reading time total
time_minutes: mins.
================================================
FILE: languages/es.yml
================================================
---
name: Español
title:
archive: Archivo
category: Categoría
tag: Etiqueta
schedule: Calendario
menu:
home: Inicio
archives: Archivo
categories: Categorías
tags: Etiquetas
about: Sobre mi
search: Buscar
schedule: Calendario
sitemap: Mapa del sitio
commonweal: Commonweal 404
sidebar:
overview: Inicio
toc: Tabla de contenidos
post:
posted: Publicado el
edited: Editado el
created: Creado por
modified: Modificado por
edit: Editar esta entrada
in: En
read_more: Leer más
untitled: Sin título
sticky: Sticky
views: Visitas
related_posts: Entradas relacionadas
copyright:
author: Autor de la entrada
link: Enlace a la entrada
license_title: Copyright
license_content: "Todos los artículos de este blog están licenciados bajo %s a no ser que se especifique una licencia adicional."
footer:
powered: "Creado mediante %s"
total_views: Visitas totales
total_visitors: Visitantes totales
counter:
tag_cloud:
zero: Sin etiquetas
one: 1 etiqueta en total
other: "%d etiquetas en total"
categories:
zero: Sin categorías
one: 1 categoría en total
other: "%d categorías en total"
archive_posts:
zero: Sin entradas.
one: 1 entrada.
other: "%d entradas en total."
state:
posts: entradas
tags: tags
categories: categorías
search:
placeholder: Buscando...
cheers:
um: Um..
ok: Bueno
nice: Guai
good: Bien
great: Genial
excellent: Excelente
keep_on: Sigue posteando.
symbol:
comma: ", "
period: ". "
colon: ": "
reward:
donate: Donar
wechatpay: WeChat Pay
alipay: Alipay
paypal: PayPal
bitcoin: Bitcoin
follow_me:
welcome: Welcome to my other publishing channels
accessibility:
nav_toggle: Cambiar a barra de navegación
prev_page: Página anterior
next_page: Página siguiente
symbols_count_time:
count: Cantidad de caracteres en el articulo
count_total: Cantidad total de caracteres
time: Tiempo de lectura
time_total: Tiempo total de lectura
time_minutes: minutos.
================================================
FILE: languages/fa.yml
================================================
---
name: فارسی
title:
archive: بایگانی
category: دسته بندی
tag: برچسب
schedule: زمان بندی
menu:
home: صفحه اصلی
archives: بایگانی
categories: دسته بندی ها
tags: برچسب ها
about: درباره
search: جستجو
schedule: زمان بندی
sitemap: نقشه سایت
commonweal: Commonweal 404
sidebar:
overview: نمای کلی
toc: فهرست مطالب
post:
posted: نوشته شده در
edited: ویرایش شده در
created: ایجاد شده
modified: تغییر یافته
edit: ویرایش این پست
in: در
read_more: ادامه مطلب
untitled: بدون عنوان
sticky: چسبنده
views: بازدیدها
related_posts: پست های مرتبط
copyright:
author: نویسنده پست
link: لینک پست
license_title: مقررات کپی رایت
license_content: "همه مقالات در این وبلاگ تحت %s مجاز می باشند مگر اینکه به طور اضافی بیان شوند."
footer:
powered: "قدرت گرفته از %s"
total_views: مجموع بازدیدها
total_visitors: تعداد بازدید کنندگان
counter:
tag_cloud:
zero: بدون برچسب
one: 1 برچسب در مجموع
other: "%d برچسب در مجموع"
categories:
zero: بدون دسته بندی
one: 1 دسته بندی در مجموع
other: "%d دسته بندی در مجموع"
archive_posts:
zero: بدون پست.
one: 1 پست.
other: "%d برچسب در مجموع."
state:
posts: پست ها
tags: برجسب ها
categories: دسته بندی ها
search:
placeholder: جستجو...
cheers:
um: ام...
ok: باشه
nice: زیبا
good: خوب
great: عالی
excellent: بسیار عالی
keep_on: به پست دادن ادامه دهید.
symbol:
comma: ", "
period: ". "
colon: ": "
reward:
donate: کمک مالی
wechatpay: پرداخت WeChat
alipay: AliPay
paypal: PayPal
bitcoin: بیت کوین
follow_me:
welcome: Welcome to my other publishing channels
accessibility:
nav_toggle: تغییر ناوبری
prev_page: صفحه قبلی
next_page: صفحه بعدی
symbols_count_time:
count: تعداد نمادها در مقاله
count_total: تعداد کل نمادها
time: زمان خواندن
time_total: کل زمان خواندن
time_minutes: دقیقه.
================================================
FILE: languages/fr.yml
================================================
---
name: Français
title:
archive: Archive
category: Catégorie
tag: Mots clés
schedule: Plannifier
menu:
home: Accueil
archives: Archives
categories: Catégories
tags: Mots clés
about: À propos
search: Recherche
schedule: Plannifier
sitemap: Sitemap
commonweal: Commonweal 404
sidebar:
overview: Aperçu
toc: Table Des Matières
post:
posted: Posté le
edited: Édité le
created: Article créé le
modified: Mis à jour le
edit: Éditer cet article
in: dans
read_more: Lire la suite
untitled: Sans titre
sticky: Épingler
views: Vues
related_posts: Articles similaires
copyright:
author: Auteur de l'article
link: Lien de l'article
license_title: Droit d'auteur
license_content: "Tous les articles de ce blog sont sous licence %s, sauf mention contraire."
footer:
powered: "Propulsé par %s"
total_views: Vues totales
total_visitors: Total visiteurs
counter:
tag_cloud:
zero: Aucun tag
one: 1 tag au total
other: "%d tags au total"
categories:
zero: Aucune categorie
one: 1 catégorie au total
other: "%d catégories au total"
archive_posts:
zero: Aucun article.
one: 1 article.
other: "%d articles au total."
state:
posts: articles
tags: mots clé
categories: catégories
search:
placeholder: Recherche...
cheers:
um: Um..
ok: OK
nice: Jolie
good: Bien
great: Super
excellent: Excellent
keep_on: Continue comme ça.
symbol:
comma: ", "
period: ". "
colon: ": "
reward:
donate: Donner
wechatpay: WeChat Pay
alipay: Alipay
paypal: PayPal
bitcoin: Bitcoin
follow_me:
welcome: Welcome to my other publishing channels
accessibility:
nav_toggle: Basculer la barre de navigation
prev_page: Page précédente
next_page: Page suivante
symbols_count_time:
count: Caractères dans l'article
count_total: Caractères total
time: Temps de lecture
time_total: Temps total de lecture
time_minutes: mins.
================================================
FILE: languages/hu.yml
================================================
---
name: magyar
title:
archive: Archive
category: Category
tag: Tag
schedule: Ütemterv
menu:
home: Home
archives: Archives
categories: Categories
tags: Tags
about: About
search: Search
schedule: Schedule
sitemap: Sitemap
commonweal: Commonweal 404
sidebar:
overview: Overview
toc: Table of Contents
post:
posted: Posted on
edited: Edited on
created: Created
modified: Modified
edit: Edit this post
in: In
read_more: Read more
untitled: Untitled
sticky: Sticky
views: Views
related_posts: Related Posts
copyright:
author: Post author
link: Post link
license_title: Copyright Notice
license_content: "All articles in this blog are licensed under %s unless stating additionally."
footer:
powered: "Powered by %s"
total_views: Total Views
total_visitors: Total Visitors
counter:
tag_cloud:
zero: No tags
one: 1 tag in total
other: "%d tags in total"
categories:
zero: No categories
one: 1 category in total
other: "%d categories in total"
archive_posts:
zero: No posts.
one: 1 post.
other: "%d posts in total."
state:
posts: posts
tags: tags
categories: categories
search:
placeholder: Searching...
cheers:
um: Um..
ok: OK
nice: Nice
good: Good
great: Great
excellent: Excellent
keep_on: Keep on posting.
symbol:
comma: ", "
period: ". "
colon: ": "
reward:
donate: Donate
wechatpay: WeChat Pay
alipay: Alipay
paypal: PayPal
bitcoin: Bitcoin
follow_me:
welcome: Welcome to my other publishing channels
accessibility:
nav_toggle: Toggle navigation bar
prev_page: Previous page
next_page: Next page
symbols_count_time:
count: Symbols count in article
count_total: Symbols count total
time: Reading time
time_total: Reading time total
time_minutes: mins.
================================================
FILE: languages/id.yml
================================================
---
name: Bahasa Indonesia
title:
archive: Arsip
category: Kategori
tag: Tag
schedule: Schedule
menu:
home: Beranda
archives: Arsip
categories: Kategori
tags: Tags
about: Tentang
search: Pencarian
schedule: Schedule
sitemap: Sitemap
commonweal: Commonweal 404
sidebar:
overview: Ikhtisar
toc: Daftar Isi
post:
posted: Diposting di
edited: Edited on
created: Post created
modified: Updated at
edit: Edit this post
in: Di
read_more: Baca lebih
untitled: Tidak ada title
sticky: Sticky
views: Views
related_posts: Related Posts
copyright:
author: Post author
link: Post link
license_title: Copyright Notice
license_content: "All articles in this blog are licensed under %s unless stating additionally."
footer:
powered: "Powered by %s"
total_views: Total Views
total_visitors: Total Visitors
counter:
tag_cloud:
zero: Tidak ada tags
one: 1 total tag
other: "%d total tags"
categories:
zero: Tidak ada kategori
one: 1 total categori
other: "%d total kategori"
archive_posts:
zero: Tidak ada posting.
one: 1 posting.
other: "%d total posting."
state:
posts: posting
tags: tags
categories: kategori
search:
placeholder: Searching...
cheers:
um: Um..
ok: OK
nice: Bagus
good: Bagus
great: Besar
excellent: Baik
keep_on: Terus Posting.
symbol:
comma: ", "
period: ". "
colon: ": "
reward:
donate: Donate
wechatpay: WeChat Pay
alipay: Alipay
paypal: PayPal
bitcoin: Bitcoin
follow_me:
welcome: Welcome to my other publishing channels
accessibility:
nav_toggle: Toggle navigation bar
prev_page: Halaman sebelumnya
next_page: Halaman selanjutnya
symbols_count_time:
count: Symbols count in article
count_total: Symbols count total
time: Reading time
time_total: Reading time total
time_minutes: mins.
================================================
FILE: languages/it.yml
================================================
---
name: Italiano
title:
archive: Archivio
category: Categoria
tag: Tag
schedule: Programma
menu:
home: Home
archives: Archivi
categories: Categorie
tags: Tags
about: Informazioni su
search: Cerca
schedule: Programma
sitemap: Sitemap
commonweal: Commonweal 404
sidebar:
overview: Panoramica
toc: Indice
post:
posted: Scritto il
edited: Edited on
created: Post creato
modified: Post modificato
edit: Edit this post
in: In
read_more: Leggi di più
untitled: Senza titolo
sticky: Sticky
views: Views
related_posts: Related Posts
copyright:
author: Autore
link: Link
license_title: Copyright
license_content: "Tutti gli articoli in questo sito sono sotto licenza %s salvo disposizione contraria."
footer:
powered: "Powered by %s"
total_views: Total Views
total_visitors: Total Visitors
counter:
tag_cloud:
zero: Nessun tag
one: 1 tag in totale
other: "%d tags in totale."
categories:
zero: Nessuna categoria
one: 1 categoria in totale
other: "%d categorie in totale."
archive_posts:
zero: Nessun post.
one: 1 post.
other: "%d posts in totale."
state:
posts: posts
tags: tags
categories: categorie
search:
placeholder: Cerca...
cheers:
um: Mh..
ok: OK
nice: Bello
good: Buono
great: Ottimo
excellent: Eccellente
keep_on: Continua così.
symbol:
comma: ", "
period: ". "
colon: ": "
reward:
donate: Dona
wechatpay: WeChat Pay
alipay: Alipay
paypal: PayPal
bitcoin: Bitcoin
follow_me:
welcome: Welcome to my other publishing channels
accessibility:
nav_toggle: Toggle navigation bar
prev_page: Pagina precedente
next_page: Pagina successiva
symbols_count_time:
count: Symbols count in article
count_total: Symbols count total
time: Reading time
time_total: Reading time total
time_minutes: mins.
================================================
FILE: languages/ja.yml
================================================
---
name: 日本語
title:
archive: アーカイブ
category: カテゴリ
tag: タグ
schedule: スケジュール
menu:
home: ホーム
archives: アーカイブ
categories: カテゴリ
tags: タグ
about: プロフィール
search: 検索
schedule: スケジュール
sitemap: サイトマップ
commonweal: 公益 404
sidebar:
overview: 概要
toc: 見出し
post:
posted: 投稿日
edited: 編集日
created: 作成日
modified: 修正日
edit: この記事を編集する
in: カテゴリ
read_more: 続きを読む
untitled: 無題
sticky: 固定
views: 閲覧数
related_posts: 関連記事
copyright:
author: 著者
link: 記事へのリンク
license_title: 著作権表示
license_content: "このブログ内のすべての記事は、特別な記載がない限り %s の下のライセンスで保護されています。"
footer:
powered: "Powered by %s"
total_views: 閲覧合計数
total_visitors: 合計閲覧者数
counter:
tag_cloud:
zero: タグなし
one: 全 1 タグ
other: "全 %d タグ"
categories:
zero: カテゴリなし
one: 全 1 カテゴリ
other: "全 %d カテゴリ"
archive_posts:
zero: ポストなし
one: 全 1 ポスト
other: "全 %d ポスト"
state:
posts: ポスト
tags: タグ
categories: カテゴリ
search:
placeholder: 検索…
cheers:
um: うーん
ok: はい
nice: まあまあ
good: いいね
great: すごい
excellent: 最高
keep_on: もっと書こう!
symbol:
comma: "、"
period: "。"
colon: ":"
reward:
donate: 寄付
wechatpay: WeChat 支払う
alipay: Alipay
paypal: PayPal
bitcoin: ビットコイン
follow_me:
welcome: Welcome to my other publishing channels
accessibility:
nav_toggle: ナビゲーションバーの切り替え
prev_page: 前のページ
next_page: 次のページ
symbols_count_time:
count: 単語数
count_total: 単語の総数
time: 読書の時間
time_total: 読書の合計時間
time_minutes: 分
================================================
FILE: languages/ko.yml
================================================
---
name: 한국어
title:
archive: 아카이브
category: 카테고리
tag: 태그
schedule: Schedule
menu:
home: 홈
archives: 아카이브
categories: 카테고리
tags: 태그
about: About
search: 검색
schedule: Schedule
sitemap: Sitemap
commonweal: Commonweal 404
sidebar:
overview: 흝어보기
toc: 목차
post:
posted: 작성일
edited: Edited on
created: Post created
modified: Updated at
edit: Edit this post
in: In
read_more: 더 읽어보기
untitled: 제목 없음
sticky: 고정
views: Views
related_posts: Related Posts
copyright:
author: Post author
link: Post link
license_title: Copyright Notice
license_content: "All articles in this blog are licensed under %s unless stating additionally."
footer:
powered: "Powered by %s"
total_views: Total Views
total_visitors: Total Visitors
counter:
tag_cloud:
zero: 태그 없음
one: 1개의 태그
other: "총 %d개의 태그"
categories:
zero: 카테고리 없음
one: 1개의 카테고리
other: "총 %d개의 카테고리"
archive_posts:
zero: 포스트 없음
one: 1개의 포스트
other: "총 %d개의 포스트"
state:
posts: 포스트
tags: 태그
categories: 카테고리
search:
placeholder: Searching...
cheers:
um: 음..
ok: OK
nice: 잘했어요
good: 좋아요
great: 훌륭해요
excellent: 완벽해요
keep_on: 포스트를 마저 작성하세요
symbol:
comma: ", "
period: ". "
colon: ": "
reward:
donate: Donate
wechatpay: WeChat Pay
alipay: Alipay
paypal: PayPal
bitcoin: Bitcoin
follow_me:
welcome: Welcome to my other publishing channels
accessibility:
nav_toggle: Toggle navigation bar
prev_page: 이전 페이지
next_page: 다음 페이지
symbols_count_time:
count: Symbols count in article
count_total: Symbols count total
time: Reading time
time_total: Reading time total
time_minutes: mins.
================================================
FILE: languages/nl.yml
================================================
---
name: Niederländisch
title:
archive: Archief
category: Categorie
tag: Label
schedule: Rooster
menu:
home: Home
archives: Archieven
categories: Categorieën
tags: Labels
about: Over
search: Zoeken
schedule: Rooster
sitemap: Sitemap
commonweal: Gezond verstand 404
sidebar:
overview: Overzicht
toc: Inhoudsopgave
post:
posted: Geplaatst op
edited: Edited on
created: Post aangemaakt
modified: Post aangepast
edit: Edit this post
in: In
read_more: Lees meer
untitled: Naamloos
sticky: Sticky
views: Views
related_posts: Related Posts
copyright:
author: Post auteur
link: Post link
license_title: Copyright melding
license_content: "Alle artikelen op deze blog zijn gelicenseerd onder %s, mits niet anders aangegeven."
footer:
powered: "Mede mogelijk gemaakt door %s"
total_views: Total Views
total_visitors: Total Visitors
counter:
tag_cloud:
zero: Geen labels
one: 1 label in totaal
other: "%d labels in totaal"
categories:
zero: Geen categorieën
one: 1 categorie in totaal
other: "%d categorieën in totaal"
archive_posts:
zero: Geen posts.
one: 1 post.
other: "%d posts in totaal."
state:
posts: posts
tags: labels
categories: categorieën
search:
placeholder: Zoeken...
cheers:
um: Um..
ok: Oké
nice: Leuk
good: Goed
great: Geweldig
excellent: Uitstekend
keep_on: Blijf posten.
symbol:
comma: ", "
period: ". "
colon: ": "
reward:
donate: Doneer
wechatpay: WeChat Pay
alipay: Alipay
paypal: PayPal
bitcoin: Bitcoin
follow_me:
welcome: Welcome to my other publishing channels
accessibility:
nav_toggle: Toggle navigation bar
prev_page: Vorige pagina
next_page: Volgende pagina
symbols_count_time:
count: Symbols count in article
count_total: Symbols count total
time: Reading time
time_total: Reading time total
time_minutes: mins.
================================================
FILE: languages/pt-BR.yml
================================================
---
name: Português
title:
archive: Arquivo
category: Categoria
tag: Tag
schedule: Schedule
menu:
home: Home
archives: Arquivos
categories: Categorias
tags: Tags
about: Sobre
search: Pesquisar
schedule: Schedule
sitemap: Sitemap
commonweal: Commonweal 404
sidebar:
overview: Visão geral
toc: Tabela de conteúdo
post:
posted: Postado em
edited: Edited on
created: Post created
modified: Updated at
edit: Edit this post
in: Em
read_more: Leia mais
untitled: Sem título
sticky: Sticky
views: Views
related_posts: Related Posts
copyright:
author: Post author
link: Post link
license_title: Copyright Notice
license_content: "All articles in this blog are licensed under %s unless stating additionally."
footer:
powered: "Feito com %s"
total_views: Total Views
total_visitors: Total Visitors
counter:
tag_cloud:
zero: Sem tags
one: 1 tag no total de
other: "%d tags no total de"
categories:
zero: Sem categoria
one: 1 categoria no total de
other: "%d categoria no total de"
archive_posts:
zero: Sem posts.
one: 1 post.
other: "%d posts no total."
state:
posts: Posts
tags: Tags
categories: Categorias
search:
placeholder: Searching...
cheers:
um: Uhmmmm...
ok: OK
nice: Bom
good: Muito Bom
great: Ótimo
excellent: Excelente
keep_on: Continuar no post.
symbol:
comma: ", "
period: ". "
colon: ": "
reward:
donate: Donate
wechatpay: WeChat Pay
alipay: Alipay
paypal: PayPal
bitcoin: Bitcoin
follow_me:
welcome: Welcome to my other publishing channels
accessibility:
nav_toggle: Toggle navigation bar
prev_page: Página anterior
next_page: Próxima página
symbols_count_time:
count: Symbols count in article
count_total: Symbols count total
time: Reading time
time_total: Reading time total
time_minutes: mins.
================================================
FILE: languages/pt.yml
================================================
---
name: Português
title:
archive: Arquivo
category: Categoria
tag: Tag
schedule: Schedule
menu:
home: Home
archives: Arquivos
categories: Categorias
tags: Tags
about: Sobre
search: Pesquisa
schedule: Schedule
sitemap: Sitemap
commonweal: Commonweal 404
sidebar:
overview: Visão Geral
toc: Tabela de Conteúdo
post:
posted: Postado em
edited: Edited on
created: Post created
modified: Updated at
edit: Edit this post
in: Em
read_more: Ler mais
untitled: Sem título
sticky: Sticky
views: Views
related_posts: Related Posts
copyright:
author: Post author
link: Post link
license_title: Copyright Notice
license_content: "All articles in this blog are licensed under %s unless stating additionally."
footer:
powered: "Desenvolvido com amor com %s"
total_views: Total Views
total_visitors: Total Visitors
counter:
tag_cloud:
zero: Sem tags
one: 1 tag no total
other: "%d tags no total"
categories:
zero: Sem categorias
one: 1 categoria no total
other: "%d categorias no total"
archive_posts:
zero: Sem publicações.
one: 1 post.
other: "%d publicações no total."
state:
posts: publicações
tags: tags
categories: categorias
search:
placeholder: Searching...
cheers:
um: Um..
ok: OK
nice: Legal
good: Bom
great: Grandioso
excellent: Excelente
keep_on: Mantenha-se publicando!
symbol:
comma: ", "
period: ". "
colon: ": "
reward:
donate: Donate
wechatpay: WeChat Pay
alipay: Alipay
paypal: PayPal
bitcoin: Bitcoin
follow_me:
welcome: Welcome to my other publishing channels
accessibility:
nav_toggle: Toggle navigation bar
prev_page: Página anterior
next_page: Página seguinte
symbols_count_time:
count: Symbols count in article
count_total: Symbols count total
time: Reading time
time_total: Reading time total
time_minutes: mins.
================================================
FILE: languages/ru.yml
================================================
---
name: Русский
title:
archive: Архив
category: Категория
tag: Тэг
schedule: Календарь
menu:
home: Главная
archives: Архив
categories: Категории
tags: Тэги
about: О сайте
search: Поиск
schedule: Календарь
sitemap: Карта сайта
commonweal: Страница 404
sidebar:
overview: Обзор
toc: Содержание
post:
posted: Размещено
edited: Изменено
created: Создано
modified: Изменено
edit: Редактировать запись
in: в категории
read_more: Читать полностью
untitled: Без имени
sticky: Ссылка
views: Просмотров
related_posts: Похожие записи
copyright:
author: Автор записи
link: Ссылка на запись
license_title: Информация об авторских правах
license_content: "Все записи на этом сайте защищены лицензией %s, если не указано дополнительно."
footer:
powered: "Генератор — %s"
total_views: Всего просмотров
total_visitors: Всего посетителей
counter:
tag_cloud:
zero: Нет тэгов.
one: 1 тэг.
other: "%d тэгов всего."
categories:
zero: Нет категорий.
one: 1 категория.
other: "%d категорий всего."
archive_posts:
zero: Нет записей.
one: 1 запись.
other: "%d записей всего."
state:
posts: Архив
tags: Тэги
categories: Категории
search:
placeholder: Поиск...
cheers:
um: Эм..
ok: OK
nice: Неплохо
good: Хорошо
great: Замечательно
excellent: Великолепно
keep_on: Продолжаю писать.
symbol:
comma: ", "
period: ". "
colon: ": "
reward:
donate: Донат
wechatpay: WeChat Pay
alipay: Alipay
paypal: PayPal
bitcoin: Bitcoin
follow_me:
welcome: Добро пожаловать на другие мои издательские каналы
accessibility:
nav_toggle: Показать/скрыть меню
prev_page: Предыдущая страница
next_page: Следующая страница
symbols_count_time:
count: Кол-во символов в статье
count_total: Общее кол-во символов
time: Время чтения
time_total: Общее время чтения
time_minutes: мин.
================================================
FILE: languages/tr.yml
================================================
---
name: Türk
title:
archive: Arşiv
category: Kategori
tag: Etiket
schedule: Program
menu:
home: Ana Sayfa
archives: Arşivler
categories: Kategoriler
tags: Etiketler
about: Hakkımda
search: Ara
schedule: Program
sitemap: Site Haritası
commonweal: Hata 404
sidebar:
overview: Genel Bakış
toc: İçindekiler
post:
posted: Yayınlandı
edited: Düzenlendi
created: Oluşturuldu
modified: Değiştirildi
edit: Bu gönderiyi düzenle
in: İçinde
read_more: Daha fazla oku
untitled: Başlıksız
sticky: Sabit
views: Görünümler
related_posts: İlgili Gönderiler
copyright:
author: Gönderiyi yazan
link: Gönderi bağlantısı
license_title: Telif Hakkı Bildirimi
license_content: "Bu blogdaki tüm makaleler aksi belirtilmediği sürece %s altında lisanslıdır."
footer:
powered: "%s tarafından desteklenmektedir"
total_views: Toplam görüntülenme
total_visitors: Toplam Ziyaretçi
counter:
tag_cloud:
zero: Etiket yok
one: Toplam 1 etiket
other: "Toplamda %d etiket"
categories:
zero: Kategori yok
one: Toplamda 1 kategori
other: "Toplamda %d kategori"
archive_posts:
zero: Gönderi yok.
one: 1 gönderi.
other: "Toplamda %d gönderi."
state:
posts: gönderiler
tags: etiketler
categories: kategoriler
search:
placeholder: Aranıyor...
cheers:
um: Um..
ok: Tamam
nice: Güzel
good: İyi
great: Müthiş
excellent: Mükemmel
keep_on: Gönderiye devam.
symbol:
comma: ", "
period: ". "
colon: ": "
reward:
donate: Bağış
wechatpay: WeChat Pay
alipay: Alipay
paypal: PayPal
bitcoin: Bitcoin
follow_me:
welcome: Welcome to my other publishing channels
accessibility:
nav_toggle: Gezinti çubuğunu değiştir
prev_page: Önceki sayfa
next_page: Sonraki sayfa
symbols_count_time:
count: Makalede sayılan semboller
count_total: Sayılan toplam semboller
time: Okuma Süresi
time_total: Toplamda Okuma Süresi
time_minutes: dk.
================================================
FILE: languages/uk.yml
================================================
---
name: Український
title:
archive: Архів
category: Категорія
tag: Тег
schedule: Календар
menu:
home: Головна
archives: Архів
categories: Категорії
tags: Теги
about: Про сайт
search: Пошук
schedule: Календар
sitemap: Карта сайту
commonweal: Сторінка 404
sidebar:
overview: Огляд
toc: Зміст
post:
posted: Опубліковано
edited: Змінено
created: Створено
modified: Змінено
edit: Редагувати запис
in: в категорії
read_more: Читати повністю
untitled: Без імені
sticky: Посилання
views: Переглядів
related_posts: Схожі записи
copyright:
author: Автор запису
link: Посилання на запис
license_title: Інформація про авторські права
license_content: "Всі записи на цьому сайті захищені ліцензією %s, якщо не вказано додатково."
footer:
powered: "Генератор — %s"
total_views: Всього переглядів
total_visitors: Всього відвідувачів
counter:
tag_cloud:
zero: Немає тегів.
one: 1 тег.
other: "%d тегів всього."
categories:
zero: Немає категорій.
one: 1 категорія.
other: "%d категорій всього."
archive_posts:
zero: Немає записів.
one: 1 запис.
other: "%d записів всього."
state:
posts: Архів
tags: Теги
categories: Категорії
search:
placeholder: Пошук...
cheers:
um: Ем..
ok: ОК
nice: Не погано
good: Добре
great: Чудово
excellent: Прекрасно
keep_on: Продовжую писати.
symbol:
comma: ", "
period: ". "
colon: ": "
reward:
donate: Донат
wechatpay: WeChat Pay
alipay: Alipay
paypal: PayPal
bitcoin: Bitcoin
follow_me:
welcome: Мої інші видавничі канали
accessibility:
nav_toggle: Показати/приховати меню
prev_page: Попередня сторінка
next_page: Наступна сторінка
symbols_count_time:
count: К-сть символів в статті
count_total: Загальна к-сть символів
time: Час читання
time_total: Загальний час читання
time_minutes: хв.
================================================
FILE: languages/vi.yml
================================================
---
name: Tiếng Việt
title:
archive: Lưu Trữ
category: Phân Loại
tag: Thẻ
schedule: Danh Mục
menu:
home: Trang Chủ
archives: Lưu Trữ
categories: Đầu Mục
tags: Thẻ
about: Giới Thiệu
search: Tìm Kiếm
schedule: Danh Mục
sitemap: Bản đồ trang
commonweal: Commonwealth Act No. 404
sidebar:
overview: Tổng Quan
toc: Mục Lục
post:
posted: Tạo lúc
edited: Chỉnh sửa vào
created: Được tạo
modified: Được thay đổi
edit: Chính sửa bài viết này
in: Trong
read_more: Đọc tiếp
untitled: Không có tiêu đề
sticky: Đính
views: Lượt xem
related_posts: Các bài viết liên quan
copyright:
author: Người viết
link: Liên kết bài viết
license_title: Chú ý bản quyền
license_content: "Tất cả bài viết trong blog này được đăng ký bởi %s trừ khi có thông báo bổ sung."
footer:
powered: "Cung cấp bởi %s"
total_views: Tổng số người xem
total_visitors: Tổng số truy cập
counter:
tag_cloud:
zero: Không có thẻ nào
one: có 1 thẻ tất cả
other: "có %d thẻ tất cả"
categories:
zero: Không có trong mục nào
one: có 1 mục tất cả
other: "có %d mục tất cả"
archive_posts:
zero: Không có bài viết.
one: 1 bài viết.
other: "tổng số %d bài viết."
state:
posts: bài viết
tags: thẻ
categories: mục
search:
placeholder: Đang tìm...
cheers:
um: Um..
ok: Đồng Ý
nice: Hay
good: Tốt
great: Tuyệt vời
excellent: Tuyệt cú mèo
keep_on: Giữ tiến độ nha.
symbol:
comma: ", "
period: ". "
colon: ": "
reward:
donate: Tài trợ
wechatpay: WeChat Pay
alipay: Alipay
paypal: Paypal
bitcoin: Bitcoin
follow_me:
welcome: Xin chào mừng đến với các kênh khác của tôi
accessibility:
nav_toggle: Thanh điều hướng chuyển đổi
prev_page: Trang trước
next_page: Trang sau
symbols_count_time:
count: Số biểu tượng trong bài viết
count_total: Tổng số biểu tượng
time: Thời lượng đọc
time_total: Tổng thời lượng đọc
time_minutes: phút.
================================================
FILE: languages/zh-CN.yml
================================================
---
name: 简体中文
title:
archive: 归档
category: 分类
tag: 标签
schedule: 日程表
menu:
home: 首页
archives: 归档
categories: 分类
tags: 标签
about: 关于
search: 搜索
schedule: 日程表
sitemap: 站点地图
commonweal: 公益 404
sidebar:
overview: 站点概览
toc: 文章目录
post:
posted: 发表于
edited: 更新于
created: 创建时间
modified: 修改时间
edit: 编辑
in: 分类于
read_more: 阅读全文
untitled: 未命名
sticky: 置顶
views: 阅读次数
related_posts: 相关文章
copyright:
author: 本文作者
link: 本文链接
license_title: 版权声明
license_content: "本博客所有文章除特别声明外,均采用 %s 许可协议。转载请注明出处!"
footer:
powered: "由 %s 强力驱动"
total_views: 总访问量
total_visitors: 总访客量
counter:
tag_cloud:
zero: 暂无标签
one: 目前共计 1 个标签
other: "目前共计 %d 个标签"
categories:
zero: 暂无分类
one: 目前共计 1 个分类
other: "目前共计 %d 个分类"
archive_posts:
zero: 暂无日志。
one: 目前共计 1 篇日志。
other: "目前共计 %d 篇日志。"
state:
posts: 日志
tags: 标签
categories: 分类
search:
placeholder: 搜索...
cheers:
um: 嗯..
ok: 还行
nice: 不错
good: 很好
great: 非常好
excellent: 太棒了
keep_on: 继续努力。
symbol:
comma: ","
period: "。"
colon: ":"
reward:
donate: 打赏
wechatpay: 微信支付
alipay: 支付宝
paypal: 贝宝
bitcoin: 比特币
follow_me:
welcome: 欢迎关注我的其它发布渠道
accessibility:
nav_toggle: 切换导航栏
prev_page: 上一页
next_page: 下一页
symbols_count_time:
count: 本文字数
count_total: 站点总字数
time: 阅读时长
time_total: 站点阅读时长
time_minutes: 分钟
================================================
FILE: languages/zh-HK.yml
================================================
---
name: 繁體中文(香港)
title:
archive: 歸檔
category: 分類
tag: 標籤
schedule: 日程表
menu:
home: 首頁
archives: 歸檔
categories: 分類
tags: 標籤
about: 關於
search: 檢索
schedule: 日程表
sitemap: 站點地圖
commonweal: 公益 404
sidebar:
overview: 本站概覽
toc: 文章目錄
post:
posted: 發表於
edited: 更新於
created: 創建時間
modified: 修改時間
edit: 編輯
in: 分類於
read_more: 閱讀全文
untitled: 未命名
sticky: 置頂
views: 閱讀次數
related_posts: 相關文章
copyright:
author: 博主
link: 文章連結
license_title: 版權聲明
license_content: "本網誌所有文章除特別聲明外,均採用 %s 許可協議。轉載請註明出處!"
footer:
powered: "由 %s 強力驅動"
total_views: 總瀏覽次數
total_visitors: 訪客總數
counter:
tag_cloud:
zero: 暫無標籤
one: 目前共有 1 個標籤
other: "目前共有 %d 個標籤"
categories:
zero: 暫無分類
one: 目前共有 1 個分類
other: "目前共有 %d 個分類"
archive_posts:
zero: 暫無文章。
one: 目前共有 1 篇文章。
other: "目前共有 %d 篇文章。"
state:
posts: 文章
tags: 標籤
categories: 分類
search:
placeholder: 搜索...
cheers:
um: 嗯..
ok: 還行
nice: 好
good: 很好
great: 非常好
excellent: 太棒了
keep_on: 繼續努力。
symbol:
comma: ","
period: "。"
colon: ":"
reward:
donate: 打賞
wechatpay: 微信支付
alipay: 支付寶
paypal: PayPal
bitcoin: 比特幣
follow_me:
welcome: 歡迎關注我的其它發布渠道
accessibility:
nav_toggle: 切換導航欄
prev_page: 上一頁
next_page: 下一頁
symbols_count_time:
count: 本文字數
count_total: 站點總字數
time: 閱讀時長
time_total: 站點閱讀時長
time_minutes: 分鍾
================================================
FILE: languages/zh-TW.yml
================================================
---
name: 繁體中文
title:
archive: 歸檔
category: 分類
tag: 標籤
schedule: 時間表
menu:
home: 首頁
archives: 歸檔
categories: 分類
tags: 標籤
about: 關於
search: 搜尋
schedule: 時間表
sitemap: 網站地圖
commonweal: 公益 404
sidebar:
overview: 本站概要
toc: 文章目錄
post:
posted: 發表於
edited: 更新於
created: 創建時間
modified: 修改時間
edit: 編輯
in: 分類於
read_more: 閱讀全文
untitled: 未命名
sticky: 置頂
views: 閱讀次數
related_posts: 相關文章
copyright:
author: 作者
link: 文章連結
license_title: 版權聲明
license_content: "本網誌所有文章除特別聲明外,均採用 %s 許可協議。轉載請註明出處!"
footer:
powered: "由 %s 強力驅動"
total_views: 總瀏覽次數
total_visitors: 訪客總數
counter:
tag_cloud:
zero: 沒有標籤
one: 目前共有 1 個標籤
other: "目前共有 %d 個標籤"
categories:
zero: 沒有分類
one: 目前共有 1 個分類
other: "目前共有 %d 個分類"
archive_posts:
zero: 沒有文章。
one: 目前共有 1 篇文章。
other: "目前共有 %d 篇文章。"
state:
posts: 文章
tags: 標籤
categories: 分類
search:
placeholder: 搜尋...
cheers:
um: 嗯..
ok: 還行
nice: 好
good: 很好
great: 非常好
excellent: 太棒了
keep_on: 繼續努力。
symbol:
comma: ","
period: "。"
colon: ":"
reward:
donate: 捐贈
wechatpay: 微信支付
alipay: 支付寶
paypal: PayPal
bitcoin: 比特幣
follow_me:
welcome: 歡迎關注我的其它發布渠道
accessibility:
nav_toggle: 切換導航欄
prev_page: 上一頁
next_page: 下一頁
symbols_count_time:
count: 文章字數
count_total: 總字數
time: 所需閱讀時間
time_total: 所需總閱讀時間
time_minutes: 分鐘
================================================
FILE: layout/_layout.swig
================================================
{{ partial('_partials/head/head.swig', {}, {cache: theme.cache.enable}) }}
{% include '_partials/head/head-unique.swig' %}
{{- next_inject('head') }}
{% block title %}{% endblock %}
{{ partial('_third-party/analytics/index.swig', {}, {cache: theme.cache.enable}) }}
{{ partial('_scripts/noscript.swig', {}, {cache: theme.cache.enable}) }}
{% include '_partials/header/index.swig' %}
{{ partial('_partials/widgets.swig', {}, {cache: theme.cache.enable}) }}
{% include '_partials/header/sub-menu.swig' %}
{% block content %}{% endblock %}
{% include '_partials/comments.swig' %}
{%- if theme.sidebar.display !== 'remove' %}
{% block sidebar %}{% endblock %}
{%- endif %}
{{ partial('_scripts/index.swig', {}, {cache: theme.cache.enable}) }}
{{ partial('_third-party/index.swig', {}, {cache: theme.cache.enable}) }}
{%- if theme.pjax %}
{%- endif %}
{% include '_third-party/math/index.swig' %}
{% include '_third-party/quicklink.swig' %}
{{- next_inject('bodyEnd') }}
{%- if theme.pjax %}
{%- endif %}
================================================
FILE: layout/_macro/post-collapse.swig
================================================
{% macro render(posts) %}
{%- set current_year = '1970' %}
{%- for post in posts.toArray() %}
{%- set year = date(post.date, 'YYYY') %}
{%- if year !== current_year %}
{%- set current_year = year %}
{{ current_year }}
{%- endif %}
{%- if post.link %}{# Link posts #}
{%- set postTitleIcon = '' %}
{%- set postText = post.title or post.link %}
{{ next_url(post.link, postText + postTitleIcon, {class: 'post-title-link post-title-link-external', itemprop: 'url'}) }}
{% else %}
{{ post.title or __('post.untitled') }}
{%- endif %}
{%- endfor %}
{% endmacro %}
================================================
FILE: layout/_macro/post.swig
================================================
{##################}
{### POST BLOCK ###}
{##################}
{%- if post.header !== false %}
<{%- if is_index %}h2{% else %}h1{%- endif %} class="post-title{%- if post.direction and post.direction.toLowerCase() === 'rtl' %} rtl{%- endif %}" itemprop="name headline">
{# Link posts #}
{%- if post.link %}
{%- if post.sticky > 0 %}
{%- endif %}
{%- set postTitleIcon = '' %}
{%- set postText = post.title or post.link %}
{{ next_url(post.link, postText + postTitleIcon, {class: 'post-title-link post-title-link-external', itemprop: 'url'}) }}
{% elif is_index %}
{%- if post.sticky > 0 %}
{%- endif %}
{{ next_url(post.path, post.title or __('post.untitled'), {class: 'post-title-link', itemprop: 'url'}) }}
{%- else %}
{{- post.title }}
{{- post_edit(post.source) }}
{%- endif %}
{%- if is_index %}h2{% else %}h1{%- endif %}>
{%- endif %}
{#################}
{### POST BODY ###}
{#################}
{# Gallery support #}
{%- if post.photos and post.photos.length %}
{%- for photo in post.photos %}
{%- endfor %}
{%- endif %}
{%- if is_index %}
{%- if post.description and theme.excerpt_description %}
{{ post.description }}
{%- if theme.read_more_btn %}
{%- endif %}
{% elif post.excerpt %}
{{ post.excerpt }}
{%- if theme.read_more_btn %}
{%- endif %}
{% else %}
{{ post.content }}
{%- endif %}
{% else %}
{{ post.content }}
{%- endif %}
{#####################}
{### END POST BODY ###}
{#####################}
{%- if theme.related_posts.enable and (theme.related_posts.display_in_home or not is_index) %}
{{ partial('_partials/post/post-related.swig') }}
{%- endif %}
{%- if not is_index %}
{{- next_inject('postBodyEnd') }}
{%- if post.reward_settings.enable %}
{{ partial('_partials/post/post-reward.swig') }}
{%- endif %}
{%- if theme.creative_commons.license and theme.creative_commons.post %}
{{ partial('_partials/post/post-copyright.swig') }}
{%- endif %}
{%- if theme.follow_me %}
{{ partial('_partials/post/post-followme.swig', {}, {cache: theme.cache.enable}) }}
{%- endif %}
{% else %}
{%- endif %}
{######################}
{### END POST BLOCK ###}
{######################}
================================================
FILE: layout/_macro/sidebar.swig
================================================
{% macro render(display_toc) %}
{% endmacro %}
================================================
FILE: layout/_partials/comments.swig
================================================
{%- if page.comments %}
{%- if theme.injects.comment.length == 1 %}
{%- set inject_item = theme.injects.comment[0] %}
{{ partial(inject_item.layout, inject_item.locals, inject_item.options) }}
{%- elif theme.injects.comment.length > 1 %}
{%- if theme.comments.style == 'buttons' %}
{%- for inject_item in theme.injects.comment %}
{{ partial(inject_item.layout, inject_item.locals, inject_item.options) }}
{%- endfor %}
{%- elif theme.comments.style == 'tabs' %}
{%- for inject_item in theme.injects.comment %}
{{ partial(inject_item.layout, inject_item.locals, inject_item.options) }}
{%- endfor %}
{%- endif %}
{%- endif %}
{%- endif %}
================================================
FILE: layout/_partials/footer.swig
================================================
{%- if theme.footer.beian.enable %}
{{- next_url('https://beian.miit.gov.cn', theme.footer.beian.icp + ' ') }}
{%- if theme.footer.beian.gongan_icon_url %}
{%- endif %}
{%- if theme.footer.beian.gongan_id and theme.footer.beian.gongan_num %}
{{- next_url('http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=' + theme.footer.beian.gongan_id, theme.footer.beian.gongan_num + ' ') }}
{%- endif %}
{%- endif %}
{% set copyright_year = date(null, 'YYYY') %}
© {% if theme.footer.since and theme.footer.since != copyright_year %}{{ theme.footer.since }} – {% endif %}
{{ copyright_year }}
{%- if config.symbols_count_time.total_symbols %}
{%- if theme.symbols_count_time.item_text_total %}
{%- endif %}
{{ symbolsCountTotal(site) }}
{%- endif %}
{%- if config.symbols_count_time.total_time %}
{%- if theme.symbols_count_time.item_text_total %}
{%- endif %}
{{ symbolsTimeTotal(site, config.symbols_count_time.awl, config.symbols_count_time.wpm, __('symbols_count_time.time_minutes')) }}
{%- endif %}
{%- if theme.footer.powered %}
{%- set next_site = 'https://theme-next.org' %}
{%- if theme.scheme !== 'Gemini' %}
{%- set next_site = 'https://' + theme.scheme | lower + '.theme-next.org' %}
{%- endif %}
{{- __('footer.powered', next_url('https://hexo.io', 'Hexo', {class: 'theme-link'}) + ' & ' + next_url(next_site, 'NexT.' + theme.scheme, {class: 'theme-link'})) }}
{%- endif %}
{%- if theme.add_this_id %}
{%- endif %}
{{- next_inject('footer') }}
================================================
FILE: layout/_partials/head/head-unique.swig
================================================
{{ open_graph() }}
{{ canonical() }}
{# Exports some front-matter variables to Front-End #}
================================================
FILE: layout/_partials/head/head.swig
================================================
{%- if theme.favicon.apple_touch_icon %}
{%- endif %}
{%- if theme.favicon.medium %}
{%- endif %}
{%- if theme.favicon.small %}
{%- endif %}
{%- if theme.favicon.safari_pinned_tab %}
{%- endif %}
{%- if theme.favicon.android_manifest %}
{%- endif %}
{%- if theme.favicon.ms_browserconfig %}
{%- endif %}
{%- if theme.disable_baidu_transformation %}
{%- endif %}
{%- if theme.google_site_verification %}
{%- endif %}
{%- if theme.bing_site_verification %}
{%- endif %}
{%- if theme.yandex_site_verification %}
{%- endif %}
{%- if theme.baidu_site_verification %}
{%- endif %}
{{ next_font() }}
{%- set font_awesome_uri = theme.vendors.fontawesome or next_vendors('font-awesome/css/all.min.css') %}
{%- if theme.fancybox %}
{%- set fancybox_css_uri = theme.vendors.fancybox_css or next_vendors('//cdn.jsdelivr.net/gh/fancyapps/fancybox@3/dist/jquery.fancybox.min.css') %}
{%- endif %}
{%- if theme.pace.enable %}
{%- set pace_css_uri = theme.vendors.pace_css or next_vendors('pace/pace-theme-' + theme.pace.theme + '.min.css') %}
{%- set pace_js_uri = theme.vendors.pace or next_vendors('pace/pace.min.js') %}
{%- endif %}
{{ next_config() }}
================================================
FILE: layout/_partials/header/brand.swig
================================================
{%- if theme.algolia_search.enable or theme.local_search.enable %}
{%- endif %}
================================================
FILE: layout/_partials/header/index.swig
================================================
{{ partial('_partials/header/brand.swig', {}, {cache: theme.cache.enable}) }}
{{ partial('_partials/header/menu.swig', {}, {cache: theme.cache.enable}) }}
{{ partial('_partials/search/index.swig', {}, {cache: theme.cache.enable}) }}
{{- next_inject('header') }}
================================================
FILE: layout/_partials/header/menu-item.swig
================================================
{% macro render(name, itemName, value) %}
{%- set itemURL = value.split('||')[0] | trim %}
{%- if not itemURL.startsWith('http') %}
{%- set itemURL = itemURL | replace('//', '/') %}
{%- endif %}
{%- set menuIcon = '' %}
{%- if theme.menu_settings.icons %}
{%- set menuIcon = '' %}
{%- endif %}
{%- set menuText = __('menu.' + name) | replace('menu.', '') %}
{%- set menuBadge = '' %}
{%- if theme.menu_settings.badges %}
{%- set badges = {
archives : site.posts.length,
categories: site.categories.length,
tags : site.tags.length
}
%}
{%- for menu, count in badges %}
{%- if name == menu %}
{%- set menuBadge = '' + count + '' %}
{%- endif %}
{%- endfor %}
{%- endif %}
{{ next_url(itemURL, menuIcon + menuText + menuBadge, {rel: 'section'}) }}
{% endmacro %}
================================================
FILE: layout/_partials/header/menu.swig
================================================
{% import 'menu-item.swig' as menu_item with context %}
================================================
FILE: layout/_partials/header/sub-menu.swig
================================================
{% import '_partials/header/menu-item.swig' as menu_item with context %}
{%- if theme.menu and is_page() %}
{# Submenu & Submenu-2 #}
{%- for name, value in theme.menu %}
{%- set respath = value %}
{%- if value == '[object Object]' %}
{# If current URL is value of parent submenu 'default' path #}
{%- set currentParentUrl = page.path.split('/')[0] | trim %}
{%- if currentParentUrl == value.default.split('||')[0] | trim | replace('/', '') %}
{# Submenu items #}
{# End Submenu items #}
{# Submenu-2 #}
{%- for name, value in theme.menu %}
{%- set respath = value %}
{%- if value == '[object Object]' %}
{%- for subname, subvalue in value %}
{%- set itemName = subname | lower %}
{%- if itemName == 'default' %}
{%- set parentValue = subvalue.split('||')[0] | trim %}
{%- endif %}
{%- if subvalue == '[object Object]' %}
{# If current URL is value of parent submenu 'default' path #}
{%- set paths = page.path.split('/') %}
{%- if paths.length > 2 %}
{%- if paths[1] == subvalue.default.split('||')[0] | trim | replace('/', '') %}
{# Submenu-2 items #}
{# End Submenu-2 items #}
{%- endif %}
{%- endif %}
{# End URL & path comparing #}
{%- endif %}
{%- endfor %}
{%- endif %}
{%- endfor %}
{# End Submenu-2 #}
{%- endif %}
{# End URL & path comparing #}
{%- endif %}
{%- endfor %}
{# End Submenu & Submenu-2 #}
{%- endif %}
================================================
FILE: layout/_partials/languages.swig
================================================
{%- if theme.language_switcher and languages.length > 1 %}
{%- endif %}
================================================
FILE: layout/_partials/page/breadcrumb.swig
================================================
{%- set paths = page.path.split('/') %}
{%- set count = paths.length %}
{%- if count > 2 %}
{%- set current = 0 %}
{%- set link = '' %}
{%- endif %}
================================================
FILE: layout/_partials/page/page-header.swig
================================================
{{- page.title }}
{{- post_edit(page.source) }}
================================================
FILE: layout/_partials/pagination.swig
================================================
{%- if page.prev or page.next %}
{%- endif %}
================================================
FILE: layout/_partials/post/post-copyright.swig
================================================
{%- set ccIcon = '' %}
{%- set ccText = theme.creative_commons.license | upper %}
-
{{ __('post.copyright.link') + __('symbol.colon') }}
{{ next_url(page.permalink, page.permalink, {title: page.title}) }}
-
{{ __('post.copyright.license_title') + __('symbol.colon') }}
{{- __('post.copyright.license_content', next_url(ccURL, ccIcon + ccText)) }}
================================================
FILE: layout/_partials/post/post-followme.swig
================================================
{%- if theme.follow_me %}
{{ __('follow_me.welcome') }}
{%- endif %}
================================================
FILE: layout/_partials/post/post-footer.swig
================================================
{%- if theme.rating.enable %}
{%- endif %}
================================================
FILE: layout/_partials/post/post-related.swig
================================================
{%- set popular_posts = popular_posts_json(theme.related_posts.params, page) %}
{%- if popular_posts.json and popular_posts.json.length > 0 %}
{{ theme.related_posts.title or __('post.related_posts') }}
{%- for popular_post in popular_posts.json %}
-
{%- if popular_post.date and popular_post.date != '' %}
{{ popular_post.date }}
{%- endif %}
{%- if popular_post.img and popular_post.img != '' %}
{%- endif %}
{%- if popular_post.excerpt and popular_post.excerpt != '' %}
{{ popular_post.excerpt }}
{%- endif %}
{%- endfor %}
{%- endif %}
================================================
FILE: layout/_partials/post/post-reward.swig
================================================
{{ page.reward_settings.comment }}
================================================
FILE: layout/_partials/search/algolia-search.swig
================================================
================================================
FILE: layout/_partials/search/index.swig
================================================
{%- if theme.algolia_search.enable or theme.local_search.enable %}
{%- endif %}
================================================
FILE: layout/_partials/search/localsearch.swig
================================================
================================================
FILE: layout/_partials/sidebar/site-overview.swig
================================================
{%- if theme.site_state %}
{%- endif %}
{%- if theme.chat.enable and theme.chat.service !== '' %}
{%- endif %}
{%- if theme.social %}
{%- endif %}
{%- if theme.creative_commons.license and theme.creative_commons.sidebar %}
{%- set ccImage = '
' %}
{{ next_url(ccURL, ccImage, {class: 'cc-opacity'}) }}
{%- endif %}
{# Blogroll #}
{%- if theme.links %}
{%- if theme.links_settings.icon %}{%- endif %}
{{ theme.links_settings.title }}
{%- for blogrollText, blogrollURL in theme.links %}
-
{{ next_url(blogrollURL, blogrollText, {title: blogrollURL}) }}
{%- endfor %}
{%- endif %}
================================================
FILE: layout/_partials/widgets.swig
================================================
{%- if theme.back2top.enable and not theme.back2top.sidebar %}
0%
{%- endif %}
{%- if theme.reading_progress.enable %}
{%- endif %}
{%- if theme.bookmark.enable %}
{%- endif %}
{%- if theme.github_banner.enable %}
{%- set github_URL = theme.github_banner.permalink %}
{%- set github_title = theme.github_banner.title %}
{%- set github_image = '' %}
{{ next_url(github_URL, github_image, {class: 'github-corner', title: github_title, "aria-label": github_title}) }}
{%- endif %}
================================================
FILE: layout/_scripts/index.swig
================================================
{% include 'vendors.swig' %}
{{- next_js('utils.js') }}
{%- if theme.motion.enable %}
{{- next_js('motion.js') }}
{%- endif %}
{%- set scheme_script = 'schemes/' + theme.scheme | lower + '.swig' %}
{% include scheme_script %}
{{- next_js('next-boot.js') }}
{%- if theme.bookmark.enable %}
{{- next_js('bookmark.js') }}
{%- endif %}
{%- if theme.pjax %}
{% include 'pjax.swig' %}
{%- endif %}
{% include 'three.swig' %}
================================================
FILE: layout/_scripts/noscript.swig
================================================
================================================
FILE: layout/_scripts/pages/schedule.swig
================================================
================================================
FILE: layout/_scripts/pjax.swig
================================================
================================================
FILE: layout/_scripts/schemes/gemini.swig
================================================
{{- next_js('schemes/pisces.js') }}
================================================
FILE: layout/_scripts/schemes/mist.swig
================================================
{{- next_js('schemes/muse.js') }}
================================================
FILE: layout/_scripts/schemes/muse.swig
================================================
{{- next_js('schemes/muse.js') }}
================================================
FILE: layout/_scripts/schemes/pisces.swig
================================================
{{- next_js('schemes/pisces.js') }}
================================================
FILE: layout/_scripts/three.swig
================================================
{%- if theme.three.enable %}
{%- set three_uri = theme.vendors.three or next_vendors('three/three.min.js') %}
{%- if theme.three.three_waves %}
{%- set waves_uri = theme.vendors.three_waves or next_vendors('three/three-waves.min.js') %}
{%- endif %}
{%- if theme.three.canvas_lines %}
{%- set lines_uri = theme.vendors.canvas_lines or next_vendors('three/canvas_lines.min.js') %}
{%- endif %}
{%- if theme.three.canvas_sphere %}
{%- set sphere_uri = theme.vendors.canvas_sphere or next_vendors('three/canvas_sphere.min.js') %}
{%- endif %}
{%- endif %}
================================================
FILE: layout/_scripts/vendors.swig
================================================
{%- set js_vendors = {} %}
{%- set js_vendors = js_vendors | attr('anime', 'anime.min.js') %}
{%- if theme.pjax %}
{%- set js_vendors = js_vendors | attr('pjax', 'pjax/pjax.min.js') %}
{%- endif %}
{%- if theme.fancybox %}
{%- set js_vendors = js_vendors | attr('jquery', '//cdn.jsdelivr.net/npm/jquery@3/dist/jquery.min.js') %}
{%- set js_vendors = js_vendors | attr('fancybox', '//cdn.jsdelivr.net/gh/fancyapps/fancybox@3/dist/jquery.fancybox.min.js') %}
{%- endif %}
{%- if theme.mediumzoom %}
{%- set js_vendors = js_vendors | attr('mediumzoom', '//cdn.jsdelivr.net/npm/medium-zoom@1/dist/medium-zoom.min.js') %}
{%- endif %}
{%- if theme.lazyload %}
{%- set js_vendors = js_vendors | attr('lazyload', '//cdn.jsdelivr.net/npm/lozad@1/dist/lozad.min.js') %}
{%- endif %}
{%- if theme.pangu %}
{%- set js_vendors = js_vendors | attr('pangu', '//cdn.jsdelivr.net/npm/pangu@4/dist/browser/pangu.min.js') %}
{%- endif %}
{%- if theme.motion.enable %}
{%- set js_vendors = js_vendors | attr('velocity', 'velocity/velocity.min.js') %}
{%- set js_vendors = js_vendors | attr('velocity_ui', 'velocity/velocity.ui.min.js') %}
{%- endif %}
{%- if theme.canvas_nest.enable %}
{%- if theme.canvas_nest.onmobile %}
{%- set canvas_nest_uri = theme.vendors.canvas_nest or next_vendors('canvas-nest/canvas-nest.min.js') %}
{% else %}
{%- set canvas_nest_uri = theme.vendors.canvas_nest_nomobile or next_vendors('canvas-nest/canvas-nest-nomobile.min.js') %}
{%- endif %}
{%- endif %}
{%- if theme.canvas_ribbon.enable %}
{%- set canvas_ribbon_uri = theme.vendors.canvas_ribbon or next_vendors('canvas-ribbon/canvas-ribbon.js') %}
{%- endif %}
{%- for name, internal in js_vendors %}
{%- set internal_script = next_vendors(internal) %}
{%- endfor %}
================================================
FILE: layout/_third-party/analytics/baidu-analytics.swig
================================================
{%- if theme.baidu_analytics %}
{%- endif %}
================================================
FILE: layout/_third-party/analytics/google-analytics.swig
================================================
{%- if theme.google_analytics.tracking_id %}
{%- if not theme.google_analytics.only_pageview %}
{%- endif %}
{%- if theme.google_analytics.only_pageview %}
{%- endif %}
{%- endif %}
================================================
FILE: layout/_third-party/analytics/growingio.swig
================================================
{%- if theme.growingio_analytics %}
{%- endif %}
================================================
FILE: layout/_third-party/analytics/index.swig
================================================
{% include 'google-analytics.swig' %}
{% include 'baidu-analytics.swig' %}
{% include 'growingio.swig' %}
================================================
FILE: layout/_third-party/baidu-push.swig
================================================
{%- if theme.baidu_push %}
{%- endif %}
================================================
FILE: layout/_third-party/chat/chatra.swig
================================================
{%- if theme.chatra.enable %}
{%- if theme.chatra.embed %}
{%- endif %}
{%- endif %}
================================================
FILE: layout/_third-party/chat/tidio.swig
================================================
{%- if theme.tidio.enable %}
{%- endif %}
================================================
FILE: layout/_third-party/comments/changyan.swig
================================================
{%- if is_home() %}
{% elif page.comments %}
{%- endif %}
================================================
FILE: layout/_third-party/comments/disqus.swig
================================================
{%- if theme.disqus.count %}
{%- endif %}
{%- if page.comments %}
{%- endif %}
================================================
FILE: layout/_third-party/comments/disqusjs.swig
================================================
{%- if page.comments %}
{%- set disqusjs_css_uri = theme.vendors.disqusjs_css or '//cdn.jsdelivr.net/npm/disqusjs@1/dist/disqusjs.css' %}
{%- set disqusjs_js_uri = theme.vendors.disqusjs_js or '//cdn.jsdelivr.net/npm/disqusjs@1/dist/disqus.js' %}
{%- endif %}
================================================
FILE: layout/_third-party/comments/gitalk.swig
================================================
{%- if page.comments %}
{%- set gitalk_css_uri = theme.vendors.gitalk_css or '//cdn.jsdelivr.net/npm/gitalk@1/dist/gitalk.min.css' %}
{%- set gitalk_js_uri = theme.vendors.gitalk_js or '//cdn.jsdelivr.net/npm/gitalk@1/dist/gitalk.min.js' %}
{%- endif %}
================================================
FILE: layout/_third-party/comments/livere.swig
================================================
{%- if page.comments %}
{%- endif %}
================================================
FILE: layout/_third-party/comments/valine.swig
================================================
{%- set valine_uri = theme.vendors.valine or '//unpkg.com/valine/dist/Valine.min.js' %}
================================================
FILE: layout/_third-party/index.swig
================================================
{% include 'baidu-push.swig' %}
{% include 'rating.swig' %}
{%- if theme.algolia_search.enable %}
{% include 'search/algolia-search.swig' %}
{% elif theme.swiftype_key %}
{% include 'search/swiftype.swig' %}
{% elif theme.local_search.enable %}
{% include 'search/localsearch.swig' %}
{%- endif %}
{% include 'chat/chatra.swig' %}
{% include 'chat/tidio.swig' %}
{% include 'tags/pdf.swig' %}
{% include 'tags/mermaid.swig' %}
================================================
FILE: layout/_third-party/math/index.swig
================================================
{%- if theme.math.mathjax.enable or theme.math.katex.enable %}
{%- set is_index_has_math = false %}
{# At home, check if there has `mathjax: true` post #}
{%- if is_home() and theme.math.per_page %}
{%- for post in page.posts.toArray() %}
{%- if post.mathjax and not is_index_has_math %}
{%- set is_index_has_math = true %}
{%- endif %}
{%- endfor %}
{%- endif %}
{%- if not theme.math.per_page or is_index_has_math or page.mathjax %}
{%- if theme.math.mathjax.enable %}
{% include '_third-party/math/mathjax.swig' %}
{% elif theme.math.katex.enable %}
{% include '_third-party/math/katex.swig' %}
{%- endif %}
{%- endif %}
{%- endif %}
================================================
FILE: layout/_third-party/math/katex.swig
================================================
{%- set katex_uri = theme.vendors.katex or '//cdn.jsdelivr.net/npm/katex@0/dist/katex.min.css' %}
{%- if theme.math.katex.copy_tex %}
{%- set copy_tex_js_uri = theme.vendors.copy_tex_js or '//cdn.jsdelivr.net/npm/katex@0/dist/contrib/copy-tex.min.js' %}
{%- set copy_tex_css_uri = theme.vendors.copy_tex_css or '//cdn.jsdelivr.net/npm/katex@0/dist/contrib/copy-tex.min.css' %}
{%- endif %}
================================================
FILE: layout/_third-party/math/mathjax.swig
================================================
{%- set mathjax_uri = theme.vendors.mathjax or '//cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js' %}
================================================
FILE: layout/_third-party/quicklink.swig
================================================
{%- if page.quicklink.enable %}
{%- set quicklink_uri = theme.vendors.quicklink or next_vendors('//cdn.jsdelivr.net/npm/quicklink@1/dist/quicklink.umd.js') %}
{%- endif %}
================================================
FILE: layout/_third-party/rating.swig
================================================
{%- if theme.rating.enable %}
{%- endif %}
================================================
FILE: layout/_third-party/search/algolia-search.swig
================================================
{%- set algolia_search_uri = theme.vendors.algolia_search or next_vendors('//cdn.jsdelivr.net/npm/algoliasearch@4/dist/algoliasearch-lite.umd.js') %}
{%- set instant_search_uri = theme.vendors.instant_search or next_vendors('//cdn.jsdelivr.net/npm/instantsearch.js@4/dist/instantsearch.production.min.js') %}
{{- next_js('algolia-search.js') }}
================================================
FILE: layout/_third-party/search/localsearch.swig
================================================
{{- next_js('local-search.js') }}
================================================
FILE: layout/_third-party/search/swiftype.swig
================================================
================================================
FILE: layout/_third-party/statistics/busuanzi-counter.swig
================================================
{%- if theme.busuanzi_count.enable %}
{%- if theme.busuanzi_count.total_visitors %}
{%- endif %}
{%- if theme.busuanzi_count.total_visitors and theme.busuanzi_count.total_views %}
{%- endif %}
{%- if theme.busuanzi_count.total_views %}
{%- endif %}
{%- endif %}
================================================
FILE: layout/_third-party/statistics/cnzz-analytics.swig
================================================
{%- if theme.cnzz_siteid %}
{%- endif %}
================================================
FILE: layout/_third-party/statistics/firestore.swig
================================================
{%- if theme.firestore.enable %}
{%- endif %}
================================================
FILE: layout/_third-party/statistics/index.swig
================================================
{% include 'busuanzi-counter.swig' %}
{% include 'cnzz-analytics.swig' %}
{% include 'firestore.swig' %}
{% include 'lean-analytics.swig' %}
================================================
FILE: layout/_third-party/statistics/lean-analytics.swig
================================================
{%- if theme.leancloud_visitors.enable and not theme.valine.visitor %}
{%- endif %}
================================================
FILE: layout/_third-party/tags/mermaid.swig
================================================
{%- if theme.mermaid.enable %}
{%- set mermaid_uri = theme.vendors.mermaid or '//cdn.jsdelivr.net/npm/mermaid@8/dist/mermaid.min.js' %}
{%- endif %}
================================================
FILE: layout/_third-party/tags/pdf.swig
================================================
{%- if theme.pdf.enable %}
{%- set pdf_uri = next_vendors('pdf/web/viewer.html') %}
{%- endif %}
================================================
FILE: layout/archive.swig
================================================
{% extends '_layout.swig' %}
{% import '_macro/post-collapse.swig' as post_template with context %}
{% import '_macro/sidebar.swig' as sidebar_template with context %}
{% block title %}{{ __('title.archive') }} | {{ title }}{% endblock %}
{% block class %}archive{% endblock %}
{% block content %}
{#####################}
{### ARCHIVE BLOCK ###}
{#####################}
{%- set posts_length = site.posts.length %}
{%- if posts_length > 210 %}
{%- set cheers = 'excellent' %}
{% elif posts_length > 130 %}
{%- set cheers = 'great' %}
{% elif posts_length > 80 %}
{%- set cheers = 'good' %}
{% elif posts_length > 50 %}
{%- set cheers = 'nice' %}
{% elif posts_length > 30 %}
{%- set cheers = 'ok' %}
{% else %}
{%- set cheers = 'um' %}
{%- endif %}
{{ __('cheers.' + cheers) }}! {{ _p('counter.archive_posts', site.posts.length) }} {{ __('keep_on') }}
{{ post_template.render(page.posts) }}
{#########################}
{### END ARCHIVE BLOCK ###}
{#########################}
{% include '_partials/pagination.swig' %}
{% endblock %}
{% block sidebar %}
{{ sidebar_template.render(false) }}
{% endblock %}
================================================
FILE: layout/category.swig
================================================
{% extends '_layout.swig' %}
{% import '_macro/post-collapse.swig' as post_template with context %}
{% import '_macro/sidebar.swig' as sidebar_template with context %}
{% block title %}{{ __('title.category') }}: {{ page.category }} | {{ title }}{% endblock %}
{% block class %}category{% endblock %}
{% block content %}
{######################}
{### CATEGORY BLOCK ###}
{######################}
{{- page.category }}
{{ __('title.category') }}
{{ post_template.render(page.posts) }}
{##########################}
{### END CATEGORY BLOCK ###}
{##########################}
{% include '_partials/pagination.swig' %}
{% endblock %}
{% block sidebar %}
{{ sidebar_template.render(false) }}
{% endblock %}
================================================
FILE: layout/index.swig
================================================
{% extends '_layout.swig' %}
{% import '_macro/sidebar.swig' as sidebar_template with context %}
{% block title %}{{ title }}{%- if theme.index_with_subtitle and subtitle %} - {{ subtitle }}{%- endif %}{% endblock %}
{% block class %}index posts-expand{% endblock %}
{% block content %}
{%- for post in page.posts.toArray() %}
{{ partial('_macro/post.swig', {post: post, is_index: true}) }}
{%- endfor %}
{% include '_partials/pagination.swig' %}
{% endblock %}
{% block sidebar %}
{{ sidebar_template.render(false) }}
{% endblock %}
================================================
FILE: layout/page.swig
================================================
{% extends '_layout.swig' %}
{% import '_macro/sidebar.swig' as sidebar_template with context %}
{% block title %}
{%- set page_title_suffix = ' | ' + title %}
{%- if page.type === 'categories' and not page.title %}
{{- __('title.category') + page_title_suffix }}
{%- elif page.type === 'tags' and not page.title %}
{{- __('title.tag') + page_title_suffix }}
{%- elif page.type === 'schedule' and not page.title %}
{{- __('title.schedule') + page_title_suffix }}
{%- else %}
{{- page.title + page_title_suffix }}
{%- endif %}
{% endblock %}
{% block class %}page posts-expand{% endblock %}
{% block content %}
{##################}
{### PAGE BLOCK ###}
{##################}
{% include '_partials/page/page-header.swig' %}
{#################}
{### PAGE BODY ###}
{#################}
{%- if page.type === 'tags' %}
{{ _p('counter.tag_cloud', site.tags.length) }}
{% elif page.type === 'categories' %}
{{ _p('counter.categories', site.categories.length) }}
{{ list_categories() }}
{% elif page.type === 'schedule' %}
{% include '_scripts/pages/schedule.swig' %}
{% else %}
{{ page.content }}
{%- endif %}
{#####################}
{### END PAGE BODY ###}
{#####################}
{% include '_partials/page/breadcrumb.swig' %}
{######################}
{### END PAGE BLOCK ###}
{######################}
{% endblock %}
{% block sidebar %}
{{ sidebar_template.render(true) }}
{% endblock %}
================================================
FILE: layout/post.swig
================================================
{% extends '_layout.swig' %}
{% import '_macro/sidebar.swig' as sidebar_template with context %}
{% block title %}{{ page.title }} | {{ title }}{% endblock %}
{% block class %}post posts-expand{% endblock %}
{% block content %}
{{ partial('_macro/post.swig', {post: page}) }}
{% endblock %}
{% block sidebar %}
{{ sidebar_template.render(true) }}
{% endblock %}
================================================
FILE: layout/tag.swig
================================================
{% extends '_layout.swig' %}
{% import '_macro/post-collapse.swig' as post_template with context %}
{% import '_macro/sidebar.swig' as sidebar_template with context %}
{% block title %}{{ __('title.tag') }}: {{ page.tag }} | {{ title }}{% endblock %}
{% block class %}tag{% endblock %}
{% block content %}
{#################}
{### TAG BLOCK ###}
{#################}
{{- page.tag }}
{{ __('title.tag') }}
{{ post_template.render(page.posts) }}
{#####################}
{### END TAG BLOCK ###}
{#####################}
{% include '_partials/pagination.swig' %}
{% endblock %}
{% block sidebar %}
{{ sidebar_template.render(false) }}
{% endblock %}
================================================
FILE: package.json
================================================
{
"name": "hexo-theme-next",
"version": "7.8.0",
"description": "Elegant and powerful theme for Hexo.",
"main": "gulpfile.js",
"scripts": {
"test": "gulp"
},
"repository": {
"type": "git",
"url": "git+https://github.com/theme-next/hexo-theme-next.git"
},
"keywords": [
"hexo",
"theme",
"next"
],
"author": "NexT (https://theme-next.org)",
"license": "AGPL-3.0-or-later",
"bugs": {
"url": "https://github.com/theme-next/hexo-theme-next/issues"
},
"homepage": "https://theme-next.org",
"devDependencies": {
"eslint": "^6.8.0",
"eslint-config-theme-next": "^1.1.4",
"gulp": "^4.0.2",
"gulp-eslint": "^6.0.0",
"gulp-shell": "^0.8.0",
"js-yaml": "^3.13.1",
"stylint": "^2.0.0"
},
"engines": {
"node": ">=10.9.0"
}
}
================================================
FILE: scripts/events/index.js
================================================
/* global hexo */
'use strict';
hexo.on('generateBefore', () => {
// Merge config.
require('./lib/config')(hexo);
// Add filter type `theme_inject`
require('./lib/injects')(hexo);
});
hexo.on('generateAfter', () => {
if (!hexo.theme.config.reminder) return;
const https = require('https');
const path = require('path');
const { version } = require(path.normalize('../../package.json'));
https.get('https://api.github.com/repos/theme-next/hexo-theme-next/releases/latest', {
headers: {
'User-Agent': 'Theme NexT Client'
}
}, res => {
let result = '';
res.on('data', data => {
result += data;
});
res.on('end', () => {
try {
let latest = JSON.parse(result).tag_name.replace('v', '').split('.');
let current = version.split('.');
let isOutdated = false;
for (let i = 0; i < Math.max(latest.length, current.length); i++) {
if (!current[i] || latest[i] > current[i]) {
isOutdated = true;
break;
}
if (latest[i] < current[i]) {
break;
}
}
if (isOutdated) {
hexo.log.warn(`Your theme NexT is outdated. Current version: v${current.join('.')}, latest version: v${latest.join('.')}`);
hexo.log.warn('Visit https://github.com/theme-next/hexo-theme-next/releases for more information.');
} else {
hexo.log.info('Congratulations! Your are using the latest version of theme NexT.');
}
} catch (err) {
hexo.log.error('Failed to detect version info. Error message:');
hexo.log.error(err);
}
});
}).on('error', err => {
hexo.log.error('Failed to detect version info. Error message:');
hexo.log.error(err);
});
});
================================================
FILE: scripts/events/lib/config.js
================================================
'use strict';
function isObject(item) {
return item && typeof item === 'object' && !Array.isArray(item);
}
function merge(target, source) {
for (const key in source) {
if (isObject(target[key]) && isObject(source[key])) {
merge(target[key], source[key]);
} else {
target[key] = source[key];
}
}
return target;
}
module.exports = hexo => {
let data = hexo.locals.get('data');
/**
* Merge configs from _data/next.yml into hexo.theme.config.
* If `override`, configs in next.yml will rewrite configs in hexo.theme.config.
* If next.yml not exists, merge all `theme_config.*` into hexo.theme.config.
*/
if (data.next) {
if (data.next.override) {
hexo.theme.config = data.next;
} else {
merge(hexo.config, data.next);
merge(hexo.theme.config, data.next);
}
} else {
merge(hexo.theme.config, hexo.config.theme_config);
}
if (hexo.theme.config.cache && hexo.theme.config.cache.enable && hexo.config.relative_link) {
hexo.log.warn('Since caching is turned on, the `relative_link` option in Hexo `_config.yml` is set to `false` to avoid potential hazards.');
hexo.config.relative_link = false;
}
hexo.config.meta_generator = false;
// Custom languages support. Introduced in NexT v6.3.0.
if (data.languages) {
let { language } = hexo.config;
let { i18n } = hexo.theme;
const mergeLang = lang => {
i18n.set(lang, merge(i18n.get([lang]), data.languages[lang]));
};
if (Array.isArray(language)) {
for (let lang of language) {
mergeLang(lang);
}
} else {
mergeLang(language);
}
}
};
================================================
FILE: scripts/events/lib/injects-point.js
================================================
'use strict';
module.exports = {
views: [
'head',
'header',
'sidebar',
'postMeta',
'postBodyEnd',
'footer',
'bodyEnd',
'comment'
],
styles: [
'variable',
'mixin',
'style'
]
};
================================================
FILE: scripts/events/lib/injects.js
================================================
'use strict';
const fs = require('fs');
const path = require('path');
const points = require('./injects-point');
const defaultExtname = '.swig';
// Defining stylus types
class StylusInject {
constructor(base_dir) {
this.base_dir = base_dir;
this.files = [];
}
push(file) {
// Get absolute path base on hexo dir
this.files.push(path.resolve(this.base_dir, file));
}
}
// Defining view types
class ViewInject {
constructor(base_dir) {
this.base_dir = base_dir;
this.raws = [];
}
raw(name, raw, ...args) {
// Set default extname
if (path.extname(name) === '') {
name += defaultExtname;
}
this.raws.push({name, raw, args});
}
file(name, file, ...args) {
// Set default extname from file's extname
if (path.extname(name) === '') {
name += path.extname(file);
}
// Get absolute path base on hexo dir
this.raw(name, fs.readFileSync(path.resolve(this.base_dir, file), 'utf8'), ...args);
}
}
// Init injects
function initInject(base_dir) {
let injects = {};
points.styles.forEach(item => {
injects[item] = new StylusInject(base_dir);
});
points.views.forEach(item => {
injects[item] = new ViewInject(base_dir);
});
return injects;
}
module.exports = hexo => {
// Exec theme_inject filter
let injects = initInject(hexo.base_dir);
hexo.execFilterSync('theme_inject', injects);
hexo.theme.config.injects = {};
// Inject stylus
points.styles.forEach(type => {
hexo.theme.config.injects[type] = injects[type].files;
});
// Inject views
points.views.forEach(type => {
let configs = Object.create(null);
hexo.theme.config.injects[type] = [];
// Add or override view.
injects[type].raws.forEach((injectObj, index) => {
let name = `inject/${type}/${injectObj.name}`;
hexo.theme.setView(name, injectObj.raw);
configs[name] = {
layout : name,
locals : injectObj.args[0],
options: injectObj.args[1],
order : injectObj.args[2] || index
};
});
// Views sort.
hexo.theme.config.injects[type] = Object.values(configs)
.sort((x, y) => x.order - y.order);
});
};
================================================
FILE: scripts/filters/comment/changyan.js
================================================
/* global hexo */
'use strict';
const path = require('path');
const { iconText } = require('./common');
// Add comment
hexo.extend.filter.register('theme_inject', injects => {
let theme = hexo.theme.config;
if (!theme.changyan.enable || !theme.changyan.appid || !theme.changyan.appkey) return;
injects.comment.raw('changyan', `
`, {}, {cache: true});
injects.bodyEnd.file('changyan', path.join(hexo.theme_dir, 'layout/_third-party/comments/changyan.swig'));
});
// Add post_meta
hexo.extend.filter.register('theme_inject', injects => {
let theme = hexo.theme.config;
if (!theme.changyan.enable || !theme.changyan.appid || !theme.changyan.appkey) return;
injects.postMeta.raw('changyan', `
{% if post.comments %}
{% endif %}
`, {}, {}, theme.changyan.post_meta_order);
});
================================================
FILE: scripts/filters/comment/common.js
================================================
'use strict';
function capitalize(input) {
return input.toString().charAt(0).toUpperCase() + input.toString().substr(1);
}
module.exports = {
iconText(icon, key, defaultValue) {
if (!defaultValue) {
defaultValue = capitalize(key);
}
return `
{%- set post_meta_comment = __('post.comments.${key}') %}
{%- if post_meta_comment == 'post.comments.${key}' %}
{%- set post_meta_comment = '${defaultValue}' %}
{%- endif %}
`;
}
};
================================================
FILE: scripts/filters/comment/default-config.js
================================================
/* global hexo */
'use strict';
const path = require('path');
hexo.extend.filter.register('theme_inject', injects => {
injects.comment.raws.forEach(element => {
// Set default button content
let injectName = path.basename(element.name, path.extname(element.name));
element.args[0] = Object.assign({
configKey: injectName,
class : injectName,
button : injectName
}, element.args[0]);
// Get locals and config
let locals = element.args[0];
let config = hexo.theme.config.comments;
// Set activeClass
if (config.active === locals.configKey) {
config.activeClass = locals.class;
}
// Set custom button content
if (config.nav) {
let nav = config.nav[locals.configKey] || {};
if (nav.order) {
element.args[2] = nav.order;
}
if (nav.text) {
locals.button = nav.text;
}
}
});
}, 99999);
================================================
FILE: scripts/filters/comment/disqus.js
================================================
/* global hexo */
'use strict';
const path = require('path');
const { iconText } = require('./common');
// Add comment
hexo.extend.filter.register('theme_inject', injects => {
let theme = hexo.theme.config;
if (!theme.disqus.enable || !theme.disqus.shortname) return;
injects.comment.raw('disqus', `
`, {}, {cache: true});
injects.bodyEnd.file('disqus', path.join(hexo.theme_dir, 'layout/_third-party/comments/disqus.swig'));
});
// Add post_meta
hexo.extend.filter.register('theme_inject', injects => {
let theme = hexo.theme.config;
if (!theme.disqus.enable || !theme.disqus.shortname || !theme.disqus.count) return;
injects.postMeta.raw('disqus', `
{% if post.comments %}
{% endif %}
`, {}, {}, theme.disqus.post_meta_order);
});
================================================
FILE: scripts/filters/comment/disqusjs.js
================================================
/* global hexo */
'use strict';
const path = require('path');
// Add comment
hexo.extend.filter.register('theme_inject', injects => {
let theme = hexo.theme.config;
if (!theme.disqusjs.enable || !theme.disqusjs.shortname || !theme.disqusjs.apikey) return;
injects.comment.raw('disqusjs', `
`, {}, {cache: true});
injects.bodyEnd.file('disqusjs', path.join(hexo.theme_dir, 'layout/_third-party/comments/disqusjs.swig'));
});
================================================
FILE: scripts/filters/comment/gitalk.js
================================================
/* global hexo */
'use strict';
const path = require('path');
// Add comment
hexo.extend.filter.register('theme_inject', injects => {
let theme = hexo.theme.config;
if (!theme.gitalk.enable) return;
injects.comment.raw('gitalk', '', {}, {cache: true});
injects.bodyEnd.file('gitalk', path.join(hexo.theme_dir, 'layout/_third-party/comments/gitalk.swig'));
});
================================================
FILE: scripts/filters/comment/livere.js
================================================
/* global hexo */
'use strict';
const path = require('path');
// Add comment
hexo.extend.filter.register('theme_inject', injects => {
let theme = hexo.theme.config;
if (!theme.livere_uid) return;
injects.comment.raw('livere', `
`, {}, {cache: true});
injects.bodyEnd.file('livere', path.join(hexo.theme_dir, 'layout/_third-party/comments/livere.swig'));
});
================================================
FILE: scripts/filters/comment/valine.js
================================================
/* global hexo */
'use strict';
const path = require('path');
const { iconText } = require('./common');
// Add comment
hexo.extend.filter.register('theme_inject', injects => {
let theme = hexo.theme.config;
if (!theme.valine.enable || !theme.valine.appid || !theme.valine.appkey) return;
injects.comment.raw('valine', '', {}, {cache: true});
injects.bodyEnd.file('valine', path.join(hexo.theme_dir, 'layout/_third-party/comments/valine.swig'));
});
// Add post_meta
hexo.extend.filter.register('theme_inject', injects => {
let theme = hexo.theme.config;
if (!theme.valine.enable || !theme.valine.appid || !theme.valine.appkey) return;
injects.postMeta.raw('valine', `
{% if post.comments and (is_post() or theme.valine.comment_count) %}
{% endif %}
`, {}, {}, theme.valine.post_meta_order);
});
================================================
FILE: scripts/filters/default-injects.js
================================================
/* global hexo */
'use strict';
const points = require('../events/lib/injects-point');
hexo.extend.filter.register('theme_inject', injects => {
let filePath = hexo.theme.config.custom_file_path;
if (!filePath) return;
points.views.forEach(key => {
if (filePath[key]) {
injects[key].file('custom', filePath[key]);
}
});
points.styles.forEach(key => {
if (filePath[key]) {
injects[key].push(filePath[key]);
}
});
}, 99);
================================================
FILE: scripts/filters/front-matter.js
================================================
/**
* Modify front-matter.
*
* Some keys are included by Hexo, please don't use them.
* e.g. layout title date updated comments tags categories permalink keywords
*
* Some keys are generated by Hexo, don't use them either.
* e.g. content excerpt more source full_source path permalink prev next raw photos link
*/
/* global hexo */
'use strict';
const keys = ['toc', 'reward_settings', 'quicklink'];
function showWarnLog(source, variable) {
hexo.log.warn(`front-matter: '${variable}' has deprecated, source: ${source}`);
hexo.log.warn('see: https://github.com/theme-next/hexo-theme-next/pull/1211');
}
function compatibleBeforeAssign(page) {
if (page.quicklink === true) {
page.quicklink = {enable: true};
showWarnLog(page.source, 'quicklink:true');
}
if (page.quicklink === false) {
page.quicklink = {enable: false};
showWarnLog(page.source, 'quicklink:true');
}
}
function compatibleAfterAssign(page) {
if (page.reward !== undefined) {
page.reward_settings.enable = page.reward;
showWarnLog(page.source, 'reward');
}
if (page.toc_number !== undefined) {
page.toc.number = page.toc_number;
showWarnLog(page.source, 'toc_number');
}
if (page.toc_max_depth !== undefined) {
page.toc.max_depth = page.toc_max_depth;
showWarnLog(page.source, 'toc_max_depth');
}
}
hexo.extend.filter.register('template_locals', locals => {
const { page, theme } = locals;
compatibleBeforeAssign(page);
keys.forEach(key => {
page[key] = Object.assign({}, theme[key], page[key]);
});
compatibleAfterAssign(page);
// Set default value for toc.max_depth
if (!page.toc.max_depth) {
page.toc.max_depth = 6;
}
// Set home or archive quicklink
if (page.__index) {
page.quicklink.enable = theme.quicklink.home;
}
if (page.archive) {
page.quicklink.enable = theme.quicklink.archive;
}
});
================================================
FILE: scripts/filters/locals.js
================================================
/* global hexo */
'use strict';
const path = require('path');
hexo.extend.filter.register('template_locals', locals => {
const { env, config } = hexo;
const { __, theme } = locals;
const { i18n } = hexo.theme;
// Hexo & NexT version
locals.hexo_version = env.version;
locals.next_version = require(path.normalize('../../package.json')).version;
// Language & Config
locals.title = __('title') !== 'title' ? __('title') : config.title;
locals.subtitle = __('subtitle') !== 'subtitle' ? __('subtitle') : config.subtitle;
locals.author = __('author') !== 'author' ? __('author') : config.author;
locals.description = __('description') !== 'description' ? __('description') : config.description;
locals.languages = [...i18n.languages];
locals.languages.splice(locals.languages.indexOf('default'), 1);
locals.page.lang = locals.page.lang || locals.page.language;
// Creative Commons
locals.ccURL = 'https://creativecommons.org/' + (theme.creative_commons.license === 'zero' ? 'publicdomain/zero/1.0/' : 'licenses/' + theme.creative_commons.license + '/4.0/') + (theme.creative_commons.language || '');
// PJAX
locals.pjax = theme.pjax ? ' data-pjax' : '';
});
================================================
FILE: scripts/filters/minify.js
================================================
/* global hexo */
'use strict';
hexo.extend.filter.register('after_generate', () => {
const theme = hexo.theme.config;
if (!theme.minify) return;
const lists = hexo.route.list();
const velocity = lists.filter(list => list.includes('lib/velocity'));
const fontawesome = lists.filter(list => list.includes('lib/font-awesome'));
if (!theme.bookmark.enable) {
hexo.route.remove('js/bookmark.js');
}
if (!theme.motion.enable) {
hexo.route.remove('js/motion.js');
velocity.forEach(path => {
hexo.route.remove(path);
});
}
if (theme.motion.enable && theme.vendors.velocity && theme.vendors.velocity_ui) {
velocity.forEach(path => {
hexo.route.remove(path);
});
}
if (theme.vendors.fontawesome) {
fontawesome.forEach(path => {
hexo.route.remove(path);
});
}
if (theme.vendors.anime) {
hexo.route.remove('lib/anime.min.js');
}
if (!theme.algolia_search.enable) {
hexo.route.remove('js/algolia-search.js');
}
if (!theme.local_search.enable) {
hexo.route.remove('js/local-search.js');
}
if (theme.scheme === 'Muse' || theme.scheme === 'Mist') {
hexo.route.remove('js/schemes/pisces.js');
} else if (theme.scheme === 'Pisces' || theme.scheme === 'Gemini') {
hexo.route.remove('js/schemes/muse.js');
}
});
================================================
FILE: scripts/filters/post.js
================================================
/* global hexo */
'use strict';
hexo.extend.filter.register('after_post_render', data => {
const { config } = hexo;
const theme = hexo.theme.config;
if (!theme.exturl && !theme.lazyload) return;
if (theme.lazyload) {
data.content = data.content.replace(/(
]*) src=/img, '$1 data-src=');
}
if (theme.exturl) {
const url = require('url');
const siteHost = url.parse(config.url).hostname || config.url;
data.content = data.content.replace(/]* href="([^"]+)"[^>]*>([^<]+)<\/a>/img, (match, href, html) => {
// Exit if the href attribute doesn't exists.
if (!href) return match;
// Exit if the url has same host with `config.url`, which means it's an internal link.
let link = url.parse(href);
if (!link.protocol || link.hostname === siteHost) return match;
return `${html}`;
});
}
}, 0);
================================================
FILE: scripts/helpers/engine.js
================================================
/* global hexo */
'use strict';
const crypto = require('crypto');
hexo.extend.helper.register('next_inject', function(point) {
return hexo.theme.config.injects[point]
.map(item => this.partial(item.layout, item.locals, item.options))
.join('');
});
hexo.extend.helper.register('next_js', function(...urls) {
const { js } = hexo.theme.config;
return urls.map(url => this.js(`${js}/${url}`)).join('');
});
hexo.extend.helper.register('next_vendors', function(url) {
if (url.startsWith('//')) return url;
const internal = hexo.theme.config.vendors._internal;
return this.url_for(`${internal}/${url}`);
});
hexo.extend.helper.register('post_edit', function(src) {
const theme = hexo.theme.config;
if (!theme.post_edit.enable) return '';
return this.next_url(theme.post_edit.url + src, '', {
class: 'post-edit-link',
title: this.__('post.edit')
});
});
hexo.extend.helper.register('post_nav', function(post) {
const theme = hexo.theme.config;
if (theme.post_navigation === false || (!post.prev && !post.next)) return '';
const prev = theme.post_navigation === 'right' ? post.prev : post.next;
const next = theme.post_navigation === 'right' ? post.next : post.prev;
const left = prev ? `
${prev.title}
` : '';
const right = next ? `
${next.title}
` : '';
return `
`;
});
hexo.extend.helper.register('gitalk_md5', function(path) {
let str = this.url_for(path);
str.replace('index.html', '');
return crypto.createHash('md5').update(str).digest('hex');
});
hexo.extend.helper.register('canonical', function() {
// https://support.google.com/webmasters/answer/139066
const { permalink } = hexo.config;
let url = this.url.replace(/index\.html$/, '');
if (!permalink.endsWith('.html')) {
url = url.replace(/\.html$/, '');
}
return ``;
});
/**
* Get page path given a certain language tag
*/
hexo.extend.helper.register('i18n_path', function(language) {
const { path, lang } = this.page;
const base = path.startsWith(lang) ? path.slice(lang.length + 1) : path;
return this.url_for(`${this.languages.indexOf(language) === 0 ? '' : '/' + language}/${base}`);
});
/**
* Get the language name
*/
hexo.extend.helper.register('language_name', function(language) {
const name = hexo.theme.i18n.__(language)('name');
return name === 'name' ? language : name;
});
================================================
FILE: scripts/helpers/font.js
================================================
/* global hexo */
'use strict';
hexo.extend.helper.register('next_font', () => {
const config = hexo.theme.config.font;
if (!config || !config.enable) return '';
const fontDisplay = '&display=swap';
const fontSubset = '&subset=latin,latin-ext';
const fontStyles = ':300,300italic,400,400italic,700,700italic';
const fontHost = config.host || '//fonts.googleapis.com';
//Get a font list from config
let fontFamilies = ['global', 'title', 'headings', 'posts', 'codes'].map(item => {
if (config[item] && config[item].family && config[item].external) {
return config[item].family + fontStyles;
}
return '';
});
fontFamilies = fontFamilies.filter(item => item !== '');
fontFamilies = [...new Set(fontFamilies)];
fontFamilies = fontFamilies.join('|');
// Merge extra parameters to the final processed font string
return fontFamilies ? `` : '';
});
================================================
FILE: scripts/helpers/next-config.js
================================================
/* global hexo */
'use strict';
const url = require('url');
/**
* Export theme config to js
*/
hexo.extend.helper.register('next_config', function() {
let { config, theme, next_version } = this;
config.algolia = config.algolia || {};
let exportConfig = {
hostname : url.parse(config.url).hostname || config.url,
root : config.root,
scheme : theme.scheme,
version : next_version,
exturl : theme.exturl,
sidebar : theme.sidebar,
copycode : theme.codeblock.copy_button,
back2top : theme.back2top,
bookmark : theme.bookmark,
fancybox : theme.fancybox,
mediumzoom: theme.mediumzoom,
lazyload : theme.lazyload,
pangu : theme.pangu,
comments : theme.comments,
algolia : {
appID : config.algolia.applicationID,
apiKey : config.algolia.apiKey,
indexName: config.algolia.indexName,
hits : theme.algolia_search.hits,
labels : theme.algolia_search.labels
},
localsearch: theme.local_search,
motion : theme.motion
};
if (config.search) {
exportConfig.path = config.search.path;
}
return ``;
});
================================================
FILE: scripts/helpers/next-url.js
================================================
/* global hexo */
'use strict';
const { htmlTag } = require('hexo-util');
const url = require('url');
hexo.extend.helper.register('next_url', function(path, text, options = {}) {
const { config } = this;
const data = url.parse(path);
const siteHost = url.parse(config.url).hostname || config.url;
const theme = hexo.theme.config;
let exturl = '';
let tag = 'a';
let attrs = { href: this.url_for(path) };
// If `exturl` enabled, set spanned links only on external links.
if (theme.exturl && data.protocol && data.hostname !== siteHost) {
tag = 'span';
exturl = 'exturl';
const encoded = Buffer.from(path).toString('base64');
attrs = {
class : exturl,
'data-url': encoded
};
}
for (let key in options) {
/**
* If option have `class` attribute, add it to
* 'exturl' class if `exturl` option enabled.
*/
if (exturl !== '' && key === 'class') {
attrs[key] += ' ' + options[key];
} else {
attrs[key] = options[key];
}
}
if (attrs.class && Array.isArray(attrs.class)) {
attrs.class = attrs.class.join(' ');
}
// If it's external link, rewrite attributes.
if (data.protocol && data.hostname !== siteHost) {
attrs.external = null;
if (!theme.exturl) {
// Only for simple link need to rewrite/add attributes.
attrs.rel = 'noopener';
attrs.target = '_blank';
} else {
// Remove rel attributes for `exturl` in main menu.
attrs.rel = null;
}
}
return htmlTag(tag, attrs, decodeURI(text), false);
});
================================================
FILE: scripts/renderer.js
================================================
/* global hexo */
'use strict';
const nunjucks = require('nunjucks');
const path = require('path');
function njkCompile(data) {
const templateDir = path.dirname(data.path);
const env = nunjucks.configure(templateDir, {
autoescape: false
});
env.addFilter('attr', (dictionary, key, value) => {
dictionary[key] = value;
return dictionary;
});
env.addFilter('json', dictionary => {
return JSON.stringify(dictionary || '');
});
return nunjucks.compile(data.text, env, data.path);
}
function njkRenderer(data, locals) {
return njkCompile(data).render(locals);
}
// Return a compiled renderer.
njkRenderer.compile = function(data) {
const compiledTemplate = njkCompile(data);
// Need a closure to keep the compiled template.
return function(locals) {
return compiledTemplate.render(locals);
};
};
hexo.extend.renderer.register('njk', 'html', njkRenderer);
hexo.extend.renderer.register('swig', 'html', njkRenderer);
================================================
FILE: scripts/tags/button.js
================================================
/**
* button.js | https://theme-next.org/docs/tag-plugins/button
*/
/* global hexo */
'use strict';
function postButton(args) {
args = args.join(' ').split(',');
let url = args[0];
let text = args[1] || '';
let icon = args[2] || '';
let title = args[3] || '';
if (!url) {
hexo.log.warn('URL can NOT be empty.');
}
text = text.trim();
icon = icon.trim();
icon = icon.startsWith('fa') ? icon : 'fa fa-' + icon;
title = title.trim();
return ` 0 ? ` title="${title}"` : ''}>
${icon.length > 0 ? `` : ''}${text}
`;
}
hexo.extend.tag.register('button', postButton, {ends: false});
hexo.extend.tag.register('btn', postButton, {ends: false});
================================================
FILE: scripts/tags/caniuse.js
================================================
/**
* caniuse.js | https://theme-next.org/docs/tag-plugins/caniuse
*/
/* global hexo */
'use strict';
function caniUse(args) {
args = args.join('').split('@');
var feature = args[0];
var periods = args[1] || 'current';
if (!feature) {
hexo.log.warn('Caniuse feature can NOT be empty.');
return '';
}
return ``;
}
hexo.extend.tag.register('caniuse', caniUse);
hexo.extend.tag.register('can', caniUse);
================================================
FILE: scripts/tags/center-quote.js
================================================
/**
* center-quote.js | https://theme-next.org/docs/tag-plugins/
*/
/* global hexo */
'use strict';
function centerQuote(args, content) {
return `
${hexo.render.renderSync({ text: content, engine: 'markdown' })}
`;
}
hexo.extend.tag.register('centerquote', centerQuote, {ends: true});
hexo.extend.tag.register('cq', centerQuote, {ends: true});
================================================
FILE: scripts/tags/group-pictures.js
================================================
/**
* group-pictures.js | https://theme-next.org/docs/tag-plugins/group-pictures
*/
/* global hexo */
'use strict';
var LAYOUTS = {
2: {
1: [1, 1],
2: [2]
},
3: {
1: [3],
2: [1, 2],
3: [2, 1]
},
4: {
1: [1, 2, 1],
2: [1, 3],
3: [2, 2],
4: [3, 1]
},
5: {
1: [1, 2, 2],
2: [2, 1, 2],
3: [2, 3],
4: [3, 2]
},
6: {
1: [1, 2, 3],
2: [1, 3, 2],
3: [2, 1, 3],
4: [2, 2, 2],
5: [3, 3]
},
7: {
1: [1, 2, 2, 2],
2: [1, 3, 3],
3: [2, 2, 3],
4: [2, 3, 2],
5: [3, 2, 2]
},
8: {
1: [1, 2, 2, 3],
2: [1, 2, 3, 2],
3: [1, 3, 2, 2],
4: [2, 2, 2, 2],
5: [2, 3, 3],
6: [3, 2, 3],
7: [3, 3, 2]
},
9: {
1: [1, 2, 3, 3],
2: [1, 3, 2, 3],
3: [2, 2, 2, 3],
4: [2, 2, 3, 2],
5: [2, 3, 2, 2],
6: [3, 2, 2, 2],
7: [3, 3, 3]
},
10: {
1: [1, 3, 3, 3],
2: [2, 2, 3, 3],
3: [2, 3, 2, 3],
4: [2, 3, 3, 2],
5: [3, 2, 2, 3],
6: [3, 2, 3, 2],
7: [3, 3, 2, 2]
}
};
function groupBy(group, data) {
var r = [];
for (let count of group) {
r.push(data.slice(0, count));
data = data.slice(count);
}
return r;
}
var templates = {
dispatch: function(pictures, group, layout) {
var rule = LAYOUTS[group] ? LAYOUTS[group][layout] : null;
return rule ? this.getHTML(groupBy(rule, pictures)) : templates.defaults(pictures);
},
/**
* Defaults Layout
*
* □ □ □
* □ □ □
* ...
*
* @param pictures
*/
defaults: function(pictures) {
var ROW_SIZE = 3;
var rows = pictures.length / ROW_SIZE;
var pictureArr = [];
for (var i = 0; i < rows; i++) {
pictureArr.push(pictures.slice(i * ROW_SIZE, (i + 1) * ROW_SIZE));
}
return this.getHTML(pictureArr);
},
getHTML: function(rows) {
var rowHTML = rows.map(row => {
return `${this.getColumnHTML(row)}`;
}).join('');
return `${rowHTML}`;
},
getColumnHTML: function(pictures) {
var columnWidth = 100 / pictures.length;
var columnStyle = `style="width: ${columnWidth}%;"`;
return pictures.map(picture => {
return `${picture}`;
}).join('');
}
};
function groupPicture(args, content) {
args = args[0].split('-');
var group = parseInt(args[0], 10);
var layout = parseInt(args[1], 10);
content = hexo.render.renderSync({text: content, engine: 'markdown'});
var pictures = content.match(/
/g);
return `${templates.dispatch(pictures, group, layout)}`;
}
hexo.extend.tag.register('grouppicture', groupPicture, {ends: true});
hexo.extend.tag.register('gp', groupPicture, {ends: true});
================================================
FILE: scripts/tags/label.js
================================================
/**
* label.js | https://theme-next.org/docs/tag-plugins/label
*/
/* global hexo */
'use strict';
function postLabel(args) {
args = args.join(' ').split('@');
var classes = args[0] || 'default';
var text = args[1] || '';
!text && hexo.log.warn('Label text must be defined!');
return `${text}`;
}
hexo.extend.tag.register('label', postLabel, {ends: false});
================================================
FILE: scripts/tags/mermaid.js
================================================
/**
* mermaid.js | https://theme-next.org/docs/tag-plugins/mermaid
*/
/* global hexo */
'use strict';
function mermaid(args, content) {
return `
${args.join(' ')}
${content}
`;
}
hexo.extend.tag.register('mermaid', mermaid, {ends: true});
================================================
FILE: scripts/tags/note.js
================================================
/**
* note.js | https://theme-next.org/docs/tag-plugins/note
*/
/* global hexo */
'use strict';
function postNote(args, content) {
return `
${hexo.render.renderSync({text: content, engine: 'markdown'}).split('\n').join('')}
`;
}
hexo.extend.tag.register('note', postNote, {ends: true});
hexo.extend.tag.register('subnote', postNote, {ends: true});
================================================
FILE: scripts/tags/pdf.js
================================================
/**
* pdf.js | https://theme-next.org/docs/tag-plugins/pdf
*/
/* global hexo */
'use strict';
function pdf(args) {
let theme = hexo.theme.config;
return ``;
}
hexo.extend.tag.register('pdf', pdf, {ends: false});
================================================
FILE: scripts/tags/tabs.js
================================================
/**
* tabs.js | https://theme-next.org/docs/tag-plugins/tabs
*/
/* global hexo */
'use strict';
function postTabs(args, content) {
var tabBlock = /\n([\w\W\s\S]*?)/g;
args = args.join(' ').split(',');
var tabName = args[0];
var tabActive = Number(args[1]) || 0;
var matches = [];
var match;
var tabId = 0;
var tabNav = '';
var tabContent = '';
!tabName && hexo.log.warn('Tabs block must have unique name!');
while ((match = tabBlock.exec(content)) !== null) {
matches.push(match[1]);
matches.push(match[2]);
}
for (var i = 0; i < matches.length; i += 2) {
var tabParameters = matches[i].split('@');
var postContent = matches[i + 1];
var tabCaption = tabParameters[0] || '';
var tabIcon = tabParameters[1] || '';
var tabHref = '';
postContent = hexo.render.renderSync({text: postContent, engine: 'markdown'}).trim();
tabId += 1;
tabHref = (tabName + ' ' + tabId).toLowerCase().split(' ').join('-');
((tabCaption.length === 0) && (tabIcon.length === 0)) && (tabCaption = tabName + ' ' + tabId);
var isOnlyicon = tabIcon.length > 0 && tabCaption.length === 0 ? ' style="text-align: center;"' : '';
let icon = tabIcon.trim();
icon = icon.startsWith('fa') ? icon : 'fa fa-' + icon;
tabIcon.length > 0 && (tabIcon = ``);
var isActive = (tabActive > 0 && tabActive === tabId) || (tabActive === 0 && tabId === 1) ? ' active' : '';
tabNav += `${tabIcon + tabCaption.trim()} `;
tabContent += `${postContent}`;
}
tabNav = ``;
tabContent = `${tabContent}`;
return `${tabNav + tabContent}`;
}
hexo.extend.tag.register('tabs', postTabs, {ends: true});
hexo.extend.tag.register('subtabs', postTabs, {ends: true});
hexo.extend.tag.register('subsubtabs', postTabs, {ends: true});
================================================
FILE: scripts/tags/video.js
================================================
/**
* video.js | https://theme-next.org/docs/tag-plugins/video
*/
/* global hexo */
'use strict';
function postVideo(args) {
return ``;
}
hexo.extend.tag.register('video', postVideo, {ends: false});
================================================
FILE: source/css/_colors.styl
================================================
:root {
--body-bg-color: $body-bg-color;
--content-bg-color: $content-bg-color;
--card-bg-color: $card-bg-color;
--text-color: $text-color;
--blockquote-color: $blockquote-color;
--link-color: $link-color;
--link-hover-color: $link-hover-color;
--brand-color: $brand-color;
--brand-hover-color: $brand-hover-color;
--table-row-odd-bg-color: $table-row-odd-bg-color;
--table-row-hover-bg-color: $table-row-hover-bg-color;
--menu-item-bg-color: $menu-item-bg-color;
--btn-default-bg: $btn-default-bg;
--btn-default-color: $btn-default-color;
--btn-default-border-color: $btn-default-border-color;
--btn-default-hover-bg: $btn-default-hover-bg;
--btn-default-hover-color: $btn-default-hover-color;
--btn-default-hover-border-color: $btn-default-hover-border-color;
}
if (hexo-config('darkmode')) {
@media (prefers-color-scheme: dark) {
:root {
--body-bg-color: $body-bg-color-dark;
--content-bg-color: $content-bg-color-dark;
--card-bg-color: $card-bg-color-dark;
--text-color: $text-color-dark;
--blockquote-color: $blockquote-color-dark;
--link-color: $link-color-dark;
--link-hover-color: $link-hover-color-dark;
--brand-color: $brand-color-dark;
--brand-hover-color: $brand-hover-color-dark;
--table-row-odd-bg-color: $table-row-odd-bg-color-dark;
--table-row-hover-bg-color: $table-row-hover-bg-color-dark;
--menu-item-bg-color: $menu-item-bg-color-dark;
--btn-default-bg: $btn-default-bg-dark;
--btn-default-color: $btn-default-color-dark;
--btn-default-border-color: $btn-default-border-color-dark;
--btn-default-hover-bg: $btn-default-hover-bg-dark;
--btn-default-hover-color: $btn-default-hover-color-dark;
--btn-default-hover-border-color: $btn-default-hover-border-color-dark;
}
img {
opacity: .75;
&:hover {
opacity: .9;
}
}
}
}
================================================
FILE: source/css/_common/components/back-to-top-sidebar.styl
================================================
.back-to-top {
background: transparent;
margin: 20px - $sidebar-offset -10px -20px;
opacity: 0;
if (!hexo-config('back2top.scrollpercent')) {
span {
display: none;
}
}
&.back-to-top-on {
cursor: pointer;
opacity: $b2t-opacity;
&:hover {
opacity: $b2t-opacity-hover;
}
}
}
================================================
FILE: source/css/_common/components/back-to-top.styl
================================================
.back-to-top {
background: $b2t-bg-color;
bottom: $b2t-position-bottom;
box-sizing: border-box;
color: $b2t-color;
cursor: pointer;
left: $b2t-position-right;
opacity: $b2t-opacity;
padding: 0 6px;
position: fixed;
transition-property: bottom;
z-index: $zindex-3;
if (hexo-config('back2top.scrollpercent')) {
width: initial;
} else {
width: 24px;
span {
display: none;
}
}
&:hover {
color: $sidebar-highlight;
}
&.back-to-top-on {
bottom: $b2t-position-bottom-on;
}
+tablet-mobile() {
left: $b2t-position-right-mobile;
opacity: $b2t-opacity-hover;
}
}
================================================
FILE: source/css/_common/components/components.styl
================================================
if (hexo-config('back2top.enable')) {
.back-to-top {
font-size: $b2t-font-size;
text-align: center;
the-transition();
}
@import (hexo-config('back2top.sidebar') ? 'back-to-top-sidebar' : 'back-to-top');
}
@import 'reading-progress' if (hexo-config('reading_progress.enable'));
@import 'post';
@import 'pages';
@import 'third-party';
================================================
FILE: source/css/_common/components/pages/breadcrumb.styl
================================================
ul.breadcrumb {
font-size: $font-size-smallest;
list-style: none;
margin: 1em 0;
padding: 0 2em;
text-align: center;
li {
display: inline;
}
li + li::before {
content: '/\00a0';
font-weight: normal;
padding: .5em;
}
li + li:last-child {
font-weight: bold;
}
}
================================================
FILE: source/css/_common/components/pages/categories.styl
================================================
.category-all-page {
.category-all-title {
text-align: center;
}
.category-all {
margin-top: 20px;
}
.category-list {
list-style: none;
margin: 0;
padding: 0;
}
.category-list-item {
margin: 5px 10px;
}
.category-list-count {
color: $grey;
&::before {
content: ' (';
display: inline;
}
&::after {
content: ') ';
display: inline;
}
}
.category-list-child {
padding-left: 10px;
}
}
================================================
FILE: source/css/_common/components/pages/pages.styl
================================================
// Page specific styles
@import 'categories';
@import 'schedule';
@import 'breadcrumb';
@import 'tag-cloud';
================================================
FILE: source/css/_common/components/pages/schedule.styl
================================================
@keyframes dot-flash {
from {
opacity: 1;
transform: scale(1);
}
to {
opacity: 0;
transform: scale(.8);
}
}
.event-list {
padding: 0;
hr {
background: $black-deep;
margin: 20px 0 45px 0;
&::after {
background: $black-deep;
color: white;
content: 'NOW';
display: inline-block;
font-weight: bold;
padding: 0 5px;
text-align: right;
}
}
.event {
background: $black-deep;
margin: 20px 0;
min-height: 40px;
padding: 15px 0 15px 10px;
.event-summary {
color: white;
margin: 0;
padding-bottom: 3px;
&::before {
animation: dot-flash 1s alternate infinite ease-in-out;
color: white;
content: '\f111';
display: inline-block;
font-size: 10px;
margin-right: 25px;
vertical-align: middle;
font-family-icons();
}
}
.event-relative-time {
color: $grey;
display: inline-block;
font-size: 12px;
font-weight: normal;
padding-left: 12px;
}
.event-details {
color: white;
display: block;
line-height: 18px;
margin-left: 56px;
padding-bottom: 6px;
padding-top: 3px;
text-indent: -24px;
&::before {
color: white;
display: inline-block;
margin-right: 9px;
text-align: center;
text-indent: 0;
width: 14px;
font-family-icons();
}
&.event-location::before {
content: '\f041';
}
&.event-duration::before {
content: '\f017';
}
}
}
.event-past {
background: $whitesmoke;
.event-summary, .event-details {
color: $grey;
opacity: .9;
&::before {
animation: none;
color: $grey;
}
}
}
}
================================================
FILE: source/css/_common/components/pages/tag-cloud.styl
================================================
.tag-cloud {
text-align: center;
a {
display: inline-block;
margin: 10px;
&:hover {
color: var(--link-hover-color) !important;
}
}
}
================================================
FILE: source/css/_common/components/post/post-collapse.styl
================================================
.posts-collapse {
margin-left: $posts-collapse-margin;
position: relative;
+mobile() {
margin-left: $posts-collapse-margin-mobile;
margin-right: $posts-collapse-margin-mobile;
}
.collection-title {
font-size: $font-size-large;
position: relative;
&::before {
background: $grey-dark;
border: 1px solid white;
border-radius: 50%;
content: ' ';
height: 10px;
left: 0;
margin-left: -6px;
margin-top: -4px;
position: absolute;
top: 50%;
width: 10px;
}
}
.collection-year {
font-size: $font-size-largest;
font-weight: bold;
margin: 60px 0;
position: relative;
&::before {
background: $grey;
border-radius: 50%;
content: ' ';
height: 8px;
left: 0;
margin-left: -4px;
margin-top: -4px;
position: absolute;
top: 50%;
width: 8px;
}
}
.collection-header {
display: block;
margin: 0 0 0 20px;
small {
color: $grey;
margin-left: 5px;
}
}
.post-header {
border-bottom: 1px dashed $grey-light;
margin: 30px 0;
padding-left: 15px;
position: relative;
transition-property: border;
the-transition();
&::before {
background: $grey;
border: 1px solid white;
border-radius: 50%;
content: ' ';
height: 6px;
left: 0;
margin-left: -4px;
position: absolute;
top: $font-size-smallest;
transition-property: background;
width: 6px;
the-transition();
}
&:hover {
border-bottom-color: $grey-dim;
&::before {
background: $black-deep;
}
}
}
.post-meta {
display: inline;
font-size: $font-size-smallest;
margin-right: 10px;
}
.post-title {
display: inline;
a, span.exturl {
border-bottom: none;
color: var(--link-color);
}
.fa-external-link-alt {
font-size: $font-size-small;
margin-left: 5px;
}
}
&::before {
background: $whitesmoke;
content: ' ';
height: 100%;
left: 0;
margin-left: -2px;
position: absolute;
top: 1.25em;
width: 4px;
}
}
================================================
FILE: source/css/_common/components/post/post-copyright.styl
================================================
.post-copyright {
background: var(--card-bg-color);
border-left: 3px solid $red;
list-style: none;
margin: 2em 0 0;
padding: .5em 1em;
}
================================================
FILE: source/css/_common/components/post/post-eof.styl
================================================
.post-eof {
background: $grey-light;
height: 1px;
margin: $post-eof-margin-top auto $post-eof-margin-bottom;
text-align: center;
width: 8%;
.post-block:last-of-type & {
display: none;
}
}
================================================
FILE: source/css/_common/components/post/post-expand.styl
================================================
.content {
padding-top: 40px;
}
.post-body {
+desktop() {
text-align: unquote(hexo-config('text_align.desktop'));
}
+tablet-mobile() {
text-align: unquote(hexo-config('text_align.mobile'));
}
h1, h2, h3, h4, h5, h6 {
padding-top: 10px;
.header-anchor {
border-bottom-style: none;
color: $grey-light;
float: right;
margin-left: 10px;
visibility: hidden;
&:hover {
color: inherit;
}
}
&:hover .header-anchor {
visibility: visible;
}
}
iframe, img, video {
margin-bottom: 20px;
}
.video-container {
height: 0;
margin-bottom: 20px;
overflow: hidden;
padding-top: 75%;
position: relative;
width: 100%;
iframe, object, embed {
height: 100%;
left: 0;
margin: 0;
position: absolute;
top: 0;
width: 100%;
}
}
}
================================================
FILE: source/css/_common/components/post/post-followme.styl
================================================
.followme {
align-items: center;
background: var(--card-bg-color);
border-left: 3px solid $red;
color: $grey;
margin: 2em 0 1em 0;
padding: 1em 1.5em;
flex-column();
.social-list {
align-items: center;
display: flex;
flex-wrap: wrap;
.social-item {
margin: .5em 2em;
}
+tablet-mobile() {
.social-item {
margin: .5em .75em;
}
}
.social-link {
border: 0;
display:inline-block;
text-align: center;
.icon {
font-size: 1.75em;
height: 1.75em;
width: 1.75em;
}
.label {
display: block;
font-size: 14px;
}
}
}
}
================================================
FILE: source/css/_common/components/post/post-gallery.styl
================================================
.post-gallery {
align-items: center;
display: grid;
grid-gap: 10px;
grid-template-columns: 1fr 1fr 1fr;
margin-bottom: 20px;
+mobile() {
grid-template-columns: 1fr 1fr;
}
a {
// For fancybox
border: 0;
}
img {
margin: 0;
}
}
================================================
FILE: source/css/_common/components/post/post-header.styl
================================================
.posts-expand .post-header {
font-size: $font-size-large;
}
.posts-expand .post-title {
font-size: $font-size-largest;
font-weight: normal;
margin: initial;
text-align: center;
word-wrap();
if (hexo-config('post_edit.enable')) {
.post-edit-link {
border-bottom: none;
color: $grey;
display: inline-block;
float: right;
font-size: $font-size-larger;
margin-left: -1.2em;
the-transition-ease-in();
+mobile-small() {
margin-left: initial;
}
&:hover {
color: $sidebar-highlight;
}
}
}
}
.posts-expand .post-title-link {
border-bottom: none;
color: var(--link-color);
display: inline-block;
position: relative;
vertical-align: top;
&::before {
background: var(--link-color);
bottom: 0;
content: '';
height: 2px;
left: 0;
position: absolute;
transform: scaleX(0);
visibility: hidden;
width: 100%;
the-transition();
}
&:hover::before {
transform: scaleX(1);
visibility: visible;
}
.fa-external-link-alt {
font-size: $font-size-small;
margin-left: 5px;
}
}
.posts-expand .post-meta {
color: $grey-dark;
font-family: $font-family-posts;
font-size: $font-size-smallest;
margin: 3px 0 60px 0;
text-align: center;
.post-description {
font-size: $font-size-small;
margin-top: 2px;
}
time {
border-bottom: 1px dashed $grey-dark;
cursor: pointer;
}
}
.post-meta .post-meta-item + .post-meta-item::before {
content: '|';
margin: 0 .5em;
}
.post-meta-divider {
margin: 0 .5em;
}
.post-meta-item-icon {
margin-right: 3px;
+tablet-mobile() {
display: inline-block;
}
}
.post-meta-item-text {
if (!hexo-config('post_meta.item_text')) {
display: none;
}
+tablet-mobile() {
display: none;
}
}
================================================
FILE: source/css/_common/components/post/post-nav.styl
================================================
.post-nav {
border-top: 1px solid $gainsboro;
display: flex;
justify-content: space-between;
margin-top: 15px;
padding: 10px 5px 0;
}
.post-nav-item {
flex: 1;
a {
border-bottom: none;
display: block;
font-size: $font-size-small;
line-height: 1.6;
position: relative;
&:active {
top: 2px;
}
}
.fa {
font-size: $font-size-smallest;
}
&:first-child {
margin-right: 15px;
.fa {
margin-right: 5px;
}
}
&:last-child {
margin-left: 15px;
text-align: right;
.fa {
margin-left: 5px;
}
}
}
================================================
FILE: source/css/_common/components/post/post-reward.styl
================================================
.reward-container {
margin: 20px auto;
padding: 10px 0;
text-align: center;
width: 90%;
button {
background: transparent;
border: 1px solid #fc6423;
border-radius: 0;
color: #fc6423;
cursor: pointer;
line-height: 2;
outline: 0;
padding: 0 15px;
vertical-align: text-top;
&:hover {
background: #fc6423;
border: 1px solid transparent;
color: #fa9366
}
}
}
#qr {
padding-top: 20px;
a {
border: 0;
}
img {
display: inline-block;
margin: .8em 2em 0 2em;
max-width: 100%;
width: 180px;
}
p {
text-align: center;
}
if (hexo-config('reward_settings.animation')) {
> div:hover p {
animation: roll .1s infinite linear;
}
@keyframes roll {
from {
transform: rotateZ(30deg);
}
to {
transform: rotateZ(-30deg);
}
}
}
}
================================================
FILE: source/css/_common/components/post/post-rtl.styl
================================================
.rtl {
&.post-body {
p, a, h1, h2, h3, h4, h5, h6, li, ul, ol {
direction: rtl;
font-family: UKIJ Ekran;
}
}
&.post-title {
font-family: UKIJ Ekran;
}
}
================================================
FILE: source/css/_common/components/post/post-tags.styl
================================================
.post-tags {
margin-top: 40px;
text-align: center;
a {
display: inline-block;
font-size: $font-size-smaller;
&:not(:last-child) {
margin-right: 10px;
}
}
}
================================================
FILE: source/css/_common/components/post/post-widgets.styl
================================================
.post-widgets {
border-top: 1px solid $gainsboro;
margin-top: 15px;
text-align: center;
}
.wp_rating {
height: 20px;
line-height: 20px;
margin-top: 10px;
padding-top: 6px;
text-align: center;
}
.social-like {
display: flex;
font-size: $font-size-small;
justify-content: center;
text-align: center;
}
================================================
FILE: source/css/_common/components/post/post.styl
================================================
.post-body {
font-family: $font-family-posts;
word-wrap();
+desktop-large() {
font-size: $font-size-large;
}
.exturl .fa {
font-size: $font-size-small;
margin-left: 4px;
}
.image-caption, .figure .caption {
color: $grey-dark;
font-size: $font-size-small;
font-weight: bold;
line-height: 1;
margin: -20px auto 15px;
text-align: center;
}
}
.post-sticky-flag {
display: inline-block;
transform: rotate(30deg);
}
.post-button {
margin-top: 40px;
text-align: center;
}
.use-motion {
if (hexo-config('motion.transition.post_block')) {
.post-block, .pagination, .comments {
opacity: 0;
}
}
if (hexo-config('motion.transition.post_header')) {
.post-header {
opacity: 0;
}
}
if (hexo-config('motion.transition.post_body')) {
.post-body {
opacity: 0;
}
}
if (hexo-config('motion.transition.coll_header')) {
.collection-header {
opacity: 0;
}
}
}
@import 'post-collapse';
@import 'post-eof';
@import 'post-expand';
@import 'post-gallery';
@import 'post-header';
@import 'post-nav';
@import 'post-rtl';
@import 'post-tags';
@import 'post-widgets';
@import 'post-reward';
@import 'post-copyright' if (hexo-config('creative_commons.post'));
@import 'post-followme' if (hexo-config('follow_me'));
================================================
FILE: source/css/_common/components/reading-progress.styl
================================================
.reading-progress-bar {
background: unquote(hexo-config('reading_progress.color'));
display: block;
height: unquote(hexo-config('reading_progress.height'));
left: 0;
position: fixed;
width: 0;
z-index: $zindex-5;
if (hexo-config('reading_progress.position') == 'bottom') {
bottom: 0;
} else {
top: 0;
}
}
================================================
FILE: source/css/_common/components/third-party/gitalk.styl
================================================
.gt-header a, .gt-comments a, .gt-popup a {
border-bottom: none;
}
.gt-container .gt-popup .gt-action.is--active::before {
top: .7em;
}
================================================
FILE: source/css/_common/components/third-party/math.styl
================================================
mjx-container[jax="CHTML"][display="true"], .has-jax {
overflow: auto hidden;
}
mjx-container + br {
display: none;
}
================================================
FILE: source/css/_common/components/third-party/related-posts.styl
================================================
.popular-posts-header {
border-bottom: 1px solid $gainsboro;
display: block;
font-size: $font-size-large;
margin-bottom: 10px;
margin-top: $post-eof-margin-bottom;
}
.popular-posts {
padding: 0;
.popular-posts-item {
// list-style: none;
margin-left: 2em;
.popular-posts-title {
font-size: $font-size-small;
font-weight: normal;
line-height: $line-height-base * 1.2;
margin: 0;
}
}
}
================================================
FILE: source/css/_common/components/third-party/search.styl
================================================
.search-pop-overlay {
background: rgba(0, 0, 0, 0);
height: 100%;
left: 0;
position: fixed;
top: 0;
transition: visibility 0s linear .2s, background .2s;
visibility: hidden;
width: 100%;
z-index: $zindex-4;
&.search-active {
background: rgba(0, 0, 0, .3);
transition: background .2s;
visibility: visible;
}
}
.search-popup {
background: var(--card-bg-color);
border-radius: 5px;
height: 80%;
left: calc(50% - 350px);
position: fixed;
top: 10%;
transform: scale(0);
transition: transform .2s;
width: 700px;
z-index: $zindex-5;
.search-active & {
transform: scale(1);
}
+mobile() {
border-radius: 0;
height: 100%;
left: 0;
margin: 0;
top: 0;
width: 100%;
}
.search-icon, .popup-btn-close {
color: $grey-dark;
font-size: 18px;
padding: 0 10px;
}
.popup-btn-close {
cursor: pointer;
&:hover .fa {
color: $black-deep;
}
}
.search-header {
background: $gainsboro;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
display: flex;
padding: 5px;
}
input.search-input {
background: transparent;
border: 0;
outline: 0;
width: 100%;
&::-webkit-search-cancel-button {
display: none;
}
}
}
if (hexo-config('algolia_search.enable')) {
.search-input-container {
flex-grow: 1;
form {
padding: 2px;
}
}
.algolia-powered {
float: right;
img {
display: inline-block;
height: 18px;
vertical-align: middle;
}
}
.algolia-results {
height: calc(100% - 55px);
overflow: auto;
padding: 5px 30px;
hr {
margin: 10px 0;
}
}
.algolia-hit-item {
margin: 15px 0;
}
.algolia-hit-item-link {
border-bottom: 1px dashed $grey-light;
display: block;
the-transition();
}
.algolia-pagination {
.pagination {
border-top: none;
margin: 40px 0;
opacity: 1;
padding: 0;
}
.pagination-item {
display: inline-block;
}
.page-number {
border-top: 1px solid transparent;
the-transition();
&:hover {
border-top: 1px solid $black-deep;
}
}
.current .page-number {
@extend .pagination .page-number.current;
cursor: default;
&:hover {
border-top-color: $pagination-active-border;
}
}
.disabled-item {
visibility: hidden;
}
}
}
if (hexo-config('local_search.enable')) {
.search-popup {
.search-input-container {
flex-grow: 1;
padding: 2px;
}
ul.search-result-list {
margin: 0 5px;
padding: 0;
width: 100%;
}
p.search-result {
border-bottom: 1px dashed $grey-light;
padding: 5px 0;
}
a.search-result-title {
font-weight: bold;
}
.search-keyword {
border-bottom: 1px dashed $red;
color: $red;
font-weight: bold;
}
#search-result {
display: flex;
height: calc(100% - 55px);
overflow: auto;
padding: 5px 25px;
}
#no-result {
color: $grey-light;
margin: auto;
}
}
}
================================================
FILE: source/css/_common/components/third-party/third-party.styl
================================================
@import 'gitalk' if (hexo-config('gitalk.enable'));
@import 'search' if (hexo-config('local_search.enable') || hexo-config('algolia_search.enable'));
@import 'related-posts' if (hexo-config('related_posts.enable'));
@import 'math' if (hexo-config('math.mathjax.enable'));
================================================
FILE: source/css/_common/outline/footer/footer.styl
================================================
// Footer Section
// --------------------------------------------------
.footer {
color: $grey-dark;
font-size: $font-size-small;
padding: 20px 0;
&.footer-fixed {
bottom: 0;
left: 0;
position: absolute;
right: 0;
}
}
.footer-inner {
box-sizing: border-box;
margin: 0 auto;
text-align: center;
width: $content-desktop;
+desktop-large() {
width: $content-desktop-large;
}
+desktop-largest() {
width: $content-desktop-largest;
}
}
@keyframes iconAnimate {
0%, 100% {
transform: scale(1);
}
10%, 30% {
transform: scale(.9);
}
20%, 40%, 60%, 80% {
transform: scale(1.1);
}
50%, 70% {
transform: scale(1.1);
}
}
.languages {
display: inline-block;
font-size: $font-size-large;
position: relative;
.lang-select-label span {
margin: 0 .5em;
}
.lang-select {
height: 100%;
left: 0;
opacity: 0;
position: absolute;
top: 0;
width: 100%;
}
}
.with-love {
color: unquote(hexo-config('footer.icon.color'));
display: inline-block;
margin: 0 5px;
if (hexo-config('footer.icon.animated')) {
animation: iconAnimate 1.33s ease-in-out infinite;
}
}
.powered-by, .theme-info {
display: inline-block;
}
================================================
FILE: source/css/_common/outline/header/bookmark.styl
================================================
.book-mark-link {
border-bottom: none;
display: inline-block;
position: fixed;
right: $b2t-position-right;
top: -10px;
transition: .3s;
+tablet-mobile() {
display: none;
}
&::before {
color: unquote(hexo-config('bookmark.color'));
content: '\f02e';
font-size: 32px;
line-height: 1;
font-family-icons();
}
}
.book-mark-link:hover, .book-mark-link-fixed {
top: -2px;
}
================================================
FILE: source/css/_common/outline/header/github-banner.styl
================================================
@keyframes octocat-wave {
0%, 100% {
transform: rotate(0);
}
20%, 60% {
transform: rotate(-25deg);
}
40%, 80% {
transform: rotate(10deg);
}
}
.github-corner {
$bg-color = unquote(hexo-config('android_chrome_color'));
:hover .octo-arm {
animation: octocat-wave 560ms ease-in-out;
}
svg {
border: 0;
color: white;
fill: $bg-color;
position: absolute;
right: 0;
top: 0;
z-index: $zindex-0;
}
+tablet-mobile() {
if (hexo-config('local_search.enable') || hexo-config('algolia_search.enable')) {
display: none;
}
svg {
if (($scheme == 'Pisces') || ($scheme == 'Gemini')) {
color: $bg-color;
fill: white;
}
}
.github-corner:hover .octo-arm {
animation: none;
}
.github-corner .octo-arm {
animation: octocat-wave 560ms ease-in-out;
}
}
if ($scheme == 'Mist') {
+mobile() {
svg {
top: inherit;
}
}
}
}
================================================
FILE: source/css/_common/outline/header/header.styl
================================================
// Header Section
// --------------------------------------------------
.header {
background: $head-bg;
}
.header-inner {
margin: 0 auto;
width: $content-desktop;
+desktop-large() {
width: $content-desktop-large;
}
+desktop-largest() {
width: $content-desktop-largest;
}
}
.site-brand-container {
display: flex;
flex-shrink: 0;
padding: 0 10px;
}
@import 'headerband';
@import 'site-meta';
@import 'site-nav';
@import 'menu';
@import 'bookmark' if (hexo-config('bookmark.enable'));
@import 'github-banner' if (hexo-config('github_banner.enable'));
================================================
FILE: source/css/_common/outline/header/headerband.styl
================================================
.headband {
background: $headband-bg;
height: $headband-height;
}
================================================
FILE: source/css/_common/outline/header/menu.styl
================================================
// Menu
// --------------------------------------------------
.menu {
margin-top: 20px;
padding-left: 0;
text-align: center;
}
.menu-item {
display: inline-block;
list-style: none;
margin: 0 10px;
+mobile() {
display: block;
margin-top: 10px;
&.menu-item-search {
display: none;
}
}
a, span.exturl {
border-bottom: 0;
display: block;
font-size: $font-size-smaller;
transition-property: border-color;
the-transition();
// To prevent hover on external links with touch devices after click.
@media (hover: none) {
&:hover {
border-bottom-color: transparent !important;
}
}
}
.fa, .fab, .far, .fas {
margin-right: 8px;
}
.badge {
display: inline-block;
font-weight: bold;
line-height: 1;
margin-left: .35em;
margin-top: .35em;
text-align: center;
white-space: nowrap;
+mobile() {
float: right;
margin-left: 0;
}
}
}
.menu-item-active a {
background: var(--menu-item-bg-color);
}
.use-motion .menu-item {
opacity: 0;
}
================================================
FILE: source/css/_common/outline/header/site-meta.styl
================================================
.site-meta {
flex-grow: 1;
text-align: $site-meta-text-align;
+mobile() {
text-align: center;
}
}
.brand {
border-bottom: none;
color: var(--brand-color);
display: inline-block;
line-height: $font-size-title;
padding: 0 40px;
position: relative;
&:hover {
color: var(--brand-hover-color);
}
}
.site-title {
font-family: $font-family-logo;
font-size: $font-size-title;
font-weight: normal;
margin: 0;
}
.site-subtitle {
color: $subtitle-color;
font-size: $font-size-subtitle;
margin: 10px 0;
}
.use-motion {
.brand {
opacity: 0;
}
.site-title, .site-subtitle, .custom-logo-image {
opacity: 0;
position: relative;
top: -10px;
}
}
================================================
FILE: source/css/_common/outline/header/site-nav.styl
================================================
.site-nav-toggle, .site-nav-right {
display: none;
+mobile() {
flex-column();
}
.toggle {
color: var(--text-color);
padding: 10px;
width: 22px;
.toggle-line {
background: var(--text-color);
border-radius: 1px;
}
}
}
.site-nav {
display: block;
+mobile() {
clear: both;
display: none;
}
&.site-nav-on {
display: block;
}
}
================================================
FILE: source/css/_common/outline/mobile.styl
================================================
/*
// < 767px
+mobile() {
}
*/
+mobile-small() {
// For Pisces & Gemini schemes only wider width (remove main blocks in Gemini).
.content-wrap {
padding: initial !important;
}
// For all schemes wider width.
.posts-expand {
.post-meta {
margin: 3px 0 10px 0 !important;
}
}
.post-block {
margin-top: initial !important;
// Inside posts blocks content padding (default 40px).
padding: $content-mobile-padding 18px $content-mobile-padding !important;
}
.posts-collapse {
margin-left: 0;
margin-right: 0;
}
.post-body {
// For headers narrow width.
h1, h2, h3, h4, h5, h6 {
margin: 10px 0 8px;
}
// Rewrite paddings & margins inside tags.
.note, .tabs .tab-content .tab-pane {
h1, h2, h3, h4, h5, h6 {
margin: 0 5px;
}
}
// For paragraphs narrow width.
> p {
margin: 0 0 10px 0;
}
// Rewrite paddings & margins inside tags.
.note > p, .tabs .tab-content .tab-pane > p {
padding: 0 5px;
}
img, video {
margin-bottom: 10px !important;
}
.note {
margin-bottom: 10px !important;
padding: 10px !important;
if (hexo-config('note.icons')) {
&:not(.no-icon) {
padding-left: 35px !important;
}
}
}
.tabs .tab-content .tab-pane {
padding: 10px 10px 0 10px !important;
}
}
.post-eof {
margin: 40px auto 20px !important;
}
.pagination {
margin-top: 40px;
}
}
/*
// < 413px
+mobile-smallest() {
}
*/
================================================
FILE: source/css/_common/outline/outline.styl
================================================
.container {
min-height: 100%;
position: relative;
}
.main-inner {
margin: 0 auto;
width: $content-desktop;
+desktop-large() {
width: $content-desktop-large;
}
+desktop-largest() {
width: $content-desktop-largest;
}
}
.content-wrap {
+mobile() {
padding: 0 20px;
}
}
@import 'header';
@import 'sidebar';
@import 'footer';
@import 'mobile' if (hexo-config('mobile_layout_economy'));
================================================
FILE: source/css/_common/outline/sidebar/sidebar-author-links.styl
================================================
.links-of-author {
margin-top: 15px;
a, span.exturl {
border-bottom-color: $black-light;
display: inline-block;
font-size: $font-size-smaller;
margin-bottom: 10px;
margin-right: 10px;
vertical-align: middle;
if (hexo-config('social_icons.transition')) {
the-transition();
}
&::before {
background: rgb(random-color(0, 255) - 50%, random-color(0, 255) - 50%, random-color(0, 255) - 50%);
border-radius: 50%;
content: ' ';
display: inline-block;
height: 4px;
margin-right: 3px;
vertical-align: middle;
width: 4px;
}
}
}
================================================
FILE: source/css/_common/outline/sidebar/sidebar-author.styl
================================================
.site-author-image {
border: $site-author-image-border-width solid $site-author-image-border-color;
display: block;
margin: 0 auto;
max-width: $site-author-image-width;
padding: 2px;
if (hexo-config('avatar.rounded')) {
border-radius: 50%;
}
}
if (hexo-config('avatar.rotated')) {
.site-author-image {
transition: transform 1s ease-out;
}
.site-author-image:hover {
transform: rotateZ(360deg);
}
}
.site-author-name {
color: $site-author-name-color;
font-weight: $site-author-name-weight;
margin: $site-author-name-margin;
text-align: center;
}
.site-description {
color: $site-description-color;
font-size: $site-description-font-size;
margin-top: $site-description-margin-top;
text-align: center;
}
================================================
FILE: source/css/_common/outline/sidebar/sidebar-blogroll.styl
================================================
.links-of-blogroll {
font-size: $font-size-smaller;
margin-top: 10px;
}
.links-of-blogroll-title {
font-size: $font-size-small;
font-weight: 600;
margin-top: 0;
}
.links-of-blogroll-list {
list-style: none;
margin: 0;
padding: 0;
}
================================================
FILE: source/css/_common/outline/sidebar/sidebar-button.styl
================================================
.sidebar-button {
margin-top: 15px;
a {
border: 1px solid $orange;
border-radius: 4px;
color: $orange;
display: inline-block;
padding: 0 15px;
.fa, .fab, .far, .fas {
margin-right: 5px;
}
&:hover {
background: $orange;
border: 1px solid $orange;
color: white;
.fa, .fab, .far, .fas {
color: white;
}
}
}
}
================================================
FILE: source/css/_common/outline/sidebar/sidebar-dimmer.styl
================================================
#sidebar-dimmer {
display: none;
}
+mobile() {
#sidebar-dimmer {
background: black;
display: block;
height: 100%;
left: 100%;
opacity: 0;
position: fixed;
top: 0;
width: 100%;
z-index: $zindex-1;
}
.sidebar-active + #sidebar-dimmer {
opacity: .7;
transform: translateX(-100%);
transition: opacity .5s;
}
}
================================================
FILE: source/css/_common/outline/sidebar/sidebar-nav.styl
================================================
// Sidebar Navigation
.sidebar-nav {
margin: 0;
padding-bottom: 20px;
padding-left: 0;
li {
border-bottom: 1px solid transparent;
color: $sidebar-nav-color;
cursor: pointer;
display: inline-block;
font-size: $font-size-small;
&.sidebar-nav-overview {
margin-left: 10px;
}
&:hover {
color: $sidebar-nav-hover-color;
}
}
.sidebar-nav-active {
border-bottom-color: $sidebar-highlight;
color: $sidebar-highlight;
&:hover {
color: $sidebar-highlight;
}
}
}
.sidebar-panel {
display: none;
overflow-x: hidden;
overflow-y: auto;
}
.sidebar-panel-active {
display: block;
}
================================================
FILE: source/css/_common/outline/sidebar/sidebar-toc.styl
================================================
.post-toc {
font-size: $font-size-small;
ol {
list-style: none;
margin: 0;
padding: 0 2px 5px 10px;
text-align: left;
> ol {
padding-left: 0;
}
a {
transition-property: all;
the-transition();
}
}
.nav-item {
line-height: 1.8;
overflow: hidden;
text-overflow: ellipsis;
// text-align: justify;
if (!hexo-config('toc.wrap')) {
white-space: nowrap;
}
}
.nav {
.nav-child {
display: hexo-config('toc.expand_all') ? block : none;
}
.active > .nav-child {
display: block;
}
.active-current > .nav-child {
display: block;
> .nav-item {
display: block;
}
}
.active > a {
border-bottom-color: $sidebar-highlight;
color: $sidebar-highlight;
}
.active-current > a {
color: $sidebar-highlight;
&:hover {
color: $sidebar-highlight;
}
}
}
}
================================================
FILE: source/css/_common/outline/sidebar/sidebar-toggle.styl
================================================
.sidebar-toggle {
background: $black-deep;
bottom: 45px;
cursor: pointer;
height: 14px;
left: $b2t-position-right;
padding: 5px;
position: fixed;
width: 14px;
z-index: $zindex-3;
+tablet-mobile() {
left: $b2t-position-right-mobile;
opacity: $b2t-opacity-hover;
if (!hexo-config('sidebar.onmobile')) {
display: none;
}
}
}
.sidebar-toggle:hover .toggle-line {
background: $sidebar-highlight;
}
================================================
FILE: source/css/_common/outline/sidebar/sidebar.styl
================================================
.sidebar {
background: $black-deep;
bottom: 0;
if (!hexo-config('back2top.sidebar')){
box-shadow: inset 0 2px 6px black;
}
position: fixed;
top: 0;
+tablet-mobile() {
if (!hexo-config('sidebar.onmobile')) {
display: none;
}
}
}
.sidebar-inner {
color: $grey-dark;
padding: $sidebar-padding 10px;
text-align: center;
}
.cc-license {
margin-top: 10px;
text-align: center;
.cc-opacity {
border-bottom: none;
opacity: .7;
&:hover {
opacity: .9;
}
}
img {
display: inline-block;
}
}
@import 'sidebar-author';
@import 'sidebar-author-links';
@import 'sidebar-button';
@import 'sidebar-blogroll';
@import 'sidebar-dimmer';
@import 'sidebar-nav';
@import 'sidebar-toggle';
@import 'sidebar-toc' if (hexo-config('toc.enable'));
@import 'site-state' if (hexo-config('site_state'));
================================================
FILE: source/css/_common/outline/sidebar/site-state.styl
================================================
.site-state {
display: flex;
justify-content: center;
line-height: 1.4;
margin-top: 10px;
overflow: hidden;
text-align: center;
white-space: nowrap;
}
.site-state-item {
padding: 0 15px;
&:not(:first-child) {
border-left: 1px solid $site-state-item-border-color;
}
a {
border-bottom: none;
}
}
.site-state-item-count {
display: block;
font-size: $site-state-item-count-font-size;
font-weight: 600;
text-align: center;
}
.site-state-item-name {
color: $site-state-item-name-color;
font-size: $site-state-item-name-font-size;
}
================================================
FILE: source/css/_common/scaffolding/base.styl
================================================
::selection {
background: $selection-bg;
color: $selection-color;
}
html, body {
height: 100%;
}
body {
background: var(--body-bg-color);
color: var(--text-color);
font-family: $font-family-base;
font-size: $font-size-base;
line-height: $line-height-base;
+tablet-mobile() {
// Remove the padding of body when the sidebar is open.
padding-left: 0 !important;
padding-right: 0 !important;
}
}
h1, h2, h3, h4, h5, h6 {
font-family: $font-family-headings;
font-weight: bold;
line-height: 1.5;
margin: 20px 0 15px;
}
for headline in (1 .. 6) {
h{headline} {
font-size: $font-size-headings-base - $font-size-headings-step * headline;
}
}
p {
margin: 0 0 20px 0;
}
a, span.exturl {
border-bottom: 1px solid $link-decoration-color;
color: var(--link-color);
outline: 0;
text-decoration: none;
word-wrap();
&:hover {
border-bottom-color: var(--link-hover-color);
color: var(--link-hover-color);
}
// For spanned external links.
cursor: pointer;
}
iframe, img, video {
display: block;
margin-left: auto;
margin-right: auto;
max-width: 100%;
}
hr {
background-image: repeating-linear-gradient(-45deg, $grey-lighter, $grey-lighter 4px, transparent 4px, transparent 8px);
border: 0;
height: 3px;
margin: 40px 0;
}
blockquote {
border-left: 4px solid $grey-lighter;
color: var(--blockquote-color);
margin: 0;
padding: 0 15px;
cite::before {
content: '-';
padding: 0 5px;
}
}
dt {
font-weight: bold;
}
dd {
margin: 0;
padding: 0;
}
kbd {
background-color: $whitesmoke;
background-image: linear-gradient($gainsboro, white, $gainsboro);
border: 1px solid $grey-light;
border-radius: .2em;
box-shadow: .1em .1em .2em rgba(0, 0, 0, .1);
color: $code-foreground;
font-family: inherit;
padding: .1em .3em;
white-space: nowrap;
}
================================================
FILE: source/css/_common/scaffolding/buttons.styl
================================================
.btn {
background: var(--btn-default-bg);
border: 2px solid var(--btn-default-border-color);
border-radius: $btn-default-radius;
color: var(--btn-default-color);
display: inline-block;
font-size: $font-size-small;
line-height: 2;
padding: 0 20px;
text-decoration: none;
transition-property: background-color;
the-transition();
&:hover {
background: var(--btn-default-hover-bg);
border-color: var(--btn-default-hover-border-color);
color: var(--btn-default-hover-color);
}
+ .btn {
margin: 0 0 8px 8px;
}
.fa-fw {
text-align: left;
width: (18em / 14);
}
}
================================================
FILE: source/css/_common/scaffolding/comments.styl
================================================
.comments {
margin-top: 60px;
overflow: hidden;
}
.comment-button-group {
display: flex;
flex-wrap: wrap-reverse;
justify-content: center;
margin: 1em 0;
.comment-button {
margin: .1em .2em;
&.active {
background: var(--btn-default-hover-bg);
border-color: var(--btn-default-hover-border-color);
color: var(--btn-default-hover-color);
}
}
}
.comment-position {
display: none;
&.active {
display: block;
}
}
.tabs-comment {
background: var(--content-bg-color);
margin-top: 4em;
padding-top: 0;
.comments {
border: 0;
box-shadow: none;
margin-top: 0;
padding-top: 0;
}
}
================================================
FILE: source/css/_common/scaffolding/highlight/copy-code.styl
================================================
.highlight-container {
position: relative;
}
.highlight-container:hover .copy-btn, .highlight-container .copy-btn:focus {
opacity: 1;
}
.copy-btn {
color: $black-dim;
cursor: pointer;
line-height: 1.6;
opacity: 0;
padding: 2px 6px;
position: absolute;
the-transition();
if (hexo-config('codeblock.copy_button.style') == 'flat') {
background: white;
border: 0;
font-size: $font-size-smaller;
right: 0;
top: 0;
} else if (hexo-config('codeblock.copy_button.style') == 'mac') {
color: white;
font-size: 14px;
right: 0;
top: 2px;
} else {
background-color: $gainsboro;
background-image: linear-gradient(#fcfcfc, $gainsboro);
border: 1px solid #d5d5d5;
border-radius: 3px;
font-size: $font-size-smaller;
right: 4px;
top: 8px;
}
}
if (hexo-config('codeblock.copy_button.style') == 'mac') {
.highlight-container {
background: #21252b;
border-radius: 5px;
box-shadow: 0 10px 30px 0 rgba(0, 0, 0, .4);
padding-top: 30px;
&::before {
background: #fc625d;
border-radius: 50%;
box-shadow: 20px 0 #fdbc40, 40px 0 #35cd4b;
content: ' ';
height: 12px;
left: 12px;
margin-top: -20px;
position: absolute;
width: 12px;
}
.highlight {
border-radius: 0 0 5px 5px;
.table-container {
border-radius: 0 0 5px 5px;
}
}
}
}
================================================
FILE: source/css/_common/scaffolding/highlight/diff.styl
================================================
if ($highlight-theme == 'normal') {
$highlight-deletion = #fdd;
$highlight-addition = #dfd;
} else {
$highlight-deletion = #800000;
$highlight-addition = #008000;
}
================================================
FILE: source/css/_common/scaffolding/highlight/highlight.styl
================================================
// https://github.com/chriskempson/tomorrow-theme
$highlight-theme = hexo-config('codeblock.highlight_theme');
@import 'theme';
@import 'diff';
@import 'copy-code' if (hexo-config('codeblock.copy_button.enable'));
// Placeholder: $code-block
$code-block {
background: $highlight-background;
color: $highlight-foreground;
line-height: $line-height-code-block;
margin: 0 auto 20px;
}
pre, code {
font-family: $code-font-family;
}
code {
background: $code-background;
border-radius: 3px;
color: $code-foreground;
padding: 2px 4px;
word-wrap();
}
.highlight {
@extend $code-block;
*::selection {
background: $highlight-selection;
}
pre {
border: 0;
margin: 0;
padding: 10px 0;
}
table {
border: 0;
margin: 0;
width: auto;
}
td {
border: 0;
padding: 0;
}
figcaption {
background: $highlight-gutter.bg-color;
color: $highlight-foreground;
display: flex;
font-size: $table-font-size;
justify-content: space-between;
line-height: 1.2;
padding: .5em;
a {
color: $highlight-foreground;
&:hover {
border-bottom-color: $highlight-foreground;
}
}
}
.gutter {
disable-user-select();
pre {
background: $highlight-gutter.bg-color;
color: $highlight-gutter.color;
padding-left: 10px;
padding-right: 10px;
text-align: right;
}
}
.code pre {
background: $highlight-background;
padding-left: 10px;
width: 100%;
}
}
.gist table {
width: auto;
td {
border: 0;
}
}
pre {
@extend $code-block;
overflow: auto;
padding: 10px;
code {
background: none;
color: $highlight-foreground;
font-size: $table-font-size;
padding: 0;
text-shadow: none;
}
// For diff highlight
.deletion {
background: $highlight-deletion;
}
.addition {
background: $highlight-addition;
}
.meta {
color: $highlight-yellow;
disable-user-select();
}
.comment {
color: $highlight-comment;
}
.variable, .attribute, .tag, .name, .regexp, .ruby .constant, .xml .tag .title, .xml .pi, .xml .doctype, .html .doctype, .css .id, .css .class, .css .pseudo {
color: $highlight-red;
}
.number, .preprocessor, .built_in, .builtin-name, .literal, .params, .constant, .command {
color: $highlight-orange;
}
.ruby .class .title, .css .rules .attribute, .string, .symbol, .value, .inheritance, .header, .ruby .symbol, .xml .cdata, .special, .formula {
color: $highlight-green;
}
.title, .css .hexcolor {
color: $highlight-aqua;
}
.function, .python .decorator, .python .title, .ruby .function .title, .ruby .title .keyword, .perl .sub, .javascript .title, .coffeescript .title {
color: $highlight-blue;
}
.keyword, .javascript .function {
color: $highlight-purple;
}
}
================================================
FILE: source/css/_common/scaffolding/highlight/theme.styl
================================================
if ($highlight-theme == 'night') {
$highlight-background = #1d1f21;
$highlight-current-line = #282a2e;
$highlight-selection = #373b41;
$highlight-foreground = #c5c8c6;
$highlight-comment = #969896;
$highlight-red = #cc6666;
$highlight-orange = #de935f;
$highlight-yellow = #f0c674;
$highlight-green = #b5bd68;
$highlight-aqua = #8abeb7;
$highlight-blue = #81a2be;
$highlight-purple = #b294bb;
$highlight-gutter = {
color: lighten($highlight-background, 50%),
bg-color: darken($highlight-background, 100%)
};
} else if ($highlight-theme == 'night eighties') {
$highlight-background = #2d2d2d;
$highlight-current-line = #393939;
$highlight-selection = #515151;
$highlight-foreground = #cccccc;
$highlight-comment = #999999;
$highlight-red = #f2777a;
$highlight-orange = #f99157;
$highlight-yellow = #ffcc66;
$highlight-green = #99cc99;
$highlight-aqua = #66cccc;
$highlight-blue = #6699cc;
$highlight-purple = #cc99cc;
$highlight-gutter = {
color: $highlight-comment,
bg-color: darken($highlight-background, 40%)
};
} else if ($highlight-theme == 'night blue') {
$highlight-background = #002451;
$highlight-current-line = #00346e;
$highlight-selection = #003f8e;
$highlight-foreground = #ffffff;
$highlight-comment = #7285b7;
$highlight-red = #ff9da4;
$highlight-orange = #ffc58f;
$highlight-yellow = #ffeead;
$highlight-green = #d1f1a9;
$highlight-aqua = #99ffff;
$highlight-blue = #bbdaff;
$highlight-purple = #ebbbff;
$highlight-gutter = {
color: $highlight-comment,
bg-color: darken($highlight-background, 60%)
};
} else if ($highlight-theme == 'night bright') {
$highlight-background = #000000;
$highlight-current-line = #2a2a2a;
$highlight-selection = #424242;
$highlight-foreground = #eaeaea;
$highlight-comment = #969896;
$highlight-red = #d54e53;
$highlight-orange = #e78c45;
$highlight-yellow = #e7c547;
$highlight-green = #b9ca4a;
$highlight-aqua = #70c0b1;
$highlight-blue = #7aa6da;
$highlight-purple = #c397d8;
$highlight-gutter = {
color: lighten($highlight-background, 40%),
bg-color: lighten($highlight-background, 16%)
};
} else if ($highlight-theme == 'solarized') {
$highlight-background = #fdf6e3;
$highlight-current-line = #eee8d5;
$highlight-selection = #eee8d5;
$highlight-foreground = #586e75;
$highlight-comment = #93a1a1;
$highlight-red = #dc322f;
$highlight-orange = #cb4b16;
$highlight-yellow = #b58900;
$highlight-green = #859900;
$highlight-aqua = #2aa198;
$highlight-blue = #268bd2;
$highlight-purple = #6c71c4;
$highlight-gutter = {
color: $highlight-comment,
bg-color: $highlight-background
};
} else if ($highlight-theme == 'solarized dark') {
$highlight-background = #002b36;
$highlight-current-line = #073642;
$highlight-selection = #073642;
$highlight-foreground = #93a1a1;
$highlight-comment = #586e75;
$highlight-red = #dc322f;
$highlight-orange = #cb4b16;
$highlight-yellow = #b58900;
$highlight-green = #859900;
$highlight-aqua = #2aa198;
$highlight-blue = #268bd2;
$highlight-purple = #6c71c4;
$highlight-gutter = {
color: $highlight-comment,
bg-color: $highlight-background
};
} else if ($highlight-theme == 'galactic') {
$highlight-background = #262626;
$highlight-current-line = #303030;
$highlight-selection = #303030;
$highlight-foreground = #9e9e9e;
$highlight-comment = #6a6a6a;
$highlight-red = #ff511a;
$highlight-orange = #dd7202;
$highlight-yellow = #a68f01;
$highlight-green = #4ca340;
$highlight-aqua = #07a38f;
$highlight-blue = #3294ff;
$highlight-purple = #cc62fe;
$highlight-gutter = {
color: $highlight-comment,
bg-color: $highlight-background
};
} else {
$highlight-background = #f7f7f7;
$highlight-current-line = #efefef;
$highlight-selection = #d6d6d6;
$highlight-foreground = #4d4d4c;
$highlight-comment = #8e908c;
$highlight-red = #c82829;
$highlight-orange = #f5871f;
$highlight-yellow = #eab700;
$highlight-green = #718c00;
$highlight-aqua = #3e999f;
$highlight-blue = #4271ae;
$highlight-purple = #8959a8;
$highlight-gutter = {
color: #869194,
bg-color: #eff2f3
};
}
================================================
FILE: source/css/_common/scaffolding/normalize.styl
================================================
/* normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
/* Document
========================================================================== */
/**
* 1. Correct the line height in all browsers.
* 2. Prevent adjustments of font size after orientation changes in iOS.
*/
html {
line-height: 1.15; /* 1 */
-webkit-text-size-adjust: 100%; /* 2 */
}
/* Sections
========================================================================== */
/**
* Remove the margin in all browsers.
*/
body {
margin: 0;
}
/**
* Render the `main` element consistently in IE.
*/
main {
display: block;
}
/**
* Correct the font size and margin on `h1` elements within `section` and
* `article` contexts in Chrome, Firefox, and Safari.
*/
h1 {
font-size: 2em;
margin: .67em 0;
}
/* Grouping content
========================================================================== */
/**
* 1. Add the correct box sizing in Firefox.
* 2. Show the overflow in Edge and IE.
*/
hr {
box-sizing: content-box; /* 1 */
height: 0; /* 1 */
overflow: visible; /* 2 */
}
/**
* 1. Correct the inheritance and scaling of font size in all browsers.
* 2. Correct the odd `em` font sizing in all browsers.
*/
pre {
font-family: monospace, monospace; /* 1 */
font-size: 1em; /* 2 */
}
/* Text-level semantics
========================================================================== */
/**
* Remove the gray background on active links in IE 10.
*/
a {
background: transparent;
}
/**
* 1. Remove the bottom border in Chrome 57-
* 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
*/
abbr[title] {
border-bottom: none; /* 1 */
text-decoration: underline; /* 2 */
text-decoration: underline dotted; /* 2 */
}
/**
* Add the correct font weight in Chrome, Edge, and Safari.
*/
b, strong {
font-weight: bolder;
}
/**
* 1. Correct the inheritance and scaling of font size in all browsers.
* 2. Correct the odd `em` font sizing in all browsers.
*/
code, kbd, samp {
font-family: monospace, monospace; /* 1 */
font-size: 1em; /* 2 */
}
/**
* Add the correct font size in all browsers.
*/
small {
font-size: 80%;
}
/**
* Prevent `sub` and `sup` elements from affecting the line height in
* all browsers.
*/
sub, sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sub {
bottom: -.25em;
}
sup {
top: -.5em;
}
/* Embedded content
========================================================================== */
/**
* Remove the border on images inside links in IE 10.
*/
img {
border-style: none;
}
/* Forms
========================================================================== */
/**
* 1. Change the font styles in all browsers.
* 2. Remove the margin in Firefox and Safari.
*/
button, input, optgroup, select, textarea {
font-family: inherit; /* 1 */
font-size: 100%; /* 1 */
line-height: 1.15; /* 1 */
margin: 0; /* 2 */
}
/**
* Show the overflow in IE.
* 1. Show the overflow in Edge.
*/
button, input {
/* 1 */
overflow: visible;
}
/**
* Remove the inheritance of text transform in Edge, Firefox, and IE.
* 1. Remove the inheritance of text transform in Firefox.
*/
button, select {
/* 1 */
text-transform: none;
}
/**
* Correct the inability to style clickable types in iOS and Safari.
*/
button, [type='button'], [type='reset'], [type='submit'] {
-webkit-appearance: button;
}
/**
* Remove the inner border and padding in Firefox.
*/
button::-moz-focus-inner, [type='button']::-moz-focus-inner, [type='reset']::-moz-focus-inner, [type='submit']::-moz-focus-inner {
border-style: none;
padding: 0;
}
/**
* Restore the focus styles unset by the previous rule.
*/
button:-moz-focusring, [type='button']:-moz-focusring, [type='reset']:-moz-focusring, [type='submit']:-moz-focusring {
outline: 1px dotted ButtonText;
}
/**
* Correct the padding in Firefox.
*/
fieldset {
padding: .35em .75em .625em;
}
/**
* 1. Correct the text wrapping in Edge and IE.
* 2. Correct the color inheritance from `fieldset` elements in IE.
* 3. Remove the padding so developers are not caught out when they zero out
* `fieldset` elements in all browsers.
*/
legend {
box-sizing: border-box; /* 1 */
color: inherit; /* 2 */
display: table; /* 1 */
max-width: 100%; /* 1 */
padding: 0; /* 3 */
white-space: normal; /* 1 */
}
/**
* Add the correct vertical alignment in Chrome, Firefox, and Opera.
*/
progress {
vertical-align: baseline;
}
/**
* Remove the default vertical scrollbar in IE 10+.
*/
textarea {
overflow: auto;
}
/**
* 1. Add the correct box sizing in IE 10.
* 2. Remove the padding in IE 10.
*/
[type='checkbox'], [type='radio'] {
box-sizing: border-box; /* 1 */
padding: 0; /* 2 */
}
/**
* Correct the cursor style of increment and decrement buttons in Chrome.
*/
[type='number']::-webkit-inner-spin-button, [type='number']::-webkit-outer-spin-button {
height: auto;
}
/**
* 1. Correct the odd appearance in Chrome and Safari.
* 2. Correct the outline style in Safari.
*/
[type='search'] {
outline-offset: -2px; /* 2 */
-webkit-appearance: textfield; /* 1 */
}
/**
* Remove the inner padding in Chrome and Safari on macOS.
*/
[type='search']::-webkit-search-decoration {
-webkit-appearance: none;
}
/**
* 1. Correct the inability to style clickable types in iOS and Safari.
* 2. Change font properties to `inherit` in Safari.
*/
::-webkit-file-upload-button {
font: inherit; /* 2 */
-webkit-appearance: button; /* 1 */
}
/* Interactive
========================================================================== */
/*
* Add the correct display in Edge, IE 10+, and Firefox.
*/
details {
display: block;
}
/*
* Add the correct display in all browsers.
*/
summary {
display: list-item;
}
/* Misc
========================================================================== */
/**
* Add the correct display in IE 10+.
*/
template {
display: none;
}
/**
* Add the correct display in IE 10.
*/
[hidden] {
display: none;
}
================================================
FILE: source/css/_common/scaffolding/pagination.styl
================================================
$page-number-basic {
display: inline-block;
margin: 0 10px;
padding: 0 11px;
position: relative;
top: -1px;
+mobile() {
margin: 0 5px;
}
}
.pagination {
border-top: 1px solid $pagination-border;
margin: 120px 0 0;
text-align: center;
.prev, .next, .page-number {
@extend $page-number-basic;
border-bottom: 0;
border-top: 1px solid $pagination-link-border;
transition-property: border-color;
the-transition();
&:hover {
border-top-color: $pagination-link-hover-border;
}
}
.space {
@extend $page-number-basic;
margin: 0;
padding: 0;
}
.prev {
margin-left: 0;
}
.next {
margin-right: 0;
}
.page-number.current {
background: $pagination-active-bg;
border-top-color: $pagination-active-border;
color: $pagination-active-color;
}
}
+mobile() {
.pagination {
border-top: none;
}
.pagination {
.prev, .next, .page-number {
border-bottom: 1px solid $pagination-link-border;
border-top: 0;
margin-bottom: 10px;
padding: 0 10px;
&:hover {
border-bottom-color: $pagination-link-hover-border;
}
}
}
}
================================================
FILE: source/css/_common/scaffolding/scaffolding.styl
================================================
//
// Scaffolding
// ==================================================
@import 'normalize';
@import 'base';
@import 'tables';
@import 'buttons';
@import 'toggles';
@import 'highlight';
@import 'tags';
@import 'pagination';
@import 'comments';
================================================
FILE: source/css/_common/scaffolding/tables.styl
================================================
.table-container {
overflow: auto;
}
table {
border-collapse: collapse;
border-spacing: 0;
font-size: $table-font-size;
margin: 0 0 20px 0;
width: 100%;
}
tbody tr {
&:nth-of-type(odd) {
background: var(--table-row-odd-bg-color);
}
&:hover {
background: var(--table-row-hover-bg-color);
}
}
caption, th, td {
font-weight: normal;
padding: 8px;
vertical-align: middle;
}
th, td {
border: 1px solid $table-border-color;
border-bottom: 3px solid $table-cell-border-bottom-color;
}
th {
font-weight: 700;
padding-bottom: 10px;
}
td {
border-bottom-width: 1px;
}
================================================
FILE: source/css/_common/scaffolding/tags/blockquote-center.styl
================================================
// Blockquote with all children centered.
.blockquote-center {
border-left: none;
margin: 40px 0;
padding: 0;
position: relative;
text-align: center;
.fa {
display: block;
opacity: .6;
position: absolute;
width: 100%;
}
.fa-quote-left {
border-top: 1px solid $grey-light;
text-align: left;
top: -20px;
}
.fa-quote-right {
border-bottom: 1px solid $grey-light;
text-align: right;
bottom: -20px;
}
p, div {
text-align: center;
}
}
================================================
FILE: source/css/_common/scaffolding/tags/group-pictures.styl
================================================
.post-body .group-picture img {
margin: 0 auto;
padding: 0 3px;
}
.group-picture-row {
margin-bottom: 6px;
overflow: hidden;
}
.group-picture-column {
float: left;
margin-bottom: 10px;
}
================================================
FILE: source/css/_common/scaffolding/tags/label.styl
================================================
.post-body .label {
color: $text-color;
display: inline;
padding: 0 2px;
&.default {
background: $label-default;
}
&.primary {
background: $label-primary;
}
&.info {
background: $label-info;
}
&.success {
background: $label-success;
}
&.warning {
background: $label-warning;
}
&.danger {
background: $label-danger;
}
}
================================================
FILE: source/css/_common/scaffolding/tags/note.styl
================================================
.post-body .note {
$note-icons = hexo-config('note.icons');
$note-style = hexo-config('note.style');
border-radius: $note-border-radius;
margin-bottom: 20px;
padding: 1em;
position: relative;
if ($note-style == 'simple') {
border: 1px solid $gainsboro;
border-left-width: 5px;
}
if ($note-style == 'modern') {
background: $whitesmoke;
border: 1px solid transparent;
}
if ($note-style == 'flat') {
background: lighten($gainsboro, 65%);
border: initial;
border-left: 3px solid $gainsboro;
}
h2, h3, h4, h5, h6 {
if ($note-icons) {
margin-top: 3px;
} else {
margin-top: 0;
}
border-bottom: initial;
margin-bottom: 0;
padding-top: 0;
}
p, ul, ol, table, pre, blockquote, img {
&:first-child {
margin-top: 0;
}
&:last-child {
margin-bottom: 0;
}
}
if ($note-icons) {
&:not(.no-icon) {
padding-left: 2.5em;
&::before {
font-size: 1.5em;
left: .4em;
position: absolute;
top: calc(50% - 1em);
font-family-icons();
}
}
}
&.default {
if ($note-style == 'flat') {
background: $note-default-bg;
}
if ($note-style == 'modern') {
background: $note-modern-default-bg;
border-color: $note-modern-default-border;
color: $note-modern-default-text;
a, span.exturl {
&:not(.btn) {
border-bottom: 1px solid $note-modern-default-text;
color: $note-modern-default-text;
&:hover {
border-bottom: 1px solid $note-modern-default-hover;
color: $note-modern-default-hover;
}
}
}
}
if ($note-style != 'modern') {
border-left-color: $note-default-border;
h2, h3, h4, h5, h6 {
color: $note-default-text;
}
}
if ($note-icons) {
&:not(.no-icon)::before {
content: $note-default-icon;
if ($note-style != 'modern') {
color: $note-default-text;
}
}
}
}
&.primary {
if ($note-style == 'flat') {
background: $note-primary-bg;
}
if ($note-style == 'modern') {
background: $note-modern-primary-bg;
border-color: $note-modern-primary-border;
color: $note-modern-primary-text;
a, span.exturl {
&:not(.btn) {
border-bottom: 1px solid $note-modern-primary-text;
color: $note-modern-primary-text;
&:hover {
border-bottom: 1px solid $note-modern-primary-hover;
color: $note-modern-primary-hover;
}
}
}
}
if ($note-style != 'modern') {
border-left-color: $note-primary-border;
h2, h3, h4, h5, h6 {
color: $note-primary-text;
}
}
if ($note-icons) {
&:not(.no-icon)::before {
content: $note-primary-icon;
if ($note-style != 'modern') {
color: $note-primary-text;
}
}
}
}
&.info {
if ($note-style == 'flat') {
background: $note-info-bg;
}
if ($note-style == 'modern') {
background: $note-modern-info-bg;
border-color: $note-modern-info-border;
color: $note-modern-info-text;
a, span.exturl {
&:not(.btn) {
border-bottom: 1px solid $note-modern-info-text;
color: $note-modern-info-text;
&:hover {
border-bottom: 1px solid $note-modern-info-hover;
color: $note-modern-info-hover;
}
}
}
}
if ($note-style != 'modern') {
border-left-color: $note-info-border;
h2, h3, h4, h5, h6 {
color: $note-info-text;
}
}
if ($note-icons) {
&:not(.no-icon)::before {
content: $note-info-icon;
if ($note-style != 'modern') {
color: $note-info-text;
}
}
}
}
&.success {
if ($note-style == 'flat') {
background: $note-success-bg;
}
if ($note-style == 'modern') {
background: $note-modern-success-bg;
border-color: $note-modern-success-border;
color: $note-modern-success-text;
a, span.exturl {
&:not(.btn) {
border-bottom: 1px solid $note-modern-success-text;
color: $note-modern-success-text;
&:hover {
border-bottom: 1px solid $note-modern-success-hover;
color: $note-modern-success-hover;
}
}
}
}
if ($note-style != 'modern') {
border-left-color: $note-success-border;
h2, h3, h4, h5, h6 {
color: $note-success-text;
}
}
if ($note-icons) {
&:not(.no-icon)::before {
content: $note-success-icon;
if ($note-style != 'modern') {
color: $note-success-text;
}
}
}
}
&.warning {
if ($note-style == 'flat') {
background: $note-warning-bg;
}
if ($note-style == 'modern') {
background: $note-modern-warning-bg;
border-color: $note-modern-warning-border;
color: $note-modern-warning-text;
a, span.exturl {
&:not(.btn) {
border-bottom: 1px solid $note-modern-warning-text;
color: $note-modern-warning-text;
&:hover {
border-bottom: 1px solid $note-modern-warning-hover;
color: $note-modern-warning-hover;
}
}
}
}
if ($note-style != 'modern') {
border-left-color: $note-warning-border;
h2, h3, h4, h5, h6 {
color: $note-warning-text;
}
}
if ($note-icons) {
&:not(.no-icon)::before {
content: $note-warning-icon;
if ($note-style != 'modern') {
color: $note-warning-text;
}
}
}
}
&.danger {
if ($note-style == 'flat') {
background: $note-danger-bg;
}
if ($note-style == 'modern') {
background: $note-modern-danger-bg;
border-color: $note-modern-danger-border;
color: $note-modern-danger-text;
a, span.exturl {
&:not(.btn) {
border-bottom: 1px solid $note-modern-danger-text;
color: $note-modern-danger-text;
&:hover {
border-bottom: 1px solid $note-modern-danger-hover;
color: $note-modern-danger-hover;
}
}
}
}
if ($note-style != 'modern') {
border-left-color: $note-danger-border;
h2, h3, h4, h5, h6 {
color: $note-danger-text;
}
}
if ($note-icons) {
&:not(.no-icon)::before {
content: $note-danger-icon;
if ($note-style != 'modern') {
color: $note-danger-text;
}
}
}
}
}
================================================
FILE: source/css/_common/scaffolding/tags/pdf.styl
================================================
.pdfobject-container {
iframe, embed {
height: unquote(hexo-config('pdf.height'));
width: 100%;
}
}
================================================
FILE: source/css/_common/scaffolding/tags/tabs.styl
================================================
.post-body .tabs {
margin-bottom: 20px;
}
.post-body .tabs, .tabs-comment {
display: block;
padding-top: 10px;
position: relative;
ul.nav-tabs {
display: flex;
flex-wrap: wrap;
margin: 0;
margin-bottom: -1px;
padding: 0;
+mobile-smallest() {
display: block;
margin-bottom: 5px;
}
li.tab {
border-bottom: 1px solid $grey-lighter;
border-left: 1px solid transparent;
border-right: 1px solid transparent;
border-top: 3px solid transparent;
flex-grow: 1;
list-style-type: none;
+mobile-smallest() {
border-bottom: 1px solid transparent;
border-left: 3px solid transparent;
border-right: 1px solid transparent;
border-top: 1px solid transparent;
}
border-radius: $tbr $tbr 0 0;
+mobile-smallest() {
border-radius: $tbr;
}
if (hexo-config('tabs.transition.tabs')) {
the-transition-ease-out();
}
a {
border-bottom: initial;
display: block;
line-height: 1.8;
outline: 0;
padding: .25em .75em;
text-align: center;
i {
width: (18em / 14);
}
if (hexo-config('tabs.transition.labels')) {
the-transition-ease-out();
}
}
&.active {
border-bottom: 1px solid transparent;
border-left: 1px solid $table-border-color;
border-right: 1px solid $table-border-color;
border-top: 3px solid $orange;
+mobile-smallest() {
border-bottom: 1px solid $table-border-color;
border-left: 3px solid $orange;
border-right: 1px solid $table-border-color;
border-top: 1px solid $table-border-color;
}
a {
color: var(--link-color);
cursor: default;
}
}
}
}
.tab-content {
.tab-pane {
border: 1px solid $table-border-color;
border-top: 0;
padding: 20px 20px 0 20px;
border-radius: $tbr;
&:not(.active) {
display: none;
}
&.active {
display: block;
&:nth-of-type(1) {
border-radius: 0 $tbr $tbr $tbr;
+mobile-smallest() {
border-radius: $tbr;
}
}
}
}
}
}
================================================
FILE: source/css/_common/scaffolding/tags/tags.styl
================================================
@import 'blockquote-center';
@import 'group-pictures';
@import 'label';
@import 'tabs';
@import 'note' if (hexo-config('note.style') != 'disabled');
@import 'pdf' if (hexo-config('pdf.enable'));
================================================
FILE: source/css/_common/scaffolding/toggles.styl
================================================
.toggle {
line-height: 0;
.toggle-line {
background: white;
display: inline-block;
height: 2px;
left: 0;
position: relative;
top: 0;
transition: all .4s;
vertical-align: top;
width: 100%;
&:not(:first-child) {
margin-top: 3px;
}
}
}
if (hexo-config('sidebar.position') == 'right') {
.toggle.toggle-arrow {
.toggle-line-first {
top: 2px;
transform: rotate(-45deg);
width: 50%;
}
.toggle-line-middle {
width: 90%;
}
.toggle-line-last {
top: -2px;
transform: rotate(45deg);
width: 50%;
}
}
.toggle.toggle-close {
.toggle-line-first {
top: 5px;
transform: rotate(-45deg);
}
.toggle-line-middle {
opacity: 0;
}
.toggle-line-last {
top: -5px;
transform: rotate(45deg);
}
}
} else {
.toggle.toggle-arrow {
.toggle-line-first {
left: 50%;
top: 2px;
transform: rotate(45deg);
width: 50%;
}
.toggle-line-middle {
left: 2px;
width: 90%;
}
.toggle-line-last {
left: 50%;
top: -2px;
transform: rotate(-45deg);
width: 50%;
}
}
.toggle.toggle-close {
.toggle-line-first {
transform: rotate(-45deg);
top: 5px;
}
.toggle-line-middle {
opacity: 0;
}
.toggle-line-last {
transform: rotate(45deg);
top: -5px;
}
}
}
================================================
FILE: source/css/_mixins.styl
================================================
the-transition() {
transition-delay: 0s;
transition-duration: .2s;
transition-timing-function: ease-in-out;
}
the-transition-ease-in() {
transition-delay: 0s;
transition-duration: .2s;
transition-timing-function: ease-in;
}
the-transition-ease-out() {
transition-delay: 0s;
transition-duration: .2s;
transition-timing-function: ease-out;
}
mobile-smallest() {
@media (max-width: 413px) {
{block};
}
}
mobile-small() {
@media (max-width: 567px) {
{block};
}
}
mobile() {
@media (max-width: 767px) {
{block};
}
}
tablet-mobile() {
@media (max-width: 991px) {
{block};
}
}
tablet-desktop() {
@media (min-width: 768px) {
{block};
}
}
tablet() {
@media (min-width: 768px) and (max-width: 991px) {
{block};
}
}
desktop() {
@media (min-width: 992px) {
{block};
}
}
desktop-large() {
@media (min-width: 1200px) {
{block};
}
}
desktop-largest() {
@media (min-width: 1600px) {
{block};
}
}
random-color($min, $max) {
return floor(math(0, 'random') * ($max - $min + 1) + $min);
}
word-wrap() {
overflow-wrap: break-word;
word-wrap: break-word;
}
disable-user-select() {
-moz-user-select: none;
-ms-user-select: none;
-webkit-user-select: none;
user-select: none;
}
sidebar-inline-links-item() {
margin: 5px 0 0;
a, span.exturl {
box-sizing: border-box;
display: inline-block;
margin-bottom: 0;
margin-right: 0;
max-width: 216px;
overflow: hidden;
padding: 0 5px;
text-overflow: ellipsis;
white-space: nowrap;
}
}
flex-column() {
display: flex;
flex-direction: column;
justify-content: center;
}
font-family-icons() {
font-family: 'Font Awesome 5 Free';
font-weight: 900;
}
================================================
FILE: source/css/_schemes/Gemini/index.styl
================================================
@import '../Pisces/_layout';
@import '../Pisces/_header';
@import '../Pisces/_menu';
@import '../Pisces/_sub-menu';
@import '../Pisces/_sidebar';
// ==================================================
// Rewrite _layout.styl
// ==================================================
// Sidebar padding used as main desktop content padding for sidebar padding and post blocks padding too.
// In `source/css/_variables/Pisces.styl` there are variable for main offset:
// $sidebar-offset = 12px;
// This value alse can be changed in main NexT config as `sidebar: offset: 12` option.
// In `source/css/_variables/base.styl` there are variables for other resolutions:
// $content-tablet-padding = 10px;
// $content-mobile-padding = 8px;
// P.S. If u want to change this paddings u may set this variables into `custom_file_path.variable` (in theme _config.yml).
// So, it will 12px in Desktop, 10px in Tablets and 8px in Mobiles for all possible paddings.
// ==================================================
// Read values from NexT config and set they as local variables to use as string variables (in any CSS section).
$use-seo = hexo-config('seo');
// ==================================================
// Desktop layout styles.
// ==================================================
// Post blocks.
.content-wrap {
background: initial;
box-shadow: initial;
padding: initial;
}
// Post & Comments blocks.
.post-block {
background: var(--content-bg-color);
border-radius: $border-radius-inner;
box-shadow: $box-shadow-inner;
padding: $content-desktop-padding;
// When blocks are siblings (homepage).
& + .post-block {
border-radius: $border-radius;
// Rewrite shadows & borders because all blocks have offsets.
box-shadow: $box-shadow;
margin-top: $sidebar-offset;
}
}
// Comments blocks.
.comments {
background: var(--content-bg-color);
border-radius: $border-radius;
box-shadow: $box-shadow;
margin-top: $sidebar-offset;
padding: $content-desktop-padding;
}
.tabs-comment {
margin-top: 1em;
}
// Top main padding from header to posts (default 40px).
.content {
padding-top: initial;
}
// Post delimiters.
.post-eof {
display: none;
}
// Pagination.
.pagination {
.prev, .next, .page-number {
margin-bottom: initial;
top: initial;
}
background: var(--content-bg-color);
border-radius: $border-radius;
border-top: initial;
box-shadow: $box-shadow;
margin: $sidebar-offset 0 0;
padding: 10px 0 10px;
}
// Footer alignment.
.main {
padding-bottom: initial;
}
.footer {
bottom: auto;
}
// Sub-menu(s).
.sub-menu {
border-bottom: initial;
box-shadow: $box-shadow-inner;
// Adapt submenu(s) with post-blocks.
+ .content .post-block {
box-shadow: $box-shadow;
margin-top: $sidebar-offset;
+tablet() {
margin-top: $content-tablet-padding;
}
+mobile() {
margin-top: $content-mobile-padding;
}
}
}
// ==================================================
// Headers.
// ==================================================
.post-body {
h1, h2 {
border-bottom: 1px solid $body-bg-color;
}
h3 {
if ($use-seo) {
border-bottom: 1px solid $body-bg-color;
} else {
border-bottom: 1px dotted $body-bg-color;
}
}
h4 {
if ($use-seo) {
border-bottom: 1px dotted $body-bg-color;
}
}
}
// ==================================================
// > 768px & < 991px
// ==================================================
+tablet() {
// Posts in blocks.
.content-wrap {
padding: $content-tablet-padding;
}
.posts-expand {
// Components inside Posts.
.post-button {
margin-top: ($content-tablet-padding * 2);
}
}
.post-block {
border-radius: $border-radius;
// Rewrite shadows & borders because all blocks have offsets.
box-shadow: $box-shadow;
// Inside posts blocks content padding (default 40px).
padding: ($content-tablet-padding * 2);
}
// Only if blocks are siblings need bottom margin (homepage).
.post-block + .post-block {
margin-top: $content-tablet-padding;
}
.comments {
margin-top: $content-tablet-padding;
padding: $content-tablet-padding ($content-tablet-padding * 2);
// padding: initial;
// padding-top: $content-tablet-padding;
}
.pagination {
margin: $content-tablet-padding 0 0;
}
}
// ==================================================
// < 767px
// ==================================================
+mobile() {
// Posts in blocks.
.content-wrap {
padding: $content-mobile-padding;
}
.posts-expand {
// Components inside Posts.
.post-button {
margin: $sidebar-offset 0;
}
}
.post-block {
border-radius: $border-radius;
// Rewrite shadows & borders because all blocks have offsets.
box-shadow: $box-shadow;
min-height: auto;
// Inside posts blocks content padding (default 40px).
padding: $sidebar-offset;
}
// Only if blocks are siblings need bottom margin (homepage).
.post-block + .post-block {
margin-top: $content-mobile-padding;
}
.comments {
margin-top: $content-mobile-padding;
padding: 10px $sidebar-offset;
}
.pagination {
margin: $content-mobile-padding 0 0;
}
}
================================================
FILE: source/css/_schemes/Mist/_header.styl
================================================
// Header
// --------------------------------------------------
.header {
background: var(--content-bg-color);
}
.header-inner {
align-items: center;
display: flex;
padding: 20px 0;
+mobile() {
display: block;
padding: 10px 0;
width: auto;
}
}
.site-meta {
line-height: normal;
.brand {
padding: 2px 1px;
+mobile() {
display: block;
}
}
.site-title {
font-weight: bolder;
}
}
.logo-line-before, .logo-line-after {
display: block;
margin: 0 auto;
overflow: hidden;
width: 75%;
+mobile() {
display: none;
}
i {
background: var(--brand-color);
display: block;
height: 2px;
position: relative;
}
}
.use-motion {
.logo-line-before i {
left: -100%;
}
.logo-line-after i {
right: -100%;
}
}
.site-subtitle {
display: none;
}
================================================
FILE: source/css/_schemes/Mist/_layout.styl
================================================
// Tags
// --------------------------------------------------
hr {
height: 2px;
margin: 20px 0;
}
// Components
// --------------------------------------------------
.btn {
padding: 0 10px;
}
.headband {
display: none;
}
// Page - Container
// --------------------------------------------------
.main-inner {
padding-bottom: 80px;
+mobile() {
width: auto;
}
}
.content {
padding-top: 80px;
+mobile() {
padding-top: 60px;
}
}
// Pagination
// --------------------------------------------------
.pagination {
margin: 120px 0 0;
text-align: left;
+mobile() {
margin: 80px 10px 0;
text-align: center;
}
}
// Footer
// --------------------------------------------------
.footer {
background: var(--content-bg-color);
color: var(--text-color);
padding: 10px 0;
}
.footer-inner {
text-align: left;
+mobile() {
text-align: center;
width: auto;
}
}
================================================
FILE: source/css/_schemes/Mist/_menu.styl
================================================
// Menu
// --------------------------------------------------
.site-nav {
flex-grow: 1;
+mobile() {
padding: 10px 10px 0;
}
}
.menu {
margin: 0;
.menu-item {
margin: 0;
+mobile() {
margin-top: 5px;
}
a, span.exturl {
border-radius: 2px;
padding: 0 10px;
transition-property: background;
+mobile() {
text-align: left;
}
&:hover {
@extend .menu-item-active a;
}
}
.badge {
background: white;
border-radius: 10px;
color: $black-light;
padding: 1px 4px;
text-shadow: 1px 1px 0 rgba(0, 0, 0, .1);
}
}
}
================================================
FILE: source/css/_schemes/Mist/_posts-expand.styl
================================================
// Post Expand
// --------------------------------------------------
.posts-expand {
&.index {
.post-title, .post-meta {
text-align: $site-meta-text-align;
+mobile() {
text-align: center;
}
}
.post-meta {
margin: 5px 0 20px 0;
}
}
.post-eof {
display: none;
}
.post-block:not(:first-child) {
margin-top: 120px;
}
.post-title, .post-meta {
text-align: center;
}
.post-body img {
margin-left: 0;
}
.post-tags {
text-align: left;
a {
background: $whitesmoke;
border-bottom: none;
padding: 1px 5px;
&:hover {
background: $grey-light;
}
}
}
.post-nav {
margin-top: 40px;
}
}
.post-button {
margin-top: 20px;
text-align: left;
.btn {
// color: $grey-dim;
background: none;
border: 0;
border-bottom: 2px solid var(--btn-default-border-color);
padding: 0;
transition-property: border;
&:hover {
border-bottom-color: var(--btn-default-hover-border-color);
}
}
}
================================================
FILE: source/css/_schemes/Mist/index.styl
================================================
//
// Mist scheme
// ==================================================
@import '_layout';
@import '_header';
@import '_menu';
@import '_posts-expand';
@import '../Muse/_sidebar';
@import '../Muse/_sub-menu';
================================================
FILE: source/css/_schemes/Muse/_header.styl
================================================
.custom-logo {
.site-meta-headline {
text-align: center;
}
.site-title {
color: $black-deep;
margin: 10px auto 0;
a {
border: 0;
}
}
}
.custom-logo-image {
background: white;
margin: 0 auto;
max-width: 150px;
padding: 5px;
}
.brand {
background: var(--btn-default-bg);
}
================================================
FILE: source/css/_schemes/Muse/_layout.styl
================================================
.header-inner, .main-inner, .footer-inner {
+mobile() {
width: auto;
}
}
.header-inner {
padding-top: 100px;
+mobile() {
padding-top: 50px;
}
}
.main-inner {
padding-bottom: 60px;
}
.content {
padding-top: 70px;
+mobile() {
padding-top: 35px;
}
}
embed {
display: block;
margin: 0 auto 25px auto;
}
================================================
FILE: source/css/_schemes/Muse/_menu.styl
================================================
.site-nav {
+mobile() {
border-bottom: 1px solid $grey-lighter;
border-top: 1px solid $grey-lighter;
left: 0;
margin: 0;
padding: 0;
width: 100%;
}
}
.menu {
+mobile() {
text-align: left;
}
}
.menu-item-active a {
background: transparent;
border-bottom: 1px solid var(--link-hover-color) !important;
+mobile() {
border-bottom: 1px dotted $grey-lighter !important;
}
}
.menu .menu-item {
+mobile() {
margin: 0 10px;
}
a, span.exturl {
border-bottom: 1px solid transparent;
+mobile() {
padding: 5px 10px;
}
&:hover {
@extend .menu-item-active a;
}
}
.fa, .fab, .far, .fas {
+tablet-desktop() {
display: block;
line-height: 2;
margin-right: 0;
width: 100%;
}
}
.badge {
background: $gainsboro;
padding: 1px 4px;
}
}
================================================
FILE: source/css/_schemes/Muse/_sidebar.styl
================================================
if (hexo-config('sidebar.position') == 'right') {
.sidebar {
right: 0 - $sidebar-desktop;
&.sidebar-active {
right: 0;
}
}
.sidebar-toggle, .back-to-top {
left: auto;
right: $b2t-position-right;
+tablet-mobile() {
right: $b2t-position-right-mobile;
}
}
.book-mark-link {
left: $b2t-position-right;
}
} else {
.sidebar {
left: 0 - $sidebar-desktop;
&.sidebar-active {
left: 0;
}
}
}
.sidebar {
width: $sidebar-desktop;
z-index: $zindex-2;
the-transition-ease-out();
a, span.exturl {
border-bottom-color: $black-light;
color: $grey-dark;
&:hover {
border-bottom-color: $gainsboro;
color: $gainsboro;
}
}
}
.links-of-blogroll-item {
if (hexo-config('links_settings.layout') == 'inline') {
display: inline-block;
}
padding: 2px 10px;
a, span.exturl {
box-sizing: border-box;
display: inline-block;
max-width: 280px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
================================================
FILE: source/css/_schemes/Muse/_sub-menu.styl
================================================
.sub-menu {
margin: 10px 0;
.menu-item {
display: inline-block;
}
}
================================================
FILE: source/css/_schemes/Muse/index.styl
================================================
@import '_layout';
@import '_header';
@import '_menu';
@import '_sub-menu';
@import '_sidebar';
================================================
FILE: source/css/_schemes/Pisces/_header.styl
================================================
.site-brand-container {
background: $black-deep;
+tablet-mobile() {
box-shadow: 0 0 16px rgba(0, 0, 0, .5);
}
}
.site-meta {
padding: 20px 0;
}
.brand {
padding: 0;
}
.site-subtitle {
margin: 10px 10px 0;
}
.custom-logo-image {
margin-top: 20px;
+tablet-mobile() {
display: none;
}
}
================================================
FILE: source/css/_schemes/Pisces/_layout.styl
================================================
.header {
margin: 0 auto;
position: relative;
width: $content-desktop;
+desktop-large() {
width: $content-desktop-large;
}
+desktop-largest() {
width: $content-desktop-largest;
}
+tablet-mobile() {
width: auto;
}
}
.header-inner {
background: var(--content-bg-color);
border-radius: $border-radius-inner;
box-shadow: $box-shadow-inner;
overflow: hidden;
padding: 0;
position: absolute;
top: 0;
width: $sidebar-desktop;
+desktop-large() {
width: $sidebar-desktop;
}
+tablet-mobile() {
border-radius: initial;
position: relative;
width: auto;
}
}
.main-inner {
align-items: flex-start;
display: flex;
justify-content: space-between;
if (hexo-config('sidebar.position') != 'right') {
flex-direction: row-reverse;
}
+tablet-mobile() {
width: auto;
}
}
.content-wrap {
background: var(--content-bg-color);
border-radius: $border-radius-inner;
box-shadow: $box-shadow-inner;
box-sizing: border-box;
padding: $content-desktop-padding;
width: $content-wrap;
+tablet-mobile() {
border-radius: initial;
padding: 20px;
width: 100%;
}
}
if (hexo-config('sidebar.position') == 'right') {
.header-inner {
right: 0;
}
.book-mark-link {
left: $b2t-position-right;
}
.footer-inner {
padding-right: 260px;
}
} else {
.footer-inner {
padding-left: 260px;
}
.back-to-top {
left: auto;
right: $b2t-position-right;
+tablet-mobile() {
right: $b2t-position-right-mobile;
}
}
}
.footer-inner {
+tablet-mobile() {
padding-left: 0;
padding-right: 0;
width: auto;
}
}
================================================
FILE: source/css/_schemes/Pisces/_menu.styl
================================================
.site-nav-toggle, .site-nav-right {
+tablet() {
flex-column();
}
.toggle {
color: white;
.toggle-line {
background: white;
}
}
}
.site-nav {
+tablet() {
display: none;
}
}
.menu .menu-item {
display: block;
margin: 0;
a, span.exturl {
padding: 5px 20px;
position: relative;
text-align: left;
transition-property: background-color;
&:hover {
@extend .menu-item-active a;
}
}
+tablet-mobile() {
&.menu-item-search {
display: none;
}
}
.badge {
background: $grey-light;
border-radius: 10px;
color: white;
float: right;
padding: 2px 5px;
text-shadow: 1px 1px 0 rgba(0, 0, 0, .1);
vertical-align: middle;
}
}
if (!hexo-config('menu_settings.badges')) {
.main-menu .menu-item-active a::after {
background: $grey;
border-radius: 50%;
content: ' ';
height: 6px;
margin-top: -3px;
position: absolute;
right: 15px;
top: 50%;
width: 6px;
}
}
================================================
FILE: source/css/_schemes/Pisces/_sidebar.styl
================================================
.sidebar {
background: var(--body-bg-color);
box-shadow: none;
margin-top: 100%;
position: static;
width: $sidebar-desktop;
+tablet-mobile() {
display: none;
}
}
.sidebar-toggle {
display: none;
}
.sidebar-inner {
background: var(--content-bg-color);
border-radius: $border-radius;
box-shadow: $box-shadow;
box-sizing: border-box;
color: var(--text-color);
width: $sidebar-desktop;
if (hexo-config('motion.enable') && hexo-config('motion.transition.sidebar')) {
opacity: 0;
}
&.affix {
position: fixed;
top: $sidebar-offset;
}
&.affix-bottom {
position: absolute;
}
}
.site-state-item {
padding: 0 10px;
}
.sidebar-button {
border-bottom: 1px dotted $grey-light;
border-top: 1px dotted $grey-light;
margin-top: 10px;
text-align: center;
a {
border: 0;
color: $orange;
display: block;
&:hover {
background: none;
border: 0;
color: darken($orange, 20%);
.fa, .fab, .far, .fas {
color: darken($orange, 20%);
}
}
}
}
.links-of-author {
display: flex;
flex-wrap: wrap;
margin-top: 10px;
justify-content: center;
}
.links-of-author-item {
sidebar-inline-links-item();
if (!hexo-config('social_icons.icons_only')) {
width: 50%;
}
a, span.exturl {
border-bottom: none;
display: block;
text-decoration: none;
&::before {
display: none;
}
&:hover {
background: var(--body-bg-color);
border-radius: 4px;
}
}
.fa, .fab, .far, .fas {
margin-right: 2px;
}
}
.links-of-blogroll-item {
padding: 0;
if (hexo-config('links_settings.layout') == 'inline') {
display: inline-block;
sidebar-inline-links-item();
if (!hexo-config('social_icons.icons_only')) {
width: unset;
}
}
}
if (hexo-config('back2top.sidebar')) {
// Only when back2top.sidebar is true, apply the following styles
.back-to-top {
background: var(--body-bg-color);
margin: 8px - $sidebar-offset -10px -18px;
&.back-to-top-on {
margin-top: 16px;
}
}
}
================================================
FILE: source/css/_schemes/Pisces/_sub-menu.styl
================================================
.sub-menu {
background: var(--content-bg-color);
border-bottom: 1px solid $table-border-color;
margin: 0;
padding: 6px 0;
.menu-item {
display: inline-block;
a, span.exturl {
background: transparent;
margin: 5px 10px;
padding: initial;
&:hover {
background: transparent;
color: $sidebar-highlight;
}
}
}
.menu-item-active a {
border-bottom-color: $sidebar-highlight;
color: $sidebar-highlight;
&:hover {
border-bottom-color: $sidebar-highlight;
}
}
}
================================================
FILE: source/css/_schemes/Pisces/index.styl
================================================
@import '_layout';
@import '_header';
@import '_menu';
@import '_sub-menu';
@import '_sidebar';
================================================
FILE: source/css/_variables/Gemini.styl
================================================
// Variables of Gemini scheme
// ==================================================
@import "Pisces.styl";
// Settings for some of the most global styles.
// --------------------------------------------------
$body-bg-color = #eee;
// Borders.
// --------------------------------------------------
$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);
$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);
$border-radius-inner = initial;
$border-radius = initial;
// $border-radius-inner = 0 0 3px 3px;
// $border-radius = 3px;
================================================
FILE: source/css/_variables/Mist.styl
================================================
// Variables of Mist scheme
// ==================================================
@import "Muse.styl";
$link-decoration-color = $grey-light;
$content-bg-color = $whitesmoke;
$menu-item-bg-color = $grey-lighter;
$brand-color = $black-deep;
$brand-hover-color = $brand-color;
$site-meta-text-align = left;
$posts-collapse-left = 0;
$btn-default-bg = transparent;
$btn-default-color = var(--link-color);
$btn-default-hover-bg = transparent;
$btn-default-border-color = var(--link-color);
$btn-default-hover-color = var(--link-hover-color);
$btn-default-hover-border-color = var(--link-hover-color);
================================================
FILE: source/css/_variables/Muse.styl
================================================
// Variables of Muse scheme
// ==================================================
$sidebar-width = hexo-config('sidebar.width') is a 'unit' ? hexo-config('sidebar.width') : 320;
$sidebar-desktop = unit($sidebar-width, 'px');
================================================
FILE: source/css/_variables/Pisces.styl
================================================
// Variables of Pisces scheme
// ==================================================
// Settings for some of the most global styles.
// --------------------------------------------------
$body-bg-color = #f5f7f9;
$sidebar-width = hexo-config('sidebar.width') is a 'unit' ? hexo-config('sidebar.width') : 240;
$sidebar-desktop = unit($sidebar-width, 'px');
$content-wrap = 'calc(100% - %s)' % unit($sidebar-width + $sidebar-offset, 'px');
$content-desktop = 'calc(100% - %s)' % unit($content-desktop-padding / 2, 'px');
$content-desktop-large = 1160px;
$content-desktop-largest = 73%;
// Borders
// --------------------------------------------------
$box-shadow-inner = initial;
$box-shadow = initial;
$border-radius-inner = initial;
$border-radius = initial;
// Header
// --------------------------------------------------
$subtitle-color = $grey-lighter;
// Sidebar
// --------------------------------------------------
$sidebar-nav-color = var(--text-color);
$sidebar-nav-hover-color = $orange;
$sidebar-highlight = $orange;
$site-author-image-width = 120px;
$site-author-image-border-width = 1px;
$site-author-image-border-color = $gainsboro;
$site-author-name-margin = 0;
$site-author-name-color = var(--text-color);
$site-author-name-weight = 600;
$site-description-font-size = $font-size-smaller;
$site-description-color = $grey-dark;
$site-description-margin-top = 0;
$site-state-item-count-font-size = $font-size-medium;
$site-state-item-name-font-size = $font-size-smaller;
$site-state-item-name-color = $grey-dark;
$site-state-item-border-color = $gainsboro;
// Components
// --------------------------------------------------
// Button
$btn-default-radius = 2px;
$btn-default-bg = white;
$btn-default-color = $text-color;
$btn-default-border-color = $text-color;
$btn-default-hover-bg = $black-deep;
$btn-default-hover-color = white;
// Back to top
$b2t-opacity = .6;
$b2t-position-bottom = -100px;
$b2t-position-bottom-on = 30px;
================================================
FILE: source/css/_variables/base.styl
================================================
//
// Variables
// ==================================================
// Colors
// colors for use across theme.
// --------------------------------------------------
$whitesmoke = #f5f5f5;
$gainsboro = #eee;
$grey-lighter = #ddd;
$grey-light = #ccc;
$grey = #bbb;
$grey-dark = #999;
$grey-dim = #666;
$black-light = #555;
$black-dim = #333;
$black-deep = #222;
$red = #ff2a2a;
$blue-bright = #87daff;
$blue = #0684bd;
$blue-deep = #262a30;
$orange = #fc6423;
// Scaffolding
// Settings for some of the most global styles.
// --------------------------------------------------
// Global text color on
$text-color = $black-light;
$text-color-dark = $grey-light;
// Global link color.
$link-color = $black-light;
$link-color-dark = $grey-light;
$link-hover-color = $black-deep;
$link-hover-color-dark = $gainsboro;
$link-decoration-color = $grey-dark;
$blockquote-color = $grey-dim;
$blockquote-color-dark = $grey;
// Global border color.
$border-color = $grey-light;
// Background color for
$body-bg-color = white;
$body-bg-color-dark = #282828;
$content-bg-color = white;
$content-bg-color-dark = $black-dim;
// Selection
$selection-bg = $blue-deep;
$selection-color = $gainsboro;
// Dark mode color
$card-bg-color = $whitesmoke;
$card-bg-color-dark = $black-light;
$menu-item-bg-color = $whitesmoke;
$menu-item-bg-color-dark = $black-light;
// Typography
// Font, line-height, and elements colors.
// --------------------------------------------------
get_font_family(config) {
$custom-family = hexo-config('font.' + config + '.family');
return $custom-family is a 'string' ? $custom-family : null;
}
// Font families.
$font-family-chinese = "PingFang SC", "Microsoft YaHei";
$font-family-base = $font-family-chinese, sans-serif;
$font-family-base = get_font_family('global'), $font-family-chinese, sans-serif if get_font_family('global');
$font-family-logo = $font-family-base;
$font-family-logo = get_font_family('title'), $font-family-base if get_font_family('title');
$font-family-headings = $font-family-base;
$font-family-headings = get_font_family('headings'), $font-family-base if get_font_family('headings');
$font-family-posts = $font-family-base;
$font-family-posts = get_font_family('posts'), $font-family-base if get_font_family('posts');
$font-family-monospace = consolas, Menlo, monospace, $font-family-chinese;
$font-family-monospace = get_font_family('codes'), consolas, Menlo, monospace, $font-family-chinese if get_font_family('codes');
// Font size
$font-size-base = (hexo-config('font.enable') and hexo-config('font.global.size') is a 'unit') ? unit(hexo-config('font.global.size'), em) : 1em;
$font-size-smallest = .75em;
$font-size-smaller = .8125em;
$font-size-small = .875em;
$font-size-medium = 1em;
$font-size-large = 1.125em;
$font-size-larger = 1.25em;
$font-size-largest = 1.5em;
// Headings font size
$font-size-headings-step = .125em;
$font-size-headings-base = (hexo-config('font.enable') and hexo-config('font.headings.size') is a 'unit') ? unit(hexo-config('font.headings.size'), em) : 1.625em;
// Global line height
$line-height-base = 2;
$line-height-code-block = 1.6; // Can't be less than 1.3;
// Z-index master list
// --------------------------------------------------
$zindex-0 = 1000;
$zindex-1 = 1100;
$zindex-2 = 1200;
$zindex-3 = 1300;
$zindex-4 = 1400;
$zindex-5 = 1500;
// Table
// --------------------------------------------------
$table-border-color = $grey-lighter;
$table-font-size = $font-size-small;
$table-cell-border-bottom-color = $grey-lighter;
$table-row-odd-bg-color = #f9f9f9;
$table-row-odd-bg-color-dark = #282828;
$table-row-hover-bg-color = $whitesmoke;
$table-row-hover-bg-color-dark = #363636;
// Code & Code Blocks
// --------------------------------------------------
$code-font-family = $font-family-monospace;
$code-foreground = $black-light;
$code-background = $gainsboro;
// Buttons
// --------------------------------------------------
$btn-default-radius = 0;
$btn-default-bg = $black-deep;
$btn-default-bg-dark = $black-deep;
$btn-default-color = white;
$btn-default-color-dark = $text-color-dark;
$btn-default-border-color = $black-deep;
$btn-default-border-color-dark = $black-light;
$btn-default-hover-bg = white;
$btn-default-hover-bg-dark = $grey-dim;
$btn-default-hover-color = $black-deep;
$btn-default-hover-color-dark = $text-color-dark;
$btn-default-hover-border-color = $black-deep;
$btn-default-hover-border-color-dark = $grey-dim;
// Pagination
// --------------------------------------------------
$pagination-border = $gainsboro;
$pagination-link-bg = transparent;
$pagination-link-color = $link-color;
$pagination-link-border = $gainsboro;
$pagination-link-hover-bg = transparent;
$pagination-link-hover-color = $link-color;
$pagination-link-hover-border = $black-deep;
$pagination-active-bg = $grey-light;
$pagination-active-color = white;
$pagination-active-border = $grey-light;
// Layout sizes
// --------------------------------------------------
$content-desktop = 700px;
$content-desktop-large = 800px;
$content-desktop-largest = 900px;
$content-desktop-padding = 40px;
$content-tablet-padding = 10px;
$content-mobile-padding = 8px;
// Headband
// --------------------------------------------------
$headband-height = 3px;
$headband-bg = $black-deep;
// Section Header
// Variables for header section elements.
// --------------------------------------------------
$head-bg = transparent;
// Site Meta
$site-meta-text-align = center;
$brand-color = white;
$brand-hover-color = white;
$brand-color-dark = $grey-lighter;
$brand-hover-color-dark = $grey-lighter;
$font-size-title = (hexo-config('font.enable') and hexo-config('font.title.size') is a 'unit') ? unit(hexo-config('font.title.size'), em) : 1.375em;
$font-size-subtitle = $font-size-smaller;
$subtitle-color = $grey-dark;
$site-subtitle-color = $grey-dark;
// Posts Collpase
// --------------------------------------------------
$posts-collapse-margin = 35px;
$posts-collapse-margin-mobile = 0px;
// Sidebar
// Variables for sidebar section elements.
// --------------------------------------------------
$sidebar-padding = hexo-config('sidebar.padding') is a 'unit' ? unit(hexo-config('sidebar.padding'), px) : 18px;
$sidebar-offset = hexo-config('sidebar.offset') is a 'unit' ? unit(hexo-config('sidebar.offset'), px) : 12px;
$sidebar-nav-color = $grey-dim;
$sidebar-nav-hover-color = $whitesmoke;
$sidebar-highlight = $blue-bright;
$site-author-image-width = 96px;
$site-author-image-border-width = 2px;
$site-author-image-border-color = $black-dim;
$site-author-name-margin = 5px 0 0;
$site-author-name-color = $whitesmoke;
$site-author-name-weight = normal;
$site-description-font-size = $font-size-medium;
$site-description-color = $grey-dark;
$site-description-margin-top = 5px;
$site-state-item-count-font-size = $font-size-larger;
$site-state-item-name-font-size = $font-size-small;
$site-state-item-name-color = inherit;
$site-state-item-border-color = $black-dim;
// Components
// --------------------------------------------------
// Back to top
$b2t-opacity = 1;
$b2t-opacity-hover = .8;
$b2t-position-bottom = -100px;
$b2t-position-bottom-on = 19px;
$b2t-position-right = 30px;
$b2t-position-right-mobile = 20px;
$b2t-font-size = 12px;
$b2t-color = white;
$b2t-bg-color = $black-deep;
// .post-expand .post-eof
// In Muse scheme, margin above and below the post separator
$post-eof-margin-top = 80px; // or 160px for more white space;
$post-eof-margin-bottom = 60px; // or 120px for less white space;
// Iconography
// Icons SVG Base64
// --------------------------------------------------
// blockquote-center icon
$center-quote-left = '../images/quote-l.svg';
$center-quote-right = '../images/quote-r.svg';
// Note colors
// --------------------------------------------------
// Read note light_bg_offset from NexT config and set in "$lbg%" to use it as string variable.
$lbg = hexo-config('note.light_bg_offset') is a 'unit' ? unit(hexo-config('note.light_bg_offset'), "%") : 0;
// Default
$note-border-radius = 3px;
$note-default-border = #777;
$note-default-bg = lighten(spin($note-default-border, 0), 94% + $lbg);
$note-default-text = $note-default-border;
$note-default-icon = "\f0a9";
$note-modern-default-border = #e1e1e1;
$note-modern-default-bg = lighten(spin($note-modern-default-border, 10), 60% + ($lbg * 4));
$note-modern-default-text = $grey-dim;
$note-modern-default-hover = darken(spin($note-modern-default-text, -10), 32%);
// Primary
$note-primary-border = #6f42c1;
$note-primary-bg = lighten(spin($note-primary-border, 10), 92% + $lbg);
$note-primary-text = $note-primary-border;
$note-primary-icon = "\f055";
$note-modern-primary-border = #e1c2ff;
$note-modern-primary-bg = lighten(spin($note-modern-primary-border, 10), 40% + ($lbg * 4));
$note-modern-primary-text = #6f42c1;
$note-modern-primary-hover = darken(spin($note-modern-primary-text, -10), 22%);
// Info
$note-info-border = #428bca;
$note-info-bg = lighten(spin($note-info-border, -10), 91% + $lbg);
$note-info-text = $note-info-border;
$note-info-icon = "\f05a";
$note-modern-info-border = #b3e5ef;
$note-modern-info-bg = lighten(spin($note-modern-info-border, 10), 50% + ($lbg * 4));
$note-modern-info-text = #31708f;
$note-modern-info-hover = darken(spin($note-modern-info-text, -10), 32%);
// Success
$note-success-border = #5cb85c;
$note-success-bg = lighten(spin($note-success-border, 10), 90% + $lbg);
$note-success-text = $note-success-border;
$note-success-icon = "\f058";
$note-modern-success-border = #d0e6be;
$note-modern-success-bg = lighten(spin($note-modern-success-border, 10), 40% + ($lbg * 4));
$note-modern-success-text = #3c763d;
$note-modern-success-hover = darken(spin($note-modern-success-text, -10), 27%);
// Warning
$note-warning-border = #f0ad4e;
$note-warning-bg = lighten(spin($note-warning-border, 10), 88% + $lbg);
$note-warning-text = $note-warning-border;
$note-warning-icon = "\f06a";
$note-modern-warning-border = #fae4cd;
$note-modern-warning-bg = lighten(spin($note-modern-warning-border, 10), 43% + ($lbg * 4));
$note-modern-warning-text = #8a6d3b;
$note-modern-warning-hover = darken(spin($note-modern-warning-text, -10), 18%);
// Danger
$note-danger-border = #d9534f;
$note-danger-bg = lighten(spin($note-danger-border, -10), 92% + $lbg);
$note-danger-text = $note-danger-border;
$note-danger-icon = "\f056";
$note-modern-danger-border = #ebcdd2;
$note-modern-danger-bg = lighten(spin($note-modern-danger-border, 10), 35% + ($lbg * 4));
$note-modern-danger-text = #a94442;
$note-modern-danger-hover = darken(spin($note-modern-danger-text, -10), 22%);
// Tabs border radius
// --------------------------------------------------
$tbr = 0;
// Label colors
// --------------------------------------------------
$label-default = lighten(spin($note-default-border, 0), 89% + $lbg);
$label-primary = lighten(spin($note-primary-border, 10), 87% + $lbg);
$label-info = lighten(spin($note-info-border, -10), 86% + $lbg);
$label-success = lighten(spin($note-success-border, 10), 85% + $lbg);
$label-warning = lighten(spin($note-warning-border, 10), 83% + $lbg);
$label-danger = lighten(spin($note-danger-border, -10), 87% + $lbg);
================================================
FILE: source/css/main.styl
================================================
// CSS Style Guide: http://codeguide.co/#css
$scheme = hexo-config('scheme') ? hexo-config('scheme') : 'Muse';
$variables = base $scheme;
// Variables Layer
// --------------------------------------------------
for $variable in $variables
@import "_variables/" + $variable;
for $inject_variable in hexo-config('injects.variable')
@import $inject_variable;
// Mixins Layer
// --------------------------------------------------
@import "_mixins.styl";
for $inject_mixin in hexo-config('injects.mixin')
@import $inject_mixin;
// Dark mode colors
// --------------------------------------------------
@import "_colors.styl";
// Common Layer
// --------------------------------------------------
// Scaffolding
@import "_common/scaffolding";
// Layout
@import "_common/outline";
// Components
@import "_common/components";
// Schemes Layer
// --------------------------------------------------
@import "_schemes/" + $scheme;
// Custom Layer
// --------------------------------------------------
for $inject_style in hexo-config('injects.style')
@import $inject_style;
================================================
FILE: source/js/algolia-search.js
================================================
/* global instantsearch, algoliasearch, CONFIG */
document.addEventListener('DOMContentLoaded', () => {
const algoliaSettings = CONFIG.algolia;
const { indexName, appID, apiKey } = algoliaSettings;
let search = instantsearch({
indexName,
searchClient : algoliasearch(appID, apiKey),
searchFunction: helper => {
let searchInput = document.querySelector('.search-input');
if (searchInput.value) {
helper.search();
}
}
});
window.pjax && search.on('render', () => {
window.pjax.refresh(document.getElementById('algolia-hits'));
});
// Registering Widgets
search.addWidgets([
instantsearch.widgets.configure({
hitsPerPage: algoliaSettings.hits.per_page || 10
}),
instantsearch.widgets.searchBox({
container : '.search-input-container',
placeholder : algoliaSettings.labels.input_placeholder,
// Hide default icons of algolia search
showReset : false,
showSubmit : false,
showLoadingIndicator: false,
cssClasses : {
input: 'search-input'
}
}),
instantsearch.widgets.stats({
container: '#algolia-stats',
templates: {
text: data => {
let stats = algoliaSettings.labels.hits_stats
.replace(/\$\{hits}/, data.nbHits)
.replace(/\$\{time}/, data.processingTimeMS);
return `${stats}
`;
}
}
}),
instantsearch.widgets.hits({
container: '#algolia-hits',
templates: {
item: data => {
let link = data.permalink ? data.permalink : CONFIG.root + data.path;
return `${data._highlightResult.title.value}`;
},
empty: data => {
return `
${algoliaSettings.labels.hits_empty.replace(/\$\{query}/, data.query)}
`;
}
},
cssClasses: {
item: 'algolia-hit-item'
}
}),
instantsearch.widgets.pagination({
container: '#algolia-pagination',
scrollTo : false,
showFirst: false,
showLast : false,
templates: {
first : '',
last : '',
previous: '',
next : ''
},
cssClasses: {
root : 'pagination',
item : 'pagination-item',
link : 'page-number',
selectedItem: 'current',
disabledItem: 'disabled-item'
}
})
]);
search.start();
// Handle and trigger popup window
document.querySelectorAll('.popup-trigger').forEach(element => {
element.addEventListener('click', () => {
document.body.style.overflow = 'hidden';
document.querySelector('.search-pop-overlay').classList.add('search-active');
document.querySelector('.search-input').focus();
});
});
// Monitor main search box
const onPopupClose = () => {
document.body.style.overflow = '';
document.querySelector('.search-pop-overlay').classList.remove('search-active');
};
document.querySelector('.search-pop-overlay').addEventListener('click', event => {
if (event.target === document.querySelector('.search-pop-overlay')) {
onPopupClose();
}
});
document.querySelector('.popup-btn-close').addEventListener('click', onPopupClose);
window.addEventListener('pjax:success', onPopupClose);
window.addEventListener('keyup', event => {
if (event.key === 'Escape') {
onPopupClose();
}
});
});
================================================
FILE: source/js/bookmark.js
================================================
/* global CONFIG */
document.addEventListener('DOMContentLoaded', () => {
'use strict';
var doSaveScroll = () => {
localStorage.setItem('bookmark' + location.pathname, window.scrollY);
};
var scrollToMark = () => {
var top = localStorage.getItem('bookmark' + location.pathname);
top = parseInt(top, 10);
// If the page opens with a specific hash, just jump out
if (!isNaN(top) && location.hash === '') {
// Auto scroll to the position
window.anime({
targets : document.scrollingElement,
duration : 200,
easing : 'linear',
scrollTop: top
});
}
};
// Register everything
var init = function(trigger) {
// Create a link element
var link = document.querySelector('.book-mark-link');
// Scroll event
window.addEventListener('scroll', () => link.classList.toggle('book-mark-link-fixed', window.scrollY === 0));
// Register beforeunload event when the trigger is auto
if (trigger === 'auto') {
// Register beforeunload event
window.addEventListener('beforeunload', doSaveScroll);
window.addEventListener('pjax:send', doSaveScroll);
}
// Save the position by clicking the icon
link.addEventListener('click', () => {
doSaveScroll();
window.anime({
targets : link,
duration: 200,
easing : 'linear',
top : -30,
complete: () => {
setTimeout(() => {
link.style.top = '';
}, 400);
}
});
});
scrollToMark();
window.addEventListener('pjax:success', scrollToMark);
};
init(CONFIG.bookmark.save);
});
================================================
FILE: source/js/local-search.js
================================================
/* global CONFIG */
document.addEventListener('DOMContentLoaded', () => {
// Popup Window
let isfetched = false;
let datas;
let isXml = true;
// Search DB path
let searchPath = CONFIG.path;
if (searchPath.length === 0) {
searchPath = 'search.xml';
} else if (searchPath.endsWith('json')) {
isXml = false;
}
const input = document.querySelector('.search-input');
const resultContent = document.getElementById('search-result');
const getIndexByWord = (word, text, caseSensitive) => {
if (CONFIG.localsearch.unescape) {
let div = document.createElement('div');
div.innerText = word;
word = div.innerHTML;
}
let wordLen = word.length;
if (wordLen === 0) return [];
let startPosition = 0;
let position = [];
let index = [];
if (!caseSensitive) {
text = text.toLowerCase();
word = word.toLowerCase();
}
while ((position = text.indexOf(word, startPosition)) > -1) {
index.push({ position, word });
startPosition = position + wordLen;
}
return index;
};
// Merge hits into slices
const mergeIntoSlice = (start, end, index, searchText) => {
let item = index[index.length - 1];
let { position, word } = item;
let hits = [];
let searchTextCountInSlice = 0;
while (position + word.length <= end && index.length !== 0) {
if (word === searchText) {
searchTextCountInSlice++;
}
hits.push({
position,
length: word.length
});
let wordEnd = position + word.length;
// Move to next position of hit
index.pop();
while (index.length !== 0) {
item = index[index.length - 1];
position = item.position;
word = item.word;
if (wordEnd > position) {
index.pop();
} else {
break;
}
}
}
return {
hits,
start,
end,
searchTextCount: searchTextCountInSlice
};
};
// Highlight title and content
const highlightKeyword = (text, slice) => {
let result = '';
let prevEnd = slice.start;
slice.hits.forEach(hit => {
result += text.substring(prevEnd, hit.position);
let end = hit.position + hit.length;
result += `${text.substring(hit.position, end)}`;
prevEnd = end;
});
result += text.substring(prevEnd, slice.end);
return result;
};
const inputEventFunction = () => {
if (!isfetched) return;
let searchText = input.value.trim().toLowerCase();
let keywords = searchText.split(/[-\s]+/);
if (keywords.length > 1) {
keywords.push(searchText);
}
let resultItems = [];
if (searchText.length > 0) {
// Perform local searching
datas.forEach(({ title, content, url }) => {
let titleInLowerCase = title.toLowerCase();
let contentInLowerCase = content.toLowerCase();
let indexOfTitle = [];
let indexOfContent = [];
let searchTextCount = 0;
keywords.forEach(keyword => {
indexOfTitle = indexOfTitle.concat(getIndexByWord(keyword, titleInLowerCase, false));
indexOfContent = indexOfContent.concat(getIndexByWord(keyword, contentInLowerCase, false));
});
// Show search results
if (indexOfTitle.length > 0 || indexOfContent.length > 0) {
let hitCount = indexOfTitle.length + indexOfContent.length;
// Sort index by position of keyword
[indexOfTitle, indexOfContent].forEach(index => {
index.sort((itemLeft, itemRight) => {
if (itemRight.position !== itemLeft.position) {
return itemRight.position - itemLeft.position;
}
return itemLeft.word.length - itemRight.word.length;
});
});
let slicesOfTitle = [];
if (indexOfTitle.length !== 0) {
let tmp = mergeIntoSlice(0, title.length, indexOfTitle, searchText);
searchTextCount += tmp.searchTextCountInSlice;
slicesOfTitle.push(tmp);
}
let slicesOfContent = [];
while (indexOfContent.length !== 0) {
let item = indexOfContent[indexOfContent.length - 1];
let { position, word } = item;
// Cut out 100 characters
let start = position - 20;
let end = position + 80;
if (start < 0) {
start = 0;
}
if (end < position + word.length) {
end = position + word.length;
}
if (end > content.length) {
end = content.length;
}
let tmp = mergeIntoSlice(start, end, indexOfContent, searchText);
searchTextCount += tmp.searchTextCountInSlice;
slicesOfContent.push(tmp);
}
// Sort slices in content by search text's count and hits' count
slicesOfContent.sort((sliceLeft, sliceRight) => {
if (sliceLeft.searchTextCount !== sliceRight.searchTextCount) {
return sliceRight.searchTextCount - sliceLeft.searchTextCount;
} else if (sliceLeft.hits.length !== sliceRight.hits.length) {
return sliceRight.hits.length - sliceLeft.hits.length;
}
return sliceLeft.start - sliceRight.start;
});
// Select top N slices in content
let upperBound = parseInt(CONFIG.localsearch.top_n_per_article, 10);
if (upperBound >= 0) {
slicesOfContent = slicesOfContent.slice(0, upperBound);
}
let resultItem = '';
if (slicesOfTitle.length !== 0) {
resultItem += `${highlightKeyword(title, slicesOfTitle[0])}`;
} else {
resultItem += ` ${title}`;
}
slicesOfContent.forEach(slice => {
resultItem += `${highlightKeyword(content, slice)}...
`;
});
resultItem += ' ';
resultItems.push({
item: resultItem,
id : resultItems.length,
hitCount,
searchTextCount
});
}
});
}
if (keywords.length === 1 && keywords[0] === '') {
resultContent.innerHTML = '';
} else if (resultItems.length === 0) {
resultContent.innerHTML = '';
} else {
resultItems.sort((resultLeft, resultRight) => {
if (resultLeft.searchTextCount !== resultRight.searchTextCount) {
return resultRight.searchTextCount - resultLeft.searchTextCount;
} else if (resultLeft.hitCount !== resultRight.hitCount) {
return resultRight.hitCount - resultLeft.hitCount;
}
return resultRight.id - resultLeft.id;
});
resultContent.innerHTML = `${resultItems.map(result => result.item).join('')}
`;
window.pjax && window.pjax.refresh(resultContent);
}
};
const fetchData = () => {
fetch(CONFIG.root + searchPath)
.then(response => response.text())
.then(res => {
// Get the contents from search data
isfetched = true;
datas = isXml ? [...new DOMParser().parseFromString(res, 'text/xml').querySelectorAll('entry')].map(element => {
return {
title : element.querySelector('title').textContent,
content: element.querySelector('content').textContent,
url : element.querySelector('url').textContent
};
}) : JSON.parse(res);
// Only match articles with not empty titles
datas = datas.filter(data => data.title).map(data => {
data.title = data.title.trim();
data.content = data.content ? data.content.trim().replace(/<[^>]+>/g, '') : '';
data.url = decodeURIComponent(data.url).replace(/\/{2,}/g, '/');
return data;
});
// Remove loading animation
document.getElementById('no-result').innerHTML = '';
inputEventFunction();
});
};
if (CONFIG.localsearch.preload) {
fetchData();
}
if (CONFIG.localsearch.trigger === 'auto') {
input.addEventListener('input', inputEventFunction);
} else {
document.querySelector('.search-icon').addEventListener('click', inputEventFunction);
input.addEventListener('keypress', event => {
if (event.key === 'Enter') {
inputEventFunction();
}
});
}
// Handle and trigger popup window
document.querySelectorAll('.popup-trigger').forEach(element => {
element.addEventListener('click', () => {
document.body.style.overflow = 'hidden';
document.querySelector('.search-pop-overlay').classList.add('search-active');
input.focus();
if (!isfetched) fetchData();
});
});
// Monitor main search box
const onPopupClose = () => {
document.body.style.overflow = '';
document.querySelector('.search-pop-overlay').classList.remove('search-active');
};
document.querySelector('.search-pop-overlay').addEventListener('click', event => {
if (event.target === document.querySelector('.search-pop-overlay')) {
onPopupClose();
}
});
document.querySelector('.popup-btn-close').addEventListener('click', onPopupClose);
window.addEventListener('pjax:success', onPopupClose);
window.addEventListener('keyup', event => {
if (event.key === 'Escape') {
onPopupClose();
}
});
});
================================================
FILE: source/js/motion.js
================================================
/* global NexT, CONFIG, Velocity */
if (window.$ && window.$.Velocity) window.Velocity = window.$.Velocity;
NexT.motion = {};
NexT.motion.integrator = {
queue : [],
cursor: -1,
init : function() {
this.queue = [];
this.cursor = -1;
return this;
},
add: function(fn) {
this.queue.push(fn);
return this;
},
next: function() {
this.cursor++;
var fn = this.queue[this.cursor];
typeof fn === 'function' && fn(NexT.motion.integrator);
},
bootstrap: function() {
this.next();
}
};
NexT.motion.middleWares = {
logo: function(integrator) {
var sequence = [];
var brand = document.querySelector('.brand');
var image = document.querySelector('.custom-logo-image');
var title = document.querySelector('.site-title');
var subtitle = document.querySelector('.site-subtitle');
var logoLineTop = document.querySelector('.logo-line-before i');
var logoLineBottom = document.querySelector('.logo-line-after i');
brand && sequence.push({
e: brand,
p: {opacity: 1},
o: {duration: 200}
});
function getMistLineSettings(element, translateX) {
return {
e: element,
p: {translateX},
o: {
duration : 500,
sequenceQueue: false
}
};
}
function pushImageToSequence() {
sequence.push({
e: image,
p: {opacity: 1, top: 0},
o: {duration: 200}
});
}
CONFIG.scheme === 'Mist' && logoLineTop && logoLineBottom
&& sequence.push(
getMistLineSettings(logoLineTop, '100%'),
getMistLineSettings(logoLineBottom, '-100%')
);
CONFIG.scheme === 'Muse' && image && pushImageToSequence();
title && sequence.push({
e: title,
p: {opacity: 1, top: 0},
o: {duration: 200}
});
subtitle && sequence.push({
e: subtitle,
p: {opacity: 1, top: 0},
o: {duration: 200}
});
(CONFIG.scheme === 'Pisces' || CONFIG.scheme === 'Gemini') && image && pushImageToSequence();
if (sequence.length > 0) {
sequence[sequence.length - 1].o.complete = function() {
integrator.next();
};
Velocity.RunSequence(sequence);
} else {
integrator.next();
}
if (CONFIG.motion.async) {
integrator.next();
}
},
menu: function(integrator) {
Velocity(document.querySelectorAll('.menu-item'), 'transition.slideDownIn', {
display : null,
duration: 200,
complete: function() {
integrator.next();
}
});
if (CONFIG.motion.async) {
integrator.next();
}
},
subMenu: function(integrator) {
var subMenuItem = document.querySelectorAll('.sub-menu .menu-item');
if (subMenuItem.length > 0) {
subMenuItem.forEach(element => {
element.style.opacity = 1;
});
}
integrator.next();
},
postList: function(integrator) {
var postBlock = document.querySelectorAll('.post-block, .pagination, .comments');
var postBlockTransition = CONFIG.motion.transition.post_block;
var postHeader = document.querySelectorAll('.post-header');
var postHeaderTransition = CONFIG.motion.transition.post_header;
var postBody = document.querySelectorAll('.post-body');
var postBodyTransition = CONFIG.motion.transition.post_body;
var collHeader = document.querySelectorAll('.collection-header');
var collHeaderTransition = CONFIG.motion.transition.coll_header;
if (postBlock.length > 0) {
var postMotionOptions = window.postMotionOptions || {
stagger : 100,
drag : true,
complete: function() {
integrator.next();
}
};
if (CONFIG.motion.transition.post_block) {
Velocity(postBlock, 'transition.' + postBlockTransition, postMotionOptions);
}
if (CONFIG.motion.transition.post_header) {
Velocity(postHeader, 'transition.' + postHeaderTransition, postMotionOptions);
}
if (CONFIG.motion.transition.post_body) {
Velocity(postBody, 'transition.' + postBodyTransition, postMotionOptions);
}
if (CONFIG.motion.transition.coll_header) {
Velocity(collHeader, 'transition.' + collHeaderTransition, postMotionOptions);
}
}
if (CONFIG.scheme === 'Pisces' || CONFIG.scheme === 'Gemini') {
integrator.next();
}
},
sidebar: function(integrator) {
var sidebarAffix = document.querySelector('.sidebar-inner');
var sidebarAffixTransition = CONFIG.motion.transition.sidebar;
// Only for Pisces | Gemini.
if (sidebarAffixTransition && (CONFIG.scheme === 'Pisces' || CONFIG.scheme === 'Gemini')) {
Velocity(sidebarAffix, 'transition.' + sidebarAffixTransition, {
display : null,
duration: 200,
complete: function() {
// After motion complete need to remove transform from sidebar to let affix work on Pisces | Gemini.
sidebarAffix.style.transform = 'initial';
}
});
}
integrator.next();
}
};
================================================
FILE: source/js/next-boot.js
================================================
/* global NexT, CONFIG, Velocity */
NexT.boot = {};
NexT.boot.registerEvents = function() {
NexT.utils.registerScrollPercent();
NexT.utils.registerCanIUseTag();
// Mobile top menu bar.
document.querySelector('.site-nav-toggle .toggle').addEventListener('click', () => {
event.currentTarget.classList.toggle('toggle-close');
var siteNav = document.querySelector('.site-nav');
var animateAction = siteNav.classList.contains('site-nav-on') ? 'slideUp' : 'slideDown';
if (typeof Velocity === 'function') {
Velocity(siteNav, animateAction, {
duration: 200,
complete: function() {
siteNav.classList.toggle('site-nav-on');
}
});
} else {
siteNav.classList.toggle('site-nav-on');
}
});
var TAB_ANIMATE_DURATION = 200;
document.querySelectorAll('.sidebar-nav li').forEach((element, index) => {
element.addEventListener('click', event => {
var item = event.currentTarget;
var activeTabClassName = 'sidebar-nav-active';
var activePanelClassName = 'sidebar-panel-active';
if (item.classList.contains(activeTabClassName)) return;
var targets = document.querySelectorAll('.sidebar-panel');
var target = targets[index];
var currentTarget = targets[1 - index];
window.anime({
targets : currentTarget,
duration: TAB_ANIMATE_DURATION,
easing : 'linear',
opacity : 0,
complete: () => {
// Prevent adding TOC to Overview if Overview was selected when close & open sidebar.
currentTarget.classList.remove(activePanelClassName);
target.style.opacity = 0;
target.classList.add(activePanelClassName);
window.anime({
targets : target,
duration: TAB_ANIMATE_DURATION,
easing : 'linear',
opacity : 1
});
}
});
[...item.parentNode.children].forEach(element => {
element.classList.remove(activeTabClassName);
});
item.classList.add(activeTabClassName);
});
});
window.addEventListener('resize', NexT.utils.initSidebarDimension);
window.addEventListener('hashchange', () => {
var tHash = location.hash;
if (tHash !== '' && !tHash.match(/%\S{2}/)) {
var target = document.querySelector(`.tabs ul.nav-tabs li a[href="${tHash}"]`);
target && target.click();
}
});
};
NexT.boot.refresh = function() {
/**
* Register JS handlers by condition option.
* Need to add config option in Front-End at 'layout/_partials/head.swig' file.
*/
CONFIG.fancybox && NexT.utils.wrapImageWithFancyBox();
CONFIG.mediumzoom && window.mediumZoom('.post-body :not(a) > img, .post-body > img');
CONFIG.lazyload && window.lozad('.post-body img').observe();
CONFIG.pangu && window.pangu.spacingPage();
CONFIG.exturl && NexT.utils.registerExtURL();
CONFIG.copycode.enable && NexT.utils.registerCopyCode();
NexT.utils.registerTabsTag();
NexT.utils.registerActiveMenuItem();
NexT.utils.registerLangSelect();
NexT.utils.registerSidebarTOC();
NexT.utils.wrapTableWithBox();
NexT.utils.registerVideoIframe();
};
NexT.boot.motion = function() {
// Define Motion Sequence & Bootstrap Motion.
if (CONFIG.motion.enable) {
NexT.motion.integrator
.add(NexT.motion.middleWares.logo)
.add(NexT.motion.middleWares.menu)
.add(NexT.motion.middleWares.postList)
.add(NexT.motion.middleWares.sidebar)
.bootstrap();
}
NexT.utils.updateSidebarPosition();
};
document.addEventListener('DOMContentLoaded', () => {
NexT.boot.registerEvents();
NexT.boot.refresh();
NexT.boot.motion();
});
================================================
FILE: source/js/schemes/muse.js
================================================
/* global NexT, CONFIG, Velocity */
document.addEventListener('DOMContentLoaded', () => {
var isRight = CONFIG.sidebar.position === 'right';
var SIDEBAR_WIDTH = CONFIG.sidebar.width || 320;
var SIDEBAR_DISPLAY_DURATION = 200;
var mousePos = {};
var sidebarToggleLines = {
lines: document.querySelector('.sidebar-toggle'),
init : function() {
this.lines.classList.remove('toggle-arrow', 'toggle-close');
},
arrow: function() {
this.lines.classList.remove('toggle-close');
this.lines.classList.add('toggle-arrow');
},
close: function() {
this.lines.classList.remove('toggle-arrow');
this.lines.classList.add('toggle-close');
}
};
var sidebarToggleMotion = {
sidebarEl : document.querySelector('.sidebar'),
isSidebarVisible: false,
init : function() {
sidebarToggleLines.init();
window.addEventListener('mousedown', this.mousedownHandler.bind(this));
window.addEventListener('mouseup', this.mouseupHandler.bind(this));
document.querySelector('#sidebar-dimmer').addEventListener('click', this.clickHandler.bind(this));
document.querySelector('.sidebar-toggle').addEventListener('click', this.clickHandler.bind(this));
document.querySelector('.sidebar-toggle').addEventListener('mouseenter', this.mouseEnterHandler.bind(this));
document.querySelector('.sidebar-toggle').addEventListener('mouseleave', this.mouseLeaveHandler.bind(this));
window.addEventListener('sidebar:show', this.showSidebar.bind(this));
window.addEventListener('sidebar:hide', this.hideSidebar.bind(this));
},
mousedownHandler: function(event) {
mousePos.X = event.pageX;
mousePos.Y = event.pageY;
},
mouseupHandler: function(event) {
var deltaX = event.pageX - mousePos.X;
var deltaY = event.pageY - mousePos.Y;
var clickingBlankPart = Math.sqrt((deltaX * deltaX) + (deltaY * deltaY)) < 20 && event.target.matches('.main');
if (this.isSidebarVisible && (clickingBlankPart || event.target.matches('img.medium-zoom-image, .fancybox img'))) {
this.hideSidebar();
}
},
clickHandler: function() {
this.isSidebarVisible ? this.hideSidebar() : this.showSidebar();
},
mouseEnterHandler: function() {
if (!this.isSidebarVisible) {
sidebarToggleLines.arrow();
}
},
mouseLeaveHandler: function() {
if (!this.isSidebarVisible) {
sidebarToggleLines.init();
}
},
showSidebar: function() {
this.isSidebarVisible = true;
this.sidebarEl.classList.add('sidebar-active');
if (typeof Velocity === 'function') {
Velocity(document.querySelectorAll('.sidebar .motion-element'), isRight ? 'transition.slideRightIn' : 'transition.slideLeftIn', {
stagger: 50,
drag : true
});
}
sidebarToggleLines.close();
NexT.utils.isDesktop() && window.anime(Object.assign({
targets : document.body,
duration: SIDEBAR_DISPLAY_DURATION,
easing : 'linear'
}, isRight ? {
'padding-right': SIDEBAR_WIDTH
} : {
'padding-left': SIDEBAR_WIDTH
}));
},
hideSidebar: function() {
this.isSidebarVisible = false;
this.sidebarEl.classList.remove('sidebar-active');
sidebarToggleLines.init();
NexT.utils.isDesktop() && window.anime(Object.assign({
targets : document.body,
duration: SIDEBAR_DISPLAY_DURATION,
easing : 'linear'
}, isRight ? {
'padding-right': 0
} : {
'padding-left': 0
}));
}
};
sidebarToggleMotion.init();
function updateFooterPosition() {
var footer = document.querySelector('.footer');
var containerHeight = document.querySelector('.header').offsetHeight + document.querySelector('.main').offsetHeight + footer.offsetHeight;
footer.classList.toggle('footer-fixed', containerHeight <= window.innerHeight);
}
updateFooterPosition();
window.addEventListener('resize', updateFooterPosition);
window.addEventListener('scroll', updateFooterPosition);
});
================================================
FILE: source/js/schemes/pisces.js
================================================
/* global NexT, CONFIG */
var Affix = {
init: function(element, options) {
this.element = element;
this.offset = options || 0;
this.affixed = null;
this.unpin = null;
this.pinnedOffset = null;
this.checkPosition();
window.addEventListener('scroll', this.checkPosition.bind(this));
window.addEventListener('click', this.checkPositionWithEventLoop.bind(this));
window.matchMedia('(min-width: 992px)').addListener(event => {
if (event.matches) {
this.offset = NexT.utils.getAffixParam();
this.checkPosition();
}
});
},
getState: function(scrollHeight, height, offsetTop, offsetBottom) {
let scrollTop = window.scrollY;
let targetHeight = window.innerHeight;
if (offsetTop != null && this.affixed === 'top') {
if (document.querySelector('.content-wrap').offsetHeight < offsetTop) return 'top';
return scrollTop < offsetTop ? 'top' : false;
}
if (this.affixed === 'bottom') {
if (offsetTop != null) return this.unpin <= this.element.getBoundingClientRect().top ? false : 'bottom';
return scrollTop + targetHeight <= scrollHeight - offsetBottom ? false : 'bottom';
}
let initializing = this.affixed === null;
let colliderTop = initializing ? scrollTop : this.element.getBoundingClientRect().top + scrollTop;
let colliderHeight = initializing ? targetHeight : height;
if (offsetTop != null && scrollTop <= offsetTop) return 'top';
if (offsetBottom != null && (colliderTop + colliderHeight >= scrollHeight - offsetBottom)) return 'bottom';
return false;
},
getPinnedOffset: function() {
if (this.pinnedOffset) return this.pinnedOffset;
this.element.classList.remove('affix-top', 'affix-bottom');
this.element.classList.add('affix');
return (this.pinnedOffset = this.element.getBoundingClientRect().top);
},
checkPositionWithEventLoop() {
setTimeout(this.checkPosition.bind(this), 1);
},
checkPosition: function() {
if (window.getComputedStyle(this.element).display === 'none') return;
let height = this.element.offsetHeight;
let { offset } = this;
let offsetTop = offset.top;
let offsetBottom = offset.bottom;
let { scrollHeight } = document.body;
let affix = this.getState(scrollHeight, height, offsetTop, offsetBottom);
if (this.affixed !== affix) {
if (this.unpin != null) this.element.style.top = '';
let affixType = 'affix' + (affix ? '-' + affix : '');
this.affixed = affix;
this.unpin = affix === 'bottom' ? this.getPinnedOffset() : null;
this.element.classList.remove('affix', 'affix-top', 'affix-bottom');
this.element.classList.add(affixType);
}
if (affix === 'bottom') {
this.element.style.top = scrollHeight - height - offsetBottom + 'px';
}
}
};
NexT.utils.getAffixParam = function() {
const sidebarOffset = CONFIG.sidebar.offset || 12;
let headerOffset = document.querySelector('.header-inner').offsetHeight;
let footerOffset = document.querySelector('.footer').offsetHeight;
document.querySelector('.sidebar').style.marginTop = headerOffset + sidebarOffset + 'px';
return {
top : headerOffset,
bottom: footerOffset
};
};
document.addEventListener('DOMContentLoaded', () => {
Affix.init(document.querySelector('.sidebar-inner'), NexT.utils.getAffixParam());
});
================================================
FILE: source/js/utils.js
================================================
/* global NexT, CONFIG */
HTMLElement.prototype.wrap = function(wrapper) {
this.parentNode.insertBefore(wrapper, this);
this.parentNode.removeChild(this);
wrapper.appendChild(this);
};
NexT.utils = {
/**
* Wrap images with fancybox.
*/
wrapImageWithFancyBox: function() {
document.querySelectorAll('.post-body :not(a) > img, .post-body > img').forEach(element => {
var $image = $(element);
var imageLink = $image.attr('data-src') || $image.attr('src');
var $imageWrapLink = $image.wrap(``).parent('a');
if ($image.is('.post-gallery img')) {
$imageWrapLink.attr('data-fancybox', 'gallery').attr('rel', 'gallery');
} else if ($image.is('.group-picture img')) {
$imageWrapLink.attr('data-fancybox', 'group').attr('rel', 'group');
} else {
$imageWrapLink.attr('data-fancybox', 'default').attr('rel', 'default');
}
var imageTitle = $image.attr('title') || $image.attr('alt');
if (imageTitle) {
$imageWrapLink.append(`${imageTitle}
`);
// Make sure img title tag will show correctly in fancybox
$imageWrapLink.attr('title', imageTitle).attr('data-caption', imageTitle);
}
});
$.fancybox.defaults.hash = false;
$('.fancybox').fancybox({
loop : true,
helpers: {
overlay: {
locked: false
}
}
});
},
registerExtURL: function() {
document.querySelectorAll('span.exturl').forEach(element => {
let link = document.createElement('a');
// https://stackoverflow.com/questions/30106476/using-javascripts-atob-to-decode-base64-doesnt-properly-decode-utf-8-strings
link.href = decodeURIComponent(atob(element.dataset.url).split('').map(c => {
return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);
}).join(''));
link.rel = 'noopener external nofollow noreferrer';
link.target = '_blank';
link.className = element.className;
link.title = element.title;
link.innerHTML = element.innerHTML;
element.parentNode.replaceChild(link, element);
});
},
/**
* One-click copy code support.
*/
registerCopyCode: function() {
document.querySelectorAll('figure.highlight').forEach(element => {
const box = document.createElement('div');
element.wrap(box);
box.classList.add('highlight-container');
box.insertAdjacentHTML('beforeend', '');
var button = element.parentNode.querySelector('.copy-btn');
button.addEventListener('click', event => {
var target = event.currentTarget;
var code = [...target.parentNode.querySelectorAll('.code .line')].map(line => line.innerText).join('\n');
var ta = document.createElement('textarea');
ta.style.top = window.scrollY + 'px'; // Prevent page scrolling
ta.style.position = 'absolute';
ta.style.opacity = '0';
ta.readOnly = true;
ta.value = code;
document.body.append(ta);
const selection = document.getSelection();
const selected = selection.rangeCount > 0 ? selection.getRangeAt(0) : false;
ta.select();
ta.setSelectionRange(0, code.length);
ta.readOnly = false;
var result = document.execCommand('copy');
if (CONFIG.copycode.show_result) {
target.querySelector('i').className = result ? 'fa fa-check fa-fw' : 'fa fa-times fa-fw';
}
ta.blur(); // For iOS
target.blur();
if (selected) {
selection.removeAllRanges();
selection.addRange(selected);
}
document.body.removeChild(ta);
});
button.addEventListener('mouseleave', event => {
setTimeout(() => {
event.target.querySelector('i').className = 'fa fa-clipboard fa-fw';
}, 300);
});
});
},
wrapTableWithBox: function() {
document.querySelectorAll('table').forEach(element => {
const box = document.createElement('div');
box.className = 'table-container';
element.wrap(box);
});
},
registerVideoIframe: function() {
document.querySelectorAll('iframe').forEach(element => {
const supported = [
'www.youtube.com',
'player.vimeo.com',
'player.youku.com',
'player.bilibili.com',
'www.tudou.com'
].some(host => element.src.includes(host));
if (supported && !element.parentNode.matches('.video-container')) {
const box = document.createElement('div');
box.className = 'video-container';
element.wrap(box);
let width = Number(element.width);
let height = Number(element.height);
if (width && height) {
element.parentNode.style.paddingTop = (height / width * 100) + '%';
}
}
});
},
registerScrollPercent: function() {
var THRESHOLD = 50;
var backToTop = document.querySelector('.back-to-top');
var readingProgressBar = document.querySelector('.reading-progress-bar');
// For init back to top in sidebar if page was scrolled after page refresh.
window.addEventListener('scroll', () => {
if (backToTop || readingProgressBar) {
var docHeight = document.querySelector('.container').offsetHeight;
var winHeight = window.innerHeight;
var contentVisibilityHeight = docHeight > winHeight ? docHeight - winHeight : document.body.scrollHeight - winHeight;
var scrollPercent = Math.min(100 * window.scrollY / contentVisibilityHeight, 100);
if (backToTop) {
backToTop.classList.toggle('back-to-top-on', window.scrollY > THRESHOLD);
backToTop.querySelector('span').innerText = Math.round(scrollPercent) + '%';
}
if (readingProgressBar) {
readingProgressBar.style.width = scrollPercent.toFixed(2) + '%';
}
}
});
backToTop && backToTop.addEventListener('click', () => {
window.anime({
targets : document.scrollingElement,
duration : 500,
easing : 'linear',
scrollTop: 0
});
});
},
/**
* Tabs tag listener (without twitter bootstrap).
*/
registerTabsTag: function() {
// Binding `nav-tabs` & `tab-content` by real time permalink changing.
document.querySelectorAll('.tabs ul.nav-tabs .tab').forEach(element => {
element.addEventListener('click', event => {
event.preventDefault();
var target = event.currentTarget;
// Prevent selected tab to select again.
if (!target.classList.contains('active')) {
// Add & Remove active class on `nav-tabs` & `tab-content`.
[...target.parentNode.children].forEach(element => {
element.classList.remove('active');
});
target.classList.add('active');
var tActive = document.getElementById(target.querySelector('a').getAttribute('href').replace('#', ''));
[...tActive.parentNode.children].forEach(element => {
element.classList.remove('active');
});
tActive.classList.add('active');
// Trigger event
tActive.dispatchEvent(new Event('tabs:click', {
bubbles: true
}));
}
});
});
window.dispatchEvent(new Event('tabs:register'));
},
registerCanIUseTag: function() {
// Get responsive height passed from iframe.
window.addEventListener('message', ({ data }) => {
if ((typeof data === 'string') && data.includes('ciu_embed')) {
var featureID = data.split(':')[1];
var height = data.split(':')[2];
document.querySelector(`iframe[data-feature=${featureID}]`).style.height = parseInt(height, 10) + 5 + 'px';
}
}, false);
},
registerActiveMenuItem: function() {
document.querySelectorAll('.menu-item').forEach(element => {
var target = element.querySelector('a[href]');
if (!target) return;
var isSamePath = target.pathname === location.pathname || target.pathname === location.pathname.replace('index.html', '');
var isSubPath = !CONFIG.root.startsWith(target.pathname) && location.pathname.startsWith(target.pathname);
element.classList.toggle('menu-item-active', target.hostname === location.hostname && (isSamePath || isSubPath));
});
},
registerLangSelect: function() {
let selects = document.querySelectorAll('.lang-select');
selects.forEach(sel => {
sel.value = CONFIG.page.lang;
sel.addEventListener('change', () => {
let target = sel.options[sel.selectedIndex];
document.querySelectorAll('.lang-select-label span').forEach(span => span.innerText = target.text);
let url = target.dataset.href;
window.pjax ? window.pjax.loadUrl(url) : window.location.href = url;
});
});
},
registerSidebarTOC: function() {
const navItems = document.querySelectorAll('.post-toc li');
const sections = [...navItems].map(element => {
var link = element.querySelector('a.nav-link');
var target = document.getElementById(decodeURI(link.getAttribute('href')).replace('#', ''));
// TOC item animation navigate.
link.addEventListener('click', event => {
event.preventDefault();
var offset = target.getBoundingClientRect().top + window.scrollY;
window.anime({
targets : document.scrollingElement,
duration : 500,
easing : 'linear',
scrollTop: offset + 10
});
});
return target;
});
var tocElement = document.querySelector('.post-toc-wrap');
function activateNavByIndex(target) {
if (target.classList.contains('active-current')) return;
document.querySelectorAll('.post-toc .active').forEach(element => {
element.classList.remove('active', 'active-current');
});
target.classList.add('active', 'active-current');
var parent = target.parentNode;
while (!parent.matches('.post-toc')) {
if (parent.matches('li')) parent.classList.add('active');
parent = parent.parentNode;
}
// Scrolling to center active TOC element if TOC content is taller then viewport.
window.anime({
targets : tocElement,
duration : 200,
easing : 'linear',
scrollTop: tocElement.scrollTop - (tocElement.offsetHeight / 2) + target.getBoundingClientRect().top - tocElement.getBoundingClientRect().top
});
}
function findIndex(entries) {
let index = 0;
let entry = entries[index];
if (entry.boundingClientRect.top > 0) {
index = sections.indexOf(entry.target);
return index === 0 ? 0 : index - 1;
}
for (; index < entries.length; index++) {
if (entries[index].boundingClientRect.top <= 0) {
entry = entries[index];
} else {
return sections.indexOf(entry.target);
}
}
return sections.indexOf(entry.target);
}
function createIntersectionObserver(marginTop) {
marginTop = Math.floor(marginTop + 10000);
let intersectionObserver = new IntersectionObserver((entries, observe) => {
let scrollHeight = document.documentElement.scrollHeight + 100;
if (scrollHeight > marginTop) {
observe.disconnect();
createIntersectionObserver(scrollHeight);
return;
}
let index = findIndex(entries);
activateNavByIndex(navItems[index]);
}, {
rootMargin: marginTop + 'px 0px -100% 0px',
threshold : 0
});
sections.forEach(element => {
element && intersectionObserver.observe(element);
});
}
createIntersectionObserver(document.documentElement.scrollHeight);
},
hasMobileUA: function() {
let ua = navigator.userAgent;
let pa = /iPad|iPhone|Android|Opera Mini|BlackBerry|webOS|UCWEB|Blazer|PSP|IEMobile|Symbian/g;
return pa.test(ua);
},
isTablet: function() {
return window.screen.width < 992 && window.screen.width > 767 && this.hasMobileUA();
},
isMobile: function() {
return window.screen.width < 767 && this.hasMobileUA();
},
isDesktop: function() {
return !this.isTablet() && !this.isMobile();
},
supportsPDFs: function() {
let ua = navigator.userAgent;
let isFirefoxWithPDFJS = ua.includes('irefox') && parseInt(ua.split('rv:')[1].split('.')[0], 10) > 18;
let supportsPdfMimeType = typeof navigator.mimeTypes['application/pdf'] !== 'undefined';
let isIOS = /iphone|ipad|ipod/i.test(ua.toLowerCase());
return isFirefoxWithPDFJS || (supportsPdfMimeType && !isIOS);
},
/**
* Init Sidebar & TOC inner dimensions on all pages and for all schemes.
* Need for Sidebar/TOC inner scrolling if content taller then viewport.
*/
initSidebarDimension: function() {
var sidebarNav = document.querySelector('.sidebar-nav');
var sidebarNavHeight = sidebarNav.style.display !== 'none' ? sidebarNav.offsetHeight : 0;
var sidebarOffset = CONFIG.sidebar.offset || 12;
var sidebarb2tHeight = CONFIG.back2top.enable && CONFIG.back2top.sidebar ? document.querySelector('.back-to-top').offsetHeight : 0;
var sidebarSchemePadding = (CONFIG.sidebar.padding * 2) + sidebarNavHeight + sidebarb2tHeight;
// Margin of sidebar b2t: -4px -10px -18px, brings a different of 22px.
if (CONFIG.scheme === 'Pisces' || CONFIG.scheme === 'Gemini') sidebarSchemePadding += (sidebarOffset * 2) - 22;
// Initialize Sidebar & TOC Height.
var sidebarWrapperHeight = document.body.offsetHeight - sidebarSchemePadding + 'px';
document.querySelector('.site-overview-wrap').style.maxHeight = sidebarWrapperHeight;
document.querySelector('.post-toc-wrap').style.maxHeight = sidebarWrapperHeight;
},
updateSidebarPosition: function() {
var sidebarNav = document.querySelector('.sidebar-nav');
var hasTOC = document.querySelector('.post-toc');
if (hasTOC) {
sidebarNav.style.display = '';
sidebarNav.classList.add('motion-element');
document.querySelector('.sidebar-nav-toc').click();
} else {
sidebarNav.style.display = 'none';
sidebarNav.classList.remove('motion-element');
document.querySelector('.sidebar-nav-overview').click();
}
NexT.utils.initSidebarDimension();
if (!this.isDesktop() || CONFIG.scheme === 'Pisces' || CONFIG.scheme === 'Gemini') return;
// Expand sidebar on post detail page by default, when post has a toc.
var display = CONFIG.page.sidebar;
if (typeof display !== 'boolean') {
// There's no definition sidebar in the page front-matter.
display = CONFIG.sidebar.display === 'always' || (CONFIG.sidebar.display === 'post' && hasTOC);
}
if (display) {
window.dispatchEvent(new Event('sidebar:show'));
}
},
getScript: function(url, callback, condition) {
if (condition) {
callback();
} else {
var script = document.createElement('script');
script.onload = script.onreadystatechange = function(_, isAbort) {
if (isAbort || !script.readyState || /loaded|complete/.test(script.readyState)) {
script.onload = script.onreadystatechange = null;
script = undefined;
if (!isAbort && callback) setTimeout(callback, 0);
}
};
script.src = url;
document.head.appendChild(script);
}
},
loadComments: function(element, callback) {
if (!CONFIG.comments.lazyload || !element) {
callback();
return;
}
let intersectionObserver = new IntersectionObserver((entries, observer) => {
let entry = entries[0];
if (entry.isIntersecting) {
callback();
observer.disconnect();
}
});
intersectionObserver.observe(element);
return intersectionObserver;
}
};
================================================
FILE: source/lib/anime.min.js
================================================
/*
* anime.js v3.1.0
* (c) 2019 Julian Garnier
* Released under the MIT license
* animejs.com
*/
!function(n,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):n.anime=e()}(this,function(){"use strict";var n={update:null,begin:null,loopBegin:null,changeBegin:null,change:null,changeComplete:null,loopComplete:null,complete:null,loop:1,direction:"normal",autoplay:!0,timelineOffset:0},e={duration:1e3,delay:0,endDelay:0,easing:"easeOutElastic(1, .5)",round:0},r=["translateX","translateY","translateZ","rotate","rotateX","rotateY","rotateZ","scale","scaleX","scaleY","scaleZ","skew","skewX","skewY","perspective"],t={CSS:{},springs:{}};function a(n,e,r){return Math.min(Math.max(n,e),r)}function o(n,e){return n.indexOf(e)>-1}function u(n,e){return n.apply(null,e)}var i={arr:function(n){return Array.isArray(n)},obj:function(n){return o(Object.prototype.toString.call(n),"Object")},pth:function(n){return i.obj(n)&&n.hasOwnProperty("totalLength")},svg:function(n){return n instanceof SVGElement},inp:function(n){return n instanceof HTMLInputElement},dom:function(n){return n.nodeType||i.svg(n)},str:function(n){return"string"==typeof n},fnc:function(n){return"function"==typeof n},und:function(n){return void 0===n},hex:function(n){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(n)},rgb:function(n){return/^rgb/.test(n)},hsl:function(n){return/^hsl/.test(n)},col:function(n){return i.hex(n)||i.rgb(n)||i.hsl(n)},key:function(r){return!n.hasOwnProperty(r)&&!e.hasOwnProperty(r)&&"targets"!==r&&"keyframes"!==r}};function c(n){var e=/\(([^)]+)\)/.exec(n);return e?e[1].split(",").map(function(n){return parseFloat(n)}):[]}function s(n,e){var r=c(n),o=a(i.und(r[0])?1:r[0],.1,100),u=a(i.und(r[1])?100:r[1],.1,100),s=a(i.und(r[2])?10:r[2],.1,100),f=a(i.und(r[3])?0:r[3],.1,100),l=Math.sqrt(u/o),d=s/(2*Math.sqrt(u*o)),p=d<1?l*Math.sqrt(1-d*d):0,h=1,v=d<1?(d*l-f)/p:-f+l;function g(n){var r=e?e*n/1e3:n;return r=d<1?Math.exp(-r*d*l)*(h*Math.cos(p*r)+v*Math.sin(p*r)):(h+v*r)*Math.exp(-r*l),0===n||1===n?n:1-r}return e?g:function(){var e=t.springs[n];if(e)return e;for(var r=0,a=0;;)if(1===g(r+=1/6)){if(++a>=16)break}else a=0;var o=r*(1/6)*1e3;return t.springs[n]=o,o}}function f(n){return void 0===n&&(n=10),function(e){return Math.round(e*n)*(1/n)}}var l,d,p=function(){var n=11,e=1/(n-1);function r(n,e){return 1-3*e+3*n}function t(n,e){return 3*e-6*n}function a(n){return 3*n}function o(n,e,o){return((r(e,o)*n+t(e,o))*n+a(e))*n}function u(n,e,o){return 3*r(e,o)*n*n+2*t(e,o)*n+a(e)}return function(r,t,a,i){if(0<=r&&r<=1&&0<=a&&a<=1){var c=new Float32Array(n);if(r!==t||a!==i)for(var s=0;s=.001?function(n,e,r,t){for(var a=0;a<4;++a){var i=u(e,r,t);if(0===i)return e;e-=(o(e,r,t)-n)/i}return e}(t,l,r,a):0===d?l:function(n,e,r,t,a){for(var u,i,c=0;(u=o(i=e+(r-e)/2,t,a)-n)>0?r=i:e=i,Math.abs(u)>1e-7&&++c<10;);return i}(t,i,i+e,r,a)}}}(),h=(l={linear:function(){return function(n){return n}}},d={Sine:function(){return function(n){return 1-Math.cos(n*Math.PI/2)}},Circ:function(){return function(n){return 1-Math.sqrt(1-n*n)}},Back:function(){return function(n){return n*n*(3*n-2)}},Bounce:function(){return function(n){for(var e,r=4;n<((e=Math.pow(2,--r))-1)/11;);return 1/Math.pow(4,3-r)-7.5625*Math.pow((3*e-2)/22-n,2)}},Elastic:function(n,e){void 0===n&&(n=1),void 0===e&&(e=.5);var r=a(n,1,10),t=a(e,.1,2);return function(n){return 0===n||1===n?n:-r*Math.pow(2,10*(n-1))*Math.sin((n-1-t/(2*Math.PI)*Math.asin(1/r))*(2*Math.PI)/t)}}},["Quad","Cubic","Quart","Quint","Expo"].forEach(function(n,e){d[n]=function(){return function(n){return Math.pow(n,e+2)}}}),Object.keys(d).forEach(function(n){var e=d[n];l["easeIn"+n]=e,l["easeOut"+n]=function(n,r){return function(t){return 1-e(n,r)(1-t)}},l["easeInOut"+n]=function(n,r){return function(t){return t<.5?e(n,r)(2*t)/2:1-e(n,r)(-2*t+2)/2}}}),l);function v(n,e){if(i.fnc(n))return n;var r=n.split("(")[0],t=h[r],a=c(n);switch(r){case"spring":return s(n,e);case"cubicBezier":return u(p,a);case"steps":return u(f,a);default:return u(t,a)}}function g(n){try{return document.querySelectorAll(n)}catch(n){return}}function m(n,e){for(var r=n.length,t=arguments.length>=2?arguments[1]:void 0,a=[],o=0;o1&&(r-=1),r<1/6?n+6*(e-n)*r:r<.5?e:r<2/3?n+(e-n)*(2/3-r)*6:n}if(0==u)e=r=t=i;else{var f=i<.5?i*(1+u):i+u-i*u,l=2*i-f;e=s(l,f,o+1/3),r=s(l,f,o),t=s(l,f,o-1/3)}return"rgba("+255*e+","+255*r+","+255*t+","+c+")"}(n):void 0;var e,r,t,a}function C(n){var e=/[+-]?\d*\.?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?(%|px|pt|em|rem|in|cm|mm|ex|ch|pc|vw|vh|vmin|vmax|deg|rad|turn)?$/.exec(n);if(e)return e[1]}function B(n,e){return i.fnc(n)?n(e.target,e.id,e.total):n}function P(n,e){return n.getAttribute(e)}function I(n,e,r){if(M([r,"deg","rad","turn"],C(e)))return e;var a=t.CSS[e+r];if(!i.und(a))return a;var o=document.createElement(n.tagName),u=n.parentNode&&n.parentNode!==document?n.parentNode:document.body;u.appendChild(o),o.style.position="absolute",o.style.width=100+r;var c=100/o.offsetWidth;u.removeChild(o);var s=c*parseFloat(e);return t.CSS[e+r]=s,s}function T(n,e,r){if(e in n.style){var t=e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),a=n.style[e]||getComputedStyle(n).getPropertyValue(t)||"0";return r?I(n,a,r):a}}function D(n,e){return i.dom(n)&&!i.inp(n)&&(P(n,e)||i.svg(n)&&n[e])?"attribute":i.dom(n)&&M(r,e)?"transform":i.dom(n)&&"transform"!==e&&T(n,e)?"css":null!=n[e]?"object":void 0}function E(n){if(i.dom(n)){for(var e,r=n.style.transform||"",t=/(\w+)\(([^)]*)\)/g,a=new Map;e=t.exec(r);)a.set(e[1],e[2]);return a}}function F(n,e,r,t){var a,u=o(e,"scale")?1:0+(o(a=e,"translate")||"perspective"===a?"px":o(a,"rotate")||o(a,"skew")?"deg":void 0),i=E(n).get(e)||u;return r&&(r.transforms.list.set(e,i),r.transforms.last=e),t?I(n,i,t):i}function N(n,e,r,t){switch(D(n,e)){case"transform":return F(n,e,t,r);case"css":return T(n,e,r);case"attribute":return P(n,e);default:return n[e]||0}}function A(n,e){var r=/^(\*=|\+=|-=)/.exec(n);if(!r)return n;var t=C(n)||0,a=parseFloat(e),o=parseFloat(n.replace(r[0],""));switch(r[0][0]){case"+":return a+o+t;case"-":return a-o+t;case"*":return a*o+t}}function L(n,e){if(i.col(n))return O(n);if(/\s/g.test(n))return n;var r=C(n),t=r?n.substr(0,n.length-r.length):n;return e?t+e:t}function j(n,e){return Math.sqrt(Math.pow(e.x-n.x,2)+Math.pow(e.y-n.y,2))}function S(n){for(var e,r=n.points,t=0,a=0;a0&&(t+=j(e,o)),e=o}return t}function q(n){if(n.getTotalLength)return n.getTotalLength();switch(n.tagName.toLowerCase()){case"circle":return o=n,2*Math.PI*P(o,"r");case"rect":return 2*P(a=n,"width")+2*P(a,"height");case"line":return j({x:P(t=n,"x1"),y:P(t,"y1")},{x:P(t,"x2"),y:P(t,"y2")});case"polyline":return S(n);case"polygon":return r=(e=n).points,S(e)+j(r.getItem(r.numberOfItems-1),r.getItem(0))}var e,r,t,a,o}function $(n,e){var r=e||{},t=r.el||function(n){for(var e=n.parentNode;i.svg(e)&&i.svg(e.parentNode);)e=e.parentNode;return e}(n),a=t.getBoundingClientRect(),o=P(t,"viewBox"),u=a.width,c=a.height,s=r.viewBox||(o?o.split(" "):[0,0,u,c]);return{el:t,viewBox:s,x:s[0]/1,y:s[1]/1,w:u/s[2],h:c/s[3]}}function X(n,e){function r(r){void 0===r&&(r=0);var t=e+r>=1?e+r:0;return n.el.getPointAtLength(t)}var t=$(n.el,n.svg),a=r(),o=r(-1),u=r(1);switch(n.property){case"x":return(a.x-t.x)*t.w;case"y":return(a.y-t.y)*t.h;case"angle":return 180*Math.atan2(u.y-o.y,u.x-o.x)/Math.PI}}function Y(n,e){var r=/[+-]?\d*\.?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?/g,t=L(i.pth(n)?n.totalLength:n,e)+"";return{original:t,numbers:t.match(r)?t.match(r).map(Number):[0],strings:i.str(n)||e?t.split(r):[]}}function Z(n){return m(n?y(i.arr(n)?n.map(b):b(n)):[],function(n,e,r){return r.indexOf(n)===e})}function Q(n){var e=Z(n);return e.map(function(n,r){return{target:n,id:r,total:e.length,transforms:{list:E(n)}}})}function V(n,e){var r=x(e);if(/^spring/.test(r.easing)&&(r.duration=s(r.easing)),i.arr(n)){var t=n.length;2===t&&!i.obj(n[0])?n={value:n}:i.fnc(e.duration)||(r.duration=e.duration/t)}var a=i.arr(n)?n:[n];return a.map(function(n,r){var t=i.obj(n)&&!i.pth(n)?n:{value:n};return i.und(t.delay)&&(t.delay=r?0:e.delay),i.und(t.endDelay)&&(t.endDelay=r===a.length-1?e.endDelay:0),t}).map(function(n){return k(n,r)})}function z(n,e){var r=[],t=e.keyframes;for(var a in t&&(e=k(function(n){for(var e=m(y(n.map(function(n){return Object.keys(n)})),function(n){return i.key(n)}).reduce(function(n,e){return n.indexOf(e)<0&&n.push(e),n},[]),r={},t=function(t){var a=e[t];r[a]=n.map(function(n){var e={};for(var r in n)i.key(r)?r==a&&(e.value=n[r]):e[r]=n[r];return e})},a=0;a-1&&(_.splice(o,1),r=_.length)}else a.tick(e);t++}n()}else U=cancelAnimationFrame(U)}return n}();function rn(r){void 0===r&&(r={});var t,o=0,u=0,i=0,c=0,s=null;function f(n){var e=window.Promise&&new Promise(function(n){return s=n});return n.finished=e,e}var l,d,p,h,v,g,y,b,M=(d=w(n,l=r),p=w(e,l),h=z(p,l),v=Q(l.targets),g=W(v,h),y=J(g,p),b=K,K++,k(d,{id:b,children:[],animatables:v,animations:g,duration:y.duration,delay:y.delay,endDelay:y.endDelay}));f(M);function x(){var n=M.direction;"alternate"!==n&&(M.direction="normal"!==n?"normal":"reverse"),M.reversed=!M.reversed,t.forEach(function(n){return n.reversed=M.reversed})}function O(n){return M.reversed?M.duration-n:n}function C(){o=0,u=O(M.currentTime)*(1/rn.speed)}function B(n,e){e&&e.seek(n-e.timelineOffset)}function P(n){for(var e=0,r=M.animations,t=r.length;e2||(b=Math.round(b*p)/p)),h.push(b)}var k=d.length;if(k){g=d[0];for(var O=0;O0&&(M.began=!0,I("begin")),!M.loopBegan&&M.currentTime>0&&(M.loopBegan=!0,I("loopBegin")),d<=r&&0!==M.currentTime&&P(0),(d>=l&&M.currentTime!==e||!e)&&P(e),d>r&&d=e&&(u=0,M.remaining&&!0!==M.remaining&&M.remaining--,M.remaining?(o=i,I("loopComplete"),M.loopBegan=!1,"alternate"===M.direction&&x()):(M.paused=!0,M.completed||(M.completed=!0,I("loopComplete"),I("complete"),!M.passThrough&&"Promise"in window&&(s(),f(M)))))}return M.reset=function(){var n=M.direction;M.passThrough=!1,M.currentTime=0,M.progress=0,M.paused=!0,M.began=!1,M.loopBegan=!1,M.changeBegan=!1,M.completed=!1,M.changeCompleted=!1,M.reversePlayback=!1,M.reversed="reverse"===n,M.remaining=M.loop,t=M.children;for(var e=c=t.length;e--;)M.children[e].reset();(M.reversed&&!0!==M.loop||"alternate"===n&&1===M.loop)&&M.remaining++,P(M.reversed?M.duration:0)},M.set=function(n,e){return R(n,e),M},M.tick=function(n){i=n,o||(o=i),T((i+(u-o))*rn.speed)},M.seek=function(n){T(O(n))},M.pause=function(){M.paused=!0,C()},M.play=function(){M.paused&&(M.completed&&M.reset(),M.paused=!1,_.push(M),C(),U||en())},M.reverse=function(){x(),C()},M.restart=function(){M.reset(),M.play()},M.reset(),M.autoplay&&M.play(),M}function tn(n,e){for(var r=e.length;r--;)M(n,e[r].animatable.target)&&e.splice(r,1)}return"undefined"!=typeof document&&document.addEventListener("visibilitychange",function(){document.hidden?(_.forEach(function(n){return n.pause()}),nn=_.slice(0),rn.running=_=[]):nn.forEach(function(n){return n.play()})}),rn.version="3.1.0",rn.speed=1,rn.running=_,rn.remove=function(n){for(var e=Z(n),r=_.length;r--;){var t=_[r],a=t.animations,o=t.children;tn(e,a);for(var u=o.length;u--;){var i=o[u],c=i.animations;tn(e,c),c.length||i.children.length||o.splice(u,1)}a.length||o.length||t.pause()}},rn.get=N,rn.set=R,rn.convertPx=I,rn.path=function(n,e){var r=i.str(n)?g(n)[0]:n,t=e||100;return function(n){return{property:n,el:r,svg:$(r),totalLength:q(r)*(t/100)}}},rn.setDashoffset=function(n){var e=q(n);return n.setAttribute("stroke-dasharray",e),e},rn.stagger=function(n,e){void 0===e&&(e={});var r=e.direction||"normal",t=e.easing?v(e.easing):null,a=e.grid,o=e.axis,u=e.from||0,c="first"===u,s="center"===u,f="last"===u,l=i.arr(n),d=l?parseFloat(n[0]):parseFloat(n),p=l?parseFloat(n[1]):0,h=C(l?n[1]:n)||0,g=e.start||0+(l?d:0),m=[],y=0;return function(n,e,i){if(c&&(u=0),s&&(u=(i-1)/2),f&&(u=i-1),!m.length){for(var v=0;v-1&&_.splice(o,1);for(var s=0;s