├── sphinx_typlog_theme ├── globaltoc.html ├── style.html ├── theme.conf ├── sponsors.html ├── js │ ├── ga.js │ └── app.js ├── github.html ├── logo.html ├── searchbox.html ├── footer.html ├── relations.html ├── static │ ├── theme.css_t │ └── typlog.css ├── scripts.html ├── page.html ├── __init__.py └── layout.html ├── docs ├── _static │ └── typlog-512.png ├── contributing.rst ├── _templates │ └── authlib.html ├── intro.rst ├── Makefile ├── index.rst ├── guide.rst ├── changelog.rst ├── options.rst ├── conf.py └── markup.rst ├── .gitignore ├── setup.cfg ├── MANIFEST.in ├── src ├── index.css ├── css │ ├── badge.css │ ├── vars.css │ ├── rtd.css │ ├── highlight.css │ ├── footnote.css │ ├── reset.css │ ├── sphinx.css │ ├── widget.css │ ├── layout.css │ ├── directives.css │ ├── yue.css │ └── normalize.css ├── app.js ├── solarized-dark.css └── solarized-light.css ├── server.py ├── package.json ├── Makefile ├── README.rst ├── .travis.yml ├── LICENSE └── setup.py /sphinx_typlog_theme/globaltoc.html: -------------------------------------------------------------------------------- 1 |
2 | {{ toctree() }} 3 |
4 | -------------------------------------------------------------------------------- /docs/_static/typlog-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/typlog/sphinx-typlog-theme/HEAD/docs/_static/typlog-512.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.egg-info/ 2 | build/ 3 | dist/ 4 | docs/_build 5 | node_modules/ 6 | package-lock.json 7 | 8 | *.py[cod] 9 | -------------------------------------------------------------------------------- /setup.cfg: -------------------------------------------------------------------------------- 1 | [bdist_wheel] 2 | universal = 1 3 | 4 | [metadata] 5 | license_file = LICENSE 6 | 7 | [flake8] 8 | max-line-length = 120 9 | -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | include LICENSE 2 | include README.rst 3 | recursive-include sphinx_typlog_theme *.* 4 | recursive-exclude sphinx_typlog_theme *.pyc 5 | -------------------------------------------------------------------------------- /sphinx_typlog_theme/style.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /sphinx_typlog_theme/theme.conf: -------------------------------------------------------------------------------- 1 | [theme] 2 | inherit = basic 3 | stylesheet = typlog.css 4 | 5 | [options] 6 | version = 0.7.3 7 | color = 8 | logo = 9 | logo_name = 10 | description = 11 | github_user = 12 | github_repo = 13 | analytics_id = 14 | canonical_url = 15 | twitter = 16 | og_image = 17 | meta_html = 18 | warning = 19 | -------------------------------------------------------------------------------- /docs/contributing.rst: -------------------------------------------------------------------------------- 1 | Contributing 2 | ============ 3 | 4 | Create and activate a new virtual environment, then run the following 5 | commands in the project root: 6 | 7 | .. code-block:: shell 8 | 9 | make install 10 | 11 | To run the development server: 12 | 13 | .. code-block:: shell 14 | 15 | make serve 16 | 17 | 18 | Then open http://127.0.0.1:5234 in your browser. 19 | -------------------------------------------------------------------------------- /sphinx_typlog_theme/sponsors.html: -------------------------------------------------------------------------------- 1 |
2 | 6 |
7 | -------------------------------------------------------------------------------- /sphinx_typlog_theme/js/ga.js: -------------------------------------------------------------------------------- 1 | (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');ga('create', '{{ theme_analytics_id }}');ga('send', 'pageview'); 2 | -------------------------------------------------------------------------------- /docs/_templates/authlib.html: -------------------------------------------------------------------------------- 1 |
2 | 6 |
7 | -------------------------------------------------------------------------------- /src/index.css: -------------------------------------------------------------------------------- 1 | @import "css/vars.css"; 2 | @import "css/normalize.css"; 3 | @import "css/yue.css"; 4 | @import "css/reset.css"; 5 | @import "css/sphinx.css"; 6 | @import "css/directives.css"; 7 | @import "css/highlight.css"; 8 | @import "css/rtd.css"; 9 | @import "css/layout.css"; 10 | @import "css/widget.css"; 11 | @import "css/badge.css"; 12 | @import "css/footnote.css"; 13 | @import "solarized-light.css"; 14 | -------------------------------------------------------------------------------- /server.py: -------------------------------------------------------------------------------- 1 | from livereload import Server, shell 2 | 3 | server = Server() 4 | server.watch('src/css/*', shell('npm run build:css')) 5 | server.watch('src/*.js', shell('npm run build:js')) 6 | server.watch('docs/*', shell('make docs')) 7 | server.watch('sphinx_typlog_theme/*', shell('make docs')) 8 | server.watch('sphinx_typlog_theme/static/*', shell('make docs')) 9 | server.serve(root='docs/_build/html', port=5234) 10 | -------------------------------------------------------------------------------- /sphinx_typlog_theme/github.html: -------------------------------------------------------------------------------- 1 | {%- if theme_github_user and theme_github_repo %} 2 |
3 | 4 | 5 | 6 | -stars 7 | 8 | 9 | -forks 10 | 11 | 12 |
13 | {%- endif %} 14 | -------------------------------------------------------------------------------- /docs/intro.rst: -------------------------------------------------------------------------------- 1 | Introduction 2 | ============ 3 | 4 | .. meta:: 5 | :description: An introduction on sphinx typlog theme. 6 | 7 | Design 8 | ------ 9 | 10 | This sphinx theme is designed based on the looks and feels on Typlog heavily. 11 | 12 | `Typlog`_ is a blogging service. If you have interests in blogging, take a 13 | look into it. 14 | 15 | .. _Typlog: https://typlog.com/ 16 | 17 | License 18 | ------- 19 | 20 | This project is licensed under BSD 3. 21 | 22 | .. include:: ../LICENSE 23 | -------------------------------------------------------------------------------- /sphinx_typlog_theme/logo.html: -------------------------------------------------------------------------------- 1 | {%- if theme_logo or theme_logo_name %} 2 | 12 | {%- endif %} 13 | 14 | {%- if theme_description -%} 15 |
{{ theme_description }}
16 | {%- endif %} 17 | -------------------------------------------------------------------------------- /sphinx_typlog_theme/searchbox.html: -------------------------------------------------------------------------------- 1 | {%- if pagename != "search" %} 2 | 12 | {%- endif %} 13 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "sphinx-typlog-theme", 3 | "version": "0.1.0", 4 | "private": true, 5 | "description": "A sphinx theme", 6 | "scripts": { 7 | "build": "npm run build:css && npm run build:js", 8 | "build:css": "cleancss src/index.css -o sphinx_typlog_theme/static/typlog.css", 9 | "build:js": "uglifyjs src/app.js -o sphinx_typlog_theme/js/app.js" 10 | }, 11 | "author": "", 12 | "license": "", 13 | "devDependencies": { 14 | "clean-css-cli": "^4.1.10", 15 | "uglify-js": "^3.4.9" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: docs 2 | 3 | docs: 4 | @rm -fr docs/_build 5 | @$(MAKE) -C docs html 6 | 7 | 8 | clean-build: 9 | @rm -fr build/ 10 | @rm -fr dist/ 11 | @rm -fr *.egg 12 | @rm -fr *.egg-info 13 | 14 | 15 | clean-pyc: 16 | @find . -name '*.pyc' -exec rm -f {} + 17 | @find . -name '*.pyo' -exec rm -f {} + 18 | @find . -name '*~' -exec rm -f {} + 19 | @find . -name '__pycache__' -exec rm -fr {} + 20 | 21 | 22 | install: 23 | @pip install -e '.[dev]' 24 | @npm install 25 | 26 | serve: 27 | @npm run build 28 | @make docs 29 | @python server.py 30 | -------------------------------------------------------------------------------- /sphinx_typlog_theme/footer.html: -------------------------------------------------------------------------------- 1 | 15 | -------------------------------------------------------------------------------- /docs/Makefile: -------------------------------------------------------------------------------- 1 | # Minimal makefile for Sphinx documentation 2 | # 3 | 4 | # You can set these variables from the command line. 5 | SPHINXOPTS = 6 | SPHINXBUILD = sphinx-build 7 | SPHINXPROJ = SphinxTyplogTheme 8 | SOURCEDIR = . 9 | BUILDDIR = _build 10 | 11 | # Put it first so that "make" without argument is like "make help". 12 | help: 13 | @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 14 | 15 | .PHONY: help Makefile 16 | 17 | # Catch-all target: route all unknown targets to Sphinx using the new 18 | # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). 19 | %: Makefile 20 | @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) -------------------------------------------------------------------------------- /docs/index.rst: -------------------------------------------------------------------------------- 1 | .. Sphinx Typlog Theme documentation master file, created by 2 | sphinx-quickstart on Sat Nov 11 17:53:35 2017. 3 | You can adapt this file completely to your liking, but it should at least 4 | contain the root `toctree` directive. 5 | 6 | Sphinx Typlog Theme 7 | =================== 8 | 9 | .. note:: 10 | A sphinx theme sponsored by Typlog_. Designed by `Hsiaoming Yang`_. 11 | 12 | .. raw:: html 13 | :file: _templates/authlib.html 14 | 15 | .. _Typlog: https://typlog.com/ 16 | 17 | .. _`Hsiaoming Yang`: https://lepture.com/ 18 | 19 | .. toctree:: 20 | :maxdepth: 2 21 | :caption: Contents: 22 | 23 | intro 24 | guide 25 | options 26 | markup 27 | contributing 28 | changelog 29 | -------------------------------------------------------------------------------- /sphinx_typlog_theme/relations.html: -------------------------------------------------------------------------------- 1 |
2 |

Related Topics

3 | 21 |
22 | -------------------------------------------------------------------------------- /src/css/badge.css: -------------------------------------------------------------------------------- 1 | .badge { 2 | display: inline-block; 3 | padding: 3px 6px; 4 | min-width: 3em; 5 | text-align: center; 6 | vertical-align: middle; 7 | background-color: #999; 8 | color: white; 9 | line-height: 1; 10 | border-radius: 2px; 11 | font-size: 13px; 12 | opacity: 0.98; 13 | margin-right: 4px; 14 | font-family: var(--font-code); 15 | user-select: none; 16 | } 17 | .badge-one { 18 | font-size: 12px; 19 | min-width: 0; 20 | padding: 4px 6px; 21 | } 22 | .badge-todo, 23 | .badge-yellow { 24 | background-color: #F7BA2A; 25 | } 26 | .badge-done, 27 | .badge-green { 28 | background-color: #49C784; 29 | } 30 | .badge-plan, 31 | .badge-doing, 32 | .badge-blue { 33 | background-color: #03A9F4; 34 | } 35 | .badge-red { 36 | background-color: #FF612F; 37 | } 38 | -------------------------------------------------------------------------------- /sphinx_typlog_theme/static/theme.css_t: -------------------------------------------------------------------------------- 1 | {% if theme_color %} 2 | ::selection { 3 | color: white; 4 | background-color: {{ theme_color }}; 5 | } 6 | a:hover, 7 | .yue a:hover, 8 | .site-head a:hover, 9 | .sidebar a:hover { 10 | color: {{ theme_color }}; 11 | border-color: {{ theme_color }}; 12 | } 13 | 14 | .button:hover { 15 | background-color: {{ theme_color }}; 16 | } 17 | 18 | .highlighted { 19 | background-color: {{ theme_color }}; 20 | } 21 | 22 | .sponsor_text a { 23 | border-color: {{ theme_color }}; 24 | } 25 | 26 | .globaltoc a.current { 27 | color: {{ theme_color }}; 28 | } 29 | 30 | .injected .rst-versions small a, 31 | .injected .rst-versions .rst-current-version, 32 | .injected .rst-versions .rst-other-versions dd a:hover { 33 | color: {{ theme_color }}; 34 | } 35 | {% endif %} 36 | -------------------------------------------------------------------------------- /docs/guide.rst: -------------------------------------------------------------------------------- 1 | How To Use 2 | ========== 3 | 4 | Guide on how to use **sphinx typlog theme**. 5 | 6 | Installation 7 | ------------ 8 | 9 | Installing **sphinx typlog theme** is easy with pip:: 10 | 11 | $ pip install sphinx-typlog-theme 12 | 13 | You can also add ``sphinx-typlog-theme`` into your **requirements.txt**. 14 | 15 | How to Use 16 | ---------- 17 | 18 | To use **sphinx typlog theme** in your documentation, configure it in 19 | ``conf.py``:: 20 | 21 | html_theme = 'sphinx_typlog_theme' 22 | 23 | If you are using Sphinx < 1.7, you can add it into ``html_theme_path``:: 24 | 25 | import sphinx_typlog_theme 26 | html_theme_path = [sphinx_typlog_theme.get_path()] 27 | 28 | Other Options 29 | ------------- 30 | 31 | In ``conf.py``, there are lots of :ref:`options` to be configured. 32 | -------------------------------------------------------------------------------- /docs/changelog.rst: -------------------------------------------------------------------------------- 1 | Changelog 2 | ========= 3 | 4 | Here is the changelog for sphinx typlog theme. 5 | 6 | Version 0.7.3 7 | ------------- 8 | 9 | **Released on Jun 30, 2019** 10 | 11 | - Fix headerlink style 12 | 13 | Version 0.7.2 14 | ------------- 15 | 16 | **Released on Feb 13, 2019** 17 | 18 | - Fix search scripts. 19 | 20 | Version 0.7.1 21 | ------------- 22 | 23 | **Released on Jan 4, 2019** 24 | 25 | - Fix RTD widget on mobile. 26 | - Fix sponsor image blocked by uBlock. 27 | 28 | Version 0.7 29 | ----------- 30 | 31 | **Released on Dec 28, 2018** 32 | 33 | - Style for global TOC. 34 | - Style for API references. 35 | - Use ``logo.html`` in sidebar. 36 | - Improvements on CSS. 37 | 38 | Version 0.6.1 39 | ------------- 40 | 41 | **Released on Nov 6, 2018** 42 | 43 | Style for RTD injected widget. 44 | 45 | Version 0.6 46 | ----------- 47 | 48 | **Released on Nov 6, 2018** 49 | 50 | New design. 51 | -------------------------------------------------------------------------------- /src/css/vars.css: -------------------------------------------------------------------------------- 1 | :root { 2 | --color-blue: #03A9F4; 3 | --color-blue-alpha: rgba(3, 172, 244, 0.08); 4 | --color-green: #49C784; 5 | --color-yellow: #F7BA2A; 6 | --color-purple: #b37feb; 7 | --color-cyan: #36cfc9; 8 | --color-magenta: #f759ab; 9 | --color-red: #FF612F; 10 | 11 | --color-primary: #E8371A; 12 | --color-text: rgba(0, 0, 0, 0.68); 13 | --color-heading: rgba(0, 0, 0, 0.98); 14 | --color-code: #F55826; 15 | 16 | --color-autodoc-background: rgba(245,88,38,.05); 17 | --color-autodoc-border: rgba(245,88,38,.4); 18 | 19 | --font-english: "Roboto", "Helvetica Neue", "Helvetica"; 20 | --font-cjk: "Hiragino Sans GB", "Droid Sans Fallback", "Microsoft YaHei"; 21 | --font-text: var(--font-english), var(--font-cjk), sans-serif; 22 | --font-code: "Roboto Mono", Menlo, monospace; 23 | 24 | --code-background: rgba(0, 0, 0, .02); 25 | --code-alt-background: rgba(0, 0, 0, .03); 26 | } 27 | -------------------------------------------------------------------------------- /src/css/rtd.css: -------------------------------------------------------------------------------- 1 | /* style for RTD */ 2 | .injected .rst-versions.rst-badge { 3 | left: 0; 4 | bottom: 0; 5 | width: 340px; 6 | max-width: 100%; 7 | color: rgba(0, 0, 0, 0.68); 8 | background-color: #f7f7f7; 9 | } 10 | .injected .rst-versions.rst-badge .rst-current-version { 11 | text-align: right; 12 | background-color: #eee; 13 | } 14 | 15 | .injected .rst-versions.rst-badge .fa-book { 16 | float: left; 17 | } 18 | 19 | .injected .rst-versions .rst-current-version .fa, 20 | .injected .rst-versions .rst-other-versions dd a { 21 | color: rgba(0, 0, 0, 0.68); 22 | } 23 | 24 | .injected .rst-versions .rst-other-versions hr { 25 | border-color: #ddd; 26 | } 27 | 28 | @media (max-width: 960px) { 29 | .injected .rst-versions { 30 | transform: translate3d(-340px, 0, 0); 31 | transition: transform 0.2s ease; 32 | } 33 | ._expand .injected .rst-versions { 34 | transform: translate3d(0, 0, 0); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /sphinx_typlog_theme/scripts.html: -------------------------------------------------------------------------------- 1 | {%- if not embedded %} 2 | 3 | {%- if sphinx_version >= "1.8.0" %} 4 | 5 | {%- for scriptfile in script_files %} 6 | {{ js_tag(scriptfile) }} 7 | {%- endfor %} 8 | {%- else %} 9 | 20 | {%- for scriptfile in script_files %} 21 | 22 | {%- endfor %} 23 | {%- endif %} 24 | 25 | {%- endif %} 26 | -------------------------------------------------------------------------------- /README.rst: -------------------------------------------------------------------------------- 1 | Sphinx Typlog Theme 2 | =================== 3 | 4 | A sphinx theme sponsored by Typlog_, created by `Hsiaoming Yang`_. 5 | 6 | .. image:: https://badgen.net/badge/donate/lepture/ff69b4 7 | :target: https://lepture.com/donate 8 | :alt: Donate lepture 9 | .. image:: https://badgen.net/badge//patreon/f96854?icon=patreon 10 | :target: https://patreon.com/lepture 11 | :alt: Become a patreon 12 | .. image:: https://badgen.net/pypi/v/sphinx-typlog-theme 13 | :target: https://pypi.python.org/pypi/sphinx-typlog-theme/ 14 | :alt: Latest Version 15 | .. image:: https://img.shields.io/pypi/wheel/sphinx-typlog-theme.svg 16 | :target: https://pypi.python.org/pypi/sphinx-typlog-theme/ 17 | :alt: Wheel Status 18 | 19 | .. _Typlog: https://typlog.com/ 20 | .. _`Hsiaoming Yang`: https://lepture.com/ 21 | 22 | Examples 23 | -------- 24 | 25 | Here are some examples which are using this theme: 26 | 27 | - https://sphinx-typlog-theme.readthedocs.io/ 28 | - https://docs.authlib.org/ 29 | - https://webargs.readthedocs.io/ 30 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: python 2 | cache: pip 3 | python: 4 | - "2.7" 5 | - "3.4" 6 | - "3.5" 7 | - "3.6" 8 | - "pypy" 9 | - "pypy3" 10 | env: 11 | - SPHINX=">=1.3,<1.4" 12 | - SPHINX=">=1.4,<1.5" 13 | - SPHINX=">=1.5,<1.6" 14 | - SPHINX=">=1.6,<1.7" 15 | install: 16 | # For some reason Travis' build envs have wildly different pip/setuptools 17 | # versions between minor Python versions, and this can cause many hilarious 18 | # corner packaging cases. So... 19 | - pip install -U pip 20 | # Setuptools 34+ seems to get less stable 21 | - pip install 'setuptools>33,<34' 22 | # Install dev requirements 23 | - pip install -r dev-requirements.txt 24 | # Limit Sphinx version re: test matrix 25 | - pip install "sphinx$SPHINX" 26 | # Sanity/debug-friendliness: list what got installed 27 | - pip list --format=columns 28 | # Dev tooling sanity test: can invoke list tasks? 29 | - inv --list 30 | script: 31 | # We have no real tests at present so we just make sure installation works, 32 | # first off. 33 | - pip install . 34 | # Does our own dogfooding website build ok? :D 35 | - inv docs 36 | # I have this in my git pre-push hook, but contributors probably don't 37 | - flake8 38 | -------------------------------------------------------------------------------- /src/css/highlight.css: -------------------------------------------------------------------------------- 1 | /* -- highlight begin -- */ 2 | .highlighted { 3 | padding: 1px 4px; 4 | opacity: 0.6; 5 | color: white; 6 | } 7 | 8 | .highlight, 9 | .highlighted, 10 | .highlighttable, 11 | .literal-block-wrapper { 12 | background-color: var(--code-background); 13 | margin: 1.4em 0; 14 | } 15 | 16 | .highlighted .highlight, 17 | .highlighttable .highlight, 18 | .literal-block-wrapper .highlight { 19 | background-color: transparent; 20 | margin: 0; 21 | } 22 | 23 | .highlight pre, 24 | .literal-block-wrapper .highlight, 25 | .highlighttable .highlight { 26 | margin: 0; 27 | } 28 | 29 | .literal-block-wrapper { 30 | position: relative; 31 | } 32 | .literal-block-wrapper .code-block-caption { 33 | position: absolute; 34 | top: 0; 35 | right: 0; 36 | padding: 2px 10px; 37 | border-radius: 0 4px; 38 | color: rgba(0, 0, 0, 0.3); 39 | background-color: var(--code-alt-background); 40 | } 41 | 42 | .highlighttable .linenos { 43 | width: 1px; 44 | } 45 | .highlighttable .linenodiv { 46 | padding: 10px 6px; 47 | text-align: right; 48 | background-color: var(--code-alt-background); 49 | } 50 | .highlighttable .linenodiv pre { 51 | color: rgba(0, 0, 0, 0.3); 52 | } 53 | .highlighttable .highlight { 54 | padding-left: 10px; 55 | } 56 | /* -- highlight end -- */ 57 | -------------------------------------------------------------------------------- /src/css/footnote.css: -------------------------------------------------------------------------------- 1 | .yue table.footnote { 2 | display: none; 3 | } 4 | a.footnote-reference { 5 | display: inline-block; 6 | padding: 0 4px; 7 | text-align: center; 8 | font-weight: 700; 9 | font-size: 8px; 10 | line-height: 14px; 11 | border-bottom: 0; 12 | background-color: rgba(0,0,0,.18); 13 | color: #fff; 14 | border-radius: 3px; 15 | vertical-align: top; 16 | transition: all .1s ease; 17 | } 18 | .t-body a.footnote-reference:hover { 19 | color: #fff; 20 | background-color: rgba(0,0,0,.8); 21 | } 22 | 23 | #typlog-footnote-mask { 24 | display: none; 25 | -webkit-tap-highlight-color: rgba(0, 0, 0, 0); 26 | } 27 | 28 | #typlog-footnote-mask._active { 29 | display: block; 30 | position: fixed; 31 | top: 0; 32 | left: 0; 33 | width: 100%; 34 | height: 100%; 35 | z-index: 9; 36 | } 37 | 38 | #typlog-footnote-content, 39 | #typlog-footnote-content a[href^="#fnref"] { 40 | display: none; 41 | } 42 | 43 | #typlog-footnote-content._active { 44 | display: block; 45 | font-size: 0.86em; 46 | color: rgba(0, 0, 0, 0.68); 47 | position: absolute; 48 | z-index: 10; 49 | width: 100%; 50 | max-width: 560px; 51 | margin-top: 20px; 52 | background: white; 53 | padding: 20px; 54 | box-sizing: border-box; 55 | box-shadow: 0 0 10px 1px rgba(0, 0, 0, 0.16); 56 | } 57 | 58 | @media (min-width: 560px) { 59 | #typlog-footnote-content._active { 60 | border-radius: 3px; 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2018, Hsiaoming Yang 2 | 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 8 | 9 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 10 | 11 | * Neither the name of the creator nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. 12 | 13 | 14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 15 | -------------------------------------------------------------------------------- /docs/options.rst: -------------------------------------------------------------------------------- 1 | .. _options: 2 | 3 | Options 4 | ======= 5 | 6 | There are some options for you to configure the theme in ``conf.py``:: 7 | 8 | html_theme_options = {} 9 | 10 | logo 11 | ---- 12 | 13 | Put a logo file in your docs ``_static`` folder, e.g. the filename is 14 | ``logo.png``:: 15 | 16 | html_theme_options = { 17 | 'logo': 'logo.png' 18 | } 19 | 20 | With logo configured, there will be a logo image on sidebar. 21 | 22 | logo_name 23 | --------- 24 | 25 | You can hide the name under your logo image with:: 26 | 27 | html_theme_options = { 28 | 'logo_name': 'false' 29 | } 30 | 31 | description 32 | ----------- 33 | 34 | Add a description under your logo and logo_name:: 35 | 36 | html_theme_options = { 37 | 'description': 'Your project description' 38 | } 39 | 40 | color 41 | ----- 42 | 43 | Add a theme color, it will be shown as the hover color for links etc:: 44 | 45 | html_theme_options = { 46 | 'color': '#E8371A' 47 | } 48 | 49 | github 50 | ------ 51 | 52 | Configure your GitHub repo with ``github_user`` and ``github_repo``:: 53 | 54 | html_theme_options = { 55 | 'github_user': 'lepture', 56 | 'github_repo': 'mistune' 57 | } 58 | 59 | Remember to include the ``github.html`` template:: 60 | 61 | html_sidebars = { 62 | '**': [ 63 | 'github.html', 64 | ... 65 | ] 66 | } 67 | 68 | analytics_id 69 | ------------ 70 | 71 | Track your site with Google Analytics:: 72 | 73 | html_theme_options = { 74 | 'analytics_id': 'UA-xxx' 75 | } 76 | -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import codecs 4 | from setuptools import setup 5 | from sphinx_typlog_theme import __version__ 6 | 7 | with codecs.open('README.rst', encoding='utf-8') as f: 8 | readme = f.read() 9 | 10 | setup( 11 | name='sphinx_typlog_theme', 12 | version=__version__, 13 | description='A typlog Sphinx theme', 14 | long_description=readme, 15 | author='Hsiaoming Yang', 16 | author_email='me@lepture.com', 17 | url='https://github.com/typlog/sphinx-typlog-theme', 18 | packages=['sphinx_typlog_theme'], 19 | include_package_data=True, 20 | entry_points={ 21 | 'sphinx.html_themes': [ 22 | 'sphinx_typlog_theme = sphinx_typlog_theme', 23 | ] 24 | }, 25 | extras_require={ 26 | 'dev': ['sphinx', 'livereload'], 27 | }, 28 | classifiers=[ 29 | 'Development Status :: 4 - Beta', 30 | 'Intended Audience :: Developers', 31 | 'License :: OSI Approved :: BSD License', 32 | 'Operating System :: OS Independent', 33 | 'Framework :: Sphinx', 34 | 'Framework :: Sphinx :: Theme', 35 | 'Programming Language :: Python', 36 | 'Programming Language :: Python :: 2', 37 | 'Programming Language :: Python :: 2.7', 38 | 'Programming Language :: Python :: 3', 39 | 'Programming Language :: Python :: 3.5', 40 | 'Programming Language :: Python :: 3.6', 41 | 'Programming Language :: Python :: 3.7', 42 | 'Programming Language :: Python :: Implementation :: CPython', 43 | 'Programming Language :: Python :: Implementation :: PyPy', 44 | 'Topic :: Documentation', 45 | 'Topic :: Software Development :: Documentation', 46 | ], 47 | ) 48 | -------------------------------------------------------------------------------- /sphinx_typlog_theme/js/app.js: -------------------------------------------------------------------------------- 1 | $(function(){$(".t-head_menu").on("click",function(){$("body").addClass("_expand")});$(".t-body").on("click",function(){$("body").removeClass("_expand")});$(".t-sidebar_close").on("click",function(){$("body").removeClass("_expand")});$("a.footnote-reference").on("click",function(e){e.preventDefault();var id=$(this).attr("href");var html=$(id).find("td.label + td").html();var w=Math.max(document.documentElement.clientWidth,window.innerWidth||0);var style="top:"+e.pageY+"px;";if(w>560){style+="width:480px;";if(e.pageX>240&&e.pageX+2409e5){fetchGitHubRepo(repo)}}catch(error){fetchGitHubRepo(repo)}}else{fetchGitHubRepo(repo)}}initGitHub($(".github").attr("href"))}); -------------------------------------------------------------------------------- /src/css/reset.css: -------------------------------------------------------------------------------- 1 | body { 2 | -webkit-font-smoothing: antialiased; 3 | -moz-osx-font-smoothing: grayscale; 4 | font: 400 16px/1.42 var(--font-text); 5 | color: var(--color-text); 6 | } 7 | 8 | img { 9 | max-width: 100%; 10 | vertical-align: middle; 11 | } 12 | 13 | h1, h2, h3, strong { 14 | color: var(--color-heading); 15 | } 16 | 17 | a { 18 | color: var(--color-primary); 19 | text-decoration: none; 20 | } 21 | 22 | a:hover { 23 | text-decoration: underline; 24 | } 25 | 26 | .clearfix:after, 27 | .section:after, 28 | .inner:after { 29 | display: table; 30 | content: ''; 31 | clear: both; 32 | } 33 | 34 | a > .std-ref { 35 | font-weight: 700; 36 | } 37 | 38 | .yue dd > p { 39 | margin-bottom: 0.86em; 40 | } 41 | 42 | .yue table.citation { 43 | margin-bottom: 10px; 44 | } 45 | 46 | table.docutils td.label { 47 | width: 1px; 48 | padding-right: 0.6em; 49 | } 50 | 51 | .globaltoc { 52 | margin: 20px 0; 53 | } 54 | .globaltoc > p.caption { 55 | display: none; 56 | } 57 | 58 | body[data-page="search"] input[name="q"], 59 | .rst-other-versions input[name="q"] { 60 | border: 2px solid rgba(0, 0, 0, 0.86); 61 | padding: 0 10px; 62 | line-height: 38px; 63 | outline: none; 64 | box-sizing: border-box; 65 | } 66 | 67 | body[data-page="search"] input[type="submit"] { 68 | line-height: 42px; 69 | } 70 | 71 | #searchbox .input-group { 72 | display: flex; 73 | border: 2px solid rgba(0, 0, 0, 0.86); 74 | } 75 | 76 | #searchbox .input-group > input[type="text"] { 77 | flex-grow: 1; 78 | outline: none; 79 | border: 0; 80 | padding: 0.6em 10px; 81 | } 82 | 83 | body[data-page="search"] input[type="submit"], 84 | #searchbox .input-group > button { 85 | display: inline-block; 86 | padding: 0 0.8em; 87 | font-weight: 700; 88 | text-transform: uppercase; 89 | text-decoration: none; 90 | color: white; 91 | background-color: rgba(0, 0, 0, 0.86); 92 | border: 0; 93 | transition: background-color 100ms; 94 | cursor: pointer; 95 | border-radius: 0; 96 | outline: none; 97 | } 98 | -------------------------------------------------------------------------------- /sphinx_typlog_theme/page.html: -------------------------------------------------------------------------------- 1 | {% extends "layout.html" %} 2 | 3 | {%- macro strip_meta(html, name) %} 4 | {%- set text = html| 5 | replace('name="' + name + '"', '')| 6 | replace('content=', '')| 7 | replace('', '')| 9 | replace('"', '')|trim 10 | -%} 11 | {{ text }} 12 | {%- endmacro %} 13 | 14 | {%- macro og_meta() %} 15 | {%- for html in metatags.split('\n') %} 16 | {%- if 'name="description"' in html %} 17 | {%- set text = strip_meta(html, 'description')|trim %} 18 | 19 | {%- elif 'name="image"' in html %} 20 | {%- set src = strip_meta(html, 'image')|trim %} 21 | 22 | {%- endif %} 23 | {%- endfor %} 24 | {%- endmacro %} 25 | 26 | {% block extrahead %} 27 | 28 | 29 | 30 | {%- if theme_description and 'name="description"' not in metatags %} 31 | 32 | {%- else %} 33 | {{- og_meta() }} 34 | {%- endif %} 35 | {%- if theme_og_image and 'name="image"' not in metatags %} 36 | 37 | {%- endif %} 38 | 39 | {%- if theme_twitter %} 40 | 41 | {%- endif -%} 42 | {% endblock %} 43 | 44 | {% block body %} 45 | {{ body }} 46 |
47 | {%- if prev %} 48 | 49 | ← {{ prev.title|striptags|e|truncate(30) }} 50 | 51 | {%- endif %} 52 | {%- if next %} 53 | 54 | {{ next.title|striptags|e|truncate(30) }} → 55 | 56 | {%- endif %} 57 |
58 | {% endblock %} 59 | -------------------------------------------------------------------------------- /docs/conf.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | import os 4 | import sys 5 | sys.path.insert(0, os.path.abspath('..')) 6 | from sphinx_typlog_theme import __version__ 7 | from sphinx_typlog_theme import ( 8 | add_badge_roles, 9 | add_github_roles, 10 | ) 11 | 12 | extensions = ['sphinx.ext.autodoc'] 13 | 14 | templates_path = ['_templates'] 15 | source_suffix = '.rst' 16 | 17 | master_doc = 'index' 18 | 19 | # General information about the project. 20 | project = u'Typlog Theme' 21 | copyright = u'2017, Hsiaoming Yang' 22 | author = u'Hsiaoming Yang' 23 | 24 | # The version info for the project you're documenting, acts as replacement for 25 | # |version| and |release|, also used in various other places throughout the 26 | # built documents. 27 | # 28 | # The short X.Y version. 29 | version = __version__ 30 | # The full version, including alpha/beta/rc tags. 31 | release = __version__ 32 | 33 | # The language for content autogenerated by Sphinx. Refer to documentation 34 | # for a list of supported languages. 35 | # 36 | # This is also used if you do content translation via gettext catalogs. 37 | # Usually you set "language" from the command line for these cases. 38 | language = 'en' 39 | 40 | # List of patterns, relative to source directory, that match files and 41 | # directories to ignore when looking for source files. 42 | # This patterns also effect to html_static_path and html_extra_path 43 | exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] 44 | 45 | # The name of the Pygments (syntax highlighting) style to use. 46 | pygments_style = 'sphinx' 47 | 48 | # If true, `todo` and `todoList` produce output, else they produce nothing. 49 | todo_include_todos = False 50 | 51 | 52 | # -- Options for HTML output ---------------------------------------------- 53 | 54 | # The theme to use for HTML and HTML Help pages. See the documentation for 55 | # a list of builtin themes. 56 | # 57 | html_theme = 'sphinx_typlog_theme' 58 | html_theme_options = { 59 | 'color': '#E8371A', 60 | 'logo': 'typlog-512.png', 61 | 'description': 'A sphinx theme designed by Typlog.', 62 | 'github_user': 'typlog', 63 | 'github_repo': 'sphinx-typlog-theme', 64 | 'meta_html': '', 65 | 'warning': 'This is a global warnning message', 66 | } 67 | html_theme_path = [".."] 68 | 69 | # Add any paths that contain custom static files (such as style sheets) here, 70 | # relative to this directory. They are copied after the builtin static files, 71 | # so a file named "default.css" will overwrite the builtin "default.css". 72 | html_static_path = ['_static'] 73 | 74 | html_sidebars = { 75 | '**': [ 76 | 'logo.html', 77 | 'github.html', 78 | 'globaltoc.html', 79 | 'sponsors.html', 80 | 'searchbox.html', 81 | ] 82 | } 83 | 84 | 85 | def setup(app): 86 | add_badge_roles(app) 87 | add_github_roles(app, 'lepture/authlib') 88 | -------------------------------------------------------------------------------- /src/css/sphinx.css: -------------------------------------------------------------------------------- 1 | /* styles belong to sphinx */ 2 | 3 | 4 | /* -- headerlink -- */ 5 | a.headerlink { 6 | margin-left: 1px; 7 | color: rgba(0, 0, 0, 0.24); 8 | text-decoration: none; 9 | visibility: hidden; 10 | border-width: 0; 11 | font-family: Georgia, serif; 12 | } 13 | a.headerlink:hover { 14 | background-color: rgba(0, 0, 0, 0.02); 15 | } 16 | h1:hover > a.headerlink, 17 | h2:hover > a.headerlink, 18 | h3:hover > a.headerlink, 19 | h4:hover > a.headerlink, 20 | h5:hover > a.headerlink, 21 | h6:hover > a.headerlink, 22 | dt:hover > a.headerlink, 23 | caption:hover > a.headerlink, 24 | p.caption:hover > a.headerlink, 25 | div.code-block-caption:hover > a.headerlink { 26 | visibility: visible; 27 | } 28 | 29 | /* -- TOC begin -- */ 30 | a.toc-backref { 31 | border: 0; 32 | } 33 | .contents { 34 | display: inline-block; 35 | padding: 16px 40px 16px 0; 36 | background: #f9f9f9; 37 | min-width: 240px; 38 | font-size: 13px; 39 | font-weight: 500; 40 | border-radius: 5px; 41 | } 42 | .contents .topic-title { 43 | color: rgba(0,0,0,.4); 44 | padding-left: 16px; 45 | margin-bottom: 10px; 46 | text-transform: uppercase; 47 | } 48 | .contents ul, 49 | .contents li > ul, 50 | .contents li > ul ul { 51 | list-style-type: none; 52 | } 53 | .contents ul { 54 | margin: 0; 55 | } 56 | .contents li { 57 | margin-top: 4px; 58 | } 59 | 60 | .contents a { 61 | border-bottom: 0; 62 | color: rgba(0,0,0,.5); 63 | } 64 | 65 | /* -- TOC end -- */ 66 | 67 | 68 | /* -- API references begin -- */ 69 | code.descclassname { 70 | padding: 0; 71 | background-color: transparent; 72 | } 73 | code.descname { 74 | font-weight: 700; 75 | padding: 0; 76 | background-color: transparent; 77 | } 78 | 79 | dd { 80 | margin: 4px 0 10px 2em; 81 | } 82 | 83 | dd > table.field-list .field-name { 84 | display: block; 85 | font-size: 0.86em; 86 | color: var(--color-code); 87 | padding: 0; 88 | text-align: left; 89 | text-transform: uppercase; 90 | } 91 | 92 | dd > table.field-list .field-body { 93 | display: block; 94 | padding: 0 0 0 1em; 95 | } 96 | 97 | dl.class dt, 98 | dl.method dt, 99 | dl.data dt, 100 | dl.exception dt, 101 | dl.function dt { 102 | padding: 5px; 103 | color: rgba(0, 0, 0, 0.4); 104 | border-top: 2px solid var(--color-autodoc-border); 105 | background: var(--color-autodoc-background); 106 | } 107 | 108 | dl.class dt code, 109 | dl.method dt code, 110 | dl.data dt code, 111 | dl.exception dt code, 112 | dl.function dt code { 113 | color: var(--color-code); 114 | } 115 | 116 | dl.class dt > em, 117 | dl.method dt > em, 118 | dl.data dt > em, 119 | dl.exception dt > em, 120 | dl.function dt > em { 121 | font-size: 0.98em; 122 | color: rgba(0, 0, 0, 0.68); 123 | } 124 | /* -- API references end -- */ 125 | 126 | /* -- extra -- */ 127 | .hlist td { 128 | vertical-align: top; 129 | } 130 | 131 | p.centered { 132 | text-align: center; 133 | } 134 | -------------------------------------------------------------------------------- /src/app.js: -------------------------------------------------------------------------------- 1 | $(function() { 2 | 3 | // control sidebar 4 | $('.t-head_menu').on('click',function(){$('body').addClass('_expand')}); 5 | $('.t-body').on('click',function(){$('body').removeClass('_expand')}); 6 | $('.t-sidebar_close').on('click',function(){$('body').removeClass('_expand')}); 7 | 8 | 9 | // footnote 10 | $('a.footnote-reference').on('click', function(e) { 11 | e.preventDefault(); 12 | var id = $(this).attr('href'); 13 | var html = $(id).find('td.label + td').html(); 14 | 15 | var w = Math.max(document.documentElement.clientWidth, window.innerWidth || 0); 16 | var style = 'top:' + e.pageY + 'px;'; 17 | if (w > 560) { 18 | style += 'width:480px;'; 19 | if (e.pageX > 240 && e.pageX + 240 < w) { 20 | style += 'left:' + (e.pageX - 240) + 'px;'; 21 | } else if (e.pageX <= 240) { 22 | style += 'left:20px;'; 23 | } else { 24 | style += 'right:20px;'; 25 | } 26 | } 27 | showFootnote(html, style); 28 | }); 29 | 30 | function showFootnote(html, style) { 31 | var CONTENT_ID = 'typlog-footnote-content'; 32 | var content = document.getElementById(CONTENT_ID); 33 | if (!content) { 34 | content = document.createElement('div'); 35 | content.id = CONTENT_ID; 36 | $('.t-body').append(content); 37 | } 38 | var MASK_ID = 'typlog-footnote-mask'; 39 | var mask = document.getElementById(MASK_ID); 40 | if (!mask) { 41 | mask = document.createElement('div'); 42 | mask.id = MASK_ID; 43 | document.body.appendChild(mask); 44 | mask.addEventListener('click', function () { 45 | content.className = ''; 46 | mask.className = ''; 47 | }); 48 | } 49 | 50 | content.innerHTML = html; 51 | content.setAttribute('style', style); 52 | content.className = '_active'; 53 | mask.className = '_active'; 54 | } 55 | 56 | // github badge 57 | function fetchGitHubRepo (repo) { 58 | var url = 'https://api.github.com/repos/' + repo; 59 | $.getJSON(url, function (data) { 60 | var counts = [+new Date(), data.stargazers_count, data.forks_count]; 61 | localStorage.setItem('gh:' + repo, JSON.stringify(counts)); 62 | updateGitHubStats(counts[1], counts[2]); 63 | }); 64 | } 65 | 66 | function updateGitHubStats (stars, forks) { 67 | $('.github_stars strong').text(stars); 68 | $('.github_forks strong').text(forks); 69 | } 70 | 71 | function initGitHub (url) { 72 | if (!url) { 73 | return 74 | } 75 | var repo = url.replace('https://github.com/', ''); 76 | var cache = localStorage.getItem('gh:' + repo); 77 | if (cache) { 78 | try { 79 | var counts = JSON.parse(cache); 80 | updateGitHubStats(counts[1], counts[2]); 81 | var delta = new Date() - counts[0]; 82 | if (delta < 0 || delta > 900000) { 83 | fetchGitHubRepo(repo); 84 | } 85 | } catch (error) { 86 | fetchGitHubRepo(repo); 87 | } 88 | } else { 89 | fetchGitHubRepo(repo); 90 | } 91 | } 92 | 93 | initGitHub($('.github').attr('href')); 94 | 95 | }); 96 | -------------------------------------------------------------------------------- /src/css/widget.css: -------------------------------------------------------------------------------- 1 | a.logo { 2 | display: block; 3 | font-size: 1.2em; 4 | font-weight: 900; 5 | letter-spacing: 1px; 6 | text-decoration: none; 7 | margin-bottom: 1em; 8 | border: 0; 9 | } 10 | .logo img { 11 | vertical-align: middle; 12 | margin-right: 6px; 13 | width: 40px; 14 | height: 40px; 15 | } 16 | .logo_desc { 17 | margin: 1em 0; 18 | color: rgba(0, 0, 0, 0.6); 19 | } 20 | 21 | .github_wrap { 22 | margin: 1em 0; 23 | } 24 | .github_wrap .github { 25 | display: inline-block; 26 | border: 1px solid #d5d5d5; 27 | background-image: linear-gradient(to bottom,#fcfcfc 0,#eee 100%); 28 | padding: 6px 14px; 29 | border-radius: 5px; 30 | } 31 | .github > span { 32 | display: inline-block; 33 | text-align: center; 34 | vertical-align: middle; 35 | line-height: 1; 36 | font-size: 14px; 37 | color: rgba(0, 0, 0, 0.5); 38 | } 39 | .github_icon { 40 | width: 30px; 41 | height: 30px; 42 | background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2ZXJzaW9uPSIxLjEiIGlkPSJMYXllcl8xIiB4PSIwcHgiIHk9IjBweCIgd2lkdGg9IjQwcHgiIGhlaWdodD0iNDBweCIgdmlld0JveD0iMTIgMTIgNDAgNDAiIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMTIgMTIgNDAgNDAiIHhtbDpzcGFjZT0icHJlc2VydmUiPjxwYXRoIGZpbGw9IiMzMzMzMzMiIGQ9Ik0zMiAxMy40Yy0xMC41IDAtMTkgOC41LTE5IDE5YzAgOC40IDUuNSAxNS41IDEzIDE4YzEgMC4yIDEuMy0wLjQgMS4zLTAuOWMwLTAuNSAwLTEuNyAwLTMuMiBjLTUuMyAxLjEtNi40LTIuNi02LjQtMi42QzIwIDQxLjYgMTguOCA0MSAxOC44IDQxYy0xLjctMS4yIDAuMS0xLjEgMC4xLTEuMWMxLjkgMC4xIDIuOSAyIDIuOSAyYzEuNyAyLjkgNC41IDIuMSA1LjUgMS42IGMwLjItMS4yIDAuNy0yLjEgMS4yLTIuNmMtNC4yLTAuNS04LjctMi4xLTguNy05LjRjMC0yLjEgMC43LTMuNyAyLTUuMWMtMC4yLTAuNS0wLjgtMi40IDAuMi01YzAgMCAxLjYtMC41IDUuMiAyIGMxLjUtMC40IDMuMS0wLjcgNC44LTAuN2MxLjYgMCAzLjMgMC4yIDQuNyAwLjdjMy42LTIuNCA1LjItMiA1LjItMmMxIDIuNiAwLjQgNC42IDAuMiA1YzEuMiAxLjMgMiAzIDIgNS4xYzAgNy4zLTQuNSA4LjktOC43IDkuNCBjMC43IDAuNiAxLjMgMS43IDEuMyAzLjVjMCAyLjYgMCA0LjYgMCA1LjJjMCAwLjUgMC40IDEuMSAxLjMgMC45YzcuNS0yLjYgMTMtOS43IDEzLTE4LjFDNTEgMjEuOSA0Mi41IDEzLjQgMzIgMTMuNHoiLz48L3N2Zz4=); 43 | background-size: 100% 100%; 44 | background-repeat: no-repeat; 45 | } 46 | .github span > strong { 47 | display: block; 48 | font-size: 16px; 49 | } 50 | .github_stars { 51 | position: relative; 52 | margin: 0 20px 0 10px; 53 | } 54 | .github_stars:after { 55 | content: ''; 56 | display: block; 57 | border-right: 1px solid rgba(0, 0, 0, 0.2); 58 | height: 12px; 59 | position: absolute; 60 | right: -14px; 61 | top: 10px; 62 | } 63 | 64 | .sponsors { 65 | margin: 15px 0; 66 | } 67 | .sponsor { 68 | background: rgba(0, 0, 0, 0.05); 69 | padding: 15px; 70 | margin: 5px 0; 71 | border-radius: 4px; 72 | } 73 | .sponsor:after { 74 | content: ''; 75 | display: table; 76 | clear: both; 77 | } 78 | .sponsor img { 79 | width: 48px; 80 | vertical-align: middle; 81 | } 82 | .sponsor > a.image { 83 | float: left; 84 | border-bottom: none; 85 | } 86 | .sponsor > .text { 87 | overflow: hidden; 88 | padding-left: 10px; 89 | vertical-align: middle; 90 | max-width: calc(100% - 60px); 91 | } 92 | .sponsor > .text > a { 93 | color: var(--color-heading); 94 | border-bottom: 1px solid rgba(0,0,0,.26); 95 | } 96 | .sponsor > .text > a:hover { 97 | color: var(--color-primary); 98 | } 99 | .t-content .sponsor, 100 | .t-content .sponsor > .text { 101 | display: inline-block; 102 | } 103 | .t-content .sponsor img { 104 | width: auto; 105 | height: 40px; 106 | } 107 | .t-content .sponsor > a.image { 108 | display: inline-block; 109 | float: none; 110 | } 111 | -------------------------------------------------------------------------------- /sphinx_typlog_theme/__init__.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | __version__ = '0.8.0' 4 | 5 | 6 | def get_path(): 7 | """Shortcut for users to access this theme. If you are using 8 | Sphinx < 1.7, you can add it into html_theme_path:: 9 | 10 | import sphinx_typlog_theme 11 | html_theme_path = [sphinx_typlog_theme.get_path()] 12 | 13 | :return: theme path 14 | """ 15 | # Theme directory is defined as our parent directory 16 | return os.path.abspath(os.path.dirname(os.path.dirname(__file__))) 17 | 18 | 19 | def add_badge_roles(app): 20 | """Add ``badge`` role to your sphinx documents. It can create 21 | a colorful badge inline. 22 | """ 23 | from docutils.nodes import inline, make_id 24 | from docutils.parsers.rst.roles import set_classes 25 | 26 | def create_badge_role(color=None): 27 | def badge_role(name, rawtext, text, lineno, inliner, 28 | options=None, content=None): 29 | options = options or {} 30 | set_classes(options) 31 | classes = ['badge'] 32 | if color is None: 33 | classes.append('badge-' + make_id(text)) 34 | else: 35 | classes.append('badge-' + color) 36 | if len(text) == 1: 37 | classes.append('badge-one') 38 | options['classes'] = classes 39 | node = inline(rawtext, text, **options) 40 | return [node], [] 41 | return badge_role 42 | 43 | app.add_role('badge', create_badge_role()) 44 | app.add_role('badge-red', create_badge_role('red')) 45 | app.add_role('badge-blue', create_badge_role('blue')) 46 | app.add_role('badge-green', create_badge_role('green')) 47 | app.add_role('badge-yellow', create_badge_role('yellow')) 48 | 49 | 50 | def add_github_roles(app, repo): 51 | """Add ``gh`` role to your sphinx documents. It can generate GitHub 52 | links easily:: 53 | 54 | :gh:`issue#57` will generate the issue link 55 | :gh:`PR#85` will generate the pull request link 56 | 57 | Use this function in ``conf.py`` to enable this feature:: 58 | 59 | def setup(app): 60 | sphinx_typlog_theme.add_github_roles(app, 'lepture/authlib') 61 | 62 | :param app: sphinx app 63 | :param repo: GitHub repo, e.g. "lepture/authlib" 64 | """ 65 | from docutils.nodes import reference 66 | from docutils.parsers.rst.roles import set_classes 67 | 68 | base_url = 'https://github.com/{}'.format(repo) 69 | 70 | def github_role(name, rawtext, text, lineno, inliner, 71 | options=None, content=None): 72 | if '#' in text: 73 | t, n = text.split('#', 1) 74 | if t.lower() in ['issue', 'issues']: 75 | url = base_url + '/issues/{}'.format(n) 76 | elif t.lower() in ['pr', 'pull', 'pull request']: 77 | url = base_url + '/pull/{}'.format(n) 78 | elif t.lower() in ['commit', 'commits']: 79 | url = base_url + '/commit/{}'.format(n) 80 | else: 81 | url = base_url + '/' + text 82 | 83 | options = options or {'classes': ['gh']} 84 | set_classes(options) 85 | node = reference(rawtext, text, refuri=url, **options) 86 | return [node], [] 87 | 88 | app.add_role('gh', github_role) 89 | 90 | 91 | def setup(app): 92 | # add_html_theme is new in Sphinx 1.6+ 93 | if hasattr(app, 'add_html_theme'): 94 | theme_path = os.path.abspath(os.path.dirname(__file__)) 95 | app.add_html_theme('sphinx_typlog_theme', theme_path) 96 | 97 | return {'version': __version__, 'parallel_read_safe': True} 98 | -------------------------------------------------------------------------------- /src/css/layout.css: -------------------------------------------------------------------------------- 1 | .t-sidebar { 2 | position: fixed; 3 | z-index: 10; 4 | top: 0; 5 | left: 0; 6 | bottom: 0; 7 | background: #f9f9f9; 8 | border-right: 1px solid #efefef; 9 | overflow-x: hidden; 10 | overflow-y: auto; 11 | -webkit-overflow-scrolling: touch; 12 | -ms-overflow-style: none; 13 | } 14 | .t-sidebar .inner { 15 | width: 260px; 16 | padding: 20px 40px 40px; 17 | } 18 | 19 | .t-sidebar a { 20 | text-decoration: none; 21 | color: #334433; 22 | border-bottom: 1px solid transparent; 23 | } 24 | .t-sidebar a:hover { 25 | border-color: rgba(0, 0, 0, 0.1); 26 | } 27 | 28 | .t-sidebar h3 { 29 | margin: 1em 0 0.2em; 30 | letter-spacing: -0.06em; 31 | color: #252b31; 32 | font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Droid Sans Fallback", "Microsoft YaHei", sans-serif; 33 | } 34 | 35 | .t-sidebar h1 > a, 36 | .t-sidebar h2 > a, 37 | .t-sidebar h3 > a { 38 | border-bottom-width: 0; 39 | } 40 | 41 | .t-sidebar ul { 42 | list-style-type: none; 43 | margin: 0; 44 | padding: 0; 45 | } 46 | 47 | .t-sidebar li { 48 | margin-top: 4px; 49 | } 50 | 51 | .t-sidebar li > ul { 52 | padding-left: 1em; 53 | } 54 | 55 | .t-sidebar li > a { 56 | text-decoration: none; 57 | border-bottom-width: 2px; 58 | } 59 | 60 | .t-sidebar_close { 61 | display: none; 62 | position: absolute; 63 | right: 10px; 64 | top: 10px; 65 | } 66 | 67 | .t-content { 68 | margin-left: 340px; 69 | padding: 20px 80px 0; 70 | overflow: hidden; 71 | } 72 | 73 | .t-content > footer { 74 | font-size: 0.86em; 75 | color: #999; 76 | padding: 20px 0; 77 | } 78 | 79 | .t-content > footer:before { 80 | display: block; 81 | margin-bottom: 1em; 82 | content: ''; 83 | width: 100px; 84 | border-top: 4px solid rgba(0, 0, 0, 0.1); 85 | } 86 | 87 | .t-content > footer a { 88 | color: #666; 89 | text-decoration: underline; 90 | } 91 | 92 | .t-head { 93 | display: none; 94 | } 95 | 96 | .t-pagination { 97 | margin-top: 1em; 98 | font-family: "Source Sans Pro", "Helvetica Neue", Arial, sans-serif; 99 | } 100 | 101 | .t-pagination a { 102 | border: 0; 103 | font-weight: 500; 104 | } 105 | 106 | /* responsive */ 107 | 108 | @media (max-width: 960px) { 109 | .t-sidebar { 110 | transform: translate3d(-341px, 0, 0); 111 | transition: transform 0.2s ease; 112 | } 113 | ._expand .t-sidebar { 114 | transform: translate3d(0, 0, 0); 115 | max-width: 100%; 116 | } 117 | ._expand .t-sidebar_close { 118 | display: block; 119 | } 120 | .t-content { 121 | padding: 64px 20px 0; 122 | max-width: 840px; 123 | margin: 0 auto; 124 | box-sizing: border-box; 125 | } 126 | .t-head { 127 | display: block; 128 | position: fixed; 129 | width: 100%; 130 | padding: 1em 20px; 131 | box-sizing: border-box; 132 | text-align: center; 133 | border-bottom: 1px solid #efefef; 134 | background: white; 135 | z-index: 9; 136 | } 137 | .t-head_menu { 138 | position: absolute; 139 | top: 1em; 140 | left: 2em; 141 | } 142 | .t-sidebar_close svg, 143 | .t-head_menu svg { 144 | width: 30px; 145 | fill: #ccc; 146 | } 147 | .t-head_logo { 148 | font-weight: 600; 149 | color: var(--color-heading); 150 | } 151 | .t-head_logo:hover { 152 | text-decoration: none; 153 | } 154 | .t-head_logo img { 155 | vertical-align: middle; 156 | margin-right: 6px; 157 | width: 30px; 158 | height: 30px; 159 | } 160 | .t-content :target::before { 161 | content: ""; 162 | display: block; 163 | height: 60px; 164 | margin: -60px 0 0; 165 | } 166 | } 167 | -------------------------------------------------------------------------------- /src/solarized-dark.css: -------------------------------------------------------------------------------- 1 | /* Solarized Dark 2 | 3 | For use with Jekyll and Pygments 4 | 5 | http://ethanschoonover.com/solarized 6 | 7 | SOLARIZED HEX ROLE 8 | --------- -------- ------------------------------------------ 9 | base03 #002b36 background 10 | base01 #586e75 comments / secondary content 11 | base1 #93a1a1 body text / default code / primary content 12 | orange #cb4b16 constants 13 | red #dc322f regex, special keywords 14 | blue #268bd2 reserved keywords 15 | cyan #2aa198 strings, numbers 16 | green #859900 operators, other keywords 17 | */ 18 | 19 | .highlight { color: #93a1a1 } 20 | .highlight .c { color: #586e75 } /* Comment */ 21 | .highlight .err { color: #93a1a1 } /* Error */ 22 | .highlight .g { color: #93a1a1 } /* Generic */ 23 | .highlight .k { color: #859900 } /* Keyword */ 24 | .highlight .l { color: #93a1a1 } /* Literal */ 25 | .highlight .n { color: #93a1a1 } /* Name */ 26 | .highlight .o { color: #859900 } /* Operator */ 27 | .highlight .x { color: #cb4b16 } /* Other */ 28 | .highlight .p { color: #93a1a1 } /* Punctuation */ 29 | .highlight .cm { color: #586e75 } /* Comment.Multiline */ 30 | .highlight .cp { color: #859900 } /* Comment.Preproc */ 31 | .highlight .c1 { color: #586e75 } /* Comment.Single */ 32 | .highlight .cs { color: #859900 } /* Comment.Special */ 33 | .highlight .gd { color: #2aa198 } /* Generic.Deleted */ 34 | .highlight .ge { color: #93a1a1; font-style: italic } /* Generic.Emph */ 35 | .highlight .gr { color: #dc322f } /* Generic.Error */ 36 | .highlight .gh { color: #cb4b16 } /* Generic.Heading */ 37 | .highlight .gi { color: #859900 } /* Generic.Inserted */ 38 | .highlight .go { color: #93a1a1 } /* Generic.Output */ 39 | .highlight .gp { color: #93a1a1 } /* Generic.Prompt */ 40 | .highlight .gs { color: #93a1a1; font-weight: bold } /* Generic.Strong */ 41 | .highlight .gu { color: #cb4b16 } /* Generic.Subheading */ 42 | .highlight .gt { color: #93a1a1 } /* Generic.Traceback */ 43 | .highlight .kc { color: #cb4b16 } /* Keyword.Constant */ 44 | .highlight .kd { color: #268bd2 } /* Keyword.Declaration */ 45 | .highlight .kn { color: #859900 } /* Keyword.Namespace */ 46 | .highlight .kp { color: #859900 } /* Keyword.Pseudo */ 47 | .highlight .kr { color: #268bd2 } /* Keyword.Reserved */ 48 | .highlight .kt { color: #dc322f } /* Keyword.Type */ 49 | .highlight .ld { color: #93a1a1 } /* Literal.Date */ 50 | .highlight .m { color: #2aa198 } /* Literal.Number */ 51 | .highlight .s { color: #2aa198 } /* Literal.String */ 52 | .highlight .na { color: #93a1a1 } /* Name.Attribute */ 53 | .highlight .nb { color: #B58900 } /* Name.Builtin */ 54 | .highlight .nc { color: #268bd2 } /* Name.Class */ 55 | .highlight .no { color: #cb4b16 } /* Name.Constant */ 56 | .highlight .nd { color: #268bd2 } /* Name.Decorator */ 57 | .highlight .ni { color: #cb4b16 } /* Name.Entity */ 58 | .highlight .ne { color: #cb4b16 } /* Name.Exception */ 59 | .highlight .nf { color: #268bd2 } /* Name.Function */ 60 | .highlight .nl { color: #93a1a1 } /* Name.Label */ 61 | .highlight .nn { color: #93a1a1 } /* Name.Namespace */ 62 | .highlight .nx { color: #93a1a1 } /* Name.Other */ 63 | .highlight .py { color: #93a1a1 } /* Name.Property */ 64 | .highlight .nt { color: #268bd2 } /* Name.Tag */ 65 | .highlight .nv { color: #268bd2 } /* Name.Variable */ 66 | .highlight .ow { color: #859900 } /* Operator.Word */ 67 | .highlight .w { color: #93a1a1 } /* Text.Whitespace */ 68 | .highlight .mf { color: #2aa198 } /* Literal.Number.Float */ 69 | .highlight .mh { color: #2aa198 } /* Literal.Number.Hex */ 70 | .highlight .mi { color: #2aa198 } /* Literal.Number.Integer */ 71 | .highlight .mo { color: #2aa198 } /* Literal.Number.Oct */ 72 | .highlight .sb { color: #586e75 } /* Literal.String.Backtick */ 73 | .highlight .sc { color: #2aa198 } /* Literal.String.Char */ 74 | .highlight .sd { color: #93a1a1 } /* Literal.String.Doc */ 75 | .highlight .s2 { color: #2aa198 } /* Literal.String.Double */ 76 | .highlight .se { color: #cb4b16 } /* Literal.String.Escape */ 77 | .highlight .sh { color: #93a1a1 } /* Literal.String.Heredoc */ 78 | .highlight .si { color: #2aa198 } /* Literal.String.Interpol */ 79 | .highlight .sx { color: #2aa198 } /* Literal.String.Other */ 80 | .highlight .sr { color: #dc322f } /* Literal.String.Regex */ 81 | .highlight .s1 { color: #2aa198 } /* Literal.String.Single */ 82 | .highlight .ss { color: #2aa198 } /* Literal.String.Symbol */ 83 | .highlight .bp { color: #268bd2 } /* Name.Builtin.Pseudo */ 84 | .highlight .vc { color: #268bd2 } /* Name.Variable.Class */ 85 | .highlight .vg { color: #268bd2 } /* Name.Variable.Global */ 86 | .highlight .vi { color: #268bd2 } /* Name.Variable.Instance */ 87 | .highlight .il { color: #2aa198 } /* Literal.Number.Integer.Long */ 88 | -------------------------------------------------------------------------------- /src/solarized-light.css: -------------------------------------------------------------------------------- 1 | /* Solarized Light 2 | 3 | For use with Jekyll and Pygments 4 | 5 | http://ethanschoonover.com/solarized 6 | 7 | SOLARIZED HEX ROLE 8 | --------- -------- ------------------------------------------ 9 | base01 #586e75 body text / default code / primary content 10 | base1 #93a1a1 comments / secondary content 11 | base3 #fdf6e3 background 12 | orange #cb4b16 constants 13 | red #dc322f regex, special keywords 14 | blue #268bd2 reserved keywords 15 | cyan #2aa198 strings, numbers 16 | green #859900 operators, other keywords 17 | */ 18 | 19 | .highlight { color: #586e75 } 20 | .highlight .hll { font-weight: 700 } 21 | .highlight .c { color: #93a1a1 } /* Comment */ 22 | .highlight .err { color: #586e75 } /* Error */ 23 | .highlight .g { color: #586e75 } /* Generic */ 24 | .highlight .k { color: #859900 } /* Keyword */ 25 | .highlight .l { color: #586e75 } /* Literal */ 26 | .highlight .n { color: #586e75 } /* Name */ 27 | .highlight .o { color: #859900 } /* Operator */ 28 | .highlight .x { color: #cb4b16 } /* Other */ 29 | .highlight .p { color: #586e75 } /* Punctuation */ 30 | .highlight .cm { color: #93a1a1 } /* Comment.Multiline */ 31 | .highlight .cp { color: #859900 } /* Comment.Preproc */ 32 | .highlight .c1 { color: #93a1a1 } /* Comment.Single */ 33 | .highlight .cs { color: #859900 } /* Comment.Special */ 34 | .highlight .gd { color: #2aa198 } /* Generic.Deleted */ 35 | .highlight .ge { color: #586e75; font-style: italic } /* Generic.Emph */ 36 | .highlight .gr { color: #dc322f } /* Generic.Error */ 37 | .highlight .gh { color: #cb4b16 } /* Generic.Heading */ 38 | .highlight .gi { color: #859900 } /* Generic.Inserted */ 39 | .highlight .go { color: #586e75 } /* Generic.Output */ 40 | .highlight .gp { color: #586e75 } /* Generic.Prompt */ 41 | .highlight .gs { color: #586e75; font-weight: bold } /* Generic.Strong */ 42 | .highlight .gu { color: #cb4b16 } /* Generic.Subheading */ 43 | .highlight .gt { color: #586e75 } /* Generic.Traceback */ 44 | .highlight .kc { color: #cb4b16 } /* Keyword.Constant */ 45 | .highlight .kd { color: #268bd2 } /* Keyword.Declaration */ 46 | .highlight .kn { color: #859900 } /* Keyword.Namespace */ 47 | .highlight .kp { color: #859900 } /* Keyword.Pseudo */ 48 | .highlight .kr { color: #268bd2 } /* Keyword.Reserved */ 49 | .highlight .kt { color: #dc322f } /* Keyword.Type */ 50 | .highlight .ld { color: #586e75 } /* Literal.Date */ 51 | .highlight .m { color: #2aa198 } /* Literal.Number */ 52 | .highlight .s { color: #2aa198 } /* Literal.String */ 53 | .highlight .na { color: #586e75 } /* Name.Attribute */ 54 | .highlight .nb { color: #B58900 } /* Name.Builtin */ 55 | .highlight .nc { color: #268bd2 } /* Name.Class */ 56 | .highlight .no { color: #cb4b16 } /* Name.Constant */ 57 | .highlight .nd { color: #268bd2 } /* Name.Decorator */ 58 | .highlight .ni { color: #cb4b16 } /* Name.Entity */ 59 | .highlight .ne { color: #cb4b16 } /* Name.Exception */ 60 | .highlight .nf { color: #268bd2 } /* Name.Function */ 61 | .highlight .nl { color: #586e75 } /* Name.Label */ 62 | .highlight .nn { color: #586e75 } /* Name.Namespace */ 63 | .highlight .nx { color: #586e75 } /* Name.Other */ 64 | .highlight .py { color: #586e75 } /* Name.Property */ 65 | .highlight .nt { color: #268bd2 } /* Name.Tag */ 66 | .highlight .nv { color: #268bd2 } /* Name.Variable */ 67 | .highlight .ow { color: #859900 } /* Operator.Word */ 68 | .highlight .w { color: #586e75 } /* Text.Whitespace */ 69 | .highlight .mf { color: #2aa198 } /* Literal.Number.Float */ 70 | .highlight .mh { color: #2aa198 } /* Literal.Number.Hex */ 71 | .highlight .mi { color: #2aa198 } /* Literal.Number.Integer */ 72 | .highlight .mo { color: #2aa198 } /* Literal.Number.Oct */ 73 | .highlight .sb { color: #93a1a1 } /* Literal.String.Backtick */ 74 | .highlight .sc { color: #2aa198 } /* Literal.String.Char */ 75 | .highlight .sd { color: #586e75 } /* Literal.String.Doc */ 76 | .highlight .s2 { color: #2aa198 } /* Literal.String.Double */ 77 | .highlight .se { color: #cb4b16 } /* Literal.String.Escape */ 78 | .highlight .sh { color: #586e75 } /* Literal.String.Heredoc */ 79 | .highlight .si { color: #2aa198 } /* Literal.String.Interpol */ 80 | .highlight .sx { color: #2aa198 } /* Literal.String.Other */ 81 | .highlight .sr { color: #dc322f } /* Literal.String.Regex */ 82 | .highlight .s1 { color: #2aa198 } /* Literal.String.Single */ 83 | .highlight .ss { color: #2aa198 } /* Literal.String.Symbol */ 84 | .highlight .bp { color: #268bd2 } /* Name.Builtin.Pseudo */ 85 | .highlight .vc { color: #268bd2 } /* Name.Variable.Class */ 86 | .highlight .vg { color: #268bd2 } /* Name.Variable.Global */ 87 | .highlight .vi { color: #268bd2 } /* Name.Variable.Instance */ 88 | .highlight .il { color: #2aa198 } /* Literal.Number.Integer.Long */ 89 | -------------------------------------------------------------------------------- /src/css/directives.css: -------------------------------------------------------------------------------- 1 | /* -- admonition begin -- */ 2 | .admonition { 3 | position: relative; 4 | padding: 40px 24px 18px 24px; 5 | margin: 2em 0; 6 | border-left: 4px solid #ddd; 7 | background-color: #f8f8f8; 8 | } 9 | 10 | .admonition:before { 11 | position: absolute; 12 | content: '#'; 13 | top: 14px; 14 | left: -12px; 15 | color: #fff; 16 | width: 20px; 17 | height: 20px; 18 | border-radius: 100%; 19 | background-color: #ddd; 20 | text-align: center; 21 | font: normal bold 14px/20px "Helvetica Neue", Arial, sans-serif; 22 | } 23 | .admonition.tip:before { 24 | content: 'T'; 25 | font-size: 12px; 26 | } 27 | 28 | .admonition > .admonition-title { 29 | position: absolute; 30 | margin: 0; 31 | top: 12px; 32 | left: 24px; 33 | font-size: 0.8em; 34 | color: rgba(0, 0, 0, 0.4); 35 | text-transform: uppercase; 36 | } 37 | 38 | .admonition > .last { 39 | margin-bottom: 0; 40 | } 41 | 42 | .admonition.note, 43 | .admonition.attention { 44 | border-color: var(--color-blue); 45 | background-color: var(--color-blue-alpha); 46 | } 47 | .admonition.note:before, 48 | .admonition.attention:before { 49 | background-color: var(--color-blue); 50 | } 51 | .admonition.attention:before { 52 | content: '!'; 53 | } 54 | .admonition.note > .admonition-title, 55 | .admonition.attention > .admonition-title { 56 | font-weight: 700; 57 | color: var(--color-blue); 58 | } 59 | 60 | .admonition.warning, 61 | .admonition.caution { 62 | border-color: var(--color-yellow); 63 | background-color: rgba(247, 186, 42, 0.1); 64 | } 65 | .admonition.warning:before, 66 | .admonition.caution:before { 67 | content: '!'; 68 | background-color: var(--color-yellow); 69 | } 70 | .admonition.warning > .admonition-title, 71 | .admonition.caution > .admonition-title { 72 | font-weight: 700; 73 | color: var(--color-yellow); 74 | } 75 | 76 | .admonition.error, 77 | .admonition.danger { 78 | border-color: var(--color-red); 79 | background-color: rgba(255, 92, 47, 0.08); 80 | } 81 | .admonition.error:before, 82 | .admonition.danger:before { 83 | content: '!'; 84 | background-color: var(--color-red); 85 | } 86 | .admonition.error > .admonition-title, 87 | .admonition.danger > .admonition-title { 88 | font-weight: 700; 89 | color: var(--color-red); 90 | } 91 | 92 | .admonition.important{ 93 | border-color: var(--color-purple); 94 | background-color: rgba(179, 127, 235, 0.1); 95 | } 96 | .admonition.important:before { 97 | background-color: var(--color-purple); 98 | } 99 | .admonition.important > .admonition-title { 100 | font-weight: 700; 101 | color: var(--color-purple); 102 | } 103 | 104 | .admonition.hint { 105 | border-color: var(--color-cyan); 106 | background-color: rgba(8, 151, 156, 0.1); 107 | } 108 | .admonition.hint:before { 109 | background-color: var(--color-cyan); 110 | } 111 | .admonition.hint > .admonition-title { 112 | font-weight: 700; 113 | color: var(--color-cyan); 114 | } 115 | 116 | .admonition.tip { 117 | border-color: var(--color-magenta); 118 | background-color: rgba(247, 89, 171, 0.1); 119 | } 120 | .admonition.tip:before { 121 | background-color: var(--color-magenta); 122 | } 123 | .admonition.tip > .admonition-title { 124 | font-weight: 700; 125 | color: var(--color-magenta); 126 | } 127 | 128 | /* -- versioning begin -- */ 129 | .versionmodified { 130 | color: rgba(0, 0, 0, 0.86); 131 | font-weight: 700; 132 | } 133 | 134 | .versionadded, 135 | .versionchanged, 136 | .deprecated { 137 | position: relative; 138 | padding: 8px 24px; 139 | margin: 1em 0; 140 | border-left: 4px solid transparent; 141 | } 142 | 143 | .versionadded:before, 144 | .versionchanged:before, 145 | .deprecated:before { 146 | position: absolute; 147 | content: '!'; 148 | top: 8px; 149 | left: -12px; 150 | color: #fff; 151 | width: 20px; 152 | height: 20px; 153 | border-radius: 100%; 154 | text-align: center; 155 | font: normal bold 14px/20px "Helvetica Neue", Arial, sans-serif; 156 | } 157 | 158 | .versionadded { 159 | border-color: var(--color-green); 160 | background-color: rgba(73, 199, 132, 0.08); 161 | } 162 | .versionadded:before { 163 | content: '#'; 164 | background-color: var(--color-green); 165 | } 166 | .versionchanged { 167 | border-color: var(--color-yellow); 168 | background-color: rgba(247, 186, 42, 0.08); 169 | } 170 | .versionchanged:before { 171 | background-color: var(--color-yellow); 172 | } 173 | .deprecated { 174 | border-color: var(--color-red); 175 | background-color: rgba(255, 92, 47, 0.08); 176 | } 177 | .deprecated:before { 178 | background-color: var(--color-red); 179 | } 180 | 181 | .versionadded > p, 182 | .versionchanged > p, 183 | .deprecated > p { 184 | margin: 0; 185 | } 186 | -------------------------------------------------------------------------------- /sphinx_typlog_theme/layout.html: -------------------------------------------------------------------------------- 1 | {%- set url_root = pathto('', 1) %} 2 | {%- if url_root == '#' %}{% set url_root = '' %}{% endif %} 3 | {%- if not embedded and docstitle %} 4 | {%- set titlesuffix = " — "|safe + docstitle|e %} 5 | {%- else %} 6 | {%- set titlesuffix = "" %} 7 | {%- endif %} 8 | {%- set lang_attr = 'en' if language == None else (language | replace('_', '-')) -%} 9 | 10 | 11 | 12 | 13 | 14 | {{ metatags }} 15 | {%- block htmltitle -%} 16 | {{ title|striptags|e }}{{ titlesuffix }} 17 | {% endblock %} 18 | {%- if favicon -%} 19 | 20 | {%- endif %} 21 | {%- if theme_canonical_url -%} 22 | 23 | {%- endif -%} 24 | 25 | {%- if not embedded and use_opensearch -%} 26 | 27 | {%- endif %} 28 | {%- include "style.html" -%} 29 | 30 | 31 | {%- for cssfile in css_files -%} 32 | 33 | {%- endfor %} 34 | 35 | {%- for cssfile in extra_css_files -%} 36 | 37 | {%- endfor %} 38 | 39 | {%- block linktags %} 40 | {%- if hasdoc('about') %} 41 | 43 | {%- endif %} 44 | {%- if hasdoc('genindex') %} 45 | 46 | {%- endif %} 47 | {%- if hasdoc('search') %} 48 | 49 | {%- endif %} 50 | {%- if hasdoc('copyright') %} 51 | 52 | {%- endif %} 53 | 54 | {%- if parents %} 55 | 56 | {%- endif %} 57 | {%- if next %} 58 | 59 | {%- endif %} 60 | {%- if prev %} 61 | 62 | {%- endif %} 63 | {%- endblock %} 64 | 65 | {%- block scripts %} 66 | {%- include "scripts.html" %} 67 | {%- endblock %} 68 | {%- if theme_meta_html %}{{ theme_meta_html }}{% endif %} 69 | {%- block extrahead %}{% endblock %} 70 | 71 | 72 |
73 |
74 | 80 |
81 | 93 |
94 |
95 | {%- if theme_warning %} 96 |
97 |

{{ theme_warning }}

98 |
99 | {%- endif %} 100 | {% block body %}{% endblock %} 101 |
102 |
103 | {%- block footer %} 104 | {%- include "footer.html" %} 105 | {%- endblock %} 106 |
107 | 108 | 109 | 110 | -------------------------------------------------------------------------------- /src/css/yue.css: -------------------------------------------------------------------------------- 1 | .yue { 2 | line-height: 1.62; 3 | } 4 | .yue h1, 5 | .yue h2, 6 | .yue h3, 7 | .yue h4, 8 | .yue h5, 9 | .yue h6 { 10 | -webkit-font-smoothing: antialiased; 11 | -moz-osx-font-smoothing: grayscale; 12 | font-family: var(--font-text); 13 | color: var(--color-heading); 14 | } 15 | 16 | .yue h1 { 17 | font-weight: 700; 18 | font-size: 1.8em; 19 | margin: 0.8em 0; 20 | } 21 | 22 | .yue h2 { 23 | font-weight: 700; 24 | font-size: 1.42em; 25 | margin: 1.42em 0 0.4em; 26 | } 27 | 28 | .yue h3 { 29 | font-size: 1.17em; 30 | margin: 1.62em 0 0.4em; 31 | } 32 | 33 | .yue h4, 34 | .yue h5, 35 | .yue h6 { 36 | font-size: 1em; 37 | margin: 1.6em 0 0.6em; 38 | } 39 | 40 | .yue h6 { 41 | font-weight: 500; 42 | } 43 | 44 | .yue p { 45 | margin-top: 0; 46 | margin-bottom: 1.02em; 47 | hyphens: auto; 48 | } 49 | 50 | .yue a { 51 | color: var(--color-heading); 52 | word-wrap: break-word; 53 | text-decoration: none; 54 | border-bottom: 1px solid rgba(0, 0, 0, 0.26); 55 | } 56 | 57 | .yue a:hover { 58 | color: var(--color-primary); 59 | border-color: var(--color-primary); 60 | text-decoration: none; 61 | } 62 | 63 | .yue h1 a, .yue h2 a, .yue h3 a { 64 | text-decoration: none; 65 | } 66 | 67 | .yue strong, 68 | .yue b { 69 | -webkit-font-smoothing: antialiased; 70 | font-weight: 700; 71 | color: rgba(0, 0, 0, 0.9); 72 | } 73 | 74 | .yue em, 75 | .yue i { 76 | font-style: italic; 77 | color: rgba(0, 0, 0, 0.9); 78 | } 79 | 80 | .yue img, 81 | .yue video { 82 | max-width: 100%; 83 | height: auto; 84 | margin: 0.2em 0; 85 | } 86 | 87 | .yue a img { 88 | border: none; 89 | vertical-align: middle; 90 | } 91 | 92 | .yue figure { 93 | position: relative; 94 | clear: both; 95 | outline: 0; 96 | margin: 10px 0 30px; 97 | padding: 0; 98 | min-height: 100px; 99 | } 100 | 101 | .yue figure img { 102 | display: block; 103 | max-width: 100%; 104 | margin: 0 auto; 105 | box-sizing: border-box; 106 | } 107 | 108 | .yue figcaption { 109 | width: 100%; 110 | text-align: center; 111 | left: 0; 112 | margin-top: 10px; 113 | font-weight: 400; 114 | font-size: 14px; 115 | color: rgba(0, 0, 0, 0.42); 116 | } 117 | 118 | .yue figcaption a { 119 | text-decoration: none; 120 | color: rgba(0, 0, 0, 0.42); 121 | } 122 | 123 | .yue hr { 124 | display: block; 125 | width: 90%; 126 | max-width: 100px; 127 | border: 0; 128 | border-top: 1px solid rgba(0, 0, 0, 0.04); 129 | margin: 1.42em auto 1.84em; 130 | } 131 | 132 | .yue blockquote { 133 | position: relative; 134 | padding: 0 1em 0 2em; 135 | margin: 1.2em 0; 136 | color: rgba(0, 0, 0, 0.68); 137 | border-left: 6px solid rgba(0, 0, 0, 0.1); 138 | } 139 | 140 | .yue blockquote a { 141 | color: rgba(0, 0, 0, 0.68); 142 | } 143 | 144 | .yue ul, 145 | .yue ol { 146 | margin: 0 0 24px 6px; 147 | padding-left: 16px; 148 | } 149 | 150 | .yue ul { 151 | list-style-type: square; 152 | } 153 | 154 | .yue ol { 155 | list-style-type: decimal; 156 | } 157 | 158 | .yue li { 159 | margin-bottom: 0.2em; 160 | } 161 | 162 | .yue li ul, 163 | .yue li ol { 164 | margin-top: 0; 165 | margin-bottom: 0; 166 | } 167 | 168 | .yue li ul { 169 | list-style-type: disc; 170 | } 171 | 172 | .yue li ul ul { 173 | list-style-type: circle; 174 | } 175 | 176 | .yue li p { 177 | margin: 0.4em 0 0.6em; 178 | } 179 | 180 | .yue code, 181 | .yue tt { 182 | background-color: rgba(220, 220, 220, 0.2); 183 | color: var(--color-code); 184 | font-size: 0.96em; 185 | padding: 1px 4px; 186 | border-radius: 2px; 187 | font-family: var(--font-code); 188 | word-wrap: break-word; 189 | hyphens: none; 190 | } 191 | 192 | .yue pre { 193 | margin: 1.4em 0; 194 | padding: 1.2em; 195 | border: none; 196 | overflow: auto; 197 | line-height: 1.5; 198 | font-size: 0.98em; 199 | font-family: var(--font-code); 200 | color: var(--color-text); 201 | } 202 | 203 | .yue pre code, 204 | .yue pre tt { 205 | color: rgba(0, 0, 0, 0.68); 206 | border: none; 207 | background: none; 208 | padding: 0; 209 | } 210 | 211 | .yue table { 212 | width: 100%; 213 | max-width: 100%; 214 | border-collapse: collapse; 215 | border-spacing: 0; 216 | margin-bottom: 1.5em; 217 | font-size: 0.96em; 218 | box-sizing: border-box; 219 | } 220 | 221 | .yue iframe { 222 | display: block; 223 | max-width: 100%; 224 | margin-bottom: 30px; 225 | } 226 | 227 | .yue figure iframe { 228 | margin: auto; 229 | } 230 | 231 | .yue table pre { 232 | margin: 0; 233 | padding: 0; 234 | border: none; 235 | background: none; 236 | } 237 | 238 | [lang^="en"] .yue h1 { 239 | font-weight: 900; 240 | } 241 | 242 | .yue table[border] th, 243 | .yue table[border] td { 244 | text-align: left; 245 | padding: 6px 8px 6px 10px; 246 | border: 1px solid #ddd; 247 | } 248 | 249 | .yue table[border] td { 250 | vertical-align: top; 251 | } 252 | 253 | .yue table[border] tr:nth-child(even) { 254 | background-color: rgba(0, 0, 0, 0.01); 255 | } 256 | -------------------------------------------------------------------------------- /docs/markup.rst: -------------------------------------------------------------------------------- 1 | Markup Styles 2 | ============= 3 | 4 | This page is showing markup styles, they have no meanings. 5 | 6 | .. contents:: Table of Contents 7 | 8 | Admonition 9 | ---------- 10 | 11 | .. admonition:: Debug Note 12 | 13 | The default admonition has no colors. It is gray. 14 | 15 | .. attention:: Attention please! 16 | 17 | .. caution:: Attention please! 18 | 19 | .. danger:: This is a danger area. 20 | 21 | .. error:: This is an error message. 22 | 23 | .. hint:: This is hint message. 24 | 25 | .. important:: This is an impoartant message. 26 | 27 | .. note:: 28 | This page is showing markup styles, they have no meanings. 29 | 30 | Oh. Except this message. 31 | 32 | .. tip:: A small tip please. 33 | 34 | .. warning:: Please don't do anything harmful to me. 35 | 36 | 37 | Sphinx Admonition 38 | ----------------- 39 | 40 | .. versionadded:: 2.5 41 | The *spam* parameter. 42 | 43 | .. versionchanged:: 2.5 44 | The *spam* parameter. 45 | 46 | .. deprecated:: 3.1 47 | Use :func:`spam` instead. 48 | 49 | .. seealso:: 50 | It is also available at https://typlog.com/ 51 | 52 | .. centered:: LICENSE AGREEMENT 53 | 54 | .. hlist:: 55 | :columns: 3 56 | 57 | * A list of 58 | * short items 59 | * that should be 60 | * displayed 61 | * horizontally 62 | 63 | Block Level 64 | ----------- 65 | 66 | Code 67 | ~~~~ 68 | 69 | Here is an example on code highlight:: 70 | 71 | @app.route('/', methods=['GET') 72 | def hello(name='world'): 73 | return 'Hello {}'.format(name) 74 | 75 | class API(object): 76 | """API docstring style""" 77 | 78 | def __init__(self, request): 79 | # comment 80 | self.request = request 81 | 82 | 83 | Using ``code-block`` with other options. 84 | 85 | .. code-block:: js 86 | :caption: test.js 87 | :emphasize-lines: 2 88 | 89 | function test() { 90 | console.log('hi'); 91 | } 92 | 93 | .. code-block:: rust 94 | :linenos: 95 | 96 | fn main() { 97 | println!("Hello World!"); 98 | } 99 | 100 | Quote 101 | ~~~~~ 102 | 103 | Here is an example on block quote: 104 | 105 | | Beautiful is better than ugly. 106 | | Explicit is better than implicit. 107 | | Simple is better than complex. 108 | | Complex is better than complicated. 109 | | Flat is better than nested. 110 | | Sparse is better than dense. 111 | | Readability counts. 112 | | Special cases aren't special enough to break the rules. 113 | | Although practicality beats purity. 114 | | Errors should never pass silently. 115 | | Unless explicitly silenced. 116 | | In the face of ambiguity, refuse the temptation to guess. 117 | | There should be one-- and preferably only one --obvious way to do it. 118 | | Although that way may not be obvious at first unless you're Dutch. 119 | | Now is better than never. 120 | | Although never is often better than *right* now. 121 | | If the implementation is hard to explain, it's a bad idea. 122 | | If the implementation is easy to explain, it may be a good idea. 123 | | Namespaces are one honking great idea -- let's do more of those! 124 | 125 | List 126 | ~~~~ 127 | 128 | * Make a list, and its items 129 | 130 | 1. Ordered item: foo 131 | 132 | a. A third level item 133 | 134 | 2. Ordered item: bar 135 | 136 | * The second item has no items 137 | * The third item has unordered items 138 | 139 | * A foo is a foo 140 | * A bar is a bar 141 | 142 | 143 | Options Lists 144 | ~~~~~~~~~~~~~ 145 | 146 | -a command-line option "a" 147 | -b file options can have arguments 148 | and long descriptions 149 | --long options can be long also 150 | --input=file long options can also have 151 | arguments 152 | /V DOS/VMS-style options too 153 | 154 | Inline Style 155 | ------------ 156 | 157 | A plain text mixed with **bold** and *italic*. And we have ``code`` too. 158 | 159 | Let's try a link https://lepture.com. 160 | 161 | Footnotes 162 | ~~~~~~~~~ 163 | 164 | Plain text Typical result 165 | Footnote references, like [5]_. 166 | Note that footnotes may get 167 | rearranged, e.g., to the bottom of 168 | the "page". 169 | 170 | Autonumbered footnotes are 171 | possible, like using [#]_ and [#]_. 172 | 173 | They may be assigned 'autonumber 174 | labels' - for instance, 175 | [#fourth]_ and [#third]_. 176 | 177 | .. [5] A numerical footnote. Note 178 | there's no colon after the ``]``. 179 | .. [#] This is the first one. 180 | .. [#] This is the second one. 181 | .. [#third] a.k.a. third_ 182 | .. [#fourth] a.k.a. fourth_ 183 | 184 | Citations 185 | ~~~~~~~~~ 186 | 187 | Citation references, like [CIT2002]_. 188 | Note that citations may get 189 | rearranged, e.g., to the bottom of 190 | the "page". 191 | 192 | .. [CIT2002] A citation 193 | (as often used in journals). 194 | 195 | 196 | Badges 197 | ------ 198 | 199 | Let's have a preview of what badges look like: 200 | 201 | * :badge:`done` Add badge role 202 | * :badge:`todo` Add more badge features 203 | * :badge:`doing` Things that in plan 204 | * :badge-red:`remove` Some feature has been removed 205 | * :badge-green:`√` 206 | 207 | 208 | GitHub 209 | ------ 210 | 211 | * Feature request at :gh:`issue#1`. 212 | 213 | API References 214 | -------------- 215 | 216 | .. module:: sphinx_typlog_theme 217 | 218 | .. autofunction:: get_path 219 | .. autofunction:: add_github_roles 220 | .. autofunction:: add_badge_roles 221 | -------------------------------------------------------------------------------- /src/css/normalize.css: -------------------------------------------------------------------------------- 1 | html { 2 | font-family: sans-serif; /* 1 */ 3 | line-height: 1.15; /* 2 */ 4 | -ms-text-size-adjust: 100%; /* 3 */ 5 | -webkit-text-size-adjust: 100%; /* 3 */ 6 | } 7 | 8 | /* Sections 9 | ========================================================================== */ 10 | 11 | /** 12 | * Remove the margin in all browsers (opinionated). 13 | */ 14 | 15 | body { 16 | margin: 0; 17 | } 18 | 19 | /** 20 | * Add the correct display in IE 9-. 21 | */ 22 | 23 | article, 24 | aside, 25 | footer, 26 | header, 27 | nav, 28 | section { 29 | display: block; 30 | } 31 | 32 | /** 33 | * Correct the font size and margin on `h1` elements within `section` and 34 | * `article` contexts in Chrome, Firefox, and Safari. 35 | */ 36 | 37 | h1 { 38 | font-size: 2em; 39 | margin: 0.67em 0; 40 | } 41 | 42 | /* Grouping content 43 | ========================================================================== */ 44 | 45 | /** 46 | * Add the correct display in IE 9-. 47 | * 1. Add the correct display in IE. 48 | */ 49 | 50 | figcaption, 51 | figure, 52 | main { /* 1 */ 53 | display: block; 54 | } 55 | 56 | /** 57 | * Add the correct margin in IE 8. 58 | */ 59 | 60 | figure { 61 | margin: 1em 40px; 62 | } 63 | 64 | /** 65 | * 1. Add the correct box sizing in Firefox. 66 | * 2. Show the overflow in Edge and IE. 67 | */ 68 | 69 | hr { 70 | box-sizing: content-box; /* 1 */ 71 | height: 0; /* 1 */ 72 | overflow: visible; /* 2 */ 73 | } 74 | 75 | /** 76 | * 1. Correct the inheritance and scaling of font size in all browsers. 77 | * 2. Correct the odd `em` font sizing in all browsers. 78 | */ 79 | 80 | pre { 81 | font-family: monospace, monospace; /* 1 */ 82 | font-size: 1em; /* 2 */ 83 | } 84 | 85 | /* Text-level semantics 86 | ========================================================================== */ 87 | 88 | /** 89 | * 1. Remove the gray background on active links in IE 10. 90 | * 2. Remove gaps in links underline in iOS 8+ and Safari 8+. 91 | */ 92 | 93 | a { 94 | background-color: transparent; /* 1 */ 95 | -webkit-text-decoration-skip: objects; /* 2 */ 96 | } 97 | 98 | /** 99 | * Remove the outline on focused links when they are also active or hovered 100 | * in all browsers (opinionated). 101 | */ 102 | 103 | a:active, 104 | a:hover { 105 | outline-width: 0; 106 | } 107 | 108 | /** 109 | * 1. Remove the bottom border in Firefox 39-. 110 | * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari. 111 | */ 112 | 113 | abbr[title] { 114 | border-bottom: none; /* 1 */ 115 | text-decoration: underline; /* 2 */ 116 | text-decoration: underline dotted; /* 2 */ 117 | } 118 | 119 | /** 120 | * Prevent the duplicate application of `bolder` by the next rule in Safari 6. 121 | */ 122 | 123 | b, 124 | strong { 125 | font-weight: inherit; 126 | } 127 | 128 | /** 129 | * Add the correct font weight in Chrome, Edge, and Safari. 130 | */ 131 | 132 | b, 133 | strong { 134 | font-weight: bolder; 135 | } 136 | 137 | /** 138 | * 1. Correct the inheritance and scaling of font size in all browsers. 139 | * 2. Correct the odd `em` font sizing in all browsers. 140 | */ 141 | 142 | code, 143 | kbd, 144 | samp { 145 | font-family: monospace, monospace; /* 1 */ 146 | font-size: 1em; /* 2 */ 147 | } 148 | 149 | /** 150 | * Add the correct font style in Android 4.3-. 151 | */ 152 | 153 | dfn { 154 | font-style: italic; 155 | } 156 | 157 | /** 158 | * Add the correct background and color in IE 9-. 159 | */ 160 | 161 | mark { 162 | background-color: #ff0; 163 | color: #000; 164 | } 165 | 166 | /** 167 | * Add the correct font size in all browsers. 168 | */ 169 | 170 | small { 171 | font-size: 80%; 172 | } 173 | 174 | /** 175 | * Prevent `sub` and `sup` elements from affecting the line height in 176 | * all browsers. 177 | */ 178 | 179 | sub, 180 | sup { 181 | font-size: 75%; 182 | line-height: 0; 183 | position: relative; 184 | vertical-align: baseline; 185 | } 186 | 187 | sub { 188 | bottom: -0.25em; 189 | } 190 | 191 | sup { 192 | top: -0.5em; 193 | } 194 | 195 | /* Embedded content 196 | ========================================================================== */ 197 | 198 | /** 199 | * Add the correct display in IE 9-. 200 | */ 201 | 202 | audio, 203 | video { 204 | display: inline-block; 205 | } 206 | 207 | /** 208 | * Add the correct display in iOS 4-7. 209 | */ 210 | 211 | audio:not([controls]) { 212 | display: none; 213 | height: 0; 214 | } 215 | 216 | /** 217 | * Remove the border on images inside links in IE 10-. 218 | */ 219 | 220 | img { 221 | border-style: none; 222 | } 223 | 224 | /** 225 | * Hide the overflow in IE. 226 | */ 227 | 228 | svg:not(:root) { 229 | overflow: hidden; 230 | } 231 | 232 | /* Forms 233 | ========================================================================== */ 234 | 235 | /** 236 | * 1. Change the font styles in all browsers (opinionated). 237 | * 2. Remove the margin in Firefox and Safari. 238 | */ 239 | 240 | button, 241 | input, 242 | optgroup, 243 | select, 244 | textarea { 245 | font-family: sans-serif; /* 1 */ 246 | font-size: 100%; /* 1 */ 247 | line-height: 1.15; /* 1 */ 248 | margin: 0; /* 2 */ 249 | } 250 | 251 | /** 252 | * Show the overflow in IE. 253 | * 1. Show the overflow in Edge. 254 | */ 255 | 256 | button, 257 | input { /* 1 */ 258 | overflow: visible; 259 | } 260 | 261 | /** 262 | * Remove the inheritance of text transform in Edge, Firefox, and IE. 263 | * 1. Remove the inheritance of text transform in Firefox. 264 | */ 265 | 266 | button, 267 | select { /* 1 */ 268 | text-transform: none; 269 | } 270 | 271 | /** 272 | * 1. Prevent a WebKit bug where (2) destroys native `audio` and `video` 273 | * controls in Android 4. 274 | * 2. Correct the inability to style clickable types in iOS and Safari. 275 | */ 276 | 277 | button, 278 | html [type="button"], /* 1 */ 279 | [type="reset"], 280 | [type="submit"] { 281 | -webkit-appearance: button; /* 2 */ 282 | } 283 | 284 | /** 285 | * Remove the inner border and padding in Firefox. 286 | */ 287 | 288 | button::-moz-focus-inner, 289 | [type="button"]::-moz-focus-inner, 290 | [type="reset"]::-moz-focus-inner, 291 | [type="submit"]::-moz-focus-inner { 292 | border-style: none; 293 | padding: 0; 294 | } 295 | 296 | /** 297 | * Restore the focus styles unset by the previous rule. 298 | */ 299 | 300 | button:-moz-focusring, 301 | [type="button"]:-moz-focusring, 302 | [type="reset"]:-moz-focusring, 303 | [type="submit"]:-moz-focusring { 304 | outline: 1px dotted ButtonText; 305 | } 306 | 307 | /** 308 | * Change the border, margin, and padding in all browsers (opinionated). 309 | */ 310 | 311 | fieldset { 312 | border: 1px solid #c0c0c0; 313 | margin: 0 2px; 314 | padding: 0.35em 0.625em 0.75em; 315 | } 316 | 317 | /** 318 | * 1. Correct the text wrapping in Edge and IE. 319 | * 2. Correct the color inheritance from `fieldset` elements in IE. 320 | * 3. Remove the padding so developers are not caught out when they zero out 321 | * `fieldset` elements in all browsers. 322 | */ 323 | 324 | legend { 325 | box-sizing: border-box; /* 1 */ 326 | color: inherit; /* 2 */ 327 | display: table; /* 1 */ 328 | max-width: 100%; /* 1 */ 329 | padding: 0; /* 3 */ 330 | white-space: normal; /* 1 */ 331 | } 332 | 333 | /** 334 | * 1. Add the correct display in IE 9-. 335 | * 2. Add the correct vertical alignment in Chrome, Firefox, and Opera. 336 | */ 337 | 338 | progress { 339 | display: inline-block; /* 1 */ 340 | vertical-align: baseline; /* 2 */ 341 | } 342 | 343 | /** 344 | * Remove the default vertical scrollbar in IE. 345 | */ 346 | 347 | textarea { 348 | overflow: auto; 349 | } 350 | 351 | /** 352 | * 1. Add the correct box sizing in IE 10-. 353 | * 2. Remove the padding in IE 10-. 354 | */ 355 | 356 | [type="checkbox"], 357 | [type="radio"] { 358 | box-sizing: border-box; /* 1 */ 359 | padding: 0; /* 2 */ 360 | } 361 | 362 | /** 363 | * Correct the cursor style of increment and decrement buttons in Chrome. 364 | */ 365 | 366 | [type="number"]::-webkit-inner-spin-button, 367 | [type="number"]::-webkit-outer-spin-button { 368 | height: auto; 369 | } 370 | 371 | /** 372 | * 1. Correct the odd appearance in Chrome and Safari. 373 | * 2. Correct the outline style in Safari. 374 | */ 375 | 376 | [type="search"] { 377 | -webkit-appearance: textfield; /* 1 */ 378 | outline-offset: -2px; /* 2 */ 379 | } 380 | 381 | /** 382 | * Remove the inner padding and cancel buttons in Chrome and Safari on macOS. 383 | */ 384 | 385 | [type="search"]::-webkit-search-cancel-button, 386 | [type="search"]::-webkit-search-decoration { 387 | -webkit-appearance: none; 388 | } 389 | 390 | /** 391 | * 1. Correct the inability to style clickable types in iOS and Safari. 392 | * 2. Change font properties to `inherit` in Safari. 393 | */ 394 | 395 | ::-webkit-file-upload-button { 396 | -webkit-appearance: button; /* 1 */ 397 | font: inherit; /* 2 */ 398 | } 399 | 400 | /* Interactive 401 | ========================================================================== */ 402 | 403 | /* 404 | * Add the correct display in IE 9-. 405 | * 1. Add the correct display in Edge, IE, and Firefox. 406 | */ 407 | 408 | details, /* 1 */ 409 | menu { 410 | display: block; 411 | } 412 | 413 | /* 414 | * Add the correct display in all browsers. 415 | */ 416 | 417 | summary { 418 | display: list-item; 419 | } 420 | 421 | /* Scripting 422 | ========================================================================== */ 423 | 424 | /** 425 | * Add the correct display in IE 9-. 426 | */ 427 | 428 | canvas { 429 | display: inline-block; 430 | } 431 | 432 | /** 433 | * Add the correct display in IE. 434 | */ 435 | 436 | template { 437 | display: none; 438 | } 439 | 440 | /* Hidden 441 | ========================================================================== */ 442 | 443 | /** 444 | * Add the correct display in IE 10-. 445 | */ 446 | 447 | [hidden] { 448 | display: none; 449 | } 450 | -------------------------------------------------------------------------------- /sphinx_typlog_theme/static/typlog.css: -------------------------------------------------------------------------------- 1 | :root{--color-blue:#03A9F4;--color-blue-alpha:rgba(3, 172, 244, 0.08);--color-green:#49C784;--color-yellow:#F7BA2A;--color-purple:#b37feb;--color-cyan:#36cfc9;--color-magenta:#f759ab;--color-red:#FF612F;--color-primary:#E8371A;--color-text:rgba(0, 0, 0, 0.68);--color-heading:rgba(0, 0, 0, 0.98);--color-code:#F55826;--color-autodoc-background:rgba(245,88,38,.05);--color-autodoc-border:rgba(245,88,38,.4);--font-english:"Roboto","Helvetica Neue","Helvetica";--font-cjk:"Hiragino Sans GB","Droid Sans Fallback","Microsoft YaHei";--font-text:var(--font-english),var(--font-cjk),sans-serif;--font-code:"Roboto Mono",Menlo,monospace;--code-background:rgba(0, 0, 0, .02);--code-alt-background:rgba(0, 0, 0, .03)}html{font-family:sans-serif;line-height:1.15;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,footer,header,nav,section{display:block}h1{font-size:2em;margin:.67em 0}figcaption,figure,main{display:block}figure{margin:1em 40px}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent;-webkit-text-decoration-skip:objects}a:active,a:hover{outline-width:0}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:inherit}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}dfn{font-style:italic}mark{background-color:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}audio,video{display:inline-block}audio:not([controls]){display:none;height:0}img{border-style:none}svg:not(:root){overflow:hidden}button,input,optgroup,select,textarea{font-family:sans-serif;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=reset],[type=submit],button,html [type=button]{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{display:inline-block;vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details,menu{display:block}summary{display:list-item}canvas{display:inline-block}template{display:none}[hidden]{display:none}.yue{line-height:1.62}.yue h1,.yue h2,.yue h3,.yue h4,.yue h5,.yue h6{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:var(--font-text);color:var(--color-heading)}.yue h1{font-weight:700;font-size:1.8em;margin:.8em 0}.yue h2{font-weight:700;font-size:1.42em;margin:1.42em 0 .4em}.yue h3{font-size:1.17em;margin:1.62em 0 .4em}.yue h4,.yue h5,.yue h6{font-size:1em;margin:1.6em 0 .6em}.yue h6{font-weight:500}.yue p{margin-top:0;margin-bottom:1.02em;hyphens:auto}.yue a{color:var(--color-heading);word-wrap:break-word;text-decoration:none;border-bottom:1px solid rgba(0,0,0,.26)}.yue a:hover{color:var(--color-primary);border-color:var(--color-primary);text-decoration:none}.yue h1 a,.yue h2 a,.yue h3 a{text-decoration:none}.yue b,.yue strong{-webkit-font-smoothing:antialiased;font-weight:700;color:rgba(0,0,0,.9)}.yue em,.yue i{font-style:italic;color:rgba(0,0,0,.9)}.yue img,.yue video{max-width:100%;height:auto;margin:.2em 0}.yue a img{border:none;vertical-align:middle}.yue figure{position:relative;clear:both;outline:0;margin:10px 0 30px;padding:0;min-height:100px}.yue figure img{display:block;max-width:100%;margin:0 auto;box-sizing:border-box}.yue figcaption{width:100%;text-align:center;left:0;margin-top:10px;font-weight:400;font-size:14px;color:rgba(0,0,0,.42)}.yue figcaption a{text-decoration:none;color:rgba(0,0,0,.42)}.yue hr{display:block;width:90%;max-width:100px;border:0;border-top:1px solid rgba(0,0,0,.04);margin:1.42em auto 1.84em}.yue blockquote{position:relative;padding:0 1em 0 2em;margin:1.2em 0;color:rgba(0,0,0,.68);border-left:6px solid rgba(0,0,0,.1)}.yue blockquote a{color:rgba(0,0,0,.68)}.yue ol,.yue ul{margin:0 0 24px 6px;padding-left:16px}.yue ul{list-style-type:square}.yue ol{list-style-type:decimal}.yue li{margin-bottom:.2em}.yue li ol,.yue li ul{margin-top:0;margin-bottom:0}.yue li ul{list-style-type:disc}.yue li ul ul{list-style-type:circle}.yue li p{margin:.4em 0 .6em}.yue code,.yue tt{background-color:rgba(220,220,220,.2);color:var(--color-code);font-size:.96em;padding:1px 4px;border-radius:2px;font-family:var(--font-code);word-wrap:break-word;hyphens:none}.yue pre{margin:1.4em 0;padding:1.2em;border:none;overflow:auto;line-height:1.5;font-size:.98em;font-family:var(--font-code);color:var(--color-text)}.yue pre code,.yue pre tt{color:rgba(0,0,0,.68);border:none;background:0 0;padding:0}.yue table{width:100%;max-width:100%;border-collapse:collapse;border-spacing:0;margin-bottom:1.5em;font-size:.96em;box-sizing:border-box}.yue iframe{display:block;max-width:100%;margin-bottom:30px}.yue figure iframe{margin:auto}.yue table pre{margin:0;padding:0;border:none;background:0 0}[lang^=en] .yue h1{font-weight:900}.yue table[border] td,.yue table[border] th{text-align:left;padding:6px 8px 6px 10px;border:1px solid #ddd}.yue table[border] td{vertical-align:top}.yue table[border] tr:nth-child(even){background-color:rgba(0,0,0,.01)}body{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font:400 16px/1.42 var(--font-text);color:var(--color-text)}img{max-width:100%;vertical-align:middle}h1,h2,h3,strong{color:var(--color-heading)}a{color:var(--color-primary);text-decoration:none}a:hover{text-decoration:underline}.clearfix:after,.inner:after,.section:after{display:table;content:'';clear:both}a>.std-ref{font-weight:700}.yue dd>p{margin-bottom:.86em}.yue table.citation{margin-bottom:10px}table.docutils td.label{width:1px;padding-right:.6em}.globaltoc{margin:20px 0}.globaltoc>p.caption{display:none}.rst-other-versions input[name="q"],body[data-page=search] input[name="q"]{border:2px solid rgba(0,0,0,.86);padding:0 10px;line-height:38px;outline:0;box-sizing:border-box}body[data-page=search] input[type=submit]{line-height:42px}#searchbox .input-group{display:flex;border:2px solid rgba(0,0,0,.86)}#searchbox .input-group>input[type=text]{flex-grow:1;outline:0;border:0;padding:.6em 10px}#searchbox .input-group>button,body[data-page=search] input[type=submit]{display:inline-block;padding:0 .8em;font-weight:700;text-transform:uppercase;text-decoration:none;color:#fff;background-color:rgba(0,0,0,.86);border:0;transition:background-color .1s;cursor:pointer;border-radius:0;outline:0}a.headerlink{margin-left:1px;color:rgba(0,0,0,.24);text-decoration:none;visibility:hidden;border-width:0;font-family:Georgia,serif}a.headerlink:hover{background-color:rgba(0,0,0,.02)}caption:hover>a.headerlink,div.code-block-caption:hover>a.headerlink,dt:hover>a.headerlink,h1:hover>a.headerlink,h2:hover>a.headerlink,h3:hover>a.headerlink,h4:hover>a.headerlink,h5:hover>a.headerlink,h6:hover>a.headerlink,p.caption:hover>a.headerlink{visibility:visible}a.toc-backref{border:0}.contents{display:inline-block;padding:16px 40px 16px 0;background:#f9f9f9;min-width:240px;font-size:13px;font-weight:500;border-radius:5px}.contents .topic-title{color:rgba(0,0,0,.4);padding-left:16px;margin-bottom:10px;text-transform:uppercase}.contents li>ul,.contents li>ul ul,.contents ul{list-style-type:none}.contents ul{margin:0}.contents li{margin-top:4px}.contents a{border-bottom:0;color:rgba(0,0,0,.5)}code.descclassname{padding:0;background-color:transparent}code.descname{font-weight:700;padding:0;background-color:transparent}dd{margin:4px 0 10px 2em}dd>table.field-list .field-name{display:block;font-size:.86em;color:var(--color-code);padding:0;text-align:left;text-transform:uppercase}dd>table.field-list .field-body{display:block;padding:0 0 0 1em}dl.class dt,dl.data dt,dl.exception dt,dl.function dt,dl.method dt{padding:5px;color:rgba(0,0,0,.4);border-top:2px solid var(--color-autodoc-border);background:var(--color-autodoc-background)}dl.class dt code,dl.data dt code,dl.exception dt code,dl.function dt code,dl.method dt code{color:var(--color-code)}dl.class dt>em,dl.data dt>em,dl.exception dt>em,dl.function dt>em,dl.method dt>em{font-size:.98em;color:rgba(0,0,0,.68)}.hlist td{vertical-align:top}p.centered{text-align:center}.admonition{position:relative;padding:40px 24px 18px 24px;margin:2em 0;border-left:4px solid #ddd;background-color:#f8f8f8}.admonition:before{position:absolute;content:'#';top:14px;left:-12px;color:#fff;width:20px;height:20px;border-radius:100%;background-color:#ddd;text-align:center;font:normal bold 14px/20px "Helvetica Neue",Arial,sans-serif}.admonition.tip:before{content:'T';font-size:12px}.admonition>.admonition-title{position:absolute;margin:0;top:12px;left:24px;font-size:.8em;color:rgba(0,0,0,.4);text-transform:uppercase}.admonition>.last{margin-bottom:0}.admonition.attention,.admonition.note{border-color:var(--color-blue);background-color:var(--color-blue-alpha)}.admonition.attention:before,.admonition.note:before{background-color:var(--color-blue)}.admonition.attention:before{content:'!'}.admonition.attention>.admonition-title,.admonition.note>.admonition-title{font-weight:700;color:var(--color-blue)}.admonition.caution,.admonition.warning{border-color:var(--color-yellow);background-color:rgba(247,186,42,.1)}.admonition.caution:before,.admonition.warning:before{content:'!';background-color:var(--color-yellow)}.admonition.caution>.admonition-title,.admonition.warning>.admonition-title{font-weight:700;color:var(--color-yellow)}.admonition.danger,.admonition.error{border-color:var(--color-red);background-color:rgba(255,92,47,.08)}.admonition.danger:before,.admonition.error:before{content:'!';background-color:var(--color-red)}.admonition.danger>.admonition-title,.admonition.error>.admonition-title{font-weight:700;color:var(--color-red)}.admonition.important{border-color:var(--color-purple);background-color:rgba(179,127,235,.1)}.admonition.important:before{background-color:var(--color-purple)}.admonition.important>.admonition-title{font-weight:700;color:var(--color-purple)}.admonition.hint{border-color:var(--color-cyan);background-color:rgba(8,151,156,.1)}.admonition.hint:before{background-color:var(--color-cyan)}.admonition.hint>.admonition-title{font-weight:700;color:var(--color-cyan)}.admonition.tip{border-color:var(--color-magenta);background-color:rgba(247,89,171,.1)}.admonition.tip:before{background-color:var(--color-magenta)}.admonition.tip>.admonition-title{font-weight:700;color:var(--color-magenta)}.versionmodified{color:rgba(0,0,0,.86);font-weight:700}.deprecated,.versionadded,.versionchanged{position:relative;padding:8px 24px;margin:1em 0;border-left:4px solid transparent}.deprecated:before,.versionadded:before,.versionchanged:before{position:absolute;content:'!';top:8px;left:-12px;color:#fff;width:20px;height:20px;border-radius:100%;text-align:center;font:normal bold 14px/20px "Helvetica Neue",Arial,sans-serif}.versionadded{border-color:var(--color-green);background-color:rgba(73,199,132,.08)}.versionadded:before{content:'#';background-color:var(--color-green)}.versionchanged{border-color:var(--color-yellow);background-color:rgba(247,186,42,.08)}.versionchanged:before{background-color:var(--color-yellow)}.deprecated{border-color:var(--color-red);background-color:rgba(255,92,47,.08)}.deprecated:before{background-color:var(--color-red)}.deprecated>p,.versionadded>p,.versionchanged>p{margin:0}.highlighted{padding:1px 4px;opacity:.6;color:#fff}.highlight,.highlighted,.highlighttable,.literal-block-wrapper{background-color:var(--code-background);margin:1.4em 0}.highlighted .highlight,.highlighttable .highlight,.literal-block-wrapper .highlight{background-color:transparent;margin:0}.highlight pre,.highlighttable .highlight,.literal-block-wrapper .highlight{margin:0}.literal-block-wrapper{position:relative}.literal-block-wrapper .code-block-caption{position:absolute;top:0;right:0;padding:2px 10px;border-radius:0 4px;color:rgba(0,0,0,.3);background-color:var(--code-alt-background)}.highlighttable .linenos{width:1px}.highlighttable .linenodiv{padding:10px 6px;text-align:right;background-color:var(--code-alt-background)}.highlighttable .linenodiv pre{color:rgba(0,0,0,.3)}.highlighttable .highlight{padding-left:10px}.injected .rst-versions.rst-badge{left:0;bottom:0;width:340px;max-width:100%;color:rgba(0,0,0,.68);background-color:#f7f7f7}.injected .rst-versions.rst-badge .rst-current-version{text-align:right;background-color:#eee}.injected .rst-versions.rst-badge .fa-book{float:left}.injected .rst-versions .rst-current-version .fa,.injected .rst-versions .rst-other-versions dd a{color:rgba(0,0,0,.68)}.injected .rst-versions .rst-other-versions hr{border-color:#ddd}@media (max-width:960px){.injected .rst-versions{transform:translate3d(-340px,0,0);transition:transform .2s ease}._expand .injected .rst-versions{transform:translate3d(0,0,0)}}.t-sidebar{position:fixed;z-index:10;top:0;left:0;bottom:0;background:#f9f9f9;border-right:1px solid #efefef;overflow-x:hidden;overflow-y:auto;-webkit-overflow-scrolling:touch;-ms-overflow-style:none}.t-sidebar .inner{width:260px;padding:20px 40px 40px}.t-sidebar a{text-decoration:none;color:#343;border-bottom:1px solid transparent}.t-sidebar a:hover{border-color:rgba(0,0,0,.1)}.t-sidebar h3{margin:1em 0 .2em;letter-spacing:-.06em;color:#252b31;font-family:-apple-system,BlinkMacSystemFont,"Helvetica Neue","PingFang SC","Hiragino Sans GB","Droid Sans Fallback","Microsoft YaHei",sans-serif}.t-sidebar h1>a,.t-sidebar h2>a,.t-sidebar h3>a{border-bottom-width:0}.t-sidebar ul{list-style-type:none;margin:0;padding:0}.t-sidebar li{margin-top:4px}.t-sidebar li>ul{padding-left:1em}.t-sidebar li>a{text-decoration:none;border-bottom-width:2px}.t-sidebar_close{display:none;position:absolute;right:10px;top:10px}.t-content{margin-left:340px;padding:20px 80px 0;overflow:hidden}.t-content>footer{font-size:.86em;color:#999;padding:20px 0}.t-content>footer:before{display:block;margin-bottom:1em;content:'';width:100px;border-top:4px solid rgba(0,0,0,.1)}.t-content>footer a{color:#666;text-decoration:underline}.t-head{display:none}.t-pagination{margin-top:1em;font-family:"Source Sans Pro","Helvetica Neue",Arial,sans-serif}.t-pagination a{border:0;font-weight:500}@media (max-width:960px){.t-sidebar{transform:translate3d(-341px,0,0);transition:transform .2s ease}._expand .t-sidebar{transform:translate3d(0,0,0);max-width:100%}._expand .t-sidebar_close{display:block}.t-content{padding:64px 20px 0;max-width:840px;margin:0 auto;box-sizing:border-box}.t-head{display:block;position:fixed;width:100%;padding:1em 20px;box-sizing:border-box;text-align:center;border-bottom:1px solid #efefef;background:#fff;z-index:9}.t-head_menu{position:absolute;top:1em;left:2em}.t-head_menu svg,.t-sidebar_close svg{width:30px;fill:#ccc}.t-head_logo{font-weight:600;color:var(--color-heading)}.t-head_logo:hover{text-decoration:none}.t-head_logo img{vertical-align:middle;margin-right:6px;width:30px;height:30px}.t-content :target::before{content:"";display:block;height:60px;margin:-60px 0 0}}a.logo{display:block;font-size:1.2em;font-weight:900;letter-spacing:1px;text-decoration:none;margin-bottom:1em;border:0}.logo img{vertical-align:middle;margin-right:6px;width:40px;height:40px}.logo_desc{margin:1em 0;color:rgba(0,0,0,.6)}.github_wrap{margin:1em 0}.github_wrap .github{display:inline-block;border:1px solid #d5d5d5;background-image:linear-gradient(to bottom,#fcfcfc 0,#eee 100%);padding:6px 14px;border-radius:5px}.github>span{display:inline-block;text-align:center;vertical-align:middle;line-height:1;font-size:14px;color:rgba(0,0,0,.5)}.github_icon{width:30px;height:30px;background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2ZXJzaW9uPSIxLjEiIGlkPSJMYXllcl8xIiB4PSIwcHgiIHk9IjBweCIgd2lkdGg9IjQwcHgiIGhlaWdodD0iNDBweCIgdmlld0JveD0iMTIgMTIgNDAgNDAiIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMTIgMTIgNDAgNDAiIHhtbDpzcGFjZT0icHJlc2VydmUiPjxwYXRoIGZpbGw9IiMzMzMzMzMiIGQ9Ik0zMiAxMy40Yy0xMC41IDAtMTkgOC41LTE5IDE5YzAgOC40IDUuNSAxNS41IDEzIDE4YzEgMC4yIDEuMy0wLjQgMS4zLTAuOWMwLTAuNSAwLTEuNyAwLTMuMiBjLTUuMyAxLjEtNi40LTIuNi02LjQtMi42QzIwIDQxLjYgMTguOCA0MSAxOC44IDQxYy0xLjctMS4yIDAuMS0xLjEgMC4xLTEuMWMxLjkgMC4xIDIuOSAyIDIuOSAyYzEuNyAyLjkgNC41IDIuMSA1LjUgMS42IGMwLjItMS4yIDAuNy0yLjEgMS4yLTIuNmMtNC4yLTAuNS04LjctMi4xLTguNy05LjRjMC0yLjEgMC43LTMuNyAyLTUuMWMtMC4yLTAuNS0wLjgtMi40IDAuMi01YzAgMCAxLjYtMC41IDUuMiAyIGMxLjUtMC40IDMuMS0wLjcgNC44LTAuN2MxLjYgMCAzLjMgMC4yIDQuNyAwLjdjMy42LTIuNCA1LjItMiA1LjItMmMxIDIuNiAwLjQgNC42IDAuMiA1YzEuMiAxLjMgMiAzIDIgNS4xYzAgNy4zLTQuNSA4LjktOC43IDkuNCBjMC43IDAuNiAxLjMgMS43IDEuMyAzLjVjMCAyLjYgMCA0LjYgMCA1LjJjMCAwLjUgMC40IDEuMSAxLjMgMC45YzcuNS0yLjYgMTMtOS43IDEzLTE4LjFDNTEgMjEuOSA0Mi41IDEzLjQgMzIgMTMuNHoiLz48L3N2Zz4=);background-size:100% 100%;background-repeat:no-repeat}.github span>strong{display:block;font-size:16px}.github_stars{position:relative;margin:0 20px 0 10px}.github_stars:after{content:'';display:block;border-right:1px solid rgba(0,0,0,.2);height:12px;position:absolute;right:-14px;top:10px}.sponsors{margin:15px 0}.sponsor{background:rgba(0,0,0,.05);padding:15px;margin:5px 0;border-radius:4px}.sponsor:after{content:'';display:table;clear:both}.sponsor img{width:48px;vertical-align:middle}.sponsor>a.image{float:left;border-bottom:none}.sponsor>.text{overflow:hidden;padding-left:10px;vertical-align:middle;max-width:calc(100% - 60px)}.sponsor>.text>a{color:var(--color-heading);border-bottom:1px solid rgba(0,0,0,.26)}.sponsor>.text>a:hover{color:var(--color-primary)}.t-content .sponsor,.t-content .sponsor>.text{display:inline-block}.t-content .sponsor img{width:auto;height:40px}.t-content .sponsor>a.image{display:inline-block;float:none}.badge{display:inline-block;padding:3px 6px;min-width:3em;text-align:center;vertical-align:middle;background-color:#999;color:#fff;line-height:1;border-radius:2px;font-size:13px;opacity:.98;margin-right:4px;font-family:var(--font-code);user-select:none}.badge-one{font-size:12px;min-width:0;padding:4px 6px}.badge-todo,.badge-yellow{background-color:#f7ba2a}.badge-done,.badge-green{background-color:#49c784}.badge-blue,.badge-doing,.badge-plan{background-color:#03a9f4}.badge-red{background-color:#ff612f}.yue table.footnote{display:none}a.footnote-reference{display:inline-block;padding:0 4px;text-align:center;font-weight:700;font-size:8px;line-height:14px;border-bottom:0;background-color:rgba(0,0,0,.18);color:#fff;border-radius:3px;vertical-align:top;transition:all .1s ease}.t-body a.footnote-reference:hover{color:#fff;background-color:rgba(0,0,0,.8)}#typlog-footnote-mask{display:none;-webkit-tap-highlight-color:transparent}#typlog-footnote-mask._active{display:block;position:fixed;top:0;left:0;width:100%;height:100%;z-index:9}#typlog-footnote-content,#typlog-footnote-content a[href^="#fnref"]{display:none}#typlog-footnote-content._active{display:block;font-size:.86em;color:rgba(0,0,0,.68);position:absolute;z-index:10;width:100%;max-width:560px;margin-top:20px;background:#fff;padding:20px;box-sizing:border-box;box-shadow:0 0 10px 1px rgba(0,0,0,.16)}@media (min-width:560px){#typlog-footnote-content._active{border-radius:3px}}.highlight{color:#586e75}.highlight .hll{font-weight:700}.highlight .c{color:#93a1a1}.highlight .err{color:#586e75}.highlight .g{color:#586e75}.highlight .k{color:#859900}.highlight .l{color:#586e75}.highlight .n{color:#586e75}.highlight .o{color:#859900}.highlight .x{color:#cb4b16}.highlight .p{color:#586e75}.highlight .cm{color:#93a1a1}.highlight .cp{color:#859900}.highlight .c1{color:#93a1a1}.highlight .cs{color:#859900}.highlight .gd{color:#2aa198}.highlight .ge{color:#586e75;font-style:italic}.highlight .gr{color:#dc322f}.highlight .gh{color:#cb4b16}.highlight .gi{color:#859900}.highlight .go{color:#586e75}.highlight .gp{color:#586e75}.highlight .gs{color:#586e75;font-weight:700}.highlight .gu{color:#cb4b16}.highlight .gt{color:#586e75}.highlight .kc{color:#cb4b16}.highlight .kd{color:#268bd2}.highlight .kn{color:#859900}.highlight .kp{color:#859900}.highlight .kr{color:#268bd2}.highlight .kt{color:#dc322f}.highlight .ld{color:#586e75}.highlight .m{color:#2aa198}.highlight .s{color:#2aa198}.highlight .na{color:#586e75}.highlight .nb{color:#b58900}.highlight .nc{color:#268bd2}.highlight .no{color:#cb4b16}.highlight .nd{color:#268bd2}.highlight .ni{color:#cb4b16}.highlight .ne{color:#cb4b16}.highlight .nf{color:#268bd2}.highlight .nl{color:#586e75}.highlight .nn{color:#586e75}.highlight .nx{color:#586e75}.highlight .py{color:#586e75}.highlight .nt{color:#268bd2}.highlight .nv{color:#268bd2}.highlight .ow{color:#859900}.highlight .w{color:#586e75}.highlight .mf{color:#2aa198}.highlight .mh{color:#2aa198}.highlight .mi{color:#2aa198}.highlight .mo{color:#2aa198}.highlight .sb{color:#93a1a1}.highlight .sc{color:#2aa198}.highlight .sd{color:#586e75}.highlight .s2{color:#2aa198}.highlight .se{color:#cb4b16}.highlight .sh{color:#586e75}.highlight .si{color:#2aa198}.highlight .sx{color:#2aa198}.highlight .sr{color:#dc322f}.highlight .s1{color:#2aa198}.highlight .ss{color:#2aa198}.highlight .bp{color:#268bd2}.highlight .vc{color:#268bd2}.highlight .vg{color:#268bd2}.highlight .vi{color:#268bd2}.highlight .il{color:#2aa198} --------------------------------------------------------------------------------