├── .circleci ├── config.yml └── mock.env.json ├── .gitattributes ├── .gitignore ├── .nvmrc ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── Gruntfile.js ├── LICENSE ├── README.md ├── _static └── thumbs │ ├── DistPyTorch.jpg │ ├── babel.jpg │ ├── cartpole.gif │ ├── char_rnn_generation.png │ ├── cifar10.png │ ├── cpp_logo.png │ ├── data_parallel.png │ ├── examples.png │ ├── mnist.png │ ├── pytorch-logo-flat.png │ ├── seq2seq_flat.png │ ├── tensor_illustration_flat.png │ ├── torch-logo.png │ └── torch-nn-vs-pytorch-nn.png ├── docs ├── Makefile ├── changelog.rst ├── conf.py ├── configuring.rst ├── demo │ ├── api.rst │ ├── demo.rst │ ├── lists_tables.rst │ ├── long.rst │ ├── static │ │ ├── logo-wordmark-light.svg │ │ ├── pytorch-logo-dark.svg │ │ ├── screen_desktop.png │ │ ├── screen_mobile.png │ │ └── yi_jing_01_chien.jpg │ ├── structure.rst │ └── test_py_module │ │ ├── __init__.py │ │ └── test.py ├── index.rst ├── installing.rst ├── make.bat └── requirements.txt ├── fonts ├── FreightSans │ ├── freight-sans-bold-italic.woff │ ├── freight-sans-bold-italic.woff2 │ ├── freight-sans-bold.woff │ ├── freight-sans-bold.woff2 │ ├── freight-sans-book-italic.woff │ ├── freight-sans-book-italic.woff2 │ ├── freight-sans-book.woff │ ├── freight-sans-book.woff2 │ ├── freight-sans-light-italic.woff │ ├── freight-sans-light-italic.woff2 │ ├── freight-sans-light.woff │ ├── freight-sans-light.woff2 │ ├── freight-sans-medium-italic.woff │ ├── freight-sans-medium-italic.woff2 │ ├── freight-sans-medium.woff │ └── freight-sans-medium.woff2 └── IBMPlexMono │ ├── IBMPlexMono-Light.woff │ ├── IBMPlexMono-Light.woff2 │ ├── IBMPlexMono-Medium.woff │ ├── IBMPlexMono-Medium.woff2 │ ├── IBMPlexMono-Regular.woff │ ├── IBMPlexMono-Regular.woff2 │ ├── IBMPlexMono-SemiBold.woff │ └── IBMPlexMono-SemiBold.woff2 ├── images ├── arrow-down-blue.svg ├── arrow-right-with-tail.svg ├── chevron-down-black.svg ├── chevron-down-blue.svg ├── chevron-down-grey.svg ├── chevron-down-white.svg ├── chevron-right-blue.svg ├── chevron-right-white.svg ├── home-footer-background.jpg ├── icon-close.svg ├── icon-menu-dots-dark.svg ├── logo-dark.svg ├── logo-facebook-dark.svg ├── logo-icon.svg ├── logo-twitter-dark.svg ├── logo-youtube-dark.svg ├── logo.png ├── logo.svg ├── logo192.png ├── pytorch-colab.svg ├── pytorch-download.svg ├── pytorch-github.svg ├── pytorch-x.svg ├── search-icon.svg └── view-page-source-icon.svg ├── js ├── _utilities.js ├── filter-tutorial-tags.js ├── highlight-navigation.js ├── main-menu-dropdown.js ├── mobile-menu.js ├── mobile-toc.js ├── pytorch-anchors.js ├── scroll-to-anchor.js ├── side-menus.js └── theme.js ├── package.json ├── pytorch_sphinx_theme.py ├── pytorch_sphinx_theme ├── __init__.py ├── breadcrumbs.html ├── fonts.html ├── footer.html ├── layout.html ├── mathjax_config.html ├── search.html ├── searchbox.html ├── static │ ├── css │ │ └── theme.css │ ├── fonts │ │ ├── FreightSans │ │ │ ├── freight-sans-bold-italic.woff │ │ │ ├── freight-sans-bold-italic.woff2 │ │ │ ├── freight-sans-bold.woff │ │ │ ├── freight-sans-bold.woff2 │ │ │ ├── freight-sans-book-italic.woff │ │ │ ├── freight-sans-book-italic.woff2 │ │ │ ├── freight-sans-book.woff │ │ │ ├── freight-sans-book.woff2 │ │ │ ├── freight-sans-light-italic.woff │ │ │ ├── freight-sans-light-italic.woff2 │ │ │ ├── freight-sans-light.woff │ │ │ ├── freight-sans-light.woff2 │ │ │ ├── freight-sans-medium-italic.woff │ │ │ ├── freight-sans-medium-italic.woff2 │ │ │ ├── freight-sans-medium.woff │ │ │ └── freight-sans-medium.woff2 │ │ └── IBMPlexMono │ │ │ ├── IBMPlexMono-Light.woff │ │ │ ├── IBMPlexMono-Light.woff2 │ │ │ ├── IBMPlexMono-Medium.woff │ │ │ ├── IBMPlexMono-Medium.woff2 │ │ │ ├── IBMPlexMono-Regular.woff │ │ │ ├── IBMPlexMono-Regular.woff2 │ │ │ ├── IBMPlexMono-SemiBold.woff │ │ │ └── IBMPlexMono-SemiBold.woff2 │ ├── images │ │ ├── arrow-down-blue.svg │ │ ├── arrow-right-with-tail.svg │ │ ├── chevron-down-black.svg │ │ ├── chevron-down-blue.svg │ │ ├── chevron-down-grey.svg │ │ ├── chevron-down-white.svg │ │ ├── chevron-right-blue.svg │ │ ├── chevron-right-white.svg │ │ ├── home-footer-background.jpg │ │ ├── icon-close.svg │ │ ├── icon-menu-dots-dark.svg │ │ ├── logo-dark.svg │ │ ├── logo-facebook-dark.svg │ │ ├── logo-icon.svg │ │ ├── logo-twitter-dark.svg │ │ ├── logo-youtube-dark.svg │ │ ├── logo.png │ │ ├── logo.svg │ │ ├── logo192.png │ │ ├── pytorch-colab.svg │ │ ├── pytorch-download.svg │ │ ├── pytorch-github.svg │ │ ├── pytorch-x.svg │ │ ├── search-icon.svg │ │ └── view-page-source-icon.svg │ └── js │ │ ├── modernizr.min.js │ │ ├── theme.js │ │ └── vendor │ │ ├── anchor.min.js │ │ ├── bootstrap.min.js │ │ └── popper.min.js ├── theme.conf ├── theme_variables.jinja └── versions.html ├── scss ├── _sphinx_base.scss ├── _sphinx_layout.scss ├── shared │ ├── _article.scss │ ├── _base_styles.scss │ ├── _code.scss │ ├── _fonts.scss │ ├── _footer.scss │ ├── _navigation.scss │ ├── _syntax-highlighting.scss │ └── _variables.scss └── theme.scss ├── setup.cfg ├── setup.py └── yarn.lock /.circleci/config.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | jobs: 3 | build: 4 | docker: 5 | - image: circleci/node:7.10 6 | 7 | working_directory: ~/repo 8 | 9 | steps: 10 | - add_ssh_keys: 11 | fingerprints: 12 | - "e0:f1:7b:8c:b1:4c:49:6f:b9:bd:af:84:6d:dd:93:cb" 13 | - checkout 14 | 15 | - restore_cache: 16 | keys: 17 | - v1-dependencies-{{ checksum "package.json" }} 18 | - v1-dependencies- 19 | 20 | - run: yarn install 21 | 22 | - save_cache: 23 | paths: 24 | - node_modules 25 | key: v1-dependencies-{{ checksum "package.json" }} 26 | - run: cp .circleci/mock.env.json .env.json 27 | - run: sudo npm install -g grunt sass 28 | - run: grunt build 29 | - run: git config credential.helper 'cache --timeout=120' 30 | - run: git config user.email "ericnakagawa@gmail.com" 31 | - run: git config user.name "CircleCI Bot" 32 | - run: git add . 33 | - run: git commit -m "Deploying theme build via CircleCI" 34 | - run: git push -q git@github.com:pytorch/pytorch_sphinx_theme.git master 35 | 36 | workflows: 37 | version: 2 38 | commit-and-build: 39 | jobs: 40 | - build 41 | -------------------------------------------------------------------------------- /.circleci/mock.env.json: -------------------------------------------------------------------------------- 1 | { 2 | "TUTORIALS_DIR": "../tutorials", 3 | "DOCS_DIR": "../pytorch/docs/source" 4 | } 5 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Document global line endings settings 2 | # https://help.github.com/articles/dealing-with-line-endings/ 3 | * text eol=lf 4 | 5 | 6 | # Denote all files that are truly binary and should not be modified. 7 | *.ai binary 8 | *.jpg binary 9 | *.otf binary 10 | *.png binary 11 | *.eot binary 12 | *.ttf binary 13 | *.whl binary 14 | *.woff binary 15 | *.woff2 binary 16 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *build/ 2 | *.DS_Store 3 | *.sass-cache 4 | *.map 5 | node_modules 6 | npm-debug.log 7 | yarn-error.log 8 | package-lock.json 9 | __pycache__ 10 | .env.json 11 | dist/ 12 | *.egg-info/ 13 | scss/vendor/* 14 | -------------------------------------------------------------------------------- /.nvmrc: -------------------------------------------------------------------------------- 1 | 8.4.0 2 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | In the interest of fostering an open and welcoming environment, we as 6 | contributors and maintainers pledge to make participation in our project and 7 | our community a harassment-free experience for everyone, regardless of age, body 8 | size, disability, ethnicity, sex characteristics, gender identity and expression, 9 | level of experience, education, socio-economic status, nationality, personal 10 | appearance, race, religion, or sexual identity and orientation. 11 | 12 | ## Our Standards 13 | 14 | Examples of behavior that contributes to creating a positive environment 15 | include: 16 | 17 | * Using welcoming and inclusive language 18 | * Being respectful of differing viewpoints and experiences 19 | * Gracefully accepting constructive criticism 20 | * Focusing on what is best for the community 21 | * Showing empathy towards other community members 22 | 23 | Examples of unacceptable behavior by participants include: 24 | 25 | * The use of sexualized language or imagery and unwelcome sexual attention or 26 | advances 27 | * Trolling, insulting/derogatory comments, and personal or political attacks 28 | * Public or private harassment 29 | * Publishing others' private information, such as a physical or electronic 30 | address, without explicit permission 31 | * Other conduct which could reasonably be considered inappropriate in a 32 | professional setting 33 | 34 | ## Our Responsibilities 35 | 36 | Project maintainers are responsible for clarifying the standards of acceptable 37 | behavior and are expected to take appropriate and fair corrective action in 38 | response to any instances of unacceptable behavior. 39 | 40 | Project maintainers have the right and responsibility to remove, edit, or 41 | reject comments, commits, code, wiki edits, issues, and other contributions 42 | that are not aligned to this Code of Conduct, or to ban temporarily or 43 | permanently any contributor for other behaviors that they deem inappropriate, 44 | threatening, offensive, or harmful. 45 | 46 | ## Scope 47 | 48 | This Code of Conduct applies within all project spaces, and it also applies when 49 | an individual is representing the project or its community in public spaces. 50 | Examples of representing a project or community include using an official 51 | project e-mail address, posting via an official social media account, or acting 52 | as an appointed representative at an online or offline event. Representation of 53 | a project may be further defined and clarified by project maintainers. 54 | 55 | ## Enforcement 56 | 57 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 58 | reported by contacting the project team at . All 59 | complaints will be reviewed and investigated and will result in a response that 60 | is deemed necessary and appropriate to the circumstances. The project team is 61 | obligated to maintain confidentiality with regard to the reporter of an incident. 62 | Further details of specific enforcement policies may be posted separately. 63 | 64 | Project maintainers who do not follow or enforce the Code of Conduct in good 65 | faith may face temporary or permanent repercussions as determined by other 66 | members of the project's leadership. 67 | 68 | ## Attribution 69 | 70 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, 71 | available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html 72 | 73 | [homepage]: https://www.contributor-covenant.org 74 | 75 | For answers to common questions about this code of conduct, see 76 | https://www.contributor-covenant.org/faq 77 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to pytorch_sphinx_theme 2 | We want to make contributing to this project as easy and transparent as 3 | possible. 4 | 5 | ## Pull Requests 6 | We actively welcome your pull requests. 7 | 8 | 1. Fork the repo and create your branch from `master`. 9 | 2. If you've added code that should be tested, add tests. 10 | 3. If you've changed APIs, update the documentation. 11 | 4. Ensure the test suite passes. 12 | 5. Make sure your code lints. 13 | 6. If you haven't already, complete the Contributor License Agreement ("CLA"). 14 | 15 | ## Contributor License Agreement ("CLA") 16 | In order to accept your pull request, we need you to submit a CLA. You only need 17 | to do this once to work on any of Facebook's open source projects. 18 | 19 | Complete your CLA here: 20 | 21 | ## Issues 22 | We use GitHub issues to track public bugs. Please ensure your description is 23 | clear and has sufficient instructions to be able to reproduce the issue. 24 | 25 | Facebook has a [bounty program](https://www.facebook.com/whitehat/) for the safe 26 | disclosure of security bugs. In those cases, please go through the process 27 | outlined on that page and do not file a public issue. 28 | 29 | ## License 30 | By contributing to pytorch_sphinx_theme, you agree that your contributions will be licensed 31 | under the LICENSE file in the root directory of this source tree. -------------------------------------------------------------------------------- /Gruntfile.js: -------------------------------------------------------------------------------- 1 | module.exports = function(grunt) { 2 | // load all grunt tasks 3 | require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks); 4 | 5 | var envJSON = grunt.file.readJSON(".env.json"); 6 | var PROJECT_DIR = "docs/"; 7 | 8 | switch (grunt.option('project')) { 9 | case "docs": 10 | PROJECT_DIR = envJSON.DOCS_DIR; 11 | break; 12 | case "tutorials": 13 | PROJECT_DIR = envJSON.TUTORIALS_DIR; 14 | break; 15 | } 16 | 17 | grunt.initConfig({ 18 | // Read package.json 19 | pkg: grunt.file.readJSON("package.json"), 20 | 21 | open : { 22 | dev: { 23 | path: 'http://localhost:1919' 24 | } 25 | }, 26 | 27 | connect: { 28 | server: { 29 | options: { 30 | port: 1919, 31 | base: 'docs/build', 32 | livereload: true 33 | } 34 | } 35 | }, 36 | copy: { 37 | fonts: { 38 | files: [ 39 | { 40 | expand: true, 41 | flatten: true, 42 | src: ['fonts/FreightSans/*'], 43 | dest: 'pytorch_sphinx_theme/static/fonts/FreightSans', 44 | filter: 'isFile' 45 | }, 46 | 47 | { 48 | expand: true, 49 | flatten: true, 50 | src: ['fonts/IBMPlexMono/*'], 51 | dest: 'pytorch_sphinx_theme/static/fonts/IBMPlexMono', 52 | filter: 'isFile' 53 | } 54 | ] 55 | }, 56 | 57 | images: { 58 | files: [ 59 | { 60 | expand: true, 61 | flatten: true, 62 | src: ['images/*'], 63 | dest: 'pytorch_sphinx_theme/static/images', 64 | filter: 'isFile' 65 | } 66 | ] 67 | }, 68 | 69 | vendor: { 70 | files: [ 71 | { 72 | expand: true, 73 | cwd: 'node_modules/bootstrap/scss/', 74 | src: "**/*", 75 | dest: 'scss/vendor/bootstrap', 76 | filter: 'isFile' 77 | }, 78 | 79 | { 80 | expand: true, 81 | flatten: true, 82 | src: [ 83 | 'node_modules/popper.js/dist/umd/popper.min.js', 84 | 'node_modules/bootstrap/dist/js/bootstrap.min.js', 85 | 'node_modules/anchor-js/anchor.min.js' 86 | ], 87 | dest: 'pytorch_sphinx_theme/static/js/vendor', 88 | filter: 'isFile' 89 | } 90 | ] 91 | } 92 | }, 93 | 94 | sass: { 95 | dev: { 96 | options: { 97 | style: 'expanded' 98 | }, 99 | files: [{ 100 | expand: true, 101 | cwd: 'scss', 102 | src: ['*.scss'], 103 | dest: 'pytorch_sphinx_theme/static/css', 104 | ext: '.css' 105 | }] 106 | }, 107 | build: { 108 | options: { 109 | style: 'compressed' 110 | }, 111 | files: [{ 112 | expand: true, 113 | cwd: 'scss', 114 | src: ['*.scss'], 115 | dest: 'pytorch_sphinx_theme/static/css', 116 | ext: '.css' 117 | }] 118 | } 119 | }, 120 | 121 | postcss: { 122 | options: { 123 | map: true, 124 | processors: [ 125 | require("autoprefixer")({browsers: ["last 2 versions"]}), 126 | ] 127 | }, 128 | 129 | dist: { 130 | files: { 131 | "pytorch_sphinx_theme/static/css/theme.css": "pytorch_sphinx_theme/static/css/theme.css" 132 | } 133 | } 134 | }, 135 | 136 | browserify: { 137 | dev: { 138 | options: { 139 | external: ['jquery'], 140 | alias: { 141 | 'pytorch-sphinx-theme': './js/theme.js' 142 | } 143 | }, 144 | src: ['js/*.js'], 145 | dest: 'pytorch_sphinx_theme/static/js/theme.js' 146 | }, 147 | build: { 148 | options: { 149 | external: ['jquery'], 150 | alias: { 151 | 'pytorch-sphinx-theme': './js/theme.js' 152 | } 153 | }, 154 | src: ['js/*.js'], 155 | dest: 'pytorch_sphinx_theme/static/js/theme.js' 156 | } 157 | }, 158 | uglify: { 159 | dist: { 160 | options: { 161 | sourceMap: false, 162 | mangle: { 163 | reserved: ['jQuery'] // Leave 'jQuery' identifier unchanged 164 | }, 165 | ie8: true // compliance with IE 6-8 quirks 166 | }, 167 | files: [{ 168 | expand: true, 169 | src: ['pytorch_sphinx_theme/static/js/*.js', '!pytorch_sphinx_theme/static/js/*.min.js'], 170 | dest: 'pytorch_sphinx_theme/static/js/', 171 | rename: function (dst, src) { 172 | // Use unminified file name for minified file 173 | return src; 174 | } 175 | }] 176 | } 177 | }, 178 | exec: { 179 | build_sphinx: { 180 | cmd: 'sphinx-build ' + PROJECT_DIR + ' docs/build' 181 | } 182 | }, 183 | clean: { 184 | build: ["docs/build"], 185 | fonts: ["pytorch_sphinx_theme/static/fonts"], 186 | images: ["pytorch_sphinx_theme/static/images"], 187 | css: ["pytorch_sphinx_theme/static/css"], 188 | js: ["pytorch_sphinx_theme/static/js/*", "!pytorch_sphinx_theme/static/js/modernizr.min.js"] 189 | }, 190 | 191 | watch: { 192 | /* Compile scss changes into theme directory */ 193 | sass: { 194 | files: ['scss/**/*.scss'], 195 | tasks: ['sass:dev', 'postcss:dist'] 196 | }, 197 | /* Changes in theme dir rebuild sphinx */ 198 | sphinx: { 199 | files: ['pytorch_sphinx_theme/**/*', 'README.rst', 'docs/**/*.rst', 'docs/**/*.py'], 200 | tasks: ['clean:build','exec:build_sphinx'] 201 | }, 202 | /* JavaScript */ 203 | browserify: { 204 | files: ['js/*.js'], 205 | tasks: ['browserify:dev'] 206 | }, 207 | /* live-reload the docs if sphinx re-builds */ 208 | livereload: { 209 | files: ['docs/build/**/*'], 210 | options: { livereload: true } 211 | } 212 | } 213 | 214 | }); 215 | 216 | grunt.loadNpmTasks('grunt-exec'); 217 | grunt.loadNpmTasks('grunt-contrib-connect'); 218 | grunt.loadNpmTasks('grunt-contrib-watch'); 219 | grunt.loadNpmTasks('grunt-contrib-sass'); 220 | grunt.loadNpmTasks('grunt-contrib-clean'); 221 | grunt.loadNpmTasks('grunt-contrib-copy'); 222 | grunt.loadNpmTasks('grunt-open'); 223 | grunt.loadNpmTasks('grunt-browserify'); 224 | 225 | grunt.registerTask('default', ['clean','copy:fonts', 'copy:images', 'copy:vendor', 'sass:dev', 'postcss:dist', 'browserify:dev','exec:build_sphinx','connect','open','watch']); 226 | grunt.registerTask('build', ['clean','copy:fonts', 'copy:images', 'copy:vendor', 'sass:build', 'postcss:dist', 'browserify:build', 'uglify']); 227 | } 228 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2013-2019 PyTorch Team, Dave Snider, Read the Docs, Inc. & contributors 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /_static/thumbs/DistPyTorch.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-mmlab/pytorch_sphinx_theme/cf1aa23d2621c6ebe7f5c0b8e7ecd23a82300f3b/_static/thumbs/DistPyTorch.jpg -------------------------------------------------------------------------------- /_static/thumbs/babel.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-mmlab/pytorch_sphinx_theme/cf1aa23d2621c6ebe7f5c0b8e7ecd23a82300f3b/_static/thumbs/babel.jpg -------------------------------------------------------------------------------- /_static/thumbs/cartpole.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-mmlab/pytorch_sphinx_theme/cf1aa23d2621c6ebe7f5c0b8e7ecd23a82300f3b/_static/thumbs/cartpole.gif -------------------------------------------------------------------------------- /_static/thumbs/char_rnn_generation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-mmlab/pytorch_sphinx_theme/cf1aa23d2621c6ebe7f5c0b8e7ecd23a82300f3b/_static/thumbs/char_rnn_generation.png -------------------------------------------------------------------------------- /_static/thumbs/cifar10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-mmlab/pytorch_sphinx_theme/cf1aa23d2621c6ebe7f5c0b8e7ecd23a82300f3b/_static/thumbs/cifar10.png -------------------------------------------------------------------------------- /_static/thumbs/cpp_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-mmlab/pytorch_sphinx_theme/cf1aa23d2621c6ebe7f5c0b8e7ecd23a82300f3b/_static/thumbs/cpp_logo.png -------------------------------------------------------------------------------- /_static/thumbs/data_parallel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-mmlab/pytorch_sphinx_theme/cf1aa23d2621c6ebe7f5c0b8e7ecd23a82300f3b/_static/thumbs/data_parallel.png -------------------------------------------------------------------------------- /_static/thumbs/examples.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-mmlab/pytorch_sphinx_theme/cf1aa23d2621c6ebe7f5c0b8e7ecd23a82300f3b/_static/thumbs/examples.png -------------------------------------------------------------------------------- /_static/thumbs/mnist.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-mmlab/pytorch_sphinx_theme/cf1aa23d2621c6ebe7f5c0b8e7ecd23a82300f3b/_static/thumbs/mnist.png -------------------------------------------------------------------------------- /_static/thumbs/pytorch-logo-flat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-mmlab/pytorch_sphinx_theme/cf1aa23d2621c6ebe7f5c0b8e7ecd23a82300f3b/_static/thumbs/pytorch-logo-flat.png -------------------------------------------------------------------------------- /_static/thumbs/seq2seq_flat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-mmlab/pytorch_sphinx_theme/cf1aa23d2621c6ebe7f5c0b8e7ecd23a82300f3b/_static/thumbs/seq2seq_flat.png -------------------------------------------------------------------------------- /_static/thumbs/tensor_illustration_flat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-mmlab/pytorch_sphinx_theme/cf1aa23d2621c6ebe7f5c0b8e7ecd23a82300f3b/_static/thumbs/tensor_illustration_flat.png -------------------------------------------------------------------------------- /_static/thumbs/torch-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-mmlab/pytorch_sphinx_theme/cf1aa23d2621c6ebe7f5c0b8e7ecd23a82300f3b/_static/thumbs/torch-logo.png -------------------------------------------------------------------------------- /_static/thumbs/torch-nn-vs-pytorch-nn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-mmlab/pytorch_sphinx_theme/cf1aa23d2621c6ebe7f5c0b8e7ecd23a82300f3b/_static/thumbs/torch-nn-vs-pytorch-nn.png -------------------------------------------------------------------------------- /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 = PyTorchSphinxTheme 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) 21 | -------------------------------------------------------------------------------- /docs/changelog.rst: -------------------------------------------------------------------------------- 1 | 2 | ********* 3 | Changelog 4 | ********* 5 | 6 | v0.0.1 7 | -------------------------------------------------------------------------------- /docs/conf.py: -------------------------------------------------------------------------------- 1 | import sys 2 | import os 3 | 4 | sys.path.append(os.path.abspath('..')) 5 | sys.path.append(os.path.abspath('./demo/')) 6 | 7 | from pytorch_sphinx_theme import __version__ 8 | 9 | # If extensions (or modules to document with autodoc) are in another directory, 10 | # add these directories to sys.path here. If the directory is relative to the 11 | # documentation root, use os.path.abspath to make it absolute, like shown here. 12 | #sys.path.insert(0, os.path.abspath('.')) 13 | 14 | # -- General configuration ----------------------------------------------------- 15 | 16 | # If your documentation needs a minimal Sphinx version, state it here. 17 | #needs_sphinx = '1.0' 18 | 19 | # Add any Sphinx extension module names here, as strings. They can be extensions 20 | # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. 21 | extensions = [ 22 | 'sphinx.ext.intersphinx', 23 | 'sphinx.ext.autodoc', 24 | 'sphinx.ext.viewcode', 25 | 'sphinxcontrib.httpdomain', 26 | ] 27 | 28 | # Do not warn about external images (status badges in README.rst) 29 | suppress_warnings = ['image.nonlocal_uri'] 30 | 31 | # Add any paths that contain templates here, relative to this directory. 32 | templates_path = ['_templates'] 33 | 34 | # The suffix of source filenames. 35 | source_suffix = '.rst' 36 | 37 | # The encoding of source files. 38 | #source_encoding = 'utf-8-sig' 39 | 40 | # The master toctree document. 41 | master_doc = 'index' 42 | 43 | # General information about the project. 44 | project = u'PyTorch Sphinx Theme' 45 | copyright = u'PyTorch' 46 | 47 | # The version info for the project you're documenting, acts as replacement for 48 | # |version| and |release|, also used in various other places throughout the 49 | # built documents. 50 | # 51 | # The short X.Y version. 52 | version = __version__ 53 | # The full version, including alpha/beta/rc tags. 54 | release = __version__ 55 | 56 | # The language for content autogenerated by Sphinx. Refer to documentation 57 | # for a list of supported languages. 58 | language = 'en' 59 | 60 | # There are two options for replacing |today|: either, you set today to some 61 | # non-false value, then it is used: 62 | #today = '' 63 | # Else, today_fmt is used as the format for a strftime call. 64 | #today_fmt = '%B %d, %Y' 65 | 66 | # List of patterns, relative to source directory, that match files and 67 | # directories to ignore when looking for source files. 68 | exclude_patterns = [] 69 | 70 | # The reST default role (used for this markup: `text`) to use for all documents. 71 | #default_role = None 72 | 73 | # If true, '()' will be appended to :func: etc. cross-reference text. 74 | #add_function_parentheses = True 75 | 76 | # If true, the current module name will be prepended to all description 77 | # unit titles (such as .. function::). 78 | #add_module_names = True 79 | 80 | # If true, sectionauthor and moduleauthor directives will be shown in the 81 | # output. They are ignored by default. 82 | #show_authors = False 83 | 84 | # The name of the Pygments (syntax highlighting) style to use. 85 | pygments_style = 'default' 86 | 87 | # A list of ignored prefixes for module index sorting. 88 | #modindex_common_prefix = [] 89 | 90 | intersphinx_mapping = {'rtd': ('https://docs.readthedocs.io/en/latest/', None)} 91 | 92 | 93 | # -- Options for HTML output --------------------------------------------------- 94 | 95 | # The theme to use for HTML and HTML Help pages. See the documentation for 96 | # a list of builtin themes. 97 | html_theme = 'pytorch_sphinx_theme' 98 | 99 | # Theme options are theme-specific and customize the look and feel of a theme 100 | # further. For a list of options available for each theme, see the 101 | # documentation. 102 | html_theme_options = { 103 | 'logo_only': True 104 | } 105 | 106 | # Add any paths that contain custom themes here, relative to this directory. 107 | html_theme_path = ["../"] 108 | 109 | # The name for this set of Sphinx documents. If None, it defaults to 110 | # " v documentation". 111 | #html_title = None 112 | 113 | # A shorter title for the navigation bar. Default is the same as html_title. 114 | #html_short_title = None 115 | 116 | # The name of an image file (relative to this directory) to place at the top 117 | # of the sidebar. 118 | html_logo = "demo/static/pytorch-logo-dark.svg" 119 | 120 | # The name of an image file (within the static path) to use as favicon of the 121 | # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 122 | # pixels large. 123 | #html_favicon = None 124 | 125 | # Add any paths that contain custom static files (such as style sheets) here, 126 | # relative to this directory. They are copied after the builtin static files, 127 | # so a file named "default.css" will overwrite the builtin "default.css". 128 | #html_static_path = ['_static'] 129 | 130 | # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, 131 | # using the given strftime format. 132 | #html_last_updated_fmt = '%b %d, %Y' 133 | 134 | # If true, SmartyPants will be used to convert quotes and dashes to 135 | # typographically correct entities. 136 | #html_use_smartypants = True 137 | 138 | # Custom sidebar templates, maps document names to template names. 139 | #html_sidebars = {} 140 | 141 | # Additional templates that should be rendered to pages, maps page names to 142 | # template names. 143 | #html_additional_pages = {} 144 | 145 | # If false, no module index is generated. 146 | #html_domain_indices = True 147 | 148 | # If false, no index is generated. 149 | #html_use_index = True 150 | 151 | # If true, the index is split into individual pages for each letter. 152 | #html_split_index = False 153 | 154 | # If true, links to the reST sources are added to the pages. 155 | html_show_sourcelink = True 156 | 157 | # If true, "Created using Sphinx" is shown in the HTML footer. Default is True. 158 | #html_show_sphinx = True 159 | 160 | # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. 161 | #html_show_copyright = True 162 | 163 | # If true, an OpenSearch description file will be output, and all pages will 164 | # contain a tag referring to it. The value of this option must be the 165 | # base URL from which the finished HTML is served. 166 | #html_use_opensearch = '' 167 | 168 | # This is the file name suffix for HTML files (e.g. ".xhtml"). 169 | #html_file_suffix = None 170 | 171 | # Output file base name for HTML help builder. 172 | htmlhelp_basename = 'PyTorchSphinxthemedemodoc' 173 | 174 | 175 | # -- Options for LaTeX output -------------------------------------------------- 176 | 177 | latex_elements = { 178 | # The paper size ('letterpaper' or 'a4paper'). 179 | #'papersize': 'letterpaper', 180 | 181 | # The font size ('10pt', '11pt' or '12pt'). 182 | #'pointsize': '10pt', 183 | 184 | # Additional stuff for the LaTeX preamble. 185 | #'preamble': '', 186 | } 187 | 188 | # Grouping the document tree into LaTeX files. List of tuples 189 | # (source start file, target name, title, author, documentclass [howto/manual]). 190 | latex_documents = [ 191 | ('index', 'PyTorchthemedemo.tex', u'PyTorch theme demo Documentation', 192 | u'PyTorch, PyTorch', 'manual'), 193 | ] 194 | 195 | # The name of an image file (relative to this directory) to place at the top of 196 | # the title page. 197 | #latex_logo = None 198 | 199 | # For "manual" documents, if this is true, then toplevel headings are parts, 200 | # not chapters. 201 | #latex_use_parts = False 202 | 203 | # If true, show page references after internal links. 204 | #latex_show_pagerefs = False 205 | 206 | # If true, show URL addresses after external links. 207 | #latex_show_urls = False 208 | 209 | # Documents to append as an appendix to all manuals. 210 | #latex_appendices = [] 211 | 212 | # If false, no module index is generated. 213 | #latex_domain_indices = True 214 | 215 | 216 | # -- Options for manual page output -------------------------------------------- 217 | 218 | # One entry per manual page. List of tuples 219 | # (source start file, name, description, authors, manual section). 220 | man_pages = [ 221 | ('index', 'pytorchthemedemo', u'PyTorch theme demo Documentation', 222 | [u'PyTorch'], 1) 223 | ] 224 | 225 | # If true, show URL addresses after external links. 226 | #man_show_urls = False 227 | 228 | 229 | # -- Options for Texinfo output ------------------------------------------------ 230 | 231 | # Grouping the document tree into Texinfo files. List of tuples 232 | # (source start file, target name, title, author, 233 | # dir menu entry, description, category) 234 | texinfo_documents = [ 235 | ('index', 'PyTorchthemedemo', u'PyTorch theme demo Documentation', 236 | u'PyTorch', 'PyTorchthemedemo', 237 | 'One line description of project.', 'Miscellaneous'), 238 | ] 239 | 240 | # Documents to append as an appendix to all manuals. 241 | #texinfo_appendices = [] 242 | 243 | # If false, no module index is generated. 244 | #texinfo_domain_indices = True 245 | 246 | # How to display URL addresses: 'footnote', 'no', or 'inline'. 247 | #texinfo_show_urls = 'footnote' 248 | -------------------------------------------------------------------------------- /docs/configuring.rst: -------------------------------------------------------------------------------- 1 | 2 | ************* 3 | Configuration 4 | ************* 5 | 6 | You can configure different parts of the theme. 7 | 8 | Project-wide Configuration 9 | ========================== 10 | 11 | HTML Theme Options 12 | ------------------ 13 | 14 | The theme's project-wide options are defined in the ``pytorch_sphinx_theme/theme.conf`` 15 | file of this repository, and can be defined in your project's ``conf.py`` via 16 | ``html_theme_options``. For example: 17 | 18 | .. code:: python 19 | 20 | html_theme_options = { 21 | 'canonical_url': '', 22 | 'analytics_id': '', 23 | 'logo_only': False, 24 | 'display_version': True, 25 | 'prev_next_buttons_location': 'bottom', 26 | 'style_external_links': False, 27 | 'vcs_pageview_mode': '', 28 | # Toc options 29 | 'collapse_navigation': True, 30 | 'sticky_navigation': True, 31 | 'navigation_depth': 4, 32 | 'includehidden': True, 33 | 'titles_only': False 34 | } 35 | 36 | The following options are available: 37 | 38 | Base options 39 | ~~~~~~~~~~~~ 40 | 41 | * ``canonical_url`` String. This will specify a `canonical url `__ 42 | to let search engines know they should give higher ranking to latest version of the docs. 43 | The url points to the root of the documentation and requires a trailing slash. 44 | * ``analytics_id`` String. Change the Google Analytics ID that is included on pages. 45 | * ``display_version`` Bool. With this disabled, the version number isn't shown at the top of the sidebar. 46 | * ``prev_next_buttons_location`` String. can take the value ``bottom``, ``top``, ``both`` , or ``None`` 47 | and will display the "Next" and "Previous" buttons accordingly. 48 | * ``style_external_links`` Bool. Add an icon next to external links. Defaults to ``False``. 49 | * ``vcs_pageview_mode`` String. Changes how to view files when using `display_github`, `display_gitlab`, etc. 50 | When using Github or Gitlab this can be: `blob` (default), `edit`, or `raw`, 51 | on Bitbucket, this can be either: `view` (default) or `edit`. 52 | 53 | TOC Options 54 | ~~~~~~~~~~~ 55 | 56 | These effect how we display the Table of Contents in the side bar. You can read more about them here: http://www.sphinx-doc.org/en/stable/templating.html#toctree 57 | 58 | * ``collapse_navigation`` Bool. With this enabled, you will lose the ``[+]`` drop downs next to each section in the sidebar. 59 | * ``sticky_navigation`` Bool. This causes the sidebar to scroll with the main page content as you scroll the page. 60 | * ``navigation_depth`` Int. Indicate the max depth of the tree; by default, 4 levels are included; 61 | set it to -1 to allow unlimited depth. 62 | * ``includehidden`` Bool. Specifies if the sidebar includes toctrees marked with the ``:hidden:`` option 63 | * ``titles_only`` Bool. If True, removes headers within a page from the sidebar. 64 | 65 | .. note:: 66 | 67 | Setting ``collapse_navigation`` to False and using a high ``navigation_depth`` 68 | can cause projects with many files and a deep file structure to generate HTML files 69 | that are significantly larger in file size and much longer compilation times. 70 | 71 | 72 | HTML Context Options 73 | -------------------- 74 | 75 | TODO. 76 | 77 | 78 | Page-level Configuration 79 | ======================== 80 | 81 | Pages support metadata that changes how the theme renders. 82 | You can currently add the following: 83 | 84 | * ``:github_url:`` This will force the "Edit on GitHub" to the configured URL 85 | * ``:bitbucket_url:`` This will force the "Edit on Bitbucket" to the configured URL 86 | * ``:gitlab_url:`` This will force the "Edit on GitLab" to the configured URL 87 | 88 | 89 | How the Table of Contents builds 90 | ================================ 91 | 92 | Currently the left menu will build based upon any ``toctree(s)`` defined in your ``index.rst`` file. 93 | It outputs 2 levels of depth, which should give your visitors a high level of access to your 94 | docs. If no toctrees are set the theme reverts to sphinx's usual local toctree. 95 | 96 | It's important to note that if you don't follow the same styling for your rST headers across 97 | your documents, the toctree will misbuild, and the resulting menu might not show the correct 98 | depth when it renders. 99 | 100 | Also note that by default the table of contents is set with ``includehidden=True``. This allows you 101 | to set a hidden toc in your index file with the `:hidden: `_ property that will allow you 102 | to build a toc without it rendering in your index. 103 | 104 | By default, the navigation will "stick" to the screen as you scroll. However if your toc 105 | is vertically too large, it will revert to static positioning. To disable the sticky nav 106 | altogether change the setting in ``conf.py``. 107 | 108 | .. _hidden: http://sphinx-doc.org/markup/toctree.html 109 | -------------------------------------------------------------------------------- /docs/demo/api.rst: -------------------------------------------------------------------------------- 1 | 2 | ********************* 3 | :mod:`test_py_module` 4 | ********************* 5 | 6 | .. contents:: Table of Contents 7 | 8 | .. automodule:: test_py_module.test 9 | :members: 10 | :private-members: 11 | :special-members: 12 | 13 | Generated Index 14 | =============== 15 | 16 | Part of the sphinx build process in generate and index file: :ref:`genindex`. 17 | 18 | 19 | Optional parameter args 20 | ======================= 21 | 22 | At this point optional parameters `cannot be generated from code`_. 23 | However, some projects will manually do it, like so: 24 | 25 | This example comes from `django-payments module docs`_. 26 | 27 | .. class:: payments.dotpay.DotpayProvider(seller_id, pin[, channel=0[, lock=False], lang='pl']) 28 | 29 | This backend implements payments using a popular Polish gateway, `Dotpay.pl `_. 30 | 31 | Due to API limitations there is no support for transferring purchased items. 32 | 33 | 34 | :param seller_id: Seller ID assigned by Dotpay 35 | :param pin: PIN assigned by Dotpay 36 | :param channel: Default payment channel (consult reference guide) 37 | :param lang: UI language 38 | :param lock: Whether to disable channels other than the default selected above 39 | 40 | .. _cannot be generated from code: https://groups.google.com/forum/#!topic/sphinx-users/_qfsVT5Vxpw 41 | .. _django-payments module docs: http://django-payments.readthedocs.org/en/latest/modules.html#payments.authorizenet.AuthorizeNetProvide 42 | 43 | 44 | Data 45 | ==== 46 | 47 | .. data:: Data_item_1 48 | Data_item_2 49 | Data_item_3 50 | 51 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce congue elit eu hendrerit mattis. 52 | 53 | Some data link :data:`Data_item_1`. 54 | -------------------------------------------------------------------------------- /docs/demo/long.rst: -------------------------------------------------------------------------------- 1 | 2 | *************** 3 | Long Sticky Nav 4 | *************** 5 | 6 | .. contents:: Table of Contents 7 | 8 | This section demonstrates how the 'sticky_navigation' setting behaves when the menu is very long. 9 | When this section is selected, it will make the menu and the main area scroll when you are at the top of the page. 10 | 11 | 12 | Example Menu 1 13 | ============== 14 | 15 | Just a place holder... 16 | 17 | 18 | Example Menu 2 19 | ============== 20 | 21 | Just a place holder... 22 | 23 | 24 | Example Menu 3 25 | ============== 26 | 27 | Just a place holder... 28 | 29 | 30 | Example Menu 4 31 | ============== 32 | 33 | Just a place holder... 34 | 35 | 36 | Example Menu 5 37 | ============== 38 | 39 | Just a place holder... 40 | 41 | 42 | Example Menu 6 43 | ============== 44 | 45 | Just a place holder... 46 | 47 | 48 | Example Menu 7 49 | ============== 50 | 51 | Just a place holder... 52 | 53 | 54 | Example Menu 8 55 | ============== 56 | 57 | Just a place holder... 58 | 59 | 60 | Example Menu 9 61 | ============== 62 | 63 | Just a place holder... 64 | 65 | 66 | Example Menu 10 67 | =============== 68 | 69 | Just a place holder... 70 | 71 | 72 | Example Menu 11 73 | =============== 74 | 75 | Just a place holder... 76 | 77 | 78 | Example Menu 12 79 | =============== 80 | 81 | Just a place holder... 82 | 83 | 84 | Example Menu 13 85 | =============== 86 | 87 | Just a place holder... 88 | 89 | 90 | Example Menu 14 91 | =============== 92 | 93 | Just a place holder... 94 | 95 | 96 | Example Menu 15 97 | =============== 98 | 99 | Just a place holder... 100 | 101 | 102 | Example Menu 16 103 | =============== 104 | 105 | Just a place holder... 106 | 107 | 108 | Example Menu 17 109 | =============== 110 | 111 | Just a place holder... 112 | 113 | 114 | Example Menu 18 115 | =============== 116 | 117 | Just a place holder... 118 | 119 | 120 | Example Menu 19 121 | =============== 122 | 123 | Just a place holder... 124 | 125 | 126 | Example Menu 20 127 | =============== 128 | 129 | Just a place holder... 130 | 131 | Example Submenu 1 132 | ================= 133 | 134 | Just a place holder... 135 | 136 | Submenu 1 137 | --------- 138 | 139 | Just a place holder... 140 | 141 | Subsubmenu 1 142 | ^^^^^^^^^^^^ 143 | 144 | Just a place holder... 145 | 146 | Subsubmenu 2 147 | ^^^^^^^^^^^^ 148 | 149 | Just a place holder... 150 | 151 | Submenu 2 152 | --------- 153 | 154 | Just a place holder... 155 | 156 | Subsubmenu 1 157 | ^^^^^^^^^^^^ 158 | 159 | Just a place holder... 160 | 161 | Submenu 3 162 | --------- 163 | 164 | Just a place holder... 165 | 166 | Submenu 4 167 | --------- 168 | 169 | Just a place holder... 170 | 171 | Submenu 5 172 | --------- 173 | 174 | Just a place holder... 175 | 176 | Example Submenu 2 177 | ================= 178 | 179 | Just a place holder... 180 | 181 | Submenu 1 182 | --------- 183 | 184 | Just a place holder... 185 | 186 | Subsubmenu 1 187 | ^^^^^^^^^^^^ 188 | 189 | Just a place holder... 190 | 191 | Submenu 2 192 | --------- 193 | 194 | Just a place holder... 195 | 196 | Subsubmenu 1 197 | ^^^^^^^^^^^^ 198 | 199 | Just a place holder... 200 | 201 | Submenu 3 202 | --------- 203 | 204 | Just a place holder... 205 | 206 | Submenu 4 207 | --------- 208 | 209 | Just a place holder... 210 | 211 | Submenu 5 212 | --------- 213 | 214 | Just a place holder... 215 | -------------------------------------------------------------------------------- /docs/demo/static/pytorch-logo-dark.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 9 | 10 | 12 | 13 | 14 | 15 | 16 | 18 | 20 | 21 | 24 | 26 | 29 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /docs/demo/static/screen_desktop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-mmlab/pytorch_sphinx_theme/cf1aa23d2621c6ebe7f5c0b8e7ecd23a82300f3b/docs/demo/static/screen_desktop.png -------------------------------------------------------------------------------- /docs/demo/static/screen_mobile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-mmlab/pytorch_sphinx_theme/cf1aa23d2621c6ebe7f5c0b8e7ecd23a82300f3b/docs/demo/static/screen_mobile.png -------------------------------------------------------------------------------- /docs/demo/static/yi_jing_01_chien.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-mmlab/pytorch_sphinx_theme/cf1aa23d2621c6ebe7f5c0b8e7ecd23a82300f3b/docs/demo/static/yi_jing_01_chien.jpg -------------------------------------------------------------------------------- /docs/demo/structure.rst: -------------------------------------------------------------------------------- 1 | 2 | ******************* 3 | Structural Elements 4 | ******************* 5 | 6 | .. contents:: Table of Contents 7 | 8 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec lorem neque, interdum in ipsum nec, 9 | finibus dictum velit. Ut eu efficitur arcu, id aliquam erat. In sit amet diam gravida, imperdiet tellus eu, 10 | gravida nisl. Praesent aliquet odio eget libero elementum, quis rhoncus tellus tincidunt. 11 | Suspendisse quis volutpat ipsum. Sed lobortis scelerisque tristique. Aenean condimentum risus tellus, 12 | quis accumsan ipsum laoreet ut. Integer porttitor maximus suscipit. Mauris in posuere sapien. 13 | Aliquam accumsan feugiat ligula, nec fringilla libero commodo sed. Proin et erat pharetra. 14 | 15 | --------- 16 | 17 | Etiam turpis ante, luctus sed velit tristique, finibus volutpat dui. Nam sagittis vel ante nec malesuada. 18 | Praesent dignissim mi nec ornare elementum. Nunc eu augue vel sem dignissim cursus sed et nulla. 19 | Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. 20 | Pellentesque dictum dui sem, non placerat tortor rhoncus in. Sed placerat nulla at rhoncus iaculis. 21 | 22 | Document Section 23 | ================ 24 | 25 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed condimentum nulla vel neque venenatis, 26 | nec placerat lorem placerat. Cras purus eros, gravida vitae tincidunt id, vehicula nec nulla. 27 | Fusce aliquet auctor cursus. Phasellus ex neque, vestibulum non est vitae, viverra fringilla tortor. 28 | Donec vestibulum convallis justo, a faucibus lorem vulputate vel. Aliquam cursus odio eu felis sodales aliquet. 29 | Aliquam erat volutpat. Maecenas eget dictum mauris. Suspendisse arcu eros, condimentum eget risus sed, 30 | luctus efficitur arcu. Cras ut dictum mi. Nulla congue interdum lorem, semper semper enim commodo nec. 31 | 32 | Document Subsection 33 | ------------------- 34 | 35 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam efficitur in eros et blandit. Nunc maximus, 36 | nisl at auctor vestibulum, justo ex sollicitudin ligula, id faucibus urna orci tristique nisl. 37 | Duis auctor rutrum orci, in ornare lacus condimentum quis. Quisque arcu velit, facilisis quis interdum ac, 38 | hendrerit auctor mauris. Curabitur urna nibh, porttitor at ante sit amet, vestibulum interdum dolor. 39 | Duis dictum elit orci, tincidunt imperdiet sem pellentesque et. In vehicula pellentesque varius. 40 | Phasellus a turpis sollicitudin, bibendum massa et, imperdiet neque. Integer quis sapien in magna rutrum bibendum. 41 | Integer cursus ex sed magna vehicula finibus. Proin tempus orci quis dolor tempus, nec condimentum odio vestibulum. 42 | Etiam efficitur sollicitudin libero, tincidunt volutpat ligula interdum sed. 43 | 44 | Document Subsubsection 45 | ^^^^^^^^^^^^^^^^^^^^^^ 46 | 47 | Donec non rutrum lorem. Aenean sagittis metus at pharetra fringilla. Nunc sapien dolor, cursus sed nisi at, 48 | pretium tristique lectus. Sed pellentesque leo lectus, et convallis ipsum euismod a. 49 | Integer at leo vitae felis pretium aliquam fringilla quis odio. Sed pharetra enim accumsan feugiat pretium. 50 | Maecenas at pharetra tortor. Morbi semper eget mi vel finibus. Cras rutrum nulla eros, id feugiat arcu pellentesque ut. 51 | Sed finibus tortor ac nisi ultrices viverra. Duis feugiat malesuada sapien, at commodo ante porttitor ac. 52 | Curabitur posuere mauris mi, vel ornare orci scelerisque sit amet. Suspendisse nec fringilla dui. 53 | 54 | Document Paragraph 55 | """""""""""""""""" 56 | 57 | Pellentesque nec est in odio ultrices elementum. Vestibulum et hendrerit sapien, quis vulputate turpis. 58 | Suspendisse potenti. Curabitur tristique sit amet lectus non viverra. Phasellus rutrum dapibus turpis sed imperdiet. 59 | Mauris maximus viverra ante. Donec eu egestas mauris. Morbi vulputate tincidunt euismod. Integer vel porttitor neque. 60 | Donec at lacus suscipit, lacinia lectus vel, sagittis lectus. 61 | 62 | ********************* 63 | Structural Elements 2 64 | ********************* 65 | 66 | Etiam turpis ante, luctus sed velit tristique, finibus volutpat dui. Nam sagittis vel ante nec malesuada. 67 | Praesent dignissim mi nec ornare elementum. Nunc eu augue vel sem dignissim cursus sed et nulla. 68 | Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. 69 | Pellentesque dictum dui sem, non placerat tortor rhoncus in. Sed placerat nulla at rhoncus iaculis. 70 | 71 | Document Section 72 | ================ 73 | 74 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed condimentum nulla vel neque venenatis, 75 | nec placerat lorem placerat. Cras purus eros, gravida vitae tincidunt id, vehicula nec nulla. 76 | Fusce aliquet auctor cursus. Phasellus ex neque, vestibulum non est vitae, viverra fringilla tortor. 77 | Donec vestibulum convallis justo, a faucibus lorem vulputate vel. Aliquam cursus odio eu felis sodales aliquet. 78 | Aliquam erat volutpat. Maecenas eget dictum mauris. Suspendisse arcu eros, condimentum eget risus sed, 79 | luctus efficitur arcu. Cras ut dictum mi. Nulla congue interdum lorem, semper semper enim commodo nec. 80 | 81 | Document Subsection 82 | ------------------- 83 | 84 | .. figure:: static/yi_jing_01_chien.jpg 85 | :align: right 86 | :figwidth: 200px 87 | 88 | This is a caption for a figure. Text should wrap around the caption. 89 | 90 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam efficitur in eros et blandit. Nunc maximus, 91 | nisl at auctor vestibulum, justo ex sollicitudin ligula, id faucibus urna orci tristique nisl. 92 | Duis auctor rutrum orci, in ornare lacus condimentum quis. Quisque arcu velit, facilisis quis interdum ac, 93 | hendrerit auctor mauris. Curabitur urna nibh, porttitor at ante sit amet, vestibulum interdum dolor. 94 | Duis dictum elit orci, tincidunt imperdiet sem pellentesque et. In vehicula pellentesque varius. 95 | Phasellus a turpis sollicitudin, bibendum massa et, imperdiet neque. Integer quis sapien in magna rutrum bibendum. 96 | Integer cursus ex sed magna vehicula finibus. Proin tempus orci quis dolor tempus, nec condimentum odio vestibulum. 97 | Etiam efficitur sollicitudin libero, tincidunt volutpat ligula interdum sed. Praesent congue sagittis nisl et suscipit. 98 | Vivamus sagittis risus et egestas commodo.Cras venenatis arcu in pharetra interdum. 99 | Donec quis metus porttitor tellus cursus lobortis. Quisque et orci magna. Fusce rhoncus mi mi, 100 | at vehicula massa rhoncus quis. Mauris augue leo, pretium eget molestie vitae, efficitur nec nulla. 101 | In hac habitasse platea dictumst. Sed sit amet imperdiet purus. 102 | -------------------------------------------------------------------------------- /docs/demo/test_py_module/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-mmlab/pytorch_sphinx_theme/cf1aa23d2621c6ebe7f5c0b8e7ecd23a82300f3b/docs/demo/test_py_module/__init__.py -------------------------------------------------------------------------------- /docs/demo/test_py_module/test.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """Test Module for sphinx_rtd_theme.""" 3 | 4 | 5 | class Foo: 6 | 7 | """Docstring for class Foo. 8 | 9 | This text tests for the formatting of docstrings generated from output 10 | ``sphinx.ext.autodoc``. Which contain reST, but sphinx nests it in the 11 | ``
``, and ``
`` tags. Also, ```` is used for class, method names 12 | and etc, but those will *always* have the ``.descname`` or 13 | ``.descclassname`` class. 14 | 15 | Normal ```` (like the I just wrote here) needs to be shown with 16 | the same style as anything else with ````this type of markup````. 17 | 18 | It's common for programmers to give a code example inside of their 19 | docstring:: 20 | 21 | from test_py_module import Foo 22 | 23 | myclass = Foo() 24 | myclass.dothismethod('with this argument') 25 | myclass.flush() 26 | 27 | print(myclass) 28 | 29 | 30 | Here is a link to :py:meth:`capitalize`. 31 | Here is a link to :py:meth:`__init__`. 32 | 33 | """ 34 | 35 | #: Doc comment for class attribute Foo.bar. 36 | #: It can have multiple lines. 37 | bar = 1 38 | 39 | flox = 1.5 #: Doc comment for Foo.flox. One line only. 40 | 41 | baz = 2 42 | """Docstring for class attribute Foo.baz.""" 43 | 44 | def __init__(self, qux, spam=False): 45 | """Start the Foo. 46 | 47 | :param qux: The first argument to initialize class. 48 | :type qux: string 49 | :param spam: Spam me yes or no... 50 | :type spam: bool 51 | 52 | """ 53 | #: Doc comment for instance attribute qux. 54 | self.qux = 3 55 | 56 | self.spam = 4 57 | """Docstring for instance attribute spam.""" 58 | 59 | def add(self, val1, val2): 60 | """Return the added values. 61 | 62 | :param val1: First number to add. 63 | :type val1: int 64 | :param val2: Second number to add. 65 | :type val2: int 66 | :rtype: int 67 | 68 | """ 69 | 70 | return val1 + val2 71 | 72 | def capitalize(self, myvalue): 73 | """Return a string as uppercase. 74 | 75 | :param myvalue: String to change 76 | :type myvalue: string 77 | :rtype: string 78 | 79 | """ 80 | 81 | return myvalue.upper() 82 | 83 | def another_function(self, a, b, **kwargs): 84 | """ 85 | Here is another function. 86 | 87 | :param a: The number of green hats you own. 88 | :type a: int 89 | 90 | :param b: The number of non-green hats you own. 91 | :type b: int 92 | 93 | :param kwargs: Additional keyword arguments. Each keyword parameter 94 | should specify the name of your favorite cuisine. 95 | The values should be floats, specifying the mean price 96 | of your favorite dish in that cooking style. 97 | :type kwargs: float 98 | 99 | :returns: A 2-tuple. The first element is the mean price of all dishes 100 | across cuisines. The second element is the total number of 101 | hats you own: :math:`a + b`. 102 | :rtype: tuple 103 | 104 | :raises ValueError: When ``a`` is not an integer. 105 | 106 | .. versionadded:: 1.0 107 | This was added in 1.0 108 | .. versionchanged:: 2.0 109 | This was changed in 2.0 110 | .. deprecated:: 3.0 111 | This is deprecated since 3.0 112 | """ 113 | return sum(kwargs.values()) / len(kwargs), a + b 114 | -------------------------------------------------------------------------------- /docs/index.rst: -------------------------------------------------------------------------------- 1 | .. include:: ../README.rst 2 | 3 | .. toctree:: 4 | :caption: Theme Documentation 5 | :maxdepth: 2 6 | 7 | installing 8 | configuring 9 | changelog 10 | 11 | 12 | .. toctree:: 13 | :maxdepth: 2 14 | :numbered: 15 | :caption: Demo Documents 16 | 17 | demo/structure 18 | demo/demo 19 | demo/lists_tables 20 | demo/api 21 | 22 | .. toctree:: 23 | :maxdepth: 3 24 | :numbered: 25 | :caption: This is an incredibly long caption for a long menu 26 | 27 | demo/long 28 | -------------------------------------------------------------------------------- /docs/installing.rst: -------------------------------------------------------------------------------- 1 | 2 | ************ 3 | Installation 4 | ************ 5 | 6 | Via Git or Download 7 | =================== 8 | 9 | Symlink or subtree the ``pytorch_sphinx_theme`` repository into your documentation at 10 | ``docs/_themes/pytorch_sphinx_theme`` then add the following two settings to your Sphinx 11 | ``conf.py`` file: 12 | 13 | .. code:: python 14 | 15 | html_theme = "pytorch_sphinx_theme" 16 | html_theme_path = ["_themes", ] 17 | 18 | -------------------------------------------------------------------------------- /docs/make.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | 3 | pushd %~dp0 4 | 5 | REM Command file for Sphinx documentation 6 | 7 | if "%SPHINXBUILD%" == "" ( 8 | set SPHINXBUILD=python -msphinx 9 | ) 10 | set SPHINXOPTS= 11 | set SPHINXBUILD=sphinx-build 12 | set SOURCEDIR=. 13 | set BUILDDIR=build 14 | set SPHINXPROJ=PyTorchSphinxTheme 15 | 16 | if "%1" == "" goto help 17 | 18 | %SPHINXBUILD% >NUL 2>NUL 19 | if errorlevel 9009 ( 20 | echo. 21 | echo.The Sphinx module was not found. Make sure you have Sphinx installed, 22 | echo.then set the SPHINXBUILD environment variable to point to the full 23 | echo.path of the 'sphinx-build' executable. Alternatively you may add the 24 | echo.Sphinx directory to PATH. 25 | echo. 26 | echo.If you don't have Sphinx installed, grab it from 27 | echo.http://sphinx-doc.org/ 28 | exit /b 1 29 | ) 30 | 31 | %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% 32 | goto end 33 | 34 | :help 35 | %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% 36 | 37 | :end 38 | popd 39 | -------------------------------------------------------------------------------- /docs/requirements.txt: -------------------------------------------------------------------------------- 1 | sphinxcontrib-httpdomain 2 | sphinx 3 | -------------------------------------------------------------------------------- /fonts/FreightSans/freight-sans-bold-italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-mmlab/pytorch_sphinx_theme/cf1aa23d2621c6ebe7f5c0b8e7ecd23a82300f3b/fonts/FreightSans/freight-sans-bold-italic.woff -------------------------------------------------------------------------------- /fonts/FreightSans/freight-sans-bold-italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-mmlab/pytorch_sphinx_theme/cf1aa23d2621c6ebe7f5c0b8e7ecd23a82300f3b/fonts/FreightSans/freight-sans-bold-italic.woff2 -------------------------------------------------------------------------------- /fonts/FreightSans/freight-sans-bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-mmlab/pytorch_sphinx_theme/cf1aa23d2621c6ebe7f5c0b8e7ecd23a82300f3b/fonts/FreightSans/freight-sans-bold.woff -------------------------------------------------------------------------------- /fonts/FreightSans/freight-sans-bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-mmlab/pytorch_sphinx_theme/cf1aa23d2621c6ebe7f5c0b8e7ecd23a82300f3b/fonts/FreightSans/freight-sans-bold.woff2 -------------------------------------------------------------------------------- /fonts/FreightSans/freight-sans-book-italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-mmlab/pytorch_sphinx_theme/cf1aa23d2621c6ebe7f5c0b8e7ecd23a82300f3b/fonts/FreightSans/freight-sans-book-italic.woff -------------------------------------------------------------------------------- /fonts/FreightSans/freight-sans-book-italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-mmlab/pytorch_sphinx_theme/cf1aa23d2621c6ebe7f5c0b8e7ecd23a82300f3b/fonts/FreightSans/freight-sans-book-italic.woff2 -------------------------------------------------------------------------------- /fonts/FreightSans/freight-sans-book.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-mmlab/pytorch_sphinx_theme/cf1aa23d2621c6ebe7f5c0b8e7ecd23a82300f3b/fonts/FreightSans/freight-sans-book.woff -------------------------------------------------------------------------------- /fonts/FreightSans/freight-sans-book.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-mmlab/pytorch_sphinx_theme/cf1aa23d2621c6ebe7f5c0b8e7ecd23a82300f3b/fonts/FreightSans/freight-sans-book.woff2 -------------------------------------------------------------------------------- /fonts/FreightSans/freight-sans-light-italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-mmlab/pytorch_sphinx_theme/cf1aa23d2621c6ebe7f5c0b8e7ecd23a82300f3b/fonts/FreightSans/freight-sans-light-italic.woff -------------------------------------------------------------------------------- /fonts/FreightSans/freight-sans-light-italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-mmlab/pytorch_sphinx_theme/cf1aa23d2621c6ebe7f5c0b8e7ecd23a82300f3b/fonts/FreightSans/freight-sans-light-italic.woff2 -------------------------------------------------------------------------------- /fonts/FreightSans/freight-sans-light.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-mmlab/pytorch_sphinx_theme/cf1aa23d2621c6ebe7f5c0b8e7ecd23a82300f3b/fonts/FreightSans/freight-sans-light.woff -------------------------------------------------------------------------------- /fonts/FreightSans/freight-sans-light.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-mmlab/pytorch_sphinx_theme/cf1aa23d2621c6ebe7f5c0b8e7ecd23a82300f3b/fonts/FreightSans/freight-sans-light.woff2 -------------------------------------------------------------------------------- /fonts/FreightSans/freight-sans-medium-italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-mmlab/pytorch_sphinx_theme/cf1aa23d2621c6ebe7f5c0b8e7ecd23a82300f3b/fonts/FreightSans/freight-sans-medium-italic.woff -------------------------------------------------------------------------------- /fonts/FreightSans/freight-sans-medium-italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-mmlab/pytorch_sphinx_theme/cf1aa23d2621c6ebe7f5c0b8e7ecd23a82300f3b/fonts/FreightSans/freight-sans-medium-italic.woff2 -------------------------------------------------------------------------------- /fonts/FreightSans/freight-sans-medium.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-mmlab/pytorch_sphinx_theme/cf1aa23d2621c6ebe7f5c0b8e7ecd23a82300f3b/fonts/FreightSans/freight-sans-medium.woff -------------------------------------------------------------------------------- /fonts/FreightSans/freight-sans-medium.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-mmlab/pytorch_sphinx_theme/cf1aa23d2621c6ebe7f5c0b8e7ecd23a82300f3b/fonts/FreightSans/freight-sans-medium.woff2 -------------------------------------------------------------------------------- /fonts/IBMPlexMono/IBMPlexMono-Light.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-mmlab/pytorch_sphinx_theme/cf1aa23d2621c6ebe7f5c0b8e7ecd23a82300f3b/fonts/IBMPlexMono/IBMPlexMono-Light.woff -------------------------------------------------------------------------------- /fonts/IBMPlexMono/IBMPlexMono-Light.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-mmlab/pytorch_sphinx_theme/cf1aa23d2621c6ebe7f5c0b8e7ecd23a82300f3b/fonts/IBMPlexMono/IBMPlexMono-Light.woff2 -------------------------------------------------------------------------------- /fonts/IBMPlexMono/IBMPlexMono-Medium.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-mmlab/pytorch_sphinx_theme/cf1aa23d2621c6ebe7f5c0b8e7ecd23a82300f3b/fonts/IBMPlexMono/IBMPlexMono-Medium.woff -------------------------------------------------------------------------------- /fonts/IBMPlexMono/IBMPlexMono-Medium.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-mmlab/pytorch_sphinx_theme/cf1aa23d2621c6ebe7f5c0b8e7ecd23a82300f3b/fonts/IBMPlexMono/IBMPlexMono-Medium.woff2 -------------------------------------------------------------------------------- /fonts/IBMPlexMono/IBMPlexMono-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-mmlab/pytorch_sphinx_theme/cf1aa23d2621c6ebe7f5c0b8e7ecd23a82300f3b/fonts/IBMPlexMono/IBMPlexMono-Regular.woff -------------------------------------------------------------------------------- /fonts/IBMPlexMono/IBMPlexMono-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-mmlab/pytorch_sphinx_theme/cf1aa23d2621c6ebe7f5c0b8e7ecd23a82300f3b/fonts/IBMPlexMono/IBMPlexMono-Regular.woff2 -------------------------------------------------------------------------------- /fonts/IBMPlexMono/IBMPlexMono-SemiBold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-mmlab/pytorch_sphinx_theme/cf1aa23d2621c6ebe7f5c0b8e7ecd23a82300f3b/fonts/IBMPlexMono/IBMPlexMono-SemiBold.woff -------------------------------------------------------------------------------- /fonts/IBMPlexMono/IBMPlexMono-SemiBold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-mmlab/pytorch_sphinx_theme/cf1aa23d2621c6ebe7f5c0b8e7ecd23a82300f3b/fonts/IBMPlexMono/IBMPlexMono-SemiBold.woff2 -------------------------------------------------------------------------------- /images/arrow-down-blue.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Group 5 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /images/arrow-right-with-tail.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Page 1 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /images/chevron-down-black.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | Created with Sketch. 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /images/chevron-down-blue.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | Created with Sketch. 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /images/chevron-down-grey.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | Created with Sketch. 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /images/chevron-down-white.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | Created with Sketch. 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /images/chevron-right-blue.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | Page 1 7 | Created with Sketch. 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /images/chevron-right-white.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | Page 1 7 | Created with Sketch. 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /images/home-footer-background.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-mmlab/pytorch_sphinx_theme/cf1aa23d2621c6ebe7f5c0b8e7ecd23a82300f3b/images/home-footer-background.jpg -------------------------------------------------------------------------------- /images/icon-close.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Page 1 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /images/icon-menu-dots-dark.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Page 1 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /images/logo-dark.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 9 | 10 | 11 | 12 | 13 | 15 | 17 | 18 | 21 | 23 | 26 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /images/logo-facebook-dark.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 8 | 9 | -------------------------------------------------------------------------------- /images/logo-icon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /images/logo-twitter-dark.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 9 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /images/logo-youtube-dark.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-mmlab/pytorch_sphinx_theme/cf1aa23d2621c6ebe7f5c0b8e7ecd23a82300f3b/images/logo.png -------------------------------------------------------------------------------- /images/logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 9 | 10 | 11 | 12 | 13 | 16 | 18 | 19 | 22 | 24 | 27 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /images/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-mmlab/pytorch_sphinx_theme/cf1aa23d2621c6ebe7f5c0b8e7ecd23a82300f3b/images/logo192.png -------------------------------------------------------------------------------- /images/pytorch-colab.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 9 | 10 | 13 | 15 | 17 | 20 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /images/pytorch-download.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 8 | 10 | 11 | -------------------------------------------------------------------------------- /images/pytorch-github.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 8 | 15 | 16 | -------------------------------------------------------------------------------- /images/pytorch-x.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /images/search-icon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Created with Sketch. 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /images/view-page-source-icon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /js/_utilities.js: -------------------------------------------------------------------------------- 1 | window.utilities = { 2 | scrollTop: function() { 3 | var supportPageOffset = window.pageXOffset !== undefined; 4 | var isCSS1Compat = ((document.compatMode || "") === "CSS1Compat"); 5 | var scrollLeft = supportPageOffset ? window.pageXOffset : isCSS1Compat ? document.documentElement.scrollLeft : document.body.scrollLeft; 6 | return supportPageOffset ? window.pageYOffset : isCSS1Compat ? document.documentElement.scrollTop : document.body.scrollTop; 7 | }, 8 | 9 | // Modified from https://stackoverflow.com/a/27078401 10 | throttle: function(func, wait, options) { 11 | var context, args, result; 12 | var timeout = null; 13 | var previous = 0; 14 | if (!options) options = {}; 15 | var later = function() { 16 | previous = options.leading === false ? 0 : Date.now(); 17 | timeout = null; 18 | result = func.apply(context, args); 19 | if (!timeout) context = args = null; 20 | }; 21 | return function() { 22 | var now = Date.now(); 23 | if (!previous && options.leading === false) previous = now; 24 | var remaining = wait - (now - previous); 25 | context = this; 26 | args = arguments; 27 | if (remaining <= 0 || remaining > wait) { 28 | if (timeout) { 29 | clearTimeout(timeout); 30 | timeout = null; 31 | } 32 | previous = now; 33 | result = func.apply(context, args); 34 | if (!timeout) context = args = null; 35 | } else if (!timeout && options.trailing !== false) { 36 | timeout = setTimeout(later, remaining); 37 | } 38 | return result; 39 | }; 40 | }, 41 | 42 | closest: function (el, selector) { 43 | var matchesFn; 44 | 45 | // find vendor prefix 46 | ['matches','webkitMatchesSelector','mozMatchesSelector','msMatchesSelector','oMatchesSelector'].some(function(fn) { 47 | if (typeof document.body[fn] == 'function') { 48 | matchesFn = fn; 49 | return true; 50 | } 51 | return false; 52 | }); 53 | 54 | var parent; 55 | 56 | // traverse parents 57 | while (el) { 58 | parent = el.parentElement; 59 | if (parent && parent[matchesFn](selector)) { 60 | return parent; 61 | } 62 | el = parent; 63 | } 64 | 65 | return null; 66 | }, 67 | 68 | // Modified from https://stackoverflow.com/a/18953277 69 | offset: function(elem) { 70 | if (!elem) { 71 | return; 72 | } 73 | 74 | rect = elem.getBoundingClientRect(); 75 | 76 | // Make sure element is not hidden (display: none) or disconnected 77 | if (rect.width || rect.height || elem.getClientRects().length) { 78 | var doc = elem.ownerDocument; 79 | var docElem = doc.documentElement; 80 | 81 | return { 82 | top: rect.top + window.pageYOffset - docElem.clientTop, 83 | left: rect.left + window.pageXOffset - docElem.clientLeft 84 | }; 85 | } 86 | }, 87 | 88 | headersHeight: function() { 89 | if (document.getElementById("pytorch-left-menu").classList.contains("make-fixed")) { 90 | return document.getElementById("pytorch-page-level-bar").offsetHeight; 91 | } else { 92 | return document.getElementById("header-holder").offsetHeight + 93 | document.getElementById("pytorch-page-level-bar").offsetHeight; 94 | } 95 | }, 96 | 97 | windowHeight: function() { 98 | return window.innerHeight || 99 | document.documentElement.clientHeight || 100 | document.body.clientHeight; 101 | } 102 | } 103 | -------------------------------------------------------------------------------- /js/filter-tutorial-tags.js: -------------------------------------------------------------------------------- 1 | window.filterTags = { 2 | bind: function() { 3 | var options = { 4 | valueNames: [{ data: ["tags"] }], 5 | page: "6", 6 | pagination: true 7 | }; 8 | 9 | var tutorialList = new List("tutorial-cards", options); 10 | 11 | function filterSelectedTags(cardTags, selectedTags) { 12 | return cardTags.some(function(tag) { 13 | return selectedTags.some(function(selectedTag) { 14 | return selectedTag == tag; 15 | }); 16 | }); 17 | } 18 | 19 | function updateList() { 20 | var selectedTags = []; 21 | 22 | $(".selected").each(function() { 23 | selectedTags.push($(this).data("tag")); 24 | }); 25 | 26 | tutorialList.filter(function(item) { 27 | var cardTags; 28 | 29 | if (item.values().tags == null) { 30 | cardTags = [""]; 31 | } else { 32 | cardTags = item.values().tags.split(","); 33 | } 34 | 35 | if (selectedTags.length == 0) { 36 | return true; 37 | } else { 38 | return filterSelectedTags(cardTags, selectedTags); 39 | } 40 | }); 41 | } 42 | 43 | $(".filter-btn").on("click", function() { 44 | if ($(this).data("tag") == "all") { 45 | $(this).addClass("all-tag-selected"); 46 | $(".filter").removeClass("selected"); 47 | } else { 48 | $(this).toggleClass("selected"); 49 | $("[data-tag='all']").removeClass("all-tag-selected"); 50 | } 51 | 52 | // If no tags are selected then highlight the 'All' tag 53 | 54 | if (!$(".selected")[0]) { 55 | $("[data-tag='all']").addClass("all-tag-selected"); 56 | } 57 | 58 | updateList(); 59 | }); 60 | } 61 | }; 62 | -------------------------------------------------------------------------------- /js/highlight-navigation.js: -------------------------------------------------------------------------------- 1 | // Modified from https://stackoverflow.com/a/32396543 2 | window.highlightNavigation = { 3 | navigationListItems: document.querySelectorAll("#pytorch-right-menu li"), 4 | sections: document.querySelectorAll(".pytorch-article .section"), 5 | sectionIdTonavigationLink: {}, 6 | 7 | bind: function() { 8 | if (!sideMenus.displayRightMenu) { 9 | return; 10 | }; 11 | 12 | for (var i = 0; i < highlightNavigation.sections.length; i++) { 13 | var id = highlightNavigation.sections[i].id; 14 | highlightNavigation.sectionIdTonavigationLink[id] = 15 | document.querySelectorAll('#pytorch-right-menu li a[href="#' + id + '"]')[0]; 16 | } 17 | 18 | $(window).scroll(utilities.throttle(highlightNavigation.highlight, 100)); 19 | }, 20 | 21 | highlight: function() { 22 | var rightMenu = document.getElementById("pytorch-right-menu"); 23 | 24 | // If right menu is not on the screen don't bother 25 | if (rightMenu.offsetWidth === 0 && rightMenu.offsetHeight === 0) { 26 | return; 27 | } 28 | 29 | var scrollPosition = utilities.scrollTop(); 30 | var OFFSET_TOP_PADDING = 25; 31 | var offset = document.getElementById("header-holder").offsetHeight + 32 | document.getElementById("pytorch-page-level-bar").offsetHeight + 33 | OFFSET_TOP_PADDING; 34 | 35 | var sections = highlightNavigation.sections; 36 | 37 | for (var i = (sections.length - 1); i >= 0; i--) { 38 | var currentSection = sections[i]; 39 | var sectionTop = utilities.offset(currentSection).top; 40 | 41 | if (scrollPosition >= sectionTop - offset) { 42 | var navigationLink = highlightNavigation.sectionIdTonavigationLink[currentSection.id]; 43 | var navigationListItem = utilities.closest(navigationLink, "li"); 44 | 45 | if (navigationListItem && !navigationListItem.classList.contains("active")) { 46 | for (var i = 0; i < highlightNavigation.navigationListItems.length; i++) { 47 | var el = highlightNavigation.navigationListItems[i]; 48 | if (el.classList.contains("active")) { 49 | el.classList.remove("active"); 50 | } 51 | } 52 | 53 | navigationListItem.classList.add("active"); 54 | 55 | // Scroll to active item. Not a requested feature but we could revive it. Needs work. 56 | 57 | // var menuTop = $("#pytorch-right-menu").position().top; 58 | // var itemTop = navigationListItem.getBoundingClientRect().top; 59 | // var TOP_PADDING = 20 60 | // var newActiveTop = $("#pytorch-side-scroll-right").scrollTop() + itemTop - menuTop - TOP_PADDING; 61 | 62 | // $("#pytorch-side-scroll-right").animate({ 63 | // scrollTop: newActiveTop 64 | // }, 100); 65 | } 66 | 67 | break; 68 | } 69 | } 70 | } 71 | }; 72 | -------------------------------------------------------------------------------- /js/main-menu-dropdown.js: -------------------------------------------------------------------------------- 1 | window.mainMenuDropdown = { 2 | bind: function() { 3 | $("[data-toggle='ecosystem-dropdown']").on("click", function() { 4 | toggleDropdown($(this).attr("data-toggle")); 5 | }); 6 | 7 | $("[data-toggle='resources-dropdown']").on("click", function() { 8 | toggleDropdown($(this).attr("data-toggle")); 9 | }); 10 | 11 | function toggleDropdown(menuToggle) { 12 | var showMenuClass = "show-menu"; 13 | var menuClass = "." + menuToggle + "-menu"; 14 | 15 | if ($(menuClass).hasClass(showMenuClass)) { 16 | $(menuClass).removeClass(showMenuClass); 17 | } else { 18 | $("[data-toggle=" + menuToggle + "].show-menu").removeClass( 19 | showMenuClass 20 | ); 21 | $(menuClass).addClass(showMenuClass); 22 | } 23 | } 24 | } 25 | }; 26 | -------------------------------------------------------------------------------- /js/mobile-menu.js: -------------------------------------------------------------------------------- 1 | window.mobileMenu = { 2 | bind: function() { 3 | $("[data-behavior='open-mobile-menu']").on('click', function(e) { 4 | e.preventDefault(); 5 | $(".mobile-main-menu").addClass("open"); 6 | $("body").addClass('no-scroll'); 7 | 8 | mobileMenu.listenForResize(); 9 | }); 10 | 11 | $("[data-behavior='close-mobile-menu']").on('click', function(e) { 12 | e.preventDefault(); 13 | mobileMenu.close(); 14 | }); 15 | }, 16 | 17 | listenForResize: function() { 18 | $(window).on('resize.ForMobileMenu', function() { 19 | if ($(this).width() > 768) { 20 | mobileMenu.close(); 21 | } 22 | }); 23 | }, 24 | 25 | close: function() { 26 | $(".mobile-main-menu").removeClass("open"); 27 | $("body").removeClass('no-scroll'); 28 | $(window).off('resize.ForMobileMenu'); 29 | } 30 | }; 31 | -------------------------------------------------------------------------------- /js/mobile-toc.js: -------------------------------------------------------------------------------- 1 | window.mobileTOC = { 2 | bind: function() { 3 | $("[data-behavior='toggle-table-of-contents']").on("click", function(e) { 4 | e.preventDefault(); 5 | 6 | var $parent = $(this).parent(); 7 | 8 | if ($parent.hasClass("is-open")) { 9 | $parent.removeClass("is-open"); 10 | $(".pytorch-left-menu").slideUp(200, function() { 11 | $(this).css({display: ""}); 12 | }); 13 | } else { 14 | $parent.addClass("is-open"); 15 | $(".pytorch-left-menu").slideDown(200); 16 | } 17 | }); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /js/pytorch-anchors.js: -------------------------------------------------------------------------------- 1 | window.pytorchAnchors = { 2 | bind: function() { 3 | // Replace Sphinx-generated anchors with anchorjs ones 4 | $(".headerlink").text(""); 5 | 6 | window.anchors.add(".pytorch-article .headerlink"); 7 | 8 | $(".anchorjs-link").each(function() { 9 | var $headerLink = $(this).closest(".headerlink"); 10 | var href = $headerLink.attr("href"); 11 | var clone = this.outerHTML; 12 | 13 | $clone = $(clone).attr("href", href); 14 | $headerLink.before($clone); 15 | $headerLink.remove(); 16 | }); 17 | } 18 | }; 19 | -------------------------------------------------------------------------------- /js/scroll-to-anchor.js: -------------------------------------------------------------------------------- 1 | // Modified from https://stackoverflow.com/a/13067009 2 | // Going for a JS solution to scrolling to an anchor so we can benefit from 3 | // less hacky css and smooth scrolling. 4 | 5 | window.scrollToAnchor = { 6 | bind: function() { 7 | var document = window.document; 8 | var history = window.history; 9 | var location = window.location 10 | var HISTORY_SUPPORT = !!(history && history.pushState); 11 | 12 | var anchorScrolls = { 13 | ANCHOR_REGEX: /^#[^ ]+$/, 14 | offsetHeightPx: function() { 15 | var OFFSET_HEIGHT_PADDING = 20; 16 | // TODO: this is a little janky. We should try to not rely on JS for this 17 | return utilities.headersHeight() + OFFSET_HEIGHT_PADDING; 18 | }, 19 | 20 | /** 21 | * Establish events, and fix initial scroll position if a hash is provided. 22 | */ 23 | init: function() { 24 | this.scrollToCurrent(); 25 | // This interferes with clicks below it, causing a double fire 26 | // $(window).on('hashchange', $.proxy(this, 'scrollToCurrent')); 27 | $('body').on('click', 'a', $.proxy(this, 'delegateAnchors')); 28 | $('body').on('click', '#pytorch-right-menu li span', $.proxy(this, 'delegateSpans')); 29 | }, 30 | 31 | /** 32 | * Return the offset amount to deduct from the normal scroll position. 33 | * Modify as appropriate to allow for dynamic calculations 34 | */ 35 | getFixedOffset: function() { 36 | return this.offsetHeightPx(); 37 | }, 38 | 39 | /** 40 | * If the provided href is an anchor which resolves to an element on the 41 | * page, scroll to it. 42 | * @param {String} href 43 | * @return {Boolean} - Was the href an anchor. 44 | */ 45 | scrollIfAnchor: function(href, pushToHistory) { 46 | var match, anchorOffset; 47 | 48 | if(!this.ANCHOR_REGEX.test(href)) { 49 | return false; 50 | } 51 | 52 | match = document.getElementById(href.slice(1)); 53 | 54 | if(match) { 55 | var anchorOffset = $(match).offset().top - this.getFixedOffset(); 56 | 57 | $('html, body').scrollTop(anchorOffset); 58 | 59 | // Add the state to history as-per normal anchor links 60 | if(HISTORY_SUPPORT && pushToHistory) { 61 | history.pushState({}, document.title, location.pathname + href); 62 | } 63 | } 64 | 65 | return !!match; 66 | }, 67 | 68 | /** 69 | * Attempt to scroll to the current location's hash. 70 | */ 71 | scrollToCurrent: function(e) { 72 | if(this.scrollIfAnchor(window.location.hash) && e) { 73 | e.preventDefault(); 74 | } 75 | }, 76 | 77 | delegateSpans: function(e) { 78 | var elem = utilities.closest(e.target, "a"); 79 | 80 | if(this.scrollIfAnchor(elem.getAttribute('href'), true)) { 81 | e.preventDefault(); 82 | } 83 | }, 84 | 85 | /** 86 | * If the click event's target was an anchor, fix the scroll position. 87 | */ 88 | delegateAnchors: function(e) { 89 | var elem = e.target; 90 | 91 | if(this.scrollIfAnchor(elem.getAttribute('href'), true)) { 92 | e.preventDefault(); 93 | } 94 | } 95 | }; 96 | 97 | $(document).ready($.proxy(anchorScrolls, 'init')); 98 | } 99 | }; 100 | -------------------------------------------------------------------------------- /js/side-menus.js: -------------------------------------------------------------------------------- 1 | window.sideMenus = { 2 | rightMenuIsOnScreen: function() { 3 | return document.getElementById("pytorch-content-right").offsetParent !== null; 4 | }, 5 | 6 | isFixedToBottom: false, 7 | 8 | bind: function() { 9 | sideMenus.handleLeftMenu(); 10 | 11 | var rightMenuLinks = document.querySelectorAll("#pytorch-right-menu li"); 12 | var rightMenuHasLinks = rightMenuLinks.length > 1; 13 | 14 | if (!rightMenuHasLinks) { 15 | for (var i = 0; i < rightMenuLinks.length; i++) { 16 | rightMenuLinks[i].style.display = "none"; 17 | } 18 | } 19 | 20 | if (rightMenuHasLinks) { 21 | // Don't show the Shortcuts menu title text unless there are menu items 22 | document.getElementById("pytorch-shortcuts-wrapper").style.display = "block"; 23 | 24 | // We are hiding the titles of the pages in the right side menu but there are a few 25 | // pages that include other pages in the right side menu (see 'torch.nn' in the docs) 26 | // so if we exclude those it looks confusing. Here we add a 'title-link' class to these 27 | // links so we can exclude them from normal right side menu link operations 28 | var titleLinks = document.querySelectorAll( 29 | "#pytorch-right-menu #pytorch-side-scroll-right \ 30 | > ul > li > a.reference.internal" 31 | ); 32 | 33 | for (var i = 0; i < titleLinks.length; i++) { 34 | var link = titleLinks[i]; 35 | 36 | link.classList.add("title-link"); 37 | 38 | if ( 39 | link.nextElementSibling && 40 | link.nextElementSibling.tagName === "UL" && 41 | link.nextElementSibling.children.length > 0 42 | ) { 43 | link.classList.add("has-children"); 44 | } 45 | } 46 | 47 | // Add + expansion signifiers to normal right menu links that have sub menus 48 | var menuLinks = document.querySelectorAll( 49 | "#pytorch-right-menu ul li ul li a.reference.internal" 50 | ); 51 | 52 | for (var i = 0; i < menuLinks.length; i++) { 53 | if ( 54 | menuLinks[i].nextElementSibling && 55 | menuLinks[i].nextElementSibling.tagName === "UL" 56 | ) { 57 | menuLinks[i].classList.add("not-expanded"); 58 | } 59 | } 60 | 61 | // If a hash is present on page load recursively expand menu items leading to selected item 62 | var linkWithHash = 63 | document.querySelector( 64 | "#pytorch-right-menu a[href=\"" + window.location.hash + "\"]" 65 | ); 66 | 67 | if (linkWithHash) { 68 | // Expand immediate sibling list if present 69 | if ( 70 | linkWithHash.nextElementSibling && 71 | linkWithHash.nextElementSibling.tagName === "UL" && 72 | linkWithHash.nextElementSibling.children.length > 0 73 | ) { 74 | linkWithHash.nextElementSibling.style.display = "block"; 75 | linkWithHash.classList.add("expanded"); 76 | } 77 | 78 | // Expand ancestor lists if any 79 | sideMenus.expandClosestUnexpandedParentList(linkWithHash); 80 | } 81 | 82 | // Bind click events on right menu links 83 | $("#pytorch-right-menu a.reference.internal").on("click", function() { 84 | if (this.classList.contains("expanded")) { 85 | this.nextElementSibling.style.display = "none"; 86 | this.classList.remove("expanded"); 87 | this.classList.add("not-expanded"); 88 | } else if (this.classList.contains("not-expanded")) { 89 | this.nextElementSibling.style.display = "block"; 90 | this.classList.remove("not-expanded"); 91 | this.classList.add("expanded"); 92 | } 93 | }); 94 | 95 | sideMenus.handleRightMenu(); 96 | } 97 | 98 | $(window).on('resize scroll', function(e) { 99 | sideMenus.handleNavBar(); 100 | 101 | sideMenus.handleLeftMenu(); 102 | 103 | if (sideMenus.rightMenuIsOnScreen()) { 104 | sideMenus.handleRightMenu(); 105 | } 106 | }); 107 | }, 108 | 109 | leftMenuIsFixed: function() { 110 | return document.getElementById("pytorch-left-menu").classList.contains("make-fixed"); 111 | }, 112 | 113 | handleNavBar: function() { 114 | var mainHeaderHeight = document.getElementById('header-holder').offsetHeight; 115 | 116 | // If we are scrolled past the main navigation header fix the sub menu bar to top of page 117 | if (utilities.scrollTop() >= mainHeaderHeight) { 118 | document.getElementById("pytorch-left-menu").classList.add("make-fixed"); 119 | document.getElementById("pytorch-page-level-bar").classList.add("left-menu-is-fixed"); 120 | } else { 121 | document.getElementById("pytorch-left-menu").classList.remove("make-fixed"); 122 | document.getElementById("pytorch-page-level-bar").classList.remove("left-menu-is-fixed"); 123 | } 124 | }, 125 | 126 | expandClosestUnexpandedParentList: function (el) { 127 | var closestParentList = utilities.closest(el, "ul"); 128 | 129 | if (closestParentList) { 130 | var closestParentLink = closestParentList.previousElementSibling; 131 | var closestParentLinkExists = closestParentLink && 132 | closestParentLink.tagName === "A" && 133 | closestParentLink.classList.contains("reference"); 134 | 135 | if (closestParentLinkExists) { 136 | // Don't add expansion class to any title links 137 | if (closestParentLink.classList.contains("title-link")) { 138 | return; 139 | } 140 | 141 | closestParentList.style.display = "block"; 142 | closestParentLink.classList.remove("not-expanded"); 143 | closestParentLink.classList.add("expanded"); 144 | sideMenus.expandClosestUnexpandedParentList(closestParentLink); 145 | } 146 | } 147 | }, 148 | 149 | handleLeftMenu: function () { 150 | var windowHeight = utilities.windowHeight(); 151 | var topOfFooterRelativeToWindow = document.getElementById("docs-tutorials-resources").getBoundingClientRect().top; 152 | 153 | if (topOfFooterRelativeToWindow >= windowHeight) { 154 | document.getElementById("pytorch-left-menu").style.height = "100%"; 155 | } else { 156 | var howManyPixelsOfTheFooterAreInTheWindow = windowHeight - topOfFooterRelativeToWindow; 157 | var leftMenuDifference = howManyPixelsOfTheFooterAreInTheWindow; 158 | document.getElementById("pytorch-left-menu").style.height = (windowHeight - leftMenuDifference) + "px"; 159 | } 160 | }, 161 | 162 | handleRightMenu: function() { 163 | var rightMenuWrapper = document.getElementById("pytorch-content-right"); 164 | var rightMenu = document.getElementById("pytorch-right-menu"); 165 | var rightMenuList = rightMenu.getElementsByTagName("ul")[0]; 166 | var article = document.getElementById("pytorch-article"); 167 | var articleHeight = article.offsetHeight; 168 | var articleBottom = utilities.offset(article).top + articleHeight; 169 | var mainHeaderHeight = document.getElementById('header-holder').offsetHeight; 170 | 171 | if (utilities.scrollTop() < mainHeaderHeight) { 172 | rightMenuWrapper.style.height = "100%"; 173 | rightMenu.style.top = 0; 174 | rightMenu.classList.remove("scrolling-fixed"); 175 | rightMenu.classList.remove("scrolling-absolute"); 176 | } else { 177 | if (rightMenu.classList.contains("scrolling-fixed")) { 178 | var rightMenuBottom = 179 | utilities.offset(rightMenuList).top + rightMenuList.offsetHeight; 180 | 181 | if (rightMenuBottom >= articleBottom) { 182 | rightMenuWrapper.style.height = articleHeight + mainHeaderHeight + "px"; 183 | rightMenu.style.top = utilities.scrollTop() - mainHeaderHeight + "px"; 184 | rightMenu.classList.add("scrolling-absolute"); 185 | rightMenu.classList.remove("scrolling-fixed"); 186 | } 187 | } else { 188 | rightMenuWrapper.style.height = articleHeight + mainHeaderHeight + "px"; 189 | rightMenu.style.top = 190 | articleBottom - mainHeaderHeight - rightMenuList.offsetHeight + "px"; 191 | rightMenu.classList.add("scrolling-absolute"); 192 | } 193 | 194 | if (utilities.scrollTop() < articleBottom - rightMenuList.offsetHeight) { 195 | rightMenuWrapper.style.height = "100%"; 196 | rightMenu.style.top = ""; 197 | rightMenu.classList.remove("scrolling-absolute"); 198 | rightMenu.classList.add("scrolling-fixed"); 199 | } 200 | } 201 | 202 | var rightMenuSideScroll = document.getElementById("pytorch-side-scroll-right"); 203 | var sideScrollFromWindowTop = rightMenuSideScroll.getBoundingClientRect().top; 204 | 205 | rightMenuSideScroll.style.height = utilities.windowHeight() - sideScrollFromWindowTop + "px"; 206 | } 207 | }; 208 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pytorch_sphinx_theme", 3 | "version": "0.0.1", 4 | "private": true, 5 | "devDependencies": { 6 | "anchor-js": "^4.3.0", 7 | "autoprefixer": "^9.8.6", 8 | "bootstrap": "4.3.1", 9 | "browserify": "^13.0.0", 10 | "connect-livereload": "~0.6.0", 11 | "grunt": "~1.3.0", 12 | "grunt-banner": "^0.6.0", 13 | "grunt-browserify": "^5.0.0", 14 | "grunt-contrib-clean": "^1.0.0", 15 | "grunt-contrib-connect": "^1.0.2", 16 | "grunt-contrib-copy": "~1.0.0", 17 | "grunt-contrib-sass": "~1.0.0", 18 | "grunt-contrib-uglify": "~3.3.0", 19 | "grunt-contrib-watch": "~1.0.0", 20 | "grunt-exec": "~1.0.1", 21 | "grunt-open": "0.2.3", 22 | "grunt-postcss": "^0.9.0", 23 | "matchdep": "~1.0.1", 24 | "popper.js": "^1.14.3" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /pytorch_sphinx_theme.py: -------------------------------------------------------------------------------- 1 | from os import path 2 | package_dir = path.dirname(path.abspath(__file__)) 3 | template_path = path.join(package_dir) 4 | 5 | def get_path(): 6 | return template_path 7 | -------------------------------------------------------------------------------- /pytorch_sphinx_theme/__init__.py: -------------------------------------------------------------------------------- 1 | """Pytorch Sphinx theme. 2 | 3 | From https://github.com/shiftlab/pytorch_sphinx_theme. 4 | 5 | """ 6 | from os import path 7 | 8 | __version__ = '0.0.24' 9 | __version_full__ = __version__ 10 | 11 | 12 | def get_html_theme_path(): 13 | """Return list of HTML theme paths.""" 14 | cur_dir = path.abspath(path.dirname(path.dirname(__file__))) 15 | return cur_dir 16 | 17 | # See http://www.sphinx-doc.org/en/stable/theming.html#distribute-your-theme-as-a-python-package 18 | def setup(app): 19 | app.add_html_theme('pytorch_sphinx_theme', path.abspath(path.dirname(__file__))) 20 | -------------------------------------------------------------------------------- /pytorch_sphinx_theme/breadcrumbs.html: -------------------------------------------------------------------------------- 1 | {# Support for Sphinx 1.3+ page_source_suffix, but don't break old builds. #} 2 | 3 | {% if page_source_suffix %} 4 | {% set suffix = page_source_suffix %} 5 | {% else %} 6 | {% set suffix = source_suffix %} 7 | {% endif %} 8 | 9 | {% if meta is defined and meta is not none %} 10 | {% set check_meta = True %} 11 | {% else %} 12 | {% set check_meta = False %} 13 | {% endif %} 14 | 15 | {% if check_meta and 'github_url' in meta %} 16 | {% set display_github = True %} 17 | {% endif %} 18 | 19 | {% if check_meta and 'bitbucket_url' in meta %} 20 | {% set display_bitbucket = True %} 21 | {% endif %} 22 | 23 | {% if check_meta and 'gitlab_url' in meta %} 24 | {% set display_gitlab = True %} 25 | {% endif %} 26 | 27 |
28 | 29 |
    30 | {% block breadcrumbs %} 31 |
  • 32 | 33 | Docs 34 | > 35 |
  • 36 | 37 | {% for doc in parents %} 38 |
  • {{ doc.title }} >
  • 39 | {% endfor %} 40 |
  • {{ title }}
  • 41 | {% endblock %} 42 | {% block breadcrumbs_aside %} 43 |
  • 44 | {% if hasdoc(pagename) %} 45 | {% if github_version in ["main", "master"] %} 46 | {% set branch_name = "latest" %} 47 | {% else %} 48 | {% set branch_name = github_version %} 49 | {% endif %} 50 | {% if language == "en" %} 51 | {{ _('以中文阅读') }} 52 | {% else %} 53 | {{ _('Read in English') }} 54 | {% endif %} 55 | {% endif %} 56 |
  • 57 | {% if hasdoc(pagename) and display_github %} 58 |
  • 59 | {% if check_meta and 'github_url' in meta %} 60 | 61 | {{ _('Edit on GitHub') }} 62 | {% elif check_meta and 'github_page' in meta %} 63 | 64 | {{ _('Edit on GitHub') }} 65 | {% elif default_edit_on_github %} 66 | {{ _('Edit on GitHub') }} 67 | {% endif %} 68 |
  • 69 | {% endif %} 70 | {% endblock %} 71 |
72 | 73 | {% if (theme_prev_next_buttons_location == 'top' or theme_prev_next_buttons_location == 'both') and (next or prev) %} 74 | 82 | {% endif %} 83 |
84 | -------------------------------------------------------------------------------- /pytorch_sphinx_theme/fonts.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /pytorch_sphinx_theme/footer.html: -------------------------------------------------------------------------------- 1 |
2 | {% if (theme_prev_next_buttons_location == 'bottom' or theme_prev_next_buttons_location == 'both') and (next or prev) 3 | %} 4 | 16 | {% endif %} 17 | 18 |
19 | 20 |
21 |

22 | {%- if show_copyright %} 23 | {%- if hasdoc('copyright') %} 24 | {% trans path=pathto('copyright'), copyright=copyright|e %}© Copyright {{ copyright 25 | }}.{% endtrans %} 26 | {%- else %} 27 | {% trans copyright=copyright|e %}© Copyright {{ copyright }}.{% endtrans %} 28 | {%- endif %} 29 | {%- endif %} 30 | 31 | {%- if build_id and build_url %} 32 | {% trans build_url=build_url, build_id=build_id %} 33 | 34 | Build 35 | {{ build_id }}. 36 | 37 | {% endtrans %} 38 | {%- elif commit %} 39 | {% trans commit=commit %} 40 | 41 | Revision {{ commit }}. 42 | 43 | {% endtrans %} 44 | {%- elif last_updated %} 45 | {% trans last_updated=last_updated|e %}Last updated on {{ last_updated }}.{% endtrans %} 46 | {%- endif %} 47 | 48 |

49 |
50 | 51 | {%- if show_sphinx %} 52 | {% trans %} 53 |
54 | Built with Sphinx using a theme provided by Read the 56 | Docs. 57 |
58 | {% endtrans %} 59 | {%- endif %} 60 | 61 | {%- block extrafooter %} {% endblock %} 62 | 63 |
-------------------------------------------------------------------------------- /pytorch_sphinx_theme/mathjax_config.html: -------------------------------------------------------------------------------- 1 | 13 | -------------------------------------------------------------------------------- /pytorch_sphinx_theme/search.html: -------------------------------------------------------------------------------- 1 | {# 2 | basic/search.html 3 | ~~~~~~~~~~~~~~~~~ 4 | 5 | Template for the search page. 6 | 7 | :copyright: Copyright 2007-2013 by the Sphinx team, see AUTHORS. 8 | :license: BSD, see LICENSE for details. 9 | #} 10 | {%- extends "layout.html" %} 11 | {% set title = _('Search') %} 12 | {% set script_files = script_files + ['_static/searchtools.js'] %} 13 | {% set script_files = script_files + ['_static/language_data.js'] %} 14 | {% block footer %} 15 | 16 | {{ super() }} 17 | {% endblock %} 18 | {% block body %} 19 | 27 | 28 | {% if search_performed %} 29 |

{{ _('Search Results') }}

30 | {% if not search_results %} 31 |

{{ _('Your search did not match any documents. Please make sure that all words are spelled correctly and that you\'ve selected enough categories.') }}

32 | {% endif %} 33 | {% endif %} 34 |
35 | {% if search_results %} 36 |
    37 | {% for href, caption, context in search_results %} 38 |
  • 39 | {{ caption }} 40 |

    {{ context|e }}

    41 |
  • 42 | {% endfor %} 43 |
44 | {% endif %} 45 |
46 | {% endblock %} 47 | -------------------------------------------------------------------------------- /pytorch_sphinx_theme/searchbox.html: -------------------------------------------------------------------------------- 1 | {%- if builder != 'singlehtml' %} 2 | 3 | {% set search_project = 'Docs' %} 4 | 5 |
6 |
7 | 8 | 9 | 10 |
11 |
12 | {%- endif %} -------------------------------------------------------------------------------- /pytorch_sphinx_theme/static/fonts/FreightSans/freight-sans-bold-italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-mmlab/pytorch_sphinx_theme/cf1aa23d2621c6ebe7f5c0b8e7ecd23a82300f3b/pytorch_sphinx_theme/static/fonts/FreightSans/freight-sans-bold-italic.woff -------------------------------------------------------------------------------- /pytorch_sphinx_theme/static/fonts/FreightSans/freight-sans-bold-italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-mmlab/pytorch_sphinx_theme/cf1aa23d2621c6ebe7f5c0b8e7ecd23a82300f3b/pytorch_sphinx_theme/static/fonts/FreightSans/freight-sans-bold-italic.woff2 -------------------------------------------------------------------------------- /pytorch_sphinx_theme/static/fonts/FreightSans/freight-sans-bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-mmlab/pytorch_sphinx_theme/cf1aa23d2621c6ebe7f5c0b8e7ecd23a82300f3b/pytorch_sphinx_theme/static/fonts/FreightSans/freight-sans-bold.woff -------------------------------------------------------------------------------- /pytorch_sphinx_theme/static/fonts/FreightSans/freight-sans-bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-mmlab/pytorch_sphinx_theme/cf1aa23d2621c6ebe7f5c0b8e7ecd23a82300f3b/pytorch_sphinx_theme/static/fonts/FreightSans/freight-sans-bold.woff2 -------------------------------------------------------------------------------- /pytorch_sphinx_theme/static/fonts/FreightSans/freight-sans-book-italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-mmlab/pytorch_sphinx_theme/cf1aa23d2621c6ebe7f5c0b8e7ecd23a82300f3b/pytorch_sphinx_theme/static/fonts/FreightSans/freight-sans-book-italic.woff -------------------------------------------------------------------------------- /pytorch_sphinx_theme/static/fonts/FreightSans/freight-sans-book-italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-mmlab/pytorch_sphinx_theme/cf1aa23d2621c6ebe7f5c0b8e7ecd23a82300f3b/pytorch_sphinx_theme/static/fonts/FreightSans/freight-sans-book-italic.woff2 -------------------------------------------------------------------------------- /pytorch_sphinx_theme/static/fonts/FreightSans/freight-sans-book.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-mmlab/pytorch_sphinx_theme/cf1aa23d2621c6ebe7f5c0b8e7ecd23a82300f3b/pytorch_sphinx_theme/static/fonts/FreightSans/freight-sans-book.woff -------------------------------------------------------------------------------- /pytorch_sphinx_theme/static/fonts/FreightSans/freight-sans-book.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-mmlab/pytorch_sphinx_theme/cf1aa23d2621c6ebe7f5c0b8e7ecd23a82300f3b/pytorch_sphinx_theme/static/fonts/FreightSans/freight-sans-book.woff2 -------------------------------------------------------------------------------- /pytorch_sphinx_theme/static/fonts/FreightSans/freight-sans-light-italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-mmlab/pytorch_sphinx_theme/cf1aa23d2621c6ebe7f5c0b8e7ecd23a82300f3b/pytorch_sphinx_theme/static/fonts/FreightSans/freight-sans-light-italic.woff -------------------------------------------------------------------------------- /pytorch_sphinx_theme/static/fonts/FreightSans/freight-sans-light-italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-mmlab/pytorch_sphinx_theme/cf1aa23d2621c6ebe7f5c0b8e7ecd23a82300f3b/pytorch_sphinx_theme/static/fonts/FreightSans/freight-sans-light-italic.woff2 -------------------------------------------------------------------------------- /pytorch_sphinx_theme/static/fonts/FreightSans/freight-sans-light.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-mmlab/pytorch_sphinx_theme/cf1aa23d2621c6ebe7f5c0b8e7ecd23a82300f3b/pytorch_sphinx_theme/static/fonts/FreightSans/freight-sans-light.woff -------------------------------------------------------------------------------- /pytorch_sphinx_theme/static/fonts/FreightSans/freight-sans-light.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-mmlab/pytorch_sphinx_theme/cf1aa23d2621c6ebe7f5c0b8e7ecd23a82300f3b/pytorch_sphinx_theme/static/fonts/FreightSans/freight-sans-light.woff2 -------------------------------------------------------------------------------- /pytorch_sphinx_theme/static/fonts/FreightSans/freight-sans-medium-italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-mmlab/pytorch_sphinx_theme/cf1aa23d2621c6ebe7f5c0b8e7ecd23a82300f3b/pytorch_sphinx_theme/static/fonts/FreightSans/freight-sans-medium-italic.woff -------------------------------------------------------------------------------- /pytorch_sphinx_theme/static/fonts/FreightSans/freight-sans-medium-italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-mmlab/pytorch_sphinx_theme/cf1aa23d2621c6ebe7f5c0b8e7ecd23a82300f3b/pytorch_sphinx_theme/static/fonts/FreightSans/freight-sans-medium-italic.woff2 -------------------------------------------------------------------------------- /pytorch_sphinx_theme/static/fonts/FreightSans/freight-sans-medium.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-mmlab/pytorch_sphinx_theme/cf1aa23d2621c6ebe7f5c0b8e7ecd23a82300f3b/pytorch_sphinx_theme/static/fonts/FreightSans/freight-sans-medium.woff -------------------------------------------------------------------------------- /pytorch_sphinx_theme/static/fonts/FreightSans/freight-sans-medium.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-mmlab/pytorch_sphinx_theme/cf1aa23d2621c6ebe7f5c0b8e7ecd23a82300f3b/pytorch_sphinx_theme/static/fonts/FreightSans/freight-sans-medium.woff2 -------------------------------------------------------------------------------- /pytorch_sphinx_theme/static/fonts/IBMPlexMono/IBMPlexMono-Light.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-mmlab/pytorch_sphinx_theme/cf1aa23d2621c6ebe7f5c0b8e7ecd23a82300f3b/pytorch_sphinx_theme/static/fonts/IBMPlexMono/IBMPlexMono-Light.woff -------------------------------------------------------------------------------- /pytorch_sphinx_theme/static/fonts/IBMPlexMono/IBMPlexMono-Light.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-mmlab/pytorch_sphinx_theme/cf1aa23d2621c6ebe7f5c0b8e7ecd23a82300f3b/pytorch_sphinx_theme/static/fonts/IBMPlexMono/IBMPlexMono-Light.woff2 -------------------------------------------------------------------------------- /pytorch_sphinx_theme/static/fonts/IBMPlexMono/IBMPlexMono-Medium.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-mmlab/pytorch_sphinx_theme/cf1aa23d2621c6ebe7f5c0b8e7ecd23a82300f3b/pytorch_sphinx_theme/static/fonts/IBMPlexMono/IBMPlexMono-Medium.woff -------------------------------------------------------------------------------- /pytorch_sphinx_theme/static/fonts/IBMPlexMono/IBMPlexMono-Medium.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-mmlab/pytorch_sphinx_theme/cf1aa23d2621c6ebe7f5c0b8e7ecd23a82300f3b/pytorch_sphinx_theme/static/fonts/IBMPlexMono/IBMPlexMono-Medium.woff2 -------------------------------------------------------------------------------- /pytorch_sphinx_theme/static/fonts/IBMPlexMono/IBMPlexMono-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-mmlab/pytorch_sphinx_theme/cf1aa23d2621c6ebe7f5c0b8e7ecd23a82300f3b/pytorch_sphinx_theme/static/fonts/IBMPlexMono/IBMPlexMono-Regular.woff -------------------------------------------------------------------------------- /pytorch_sphinx_theme/static/fonts/IBMPlexMono/IBMPlexMono-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-mmlab/pytorch_sphinx_theme/cf1aa23d2621c6ebe7f5c0b8e7ecd23a82300f3b/pytorch_sphinx_theme/static/fonts/IBMPlexMono/IBMPlexMono-Regular.woff2 -------------------------------------------------------------------------------- /pytorch_sphinx_theme/static/fonts/IBMPlexMono/IBMPlexMono-SemiBold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-mmlab/pytorch_sphinx_theme/cf1aa23d2621c6ebe7f5c0b8e7ecd23a82300f3b/pytorch_sphinx_theme/static/fonts/IBMPlexMono/IBMPlexMono-SemiBold.woff -------------------------------------------------------------------------------- /pytorch_sphinx_theme/static/fonts/IBMPlexMono/IBMPlexMono-SemiBold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-mmlab/pytorch_sphinx_theme/cf1aa23d2621c6ebe7f5c0b8e7ecd23a82300f3b/pytorch_sphinx_theme/static/fonts/IBMPlexMono/IBMPlexMono-SemiBold.woff2 -------------------------------------------------------------------------------- /pytorch_sphinx_theme/static/images/arrow-down-blue.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Group 5 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /pytorch_sphinx_theme/static/images/arrow-right-with-tail.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Page 1 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /pytorch_sphinx_theme/static/images/chevron-down-black.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | Created with Sketch. 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /pytorch_sphinx_theme/static/images/chevron-down-blue.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | Created with Sketch. 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /pytorch_sphinx_theme/static/images/chevron-down-grey.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | Created with Sketch. 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /pytorch_sphinx_theme/static/images/chevron-down-white.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | Created with Sketch. 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /pytorch_sphinx_theme/static/images/chevron-right-blue.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | Page 1 7 | Created with Sketch. 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /pytorch_sphinx_theme/static/images/chevron-right-white.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | Page 1 7 | Created with Sketch. 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /pytorch_sphinx_theme/static/images/home-footer-background.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-mmlab/pytorch_sphinx_theme/cf1aa23d2621c6ebe7f5c0b8e7ecd23a82300f3b/pytorch_sphinx_theme/static/images/home-footer-background.jpg -------------------------------------------------------------------------------- /pytorch_sphinx_theme/static/images/icon-close.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Page 1 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /pytorch_sphinx_theme/static/images/icon-menu-dots-dark.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Page 1 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /pytorch_sphinx_theme/static/images/logo-dark.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 9 | 10 | 11 | 12 | 13 | 15 | 17 | 18 | 21 | 23 | 26 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /pytorch_sphinx_theme/static/images/logo-facebook-dark.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 8 | 9 | -------------------------------------------------------------------------------- /pytorch_sphinx_theme/static/images/logo-icon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /pytorch_sphinx_theme/static/images/logo-twitter-dark.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 9 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /pytorch_sphinx_theme/static/images/logo-youtube-dark.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /pytorch_sphinx_theme/static/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-mmlab/pytorch_sphinx_theme/cf1aa23d2621c6ebe7f5c0b8e7ecd23a82300f3b/pytorch_sphinx_theme/static/images/logo.png -------------------------------------------------------------------------------- /pytorch_sphinx_theme/static/images/logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 9 | 10 | 11 | 12 | 13 | 16 | 18 | 19 | 22 | 24 | 27 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /pytorch_sphinx_theme/static/images/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-mmlab/pytorch_sphinx_theme/cf1aa23d2621c6ebe7f5c0b8e7ecd23a82300f3b/pytorch_sphinx_theme/static/images/logo192.png -------------------------------------------------------------------------------- /pytorch_sphinx_theme/static/images/pytorch-colab.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 9 | 10 | 13 | 15 | 17 | 20 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /pytorch_sphinx_theme/static/images/pytorch-download.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 8 | 10 | 11 | -------------------------------------------------------------------------------- /pytorch_sphinx_theme/static/images/pytorch-github.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 8 | 15 | 16 | -------------------------------------------------------------------------------- /pytorch_sphinx_theme/static/images/pytorch-x.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /pytorch_sphinx_theme/static/images/search-icon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Created with Sketch. 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /pytorch_sphinx_theme/static/images/view-page-source-icon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /pytorch_sphinx_theme/static/js/vendor/anchor.min.js: -------------------------------------------------------------------------------- 1 | // @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt Expat 2 | // 3 | // AnchorJS - v4.3.0 - 2020-10-21 4 | // https://www.bryanbraun.com/anchorjs/ 5 | // Copyright (c) 2020 Bryan Braun; Licensed MIT 6 | // 7 | // @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt Expat 8 | !function(A,e){"use strict";"function"==typeof define&&define.amd?define([],e):"object"==typeof module&&module.exports?module.exports=e():(A.AnchorJS=e(),A.anchors=new A.AnchorJS)}(this,function(){"use strict";return function(A){function d(A){A.icon=Object.prototype.hasOwnProperty.call(A,"icon")?A.icon:"",A.visible=Object.prototype.hasOwnProperty.call(A,"visible")?A.visible:"hover",A.placement=Object.prototype.hasOwnProperty.call(A,"placement")?A.placement:"right",A.ariaLabel=Object.prototype.hasOwnProperty.call(A,"ariaLabel")?A.ariaLabel:"Anchor",A.class=Object.prototype.hasOwnProperty.call(A,"class")?A.class:"",A.base=Object.prototype.hasOwnProperty.call(A,"base")?A.base:"",A.truncate=Object.prototype.hasOwnProperty.call(A,"truncate")?Math.floor(A.truncate):64,A.titleText=Object.prototype.hasOwnProperty.call(A,"titleText")?A.titleText:""}function f(A){var e;if("string"==typeof A||A instanceof String)e=[].slice.call(document.querySelectorAll(A));else{if(!(Array.isArray(A)||A instanceof NodeList))throw new TypeError("The selector provided to AnchorJS was invalid.");e=[].slice.call(A)}return e}this.options=A||{},this.elements=[],d(this.options),this.isTouchDevice=function(){return Boolean("ontouchstart"in window||window.TouchEvent||window.DocumentTouch&&document instanceof DocumentTouch)},this.add=function(A){var e,t,o,n,i,s,a,r,c,l,h,u,p=[];if(d(this.options),"touch"===(h=this.options.visible)&&(h=this.isTouchDevice()?"always":"hover"),0===(e=f(A=A||"h2, h3, h4, h5, h6")).length)return this;for(!function(){if(null!==document.head.querySelector("style.anchorjs"))return;var A,e=document.createElement("style");e.className="anchorjs",e.appendChild(document.createTextNode("")),void 0===(A=document.head.querySelector('[rel="stylesheet"],style'))?document.head.appendChild(e):document.head.insertBefore(e,A);e.sheet.insertRule(".anchorjs-link{opacity:0;text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}",e.sheet.cssRules.length),e.sheet.insertRule(":hover>.anchorjs-link,.anchorjs-link:focus{opacity:1}",e.sheet.cssRules.length),e.sheet.insertRule("[data-anchorjs-icon]::after{content:attr(data-anchorjs-icon)}",e.sheet.cssRules.length),e.sheet.insertRule('@font-face{font-family:anchorjs-icons;src:url(data:n/a;base64,AAEAAAALAIAAAwAwT1MvMg8yG2cAAAE4AAAAYGNtYXDp3gC3AAABpAAAAExnYXNwAAAAEAAAA9wAAAAIZ2x5ZlQCcfwAAAH4AAABCGhlYWQHFvHyAAAAvAAAADZoaGVhBnACFwAAAPQAAAAkaG10eASAADEAAAGYAAAADGxvY2EACACEAAAB8AAAAAhtYXhwAAYAVwAAARgAAAAgbmFtZQGOH9cAAAMAAAAAunBvc3QAAwAAAAADvAAAACAAAQAAAAEAAHzE2p9fDzz1AAkEAAAAAADRecUWAAAAANQA6R8AAAAAAoACwAAAAAgAAgAAAAAAAAABAAADwP/AAAACgAAA/9MCrQABAAAAAAAAAAAAAAAAAAAAAwABAAAAAwBVAAIAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAMCQAGQAAUAAAKZAswAAACPApkCzAAAAesAMwEJAAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAAAAAAAAAAAAAQAAg//0DwP/AAEADwABAAAAAAQAAAAAAAAAAAAAAIAAAAAAAAAIAAAACgAAxAAAAAwAAAAMAAAAcAAEAAwAAABwAAwABAAAAHAAEADAAAAAIAAgAAgAAACDpy//9//8AAAAg6cv//f///+EWNwADAAEAAAAAAAAAAAAAAAAACACEAAEAAAAAAAAAAAAAAAAxAAACAAQARAKAAsAAKwBUAAABIiYnJjQ3NzY2MzIWFxYUBwcGIicmNDc3NjQnJiYjIgYHBwYUFxYUBwYGIwciJicmNDc3NjIXFhQHBwYUFxYWMzI2Nzc2NCcmNDc2MhcWFAcHBgYjARQGDAUtLXoWOR8fORYtLTgKGwoKCjgaGg0gEhIgDXoaGgkJBQwHdR85Fi0tOAobCgoKOBoaDSASEiANehoaCQkKGwotLXoWOR8BMwUFLYEuehYXFxYugC44CQkKGwo4GkoaDQ0NDXoaShoKGwoFBe8XFi6ALjgJCQobCjgaShoNDQ0NehpKGgobCgoKLYEuehYXAAAADACWAAEAAAAAAAEACAAAAAEAAAAAAAIAAwAIAAEAAAAAAAMACAAAAAEAAAAAAAQACAAAAAEAAAAAAAUAAQALAAEAAAAAAAYACAAAAAMAAQQJAAEAEAAMAAMAAQQJAAIABgAcAAMAAQQJAAMAEAAMAAMAAQQJAAQAEAAMAAMAAQQJAAUAAgAiAAMAAQQJAAYAEAAMYW5jaG9yanM0MDBAAGEAbgBjAGgAbwByAGoAcwA0ADAAMABAAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAH//wAP) format("truetype")}',e.sheet.cssRules.length)}(),t=document.querySelectorAll("[id]"),o=[].map.call(t,function(A){return A.id}),i=0;i\]./()*\\\n\t\b\v\u00A0]/g,"-").replace(/-{2,}/g,"-").substring(0,this.options.truncate).replace(/^-+|-+$/gm,"").toLowerCase()},this.hasAnchorJSLink=function(A){var e=A.firstChild&&-1<(" "+A.firstChild.className+" ").indexOf(" anchorjs-link "),t=A.lastChild&&-1<(" "+A.lastChild.className+" ").indexOf(" anchorjs-link ");return e||t||!1}}}); 9 | // @license-end -------------------------------------------------------------------------------- /pytorch_sphinx_theme/theme.conf: -------------------------------------------------------------------------------- 1 | [theme] 2 | inherit = basic 3 | stylesheet = css/theme.css 4 | pygments_style = default 5 | 6 | [options] 7 | canonical_url = 8 | analytics_id = 9 | collapse_navigation = True 10 | sticky_navigation = True 11 | navigation_depth = 4 12 | includehidden = True 13 | titles_only = 14 | logo_only = 15 | display_version = True 16 | prev_next_buttons_location = bottom 17 | style_external_links = False 18 | menu = 19 | menu_lang = 20 | logo_url = 21 | header_note = 22 | default_edit_on_github = True 23 | -------------------------------------------------------------------------------- /pytorch_sphinx_theme/theme_variables.jinja: -------------------------------------------------------------------------------- 1 | {%- set shared_menu_en = [ 2 | { 3 | 'name': 4 | 'Docs', 5 | 'children': [ 6 | { 7 | 'name': 'MMEngine', 8 | 'url': 'https://mmengine.readthedocs.io/en/latest/', 9 | }, 10 | { 11 | 'name': 'MMCV', 12 | 'url': 'https://mmcv.readthedocs.io/en/latest/', 13 | }, 14 | { 15 | 'name': 'MMEval', 16 | 'url': 'https://mmeval.readthedocs.io/en/latest/', 17 | }, 18 | { 19 | 'name': 'MIM', 20 | 'url': 'https://openmim.readthedocs.io/en/latest/', 21 | }, 22 | { 23 | 'name': 'MMAction2', 24 | 'url': 'https://mmaction2.readthedocs.io/en/latest/', 25 | }, 26 | { 27 | 'name': 'MMPreTrain', 28 | 'url': 29 | 'https://mmpretrain.readthedocs.io/en/latest/', 30 | }, 31 | { 32 | 'name': 'MMDetection', 33 | 'url': 'https://mmdetection.readthedocs.io/en/latest/', 34 | }, 35 | { 36 | 'name': 'MMDetection3D', 37 | 'url': 'https://mmdetection3d.readthedocs.io/en/latest/', 38 | }, 39 | { 40 | 'name': 'MMagic', 41 | 'url': 'https://mmagic.readthedocs.io/en/latest/', 42 | }, 43 | { 44 | 'name': 'MMOCR', 45 | 'url': 'https://mmocr.readthedocs.io/en/latest/', 46 | }, 47 | { 48 | 'name': 'MMPose', 49 | 'url': 'https://mmpose.readthedocs.io/en/latest/', 50 | }, 51 | { 52 | 'name': 'MMSegmentation', 53 | 'url': 'https://mmsegmentation.readthedocs.io/en/latest/', 54 | }, 55 | { 56 | 'name': 'MMTracking', 57 | 'url': 'https://mmtracking.readthedocs.io/en/latest/', 58 | }, 59 | { 60 | 'name': 'MMFlow', 61 | 'url': 'https://mmflow.readthedocs.io/en/latest/', 62 | }, 63 | { 64 | 'name': 'MMFewShot', 65 | 'url': 'https://mmfewshot.readthedocs.io/en/latest/', 66 | }, 67 | { 68 | 'name': 'MMHuman3D', 69 | 'url': 'https://mmhuman3d.readthedocs.io/en/latest/', 70 | }, 71 | { 72 | 'name': 'MMRazor', 73 | 'url': 'https://mmrazor.readthedocs.io/en/latest/', 74 | }, 75 | { 76 | 'name': 'MMDeploy', 77 | 'url': 'https://mmdeploy.readthedocs.io/en/latest/', 78 | }, 79 | { 80 | 'name': 'MMRotate', 81 | 'url': 'https://mmrotate.readthedocs.io/en/latest/', 82 | }, 83 | { 84 | 'name': 'MMYOLO', 85 | 'url': 'https://mmyolo.readthedocs.io/en/latest/', 86 | }, 87 | ] 88 | }, 89 | { 90 | 'name': 91 | 'OpenMMLab', 92 | 'children': [ 93 | { 94 | 'name': 'Homepage', 95 | 'url': 'https://openmmlab.com/' 96 | }, 97 | { 98 | 'name': 'Open Platform', 99 | 'url': 'https://platform.openmmlab.com/' 100 | }, 101 | { 102 | 'name': 'GitHub', 103 | 'url': 'https://github.com/open-mmlab/' 104 | }, 105 | { 106 | 'name': 'Twitter', 107 | 'url': 'https://twitter.com/OpenMMLab' 108 | }, 109 | { 110 | 'name': 'Zhihu', 111 | 'url': 'https://zhihu.com/people/openmmlab' 112 | }, 113 | ] 114 | }, 115 | ] 116 | -%} 117 | 118 | {%- set shared_menu_cn = [ 119 | { 120 | 'name': 121 | '文档', 122 | 'children': [ 123 | { 124 | 'name': 'MMEngine', 125 | 'url': 'https://mmengine.readthedocs.io/zh_CN/latest/', 126 | }, 127 | { 128 | 'name': 'MMCV', 129 | 'url': 'https://mmcv.readthedocs.io/zh_CN/latest/', 130 | }, 131 | { 132 | 'name': 'MMEval', 133 | 'url': 'https://mmeval.readthedocs.io/zh_CN/latest/', 134 | }, 135 | { 136 | 'name': 'MIM', 137 | 'url': 'https://openmim.readthedocs.io/en/latest/' 138 | }, 139 | { 140 | 'name': 'MMAction2', 141 | 'url': 'https://mmaction2.readthedocs.io/zh_CN/latest/', 142 | }, 143 | { 144 | 'name': 'MMPreTrain', 145 | 'url': 146 | 'https://mmpretrain.readthedocs.io/zh_CN/latest/', 147 | }, 148 | { 149 | 'name': 'MMDetection', 150 | 'url': 'https://mmdetection.readthedocs.io/zh_CN/latest/', 151 | }, 152 | { 153 | 'name': 'MMDetection3D', 154 | 'url': 155 | 'https://mmdetection3d.readthedocs.io/zh_CN/latest/', 156 | }, 157 | { 158 | 'name': 'MMagic', 159 | 'url': 'https://mmagic.readthedocs.io/zh_CN/latest/', 160 | }, 161 | { 162 | 'name': 'MMOCR', 163 | 'url': 'https://mmocr.readthedocs.io/zh_CN/latest/', 164 | }, 165 | { 166 | 'name': 'MMPose', 167 | 'url': 'https://mmpose.readthedocs.io/zh_CN/latest/', 168 | }, 169 | { 170 | 'name': 'MMSegmentation', 171 | 'url': 172 | 'https://mmsegmentation.readthedocs.io/zh_CN/latest/', 173 | }, 174 | { 175 | 'name': 'MMTracking', 176 | 'url': 'https://mmtracking.readthedocs.io/zh_CN/latest/', 177 | }, 178 | { 179 | 'name': 'MMFlow', 180 | 'url': 'https://mmflow.readthedocs.io/en/latest/', 181 | }, 182 | { 183 | 'name': 'MMFewShot', 184 | 'url': 'https://mmfewshot.readthedocs.io/zh_CN/latest/', 185 | }, 186 | { 187 | 'name': 'MMHuman3D', 188 | 'url': 'https://mmhuman3d.readthedocs.io/en/latest/', 189 | }, 190 | { 191 | 'name': 'MMRazor', 192 | 'url': 'https://mmrazor.readthedocs.io/en/latest/', 193 | }, 194 | { 195 | 'name': 'MMDeploy', 196 | 'url': 'https://mmdeploy.readthedocs.io/zh_CN/latest/', 197 | }, 198 | { 199 | 'name': 'MMRotate', 200 | 'url': 'https://mmrotate.readthedocs.io/zh_CN/latest/', 201 | }, 202 | { 203 | 'name': 'MMYOLO', 204 | 'url': 'https://mmyolo.readthedocs.io/zh_CN/latest/', 205 | }, 206 | ] 207 | }, 208 | { 209 | 'name': 210 | 'OpenMMLab', 211 | 'children': [ 212 | { 213 | 'name': '官网', 214 | 'url': 'https://openmmlab.com/' 215 | }, 216 | { 217 | 'name': '开放平台', 218 | 'url': 'https://platform.openmmlab.com/' 219 | }, 220 | { 221 | 'name': 'GitHub', 222 | 'url': 'https://github.com/open-mmlab/' 223 | }, 224 | { 225 | 'name': '推特', 226 | 'url': 'https://twitter.com/OpenMMLab' 227 | }, 228 | { 229 | 'name': '知乎', 230 | 'url': 'https://zhihu.com/people/openmmlab' 231 | }, 232 | ] 233 | }, 234 | ] 235 | -%} 236 | 237 | {%- set lang_menu_mapping = {'default': shared_menu_en, 'cn': shared_menu_cn, 'en': shared_menu_en} -%} 238 | -------------------------------------------------------------------------------- /pytorch_sphinx_theme/versions.html: -------------------------------------------------------------------------------- 1 | {% if READTHEDOCS %} 2 | {# Add rst-badge after rst-versions for small badge style. #} 3 |
4 | 5 | Read the Docs 6 | v: {{ current_version }} 7 | 8 | 9 |
10 |
11 |
{{ _('Versions') }}
12 | {% for slug, url in versions %} 13 |
{{ slug }}
14 | {% endfor %} 15 |
16 |
17 |
{{ _('Downloads') }}
18 | {% for type, url in downloads %} 19 |
{{ type }}
20 | {% endfor %} 21 |
22 |
23 |
{{ _('On Read the Docs') }}
24 |
25 | {{ _('Project Home') }} 26 |
27 |
28 | {{ _('Builds') }} 29 |
30 |
31 |
32 | {% trans %}Free document hosting provided by Read the Docs.{% endtrans %} 33 | 34 |
35 |
36 | {% endif %} 37 | 38 | -------------------------------------------------------------------------------- /scss/shared/_article.scss: -------------------------------------------------------------------------------- 1 | article.pytorch-article { 2 | max-width: 920px; 3 | margin: 0 auto; 4 | 5 | h2, 6 | h3, 7 | h4, 8 | h5, 9 | h6 { 10 | margin: rem(22px) 0; 11 | color: $not_quite_black; 12 | } 13 | 14 | h2 { 15 | font-size: rem(26px); 16 | letter-spacing: 1.33px; 17 | line-height: rem(32px); 18 | text-transform: none; 19 | } 20 | 21 | h3 { 22 | font-size: rem(24px); 23 | letter-spacing: -0.25px; 24 | line-height: rem(30px); 25 | text-transform: none; 26 | } 27 | 28 | h4, 29 | h5, 30 | h6 { 31 | font-size: rem(18px); 32 | letter-spacing: -0.19px; 33 | line-height: rem(30px); 34 | } 35 | 36 | p { 37 | margin-bottom: rem(18px); 38 | } 39 | 40 | p, 41 | ul li, 42 | ol li, 43 | dl dt, 44 | dl dd, 45 | blockquote { 46 | font-size: rem(16px); 47 | line-height: rem(22px); 48 | color: $slate; 49 | letter-spacing: 0.01px; 50 | font-weight: 500; 51 | } 52 | 53 | table { 54 | margin-bottom: rem(40px); 55 | width: 100%; 56 | } 57 | 58 | table thead { 59 | border-bottom: 1px solid #cacaca; 60 | } 61 | 62 | table th { 63 | padding: rem(10px); 64 | color: $not_quite_black; 65 | } 66 | 67 | 68 | table td { 69 | padding: rem(5px); 70 | } 71 | 72 | table tr th:first-of-type, 73 | table tr td:first-of-type { 74 | padding-left: 0; 75 | } 76 | 77 | table.docutils.field-list { 78 | th.field-name { 79 | padding: rem(5px); 80 | padding-left: 0; 81 | } 82 | 83 | td.field-body { 84 | padding: rem(5px); 85 | p:last-of-type { 86 | margin-bottom: 0; 87 | } 88 | } 89 | } 90 | 91 | ul, 92 | ol{ 93 | margin: rem(24px) 0 rem(50px) 0; 94 | 95 | @include desktop { 96 | padding-left: rem(100px); 97 | } 98 | 99 | li { 100 | margin-bottom: rem(10px); 101 | } 102 | } 103 | 104 | dl { 105 | margin-bottom: rem(24px); 106 | } 107 | 108 | dl dt { 109 | margin-bottom: rem(12px); 110 | } 111 | 112 | pre { 113 | margin-bottom: rem(40px); 114 | } 115 | 116 | hr { 117 | margin-top: rem(75px); 118 | margin-bottom: rem(75px); 119 | } 120 | 121 | blockquote { 122 | margin: 0 auto; 123 | margin-bottom: rem(40px); 124 | width: 65%; 125 | } 126 | 127 | img { 128 | width: 100%; 129 | } 130 | } 131 | -------------------------------------------------------------------------------- /scss/shared/_base_styles.scss: -------------------------------------------------------------------------------- 1 | html { 2 | position: relative; 3 | min-height: 100%; 4 | font-size: 12px; 5 | 6 | @include desktop { 7 | font-size: 16px; 8 | } 9 | } 10 | 11 | * { 12 | box-sizing: border-box; 13 | } 14 | 15 | body { 16 | font-family: FreightSans, Helvetica Neue, Helvetica, Arial, sans-serif; 17 | } 18 | 19 | a:link, 20 | a:visited, 21 | a:hover { 22 | text-decoration: none; 23 | color: $orange; 24 | } 25 | 26 | a, .btn { 27 | &.with-right-arrow { 28 | padding-right: rem(22px); 29 | position: relative; 30 | background-image: url("../images/chevron-right-blue.svg"); 31 | background-size: 6px 13px; 32 | background-position: center right 5px; 33 | background-repeat: no-repeat; 34 | @include desktop { 35 | background-size: 8px 14px; 36 | background-position: center right 12px; 37 | padding-right: rem(32px); 38 | } 39 | } 40 | } 41 | 42 | ::-webkit-input-placeholder { 43 | color: $orange; 44 | } 45 | 46 | ::-moz-placeholder { 47 | color: $orange; 48 | } 49 | 50 | :-ms-input-placeholder { 51 | color: $orange; 52 | } 53 | 54 | :-moz-placeholder { 55 | color: $orange; 56 | } 57 | 58 | .email-subscribe-form { 59 | input.email { 60 | color: $orange; 61 | border: none; 62 | border-bottom: 1px solid #939393; 63 | width: 100%; 64 | background-color: transparent; 65 | outline: none; 66 | font-size: 1.125rem; 67 | letter-spacing: 0.25px; 68 | line-height: 2.25rem; 69 | } 70 | 71 | input[type="submit"] { 72 | position: absolute; 73 | right: 0; 74 | top: 10px; 75 | height: 15px; 76 | width: 15px; 77 | background-image: url("../images/arrow-right-with-tail.svg"); 78 | background-color: transparent; 79 | background-repeat: no-repeat; 80 | background-size: 15px 15px; 81 | background-position: center center; 82 | -webkit-appearance: none; 83 | -moz-appearance: none; 84 | appearance: none; 85 | border: 0; 86 | } 87 | } 88 | 89 | .email-subscribe-form-fields-wrapper { 90 | position: relative; 91 | } 92 | 93 | .anchorjs-link { 94 | color: $quick_start_grey !important; 95 | @include desktop { 96 | &:hover { 97 | color: inherit; 98 | text-decoration: none !important; 99 | } 100 | } 101 | } 102 | 103 | .pytorch-article #table-of-contents { 104 | display: none; 105 | } 106 | -------------------------------------------------------------------------------- /scss/shared/_code.scss: -------------------------------------------------------------------------------- 1 | code, kbd, pre, samp { 2 | @include code_font_family; 3 | span { 4 | @include code_font_family; 5 | } 6 | } 7 | 8 | pre { 9 | padding: rem(18px); 10 | background-color: $code_background_color; 11 | 12 | code { 13 | font-size: rem(14px); 14 | } 15 | 16 | &.highlight { 17 | background-color: $code_background_color; 18 | line-height: rem(21px); 19 | } 20 | } 21 | 22 | code.highlighter-rouge { 23 | color: $content_text_color; 24 | background-color: $light_grey; 25 | padding: 2px 6px; 26 | } 27 | 28 | a:link, 29 | a:visited, 30 | a:hover { 31 | code.highlighter-rouge { 32 | color: $code_link_color; 33 | } 34 | 35 | &.has-code { 36 | color: $code_link_color; 37 | } 38 | } 39 | 40 | p, 41 | h1, 42 | h2, 43 | h3, 44 | h4, 45 | h5, 46 | h6 { 47 | code { 48 | font-size: 78.5%; 49 | } 50 | } 51 | 52 | pre { 53 | white-space: pre-wrap; 54 | white-space: -moz-pre-wrap; 55 | white-space: -pre-wrap; 56 | white-space: -o-pre-wrap; 57 | word-wrap: break-word; 58 | } 59 | -------------------------------------------------------------------------------- /scss/shared/_fonts.scss: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: FreightSans; 3 | font-weight: 700; 4 | font-style: normal; 5 | src: url("../fonts/FreightSans/freight-sans-bold.woff2") format("woff2"), 6 | url("../fonts/FreightSans/freight-sans-bold.woff") format("woff"); 7 | } 8 | 9 | @font-face { 10 | font-family: FreightSans; 11 | font-weight: 700; 12 | font-style: italic; 13 | src: url("../fonts/FreightSans/freight-sans-bold-italic.woff2") format("woff2"), 14 | url("../fonts/FreightSans/freight-sans-bold-italic.woff") format("woff"); 15 | } 16 | 17 | @font-face { 18 | font-family: FreightSans; 19 | font-weight: 500; 20 | font-style: normal; 21 | src: url("../fonts/FreightSans/freight-sans-medium.woff2") format("woff2"), 22 | url("../fonts/FreightSans/freight-sans-medium.woff") format("woff"); 23 | } 24 | 25 | @font-face { 26 | font-family: FreightSans; 27 | font-weight: 500; 28 | font-style: italic; 29 | src: url("../fonts/FreightSans/freight-sans-medium-italic.woff2") format("woff2"), 30 | url("../fonts/FreightSans/freight-sans-medium-italic.woff") format("woff"); 31 | } 32 | 33 | @font-face { 34 | font-family: FreightSans; 35 | font-weight: 100; 36 | font-style: normal; 37 | src: url("../fonts/FreightSans/freight-sans-light.woff2") format("woff2"), 38 | url("../fonts/FreightSans/freight-sans-light.woff") format("woff"); 39 | } 40 | 41 | @font-face { 42 | font-family: FreightSans; 43 | font-weight: 100; 44 | font-style: italic; 45 | src: url("../fonts/FreightSans/freight-sans-light-italic.woff2") format("woff2"), 46 | url("../fonts/FreightSans/freight-sans-light-italic.woff") format("woff"); 47 | } 48 | 49 | @font-face { 50 | font-family: FreightSans; 51 | font-weight: 400; 52 | font-style: italic; 53 | src: url("../fonts/FreightSans/freight-sans-book-italic.woff2") format("woff2"), 54 | url("../fonts/FreightSans/freight-sans-book-italic.woff") format("woff"); 55 | } 56 | 57 | @font-face { 58 | font-family: FreightSans; 59 | font-weight: 400; 60 | font-style: normal; 61 | src: url("../fonts/FreightSans/freight-sans-book.woff2") format("woff2"), 62 | url("../fonts/FreightSans/freight-sans-book.woff") format("woff"); 63 | } 64 | 65 | @font-face { 66 | font-family: IBMPlexMono; 67 | font-weight: 600; 68 | font-style: normal; 69 | unicode-range: u+0020-007f; 70 | src: local("IBMPlexMono-SemiBold"), 71 | url("../fonts/IBMPlexMono/IBMPlexMono-SemiBold.woff2") 72 | format("woff2"), 73 | url("../fonts/IBMPlexMono/IBMPlexMono-SemiBold.woff") 74 | format("woff"); 75 | } 76 | 77 | @font-face { 78 | font-family: IBMPlexMono; 79 | font-weight: 500; 80 | font-style: normal; 81 | unicode-range: u+0020-007f; 82 | src: local("IBMPlexMono-Medium"), 83 | url("../fonts/IBMPlexMono/IBMPlexMono-Medium.woff2") 84 | format("woff2"), 85 | url("../fonts/IBMPlexMono/IBMPlexMono-Medium.woff") 86 | format("woff"); 87 | } 88 | 89 | @font-face { 90 | font-family: IBMPlexMono; 91 | font-weight: 400; 92 | font-style: normal; 93 | unicode-range: u+0020-007f; 94 | src: local("IBMPlexMono-Regular"), 95 | url("../fonts/IBMPlexMono/IBMPlexMono-Regular.woff2") 96 | format("woff2"), 97 | url("../fonts/IBMPlexMono/IBMPlexMono-Regular.woff") 98 | format("woff"); 99 | } 100 | 101 | @font-face { 102 | font-family: IBMPlexMono; 103 | font-weight: 300; 104 | font-style: normal; 105 | unicode-range: u+0020-007f; 106 | src: local("IBMPlexMono-Light"), 107 | url("../fonts/IBMPlexMono/IBMPlexMono-Light.woff2") 108 | format("woff2"), 109 | url("../fonts/IBMPlexMono/IBMPlexMono-Light.woff") 110 | format("woff"); 111 | } 112 | -------------------------------------------------------------------------------- /scss/shared/_footer.scss: -------------------------------------------------------------------------------- 1 | .site-footer { 2 | padding: rem(40px) 0; 3 | width: 100%; 4 | background: $black; 5 | background-size: 100%; 6 | margin-left: 0; 7 | margin-right: 0; 8 | position: relative; 9 | z-index: 201; 10 | 11 | @include desktop { 12 | padding: rem(80px) 0; 13 | } 14 | 15 | p { 16 | color: $white; 17 | } 18 | 19 | ul { 20 | list-style-type: none; 21 | padding-left: 0; 22 | margin-bottom: 0; 23 | } 24 | 25 | ul li { 26 | font-size: rem(18px); 27 | line-height: rem(32px); 28 | color: #A0A0A1; 29 | padding-bottom: rem(6px); 30 | 31 | &.list-title { 32 | padding-bottom: rem(12px); 33 | color: $white; 34 | } 35 | } 36 | 37 | a:link, 38 | a:visited { 39 | color: inherit; 40 | } 41 | 42 | @include desktop { 43 | a:hover { 44 | color: $orange; 45 | } 46 | } 47 | } 48 | 49 | .docs-tutorials-resources { 50 | background-color: $slate; 51 | color: $white; 52 | padding-top: rem(40px); 53 | padding-bottom: rem(40px); 54 | position: relative; 55 | z-index: 201; 56 | 57 | @include desktop { 58 | padding-top: rem(80px); 59 | padding-bottom: rem(80px); 60 | } 61 | 62 | p { 63 | color: #929292; 64 | font-size: rem(18px); 65 | } 66 | 67 | h2 { 68 | font-size: rem(24px); 69 | letter-spacing: -0.25px; 70 | text-transform: none; 71 | margin-bottom: 0.25rem; 72 | 73 | @include desktop { 74 | margin-bottom: rem(20px); 75 | } 76 | } 77 | 78 | .col-md-4 { 79 | margin-bottom: rem(32px); 80 | text-align: center; 81 | @include desktop { 82 | margin-bottom: 0; 83 | } 84 | } 85 | 86 | .with-right-arrow { 87 | margin-left: 12px; 88 | &:hover { 89 | background-image: url("../images/chevron-right-white.svg"); 90 | } 91 | } 92 | 93 | p { 94 | font-size: rem(16px); 95 | line-height: rem(24px); 96 | letter-spacing: 0.22px; 97 | color: #939393; 98 | margin-bottom: 0; 99 | 100 | @include desktop { 101 | margin-bottom: rem(20px); 102 | } 103 | } 104 | 105 | a { 106 | font-size: rem(18px); 107 | color: $orange; 108 | &:hover { 109 | color: $white; 110 | } 111 | } 112 | } 113 | 114 | .footer-container { 115 | position: relative; 116 | } 117 | 118 | .footer-logo-wrapper { 119 | @include desktop { 120 | position: absolute; 121 | top: 0; 122 | left: $site_horizontal_padding; 123 | } 124 | } 125 | 126 | .footer-logo { 127 | background-image: url("../images/logo-icon.svg"); 128 | background-position: center; 129 | background-repeat: no-repeat; 130 | background-size: 20px 24px; 131 | display: block; 132 | height: 24px; 133 | margin-bottom: rem(45px); 134 | width: 20px; 135 | 136 | @include desktop { 137 | background-size: 29px 36px; 138 | height: 36px; 139 | margin-bottom: 0; 140 | margin-bottom: 0; 141 | width: 29px; 142 | } 143 | } 144 | 145 | .footer-links-wrapper { 146 | display: flex; 147 | flex-wrap: wrap; 148 | 149 | @include desktop { 150 | flex-wrap: initial; 151 | justify-content: flex-end; 152 | } 153 | } 154 | 155 | .footer-links-col { 156 | margin-bottom: rem(60px); 157 | width: 50%; 158 | 159 | @include desktop { 160 | margin-bottom: 0; 161 | width: 14%; 162 | margin-right: 23px; 163 | 164 | &.follow-us-col { 165 | width: 18%; 166 | margin-right: 0; 167 | } 168 | } 169 | 170 | @include small-desktop { 171 | width: 18%; 172 | margin-right: 30px; 173 | } 174 | } 175 | 176 | .footer-social-icons { 177 | margin: rem(137px) 0 rem(40px) 0; 178 | 179 | a { 180 | height: 32px; 181 | width: 32px; 182 | display: inline-block; 183 | background-color: $very_dark_grey; 184 | border-radius: 50%; 185 | margin-right: 5px; 186 | 187 | &.facebook { 188 | background-image: url("../images/logo-facebook-dark.svg"); 189 | background-position: center center; 190 | background-size: 9px 18px; 191 | background-repeat: no-repeat; 192 | } 193 | 194 | &.twitter { 195 | background-image: url("../images/logo-twitter-dark.svg"); 196 | background-position: center center; 197 | background-size: 17px 17px; 198 | background-repeat: no-repeat; 199 | } 200 | 201 | &.youtube { 202 | background-image: url("../images/logo-youtube-dark.svg"); 203 | background-position: center center; 204 | background-repeat: no-repeat; 205 | } 206 | } 207 | } 208 | 209 | .site-footer { 210 | .mc-field-group { 211 | margin-top: -2px; 212 | } 213 | } 214 | -------------------------------------------------------------------------------- /scss/shared/_navigation.scss: -------------------------------------------------------------------------------- 1 | .header-holder { 2 | height: $mobile_header_height; 3 | 4 | @include full-nav-menu-desktop { 5 | height: $desktop_header_height; 6 | } 7 | 8 | align-items: center; 9 | display: flex; 10 | left: 0; 11 | margin-left: auto; 12 | margin-right: auto; 13 | position: fixed; 14 | right: 0; 15 | top: 0; 16 | width: 100%; 17 | z-index: 9999; 18 | background-color: $white; 19 | border-bottom: 1px solid #e2e2e2; 20 | } 21 | 22 | .header-container { 23 | position: relative; 24 | display: flex; 25 | align-items: center; 26 | @include clearfix; 27 | 28 | @include full-nav-menu-desktop { 29 | display: block; 30 | } 31 | } 32 | 33 | .header-logo { 34 | height: 23px; 35 | width: 93px; 36 | background-image: url("../images/logo.svg"); 37 | background-repeat: no-repeat; 38 | background-size: 93px 23px; 39 | display: block; 40 | float: left; 41 | z-index: 10; 42 | 43 | @include full-nav-menu-desktop { 44 | background-size: 108px 27px; 45 | position: absolute; 46 | height: 27px; 47 | width: 108px; 48 | top: 4px; 49 | float: none; 50 | } 51 | } 52 | 53 | .main-menu-open-button { 54 | background-image: url("../images/icon-menu-dots.svg"); 55 | background-position: center center; 56 | background-size: 25px 7px; 57 | background-repeat: no-repeat; 58 | width: 25px; 59 | height: 17px; 60 | position: absolute; 61 | right: 0; 62 | top: 4px; 63 | @include full-nav-menu-desktop { 64 | display: none; 65 | } 66 | } 67 | 68 | .header-holder .main-menu { 69 | display: none; 70 | 71 | @include full-nav-menu-desktop { 72 | display: flex; 73 | align-items: center; 74 | justify-content: flex-end; 75 | } 76 | 77 | ul { 78 | display: flex; 79 | align-items: center; 80 | margin: 0; 81 | } 82 | 83 | ul li { 84 | display: inline-block; 85 | margin-right: 40px; 86 | position: relative; 87 | 88 | &.active { 89 | &:after { 90 | content: "•"; 91 | bottom: -24px; 92 | color: $orange; 93 | font-size: rem(22px); 94 | left: 0; 95 | position: absolute; 96 | right: 0; 97 | text-align: center; 98 | } 99 | 100 | a { 101 | color: $orange; 102 | } 103 | } 104 | 105 | &.docs-active:after { 106 | content: "•"; 107 | bottom: -24px; 108 | color: $orange; 109 | font-size: rem(22px); 110 | left: -24px; 111 | position: absolute; 112 | right: 0; 113 | text-align: center; 114 | } 115 | 116 | &:last-of-type { 117 | margin-right: 0; 118 | } 119 | } 120 | 121 | ul li a { 122 | color: $white; 123 | font-size: 1.3rem; 124 | letter-spacing: 0; 125 | line-height: rem(34px); 126 | text-align: center; 127 | text-decoration: none; 128 | 129 | @include full-nav-menu-desktop { 130 | &:hover { 131 | color: $orange; 132 | } 133 | } 134 | } 135 | } 136 | 137 | .mobile-main-menu { 138 | display: none; 139 | &.open { 140 | background-color: $slate; 141 | display: block; 142 | height: 100%; 143 | left: 0; 144 | margin-left: auto; 145 | margin-right: auto; 146 | min-height: 100%; 147 | position: fixed; 148 | right: 0; 149 | top: 0; 150 | width: 100%; 151 | z-index: 99999; 152 | } 153 | } 154 | 155 | .mobile-main-menu .container-fluid { 156 | align-items: center; 157 | display: flex; 158 | height: $mobile_header_height; 159 | position: relative; 160 | @include clearfix; 161 | } 162 | 163 | .mobile-main-menu.open { 164 | ul { 165 | list-style-type: none; 166 | padding: 0; 167 | } 168 | 169 | ul li a, .resources-mobile-menu-title { 170 | font-size: rem(32px); 171 | color: $white; 172 | letter-spacing: 0; 173 | line-height: rem(64px); 174 | text-decoration: none; 175 | } 176 | 177 | ul li.active a { 178 | color: $orange; 179 | } 180 | } 181 | 182 | .main-menu-close-button { 183 | background-image: url("../images/icon-close.svg"); 184 | background-position: center center; 185 | background-repeat: no-repeat; 186 | background-size: 24px 24px; 187 | height: 24px; 188 | position: absolute; 189 | right: 0; 190 | width: 24px; 191 | top: -4px; 192 | } 193 | 194 | .mobile-main-menu-header-container { 195 | position: relative; 196 | } 197 | 198 | .mobile-main-menu-links-container { 199 | display: flex; 200 | align-items: center; 201 | padding-left: rem(45px); 202 | height: 90vh; 203 | margin-top: -25px; 204 | padding-top: 50%; 205 | overflow-y: scroll; 206 | .main-menu { 207 | height: 100vh; 208 | } 209 | } 210 | 211 | .mobile-main-menu-links-container { 212 | ul.resources-mobile-menu-items { 213 | li { 214 | padding-left: 15px; 215 | } 216 | } 217 | } 218 | -------------------------------------------------------------------------------- /scss/shared/_syntax-highlighting.scss: -------------------------------------------------------------------------------- 1 | /*Github syntax highlighting theme via Rouge*/ 2 | 3 | .highlight table td { padding: 5px; } 4 | .highlight table pre { margin: 0; } 5 | .highlight .cm { 6 | color: #999988; 7 | font-style: italic; 8 | } 9 | .highlight .cp { 10 | color: #999999; 11 | font-weight: bold; 12 | } 13 | .highlight .c1 { 14 | color: #999988; 15 | font-style: italic; 16 | } 17 | .highlight .cs { 18 | color: #999999; 19 | font-weight: bold; 20 | font-style: italic; 21 | } 22 | .highlight .c, .highlight .cd { 23 | color: #999988; 24 | font-style: italic; 25 | } 26 | .highlight .err { 27 | color: #a61717; 28 | background-color: #e3d2d2; 29 | } 30 | .highlight .gd { 31 | color: #000000; 32 | background-color: #ffdddd; 33 | } 34 | .highlight .ge { 35 | color: #000000; 36 | font-style: italic; 37 | } 38 | .highlight .gr { 39 | color: #aa0000; 40 | } 41 | .highlight .gh { 42 | color: #999999; 43 | } 44 | .highlight .gi { 45 | color: #000000; 46 | background-color: #ddffdd; 47 | } 48 | .highlight .go { 49 | color: #888888; 50 | } 51 | .highlight .gp { 52 | color: #2980b9; 53 | } 54 | .highlight .gs { 55 | font-weight: bold; 56 | } 57 | .highlight .gu { 58 | color: #aaaaaa; 59 | } 60 | .highlight .gt { 61 | color: #aa0000; 62 | } 63 | .highlight .kc { 64 | color: #000000; 65 | font-weight: bold; 66 | } 67 | .highlight .kd { 68 | color: #000000; 69 | font-weight: bold; 70 | } 71 | .highlight .kn { 72 | color: #000000; 73 | font-weight: bold; 74 | } 75 | .highlight .kp { 76 | color: #000000; 77 | font-weight: bold; 78 | } 79 | .highlight .kr { 80 | color: #000000; 81 | font-weight: bold; 82 | } 83 | .highlight .kt { 84 | color: #445588; 85 | font-weight: bold; 86 | } 87 | .highlight .k, .highlight .kv { 88 | color: #000000; 89 | font-weight: bold; 90 | } 91 | .highlight .mf { 92 | color: #009999; 93 | } 94 | .highlight .mh { 95 | color: #009999; 96 | } 97 | .highlight .il { 98 | color: #009999; 99 | } 100 | .highlight .mi { 101 | color: #009999; 102 | } 103 | .highlight .mo { 104 | color: #009999; 105 | } 106 | .highlight .m, .highlight .mb, .highlight .mx { 107 | color: #009999; 108 | } 109 | .highlight .sb { 110 | color: #d14; 111 | } 112 | .highlight .sc { 113 | color: #d14; 114 | } 115 | .highlight .sd { 116 | color: #d14; 117 | } 118 | .highlight .s2 { 119 | color: #d14; 120 | } 121 | .highlight .se { 122 | color: #d14; 123 | } 124 | .highlight .sh { 125 | color: #d14; 126 | } 127 | .highlight .si { 128 | color: #d14; 129 | } 130 | .highlight .sx { 131 | color: #d14; 132 | } 133 | .highlight .sr { 134 | color: #009926; 135 | } 136 | .highlight .s1 { 137 | color: #d14; 138 | } 139 | .highlight .ss { 140 | color: #990073; 141 | } 142 | .highlight .s { 143 | color: #d14; 144 | } 145 | .highlight .na { 146 | color: #008080; 147 | } 148 | .highlight .bp { 149 | color: #525252; 150 | } 151 | .highlight .nb { 152 | color: #0086B3; 153 | } 154 | .highlight .nc { 155 | color: #445588; 156 | font-weight: bold; 157 | } 158 | .highlight .no { 159 | color: #008080; 160 | } 161 | .highlight .nd { 162 | color: #3c5d5d; 163 | font-weight: bold; 164 | } 165 | .highlight .ni { 166 | color: #800080; 167 | } 168 | .highlight .ne { 169 | color: #990000; 170 | font-weight: bold; 171 | } 172 | .highlight .nf { 173 | color: #990000; 174 | font-weight: bold; 175 | } 176 | .highlight .nl { 177 | color: #990000; 178 | font-weight: bold; 179 | } 180 | .highlight .nn { 181 | color: #2980b9; 182 | } 183 | .highlight .nt { 184 | color: #000080; 185 | } 186 | .highlight .vc { 187 | color: #008080; 188 | } 189 | .highlight .vg { 190 | color: #008080; 191 | } 192 | .highlight .vi { 193 | color: #008080; 194 | } 195 | .highlight .nv { 196 | color: #008080; 197 | } 198 | .highlight .ow { 199 | color: #000000; 200 | font-weight: bold; 201 | } 202 | .highlight .o { 203 | color: #000000; 204 | font-weight: bold; 205 | } 206 | .highlight .n { 207 | color: #000000; 208 | font-weight: bold; 209 | } 210 | .highlight .p { 211 | color: #000000; 212 | font-weight: bold; 213 | } 214 | .highlight .w { 215 | color: #bbbbbb; 216 | } 217 | .highlight { 218 | background-color: #f8f8f8; 219 | } 220 | -------------------------------------------------------------------------------- /scss/shared/_variables.scss: -------------------------------------------------------------------------------- 1 | $custom-font-size: 16px; 2 | $black: #000000; 3 | $white: #ffffff; 4 | $dark_grey: #6c6c6d; 5 | $light_grey: #f3f4f7; 6 | $orange: #e44c2c; 7 | $red_orange: #ee4c2c; 8 | $medium_grey: #f3f4f7; 9 | $not_quite_black: #262626; 10 | $slate: #262626; 11 | $very_light_grey: #f3f4f7; 12 | $very_dark_grey: #CCCDD1; 13 | $content_text_color: #6c6c6d; 14 | $code_background_color: #f3f4f7; 15 | $dark_blue: #3d5a97; 16 | $quick_start_grey: #6c6c6d; 17 | $command_block_black: #6c6c6d; 18 | $smoky_grey: #CCCDD1; 19 | $medium_smoky_grey: #CCCDD1; 20 | $code_link_color: #4974D1; 21 | 22 | $desktop_menu_width: 350px; 23 | 24 | $desktop_header_height: 90px; 25 | $mobile_header_height: 68px; 26 | $desktop_footer_height: 420px; 27 | $site_horizontal_padding: 30px; 28 | 29 | $baseurl: ""; 30 | 31 | @mixin code_font_family { 32 | font-family: IBMPlexMono,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace; 33 | } 34 | 35 | @mixin desktop { 36 | @media screen and (min-width: 768px) { @content; } 37 | } 38 | 39 | @mixin full-nav-menu-desktop { 40 | @media screen and (min-width: 1100px) { @content; } 41 | } 42 | 43 | @mixin max-width-desktop { 44 | @media screen and (min-width: 1240px) { @content; } 45 | } 46 | 47 | @mixin small-desktop { 48 | @media (min-width: 768px) and (max-width: 1239px) { @content; } 49 | } 50 | 51 | @function rem($px) { 52 | @return ($px / 16px) * 1rem; 53 | } 54 | 55 | @mixin clearfix { 56 | &:before, 57 | &:after { 58 | content: ""; 59 | display: table; 60 | } 61 | &:after { 62 | clear: both; 63 | } 64 | & { 65 | *zoom: 1; 66 | } 67 | } 68 | 69 | @mixin default_link_styles { 70 | a:link, 71 | a:visited, 72 | a:hover { 73 | color: $orange; 74 | text-decoration: none; 75 | } 76 | 77 | @include desktop { 78 | a:hover { 79 | text-decoration: underline; 80 | } 81 | } 82 | } 83 | 84 | @mixin animated_border_hover_state { 85 | @include desktop { 86 | &:after { 87 | content: ""; 88 | display: block; 89 | width: 0; 90 | height: 1px; 91 | position: absolute; 92 | bottom: 0; 93 | left: 0; 94 | background-color: $orange; 95 | transition: width .250s ease-in-out; 96 | } 97 | 98 | &:hover:after { 99 | width: 100%; 100 | } 101 | } 102 | } 103 | -------------------------------------------------------------------------------- /scss/theme.scss: -------------------------------------------------------------------------------- 1 | @import "vendor/bootstrap/functions"; 2 | @import "vendor/bootstrap/bootstrap"; 3 | 4 | @import "shared/syntax-highlighting"; 5 | @import "shared/fonts"; 6 | @import "shared/variables"; 7 | @import "shared/base_styles"; 8 | @import "shared/code"; 9 | @import "shared/navigation"; 10 | @import "shared/footer"; 11 | @import "shared/article"; 12 | 13 | @import "sphinx_base"; 14 | @import "sphinx_layout"; 15 | -------------------------------------------------------------------------------- /setup.cfg: -------------------------------------------------------------------------------- 1 | [bdist_wheel] 2 | universal = 1 3 | -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | from setuptools import setup 2 | from io import open 3 | from pytorch_sphinx_theme import __version__ 4 | 5 | setup( 6 | name = 'pytorch_sphinx_theme', 7 | version =__version__, 8 | author = 'Shift Lab', 9 | author_email= 'info@shiftlabny.com', 10 | url="https://github.com/pytorch/pytorch_sphinx_theme", 11 | docs_url="https://github.com/pytorch/pytorch_sphinx_theme", 12 | description='PyTorch Sphinx Theme', 13 | py_modules = ['pytorch_sphinx_theme'], 14 | packages = ['pytorch_sphinx_theme'], 15 | include_package_data=True, 16 | zip_safe=False, 17 | package_data={'pytorch_sphinx_theme': [ 18 | 'theme.conf', 19 | '*.html', 20 | 'static/css/*.css', 21 | 'static/js/*.js', 22 | 'static/js/*/*.js', 23 | 'static/fonts/*/*.*', 24 | 'static/images/*.*', 25 | 'theme_variables.jinja' 26 | ]}, 27 | entry_points = { 28 | 'sphinx.html_themes': [ 29 | 'pytorch_sphinx_theme = pytorch_sphinx_theme', 30 | ] 31 | }, 32 | license= 'MIT License', 33 | classifiers=[ 34 | "Development Status :: 5 - Production/Stable", 35 | "Environment :: Web Environment", 36 | "Intended Audience :: Developers", 37 | "Intended Audience :: System Administrators", 38 | "License :: OSI Approved :: MIT License", 39 | "Operating System :: OS Independent", 40 | "Programming Language :: Python", 41 | "Topic :: Internet", 42 | "Topic :: Software Development :: Documentation" 43 | ], 44 | install_requires=[ 45 | 'sphinx' 46 | ] 47 | ) 48 | --------------------------------------------------------------------------------