pax_global_header00006660000000000000000000000064144523266470014527gustar00rootroot0000000000000052 comment=69bee0082a4a18f891fada848354b477a4271367 sphinx-basic-ng-1.0.0.beta2/000077500000000000000000000000001445232664700155135ustar00rootroot00000000000000sphinx-basic-ng-1.0.0.beta2/.flake8000066400000000000000000000000701445232664700166630ustar00rootroot00000000000000[flake8] max-line-length = 88 extend-ignore = E203,E501 sphinx-basic-ng-1.0.0.beta2/.gitignore000066400000000000000000000040421445232664700175030ustar00rootroot00000000000000# Byte-compiled / optimized / DLL files __pycache__/ *.py[cod] *$py.class # C extensions *.so # Distribution / packaging .Python build/ develop-eggs/ dist/ downloads/ eggs/ .eggs/ lib/ lib64/ parts/ sdist/ var/ wheels/ share/python-wheels/ *.egg-info/ .installed.cfg *.egg MANIFEST # PyInstaller # Usually these files are written by a python script from a template # before PyInstaller builds the exe, so as to inject date/other infos into it. *.manifest *.spec # Installer logs pip-log.txt pip-delete-this-directory.txt # Unit test / coverage reports htmlcov/ .tox/ .nox/ .coverage .coverage.* .cache nosetests.xml coverage.xml *.cover *.py,cover .hypothesis/ .pytest_cache/ cover/ # Translations *.mo *.pot # Django stuff: *.log local_settings.py db.sqlite3 db.sqlite3-journal # Flask stuff: instance/ .webassets-cache # Scrapy stuff: .scrapy # Sphinx documentation docs/_build/ # PyBuilder .pybuilder/ target/ # Jupyter Notebook .ipynb_checkpoints # IPython profile_default/ ipython_config.py # pyenv # For a library or package, you might want to ignore these files since the code is # intended to run in multiple environments; otherwise, check them in: # .python-version # pipenv # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. # However, in case of collaboration, if having platform-specific dependencies or dependencies # having no cross-platform support, pipenv may install dependencies that don't work, or not # install all needed dependencies. #Pipfile.lock # PEP 582; used by e.g. github.com/David-OConnor/pyflow __pypackages__/ # Celery stuff celerybeat-schedule celerybeat.pid # SageMath parsed files *.sage.py # Environments .env .venv env/ venv/ ENV/ env.bak/ venv.bak/ # Spyder project settings .spyderproject .spyproject # Rope project settings .ropeproject # mkdocs documentation /site # mypy .mypy_cache/ .dmypy.json dmypy.json # Pyre type checker .pyre/ # pytype static type analyzer .pytype/ # Cython debug symbols cython_debug/ # Project specific tests/barebones/_templates sphinx-basic-ng-1.0.0.beta2/.pre-commit-config.yaml000066400000000000000000000025531445232664700220010ustar00rootroot00000000000000repos: - repo: https://github.com/psf/black rev: 20.8b1 hooks: - id: black language_version: python3.8 - repo: https://github.com/PyCQA/isort rev: 5.6.4 hooks: - id: isort args: ["--profile", "black", "--filter-files"] - repo: https://gitlab.com/pycqa/flake8 rev: 3.8.4 hooks: - id: flake8 - repo: https://github.com/pre-commit/mirrors-mypy rev: v0.812 hooks: - id: mypy args: [--strict] files: src/.+\.py$ - repo: https://github.com/pre-commit/pre-commit-hooks rev: v3.2.0 hooks: - id: check-builtin-literals - id: check-added-large-files - id: check-case-conflict - id: check-toml - id: check-yaml - id: debug-statements - id: end-of-file-fixer - id: forbid-new-submodules - id: trailing-whitespace - repo: https://github.com/PyCQA/pydocstyle rev: 5.1.1 hooks: - id: pydocstyle files: src/.+\.py$ - repo: https://github.com/asottile/blacken-docs rev: v1.8.0 hooks: - id: blacken-docs additional_dependencies: [black==20.8b1] - repo: https://github.com/pre-commit/mirrors-prettier rev: v2.1.2 hooks: - id: prettier exclude: src/.+/theme/.+ - repo: https://github.com/mgedmin/check-manifest rev: "0.46" hooks: - id: check-manifest sphinx-basic-ng-1.0.0.beta2/.prettierrc.toml000066400000000000000000000000451445232664700206500ustar00rootroot00000000000000useTabs = false proseWrap = "always" sphinx-basic-ng-1.0.0.beta2/.readthedocs.yml000066400000000000000000000004141445232664700206000ustar00rootroot00000000000000# Read the Docs configuration file # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details # Required version: 2 sphinx: builder: dirhtml configuration: docs/conf.py python: version: 3.8 install: - requirements: docs/requirements.txt sphinx-basic-ng-1.0.0.beta2/LICENSE000066400000000000000000000020661445232664700165240ustar00rootroot00000000000000Copyright (c) 2021 Pradyun Gedam Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. sphinx-basic-ng-1.0.0.beta2/MANIFEST.in000066400000000000000000000005131445232664700172500ustar00rootroot00000000000000exclude .flake8 exclude .pre-commit-config.yaml exclude noxfile.py include README.md include LICENSE recursive-include docs *.md recursive-include docs *.rst recursive-include docs *.png recursive-include docs *.py recursive-include src *.conf recursive-include src *.html recursive-include src *.css recursive-include src *.js sphinx-basic-ng-1.0.0.beta2/README.md000066400000000000000000000006521445232664700167750ustar00rootroot00000000000000# sphinx-basic-ng A modernised skeleton for Sphinx themes. ## To demo this theme 1. Clone this repository ```shell git clone https://github.com/pradyunsg/sphinx-basic-ng ``` 2. Install it locally ```shell pip install -e ./sphinx-basic-ng ``` 3. Install `nox` ```shell pip install nox ``` 4. Use `nox` to build a simple demo site ```shell nox -s docs-live -- ./tests/barebones ``` sphinx-basic-ng-1.0.0.beta2/docs/000077500000000000000000000000001445232664700164435ustar00rootroot00000000000000sphinx-basic-ng-1.0.0.beta2/docs/changelog.md000066400000000000000000000047261445232664700207250ustar00rootroot00000000000000# Changelog ## 0.0.1.alpha12 - Add a `view-this-page` component - Improve `edit-this-page` component's extensibility - Lint the entire codebase with prettier - Expand the documentation with more content - Tweak the size of the highest breakpoint ## 0.0.1.alpha11 - Declare Sphinx 5 compatibility. - Drop support for Python 3.6. ## 0.0.1.alpha10 - Move the container tag inside the container block. - Add a new `sections/header-content.html`. - Implement `search.html`. - Implement `genindex*.html`. - Implement `domainindex.html`. - Clarify handling of overlays for sidebars. - Improve handling of padding around main content. - Increase the z-index of overlay'd sidebars. ## 0.0.1.alpha9 - Move the JS files to the end of body. ## 0.0.1.alpha8 - Improve `debug.css`. - Expand the breadcrumbs conditional to do the right thing. - Include block names in endblock, in the Jinja templates. - Allow for full-width content styles. - Extend scaffold to fit 90rem screens. - Add `match-content-width` for content heading and footer. - Use viewport width for containers on mobile. - Only show `edit-this-page` if `source_suffix` is known. - Lightly tweak example theme. - Present better warnings in noxfile. - Drop `_html_page_context`. - Improve `breadcrumbs.html` implementation. - Add clearer "not implemented" warnings. - Drop the overflow handling, which is incompatible with `sticky`. ## 0.0.1.alpha7 - Add additional breakpoint of 50rem (800px) for content width. ## 0.0.1.alpha6 - Bump up to Sphinx 4. - Add example documentation, with an inline theme - Add header-article section. - Add `!important` for the hiding of sidebar toggles. - Fix the search input example. - Tweak announcement container, to not be centered. ## 0.0.1.alpha5 - Allow omitting skeleton.css, via html-context. ## 0.0.1.alpha4 - Add component: search-input - Add component: search-hide - Add components for toggling sidebars ## 0.0.1.alpha3 - Add a nice introduction to `sections/article.html` - Add component: related-pages - Add responsive off-canvas sidebars, and corresponding components. - Host documentation on ReadTheDocs. - Rename certain sections of the scaffolding. - Add more headers and footers to the scaffolding. ## 0.0.1.alpha2 - Add initial documentation scaffolding. - Add component: breadcrumbs - Add component: edit-this-page - Add component: ethical-ads - Add component: logo - Remove Sphinx variables from skeleton. - Updating terminology for parts of this project. ## 0.0.1.alpha1 Initial release. sphinx-basic-ng-1.0.0.beta2/docs/conf.py000066400000000000000000000030131445232664700177370ustar00rootroot00000000000000# Configuration file for the Sphinx documentation builder. # # Full list of options can be found in the Sphinx documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # # -- Project information ----------------------------------------------------- # project = "sphinx-basic-ng" copyright = "2021, Pradyun Gedam" author = "Pradyun Gedam" # # -- General configuration --------------------------------------------------- # extensions = [ # Sphinx's own extensions "sphinx.ext.autodoc", "sphinx.ext.extlinks", "sphinx.ext.intersphinx", "sphinx.ext.mathjax", "sphinx.ext.todo", "sphinx.ext.viewcode", # External stuff "myst_parser", "sphinx_copybutton", "sphinx_inline_tabs", ] templates_path = ["_templates"] # # -- Options for extlinks ---------------------------------------------------- # extlinks = { "pypi": ("https://pypi.org/project/%s/", ""), } # # -- Options for intersphinx ------------------------------------------------- # intersphinx_mapping = { "python": ("https://docs.python.org/3", None), "sphinx": ("https://www.sphinx-doc.org/en/master", None), } # # -- Options for TODOs ------------------------------------------------------- # todo_include_todos = True # # -- Options for Markdown files ---------------------------------------------- # myst_enable_extensions = [ "deflist", ] myst_heading_anchors = 3 # # -- Options for HTML output ------------------------------------------------- # html_theme = "furo" html_title = "sphinx-basic-ng" sphinx-basic-ng-1.0.0.beta2/docs/design/000077500000000000000000000000001445232664700177145ustar00rootroot00000000000000sphinx-basic-ng-1.0.0.beta2/docs/design/index.md000066400000000000000000000002621445232664700213450ustar00rootroot00000000000000# Design This section describes how this theme is designed and how we're supposed to approach adding things to this theme. ```{toctree} :hidden: ``` ```{todo} Write this. ``` sphinx-basic-ng-1.0.0.beta2/docs/development/000077500000000000000000000000001445232664700207655ustar00rootroot00000000000000sphinx-basic-ng-1.0.0.beta2/docs/development/index.md000066400000000000000000000002311445232664700224120ustar00rootroot00000000000000# Development This section contains information about how to do development work on this project. ```{toctree} :hidden: ``` ```{todo} Write this. ``` sphinx-basic-ng-1.0.0.beta2/docs/expectations.md000066400000000000000000000034561445232664700215030ustar00rootroot00000000000000# Expectations This is an explanation page, describing what the expectations are around: - how this project is scoped, and why we might say no to certain things. - how this project will react to upstream Sphinx changes. - how this project would interact with derivative theme authors. ## Project Scope This project is intended to serve as a fairly-unopinionated base for Sphinx themes to use. It has one opinionated part -- the skeleton provided -- that can be removed/omitted if the theme authors wish to do so. Any new components added to the project should be generally applicable and should not need any Python code to support it. There is no reason to add theme-specific components, since derivative themes can extend the components they can use by adding a `components/.html` template file in their own source tree. ## Sphinx This project tracks the Sphinx project fairly loosely. The general expectation is that Sphinx will evolve slowly and there is no urgency in keeping up with a new Sphinx major version bump, when it happens. This project will be updated in response to changes in Sphinx, as quickly as feasible with the development and community management resources available. This does mean that, if this project does not have sufficient resources to do so, these updates will be slow. ## Derivative Themes At the time of writing, this project has a no backwards compatibility policy -- the project is in an alpha state, with only two known downstream themes: Furo and Lutra. If you do use this in your project, please feel welcome to do so! We'd appreciate if you reach out over the issue tracker to let us know that you're doing this. It's likely that there will be some changes to the skeleton as well as components, and we welcome any feedback on how to improve both of them and make them work better. sphinx-basic-ng-1.0.0.beta2/docs/glossary.md000066400000000000000000000006051445232664700206310ustar00rootroot00000000000000# Glossary ```{glossary} Skeleton The markup provided in the `basic-ng` theme that implements a responsive 3-column layout. Sections Major areas of a page (e.g. sidebar, top bar, footer). Components Snippets of HTML that you put inside of sections, that use the template variables provided by Sphinx to compose common UI patterns for documentation websites (eg: breadcrumbs). ``` sphinx-basic-ng-1.0.0.beta2/docs/goals.md000066400000000000000000000020531445232664700200720ustar00rootroot00000000000000# Goals The primary goal is to make it easier to write Sphinx themes, by providing theme authors with a consistent vocabulary for things in a Sphinx theme as well as an easy-to-build-upon base theme. The theme is meant to provide a nicer base theme for Sphinx theme authors than the Sphinx's built-in `basic` theme and to enable sharing of certain common components for documentation themes for Sphinx. ## What it provides Currently, `sphinx-basic-ng` provides two things to themes that derive from it: - Components for common design patterns on documentation websites. - Skeleton markup and styling for a 3-column website. Additionally, the documentation and implementation serves as a resource for all Sphinx theme authors on how to implement various common things in Sphinx themes (eg: breadcrumbs, edit this page buttons etc). ## What it does not provide This theme does not provide: - components that require any Python or Javascript to implement them. - styling for any of the components. - any styling beyond what is necessary for the skeleton markup. sphinx-basic-ng-1.0.0.beta2/docs/index.md000066400000000000000000000007101445232664700200720ustar00rootroot00000000000000# sphinx-basic-ng A modern base for Sphinx themes, providing shared implementation of common components and a three-column layout to build upon. ```{toctree} :hidden: goals expectations ``` ```{toctree} :hidden: :caption: Usage usage/getting-started usage/skeleton usage/components/index glossary ``` ```{toctree} :hidden: :caption: Project development/index design/index changelog license GitHub ``` sphinx-basic-ng-1.0.0.beta2/docs/license.rst000066400000000000000000000001021445232664700206100ustar00rootroot00000000000000======= License ======= **MIT License** .. include:: ../LICENSE sphinx-basic-ng-1.0.0.beta2/docs/requirements.txt000066400000000000000000000002541445232664700217300ustar00rootroot00000000000000# This file primarily exists to allow ReadTheDocs to install this package # with the "docs" extra. The actual dependency information is held # in `pyproject.toml`. .[docs] sphinx-basic-ng-1.0.0.beta2/docs/usage/000077500000000000000000000000001445232664700175475ustar00rootroot00000000000000sphinx-basic-ng-1.0.0.beta2/docs/usage/components/000077500000000000000000000000001445232664700217345ustar00rootroot00000000000000sphinx-basic-ng-1.0.0.beta2/docs/usage/components/breadcrumbs.md000066400000000000000000000027031445232664700245510ustar00rootroot00000000000000# Breadcrumbs A breadcrumb navigation provide links back to each "parent" page of the current page, showing the user's current location in a website and giving them a good way to navigate within it. ## Usage ```jinja {% include "components/breadcrumbs.html" %} ``` When there are no list-items to show in the breadcrumb, this component will render empty. In all other cases, the structure looks like: - a single `nav.breadcrumb-nav` - a single `ol.breadcrumb-nav-list` - one-or-more `breadcrumb-nav-list-item` containing a single `a[href]` tag. - a single `breadcrumb-nav-list-item` contain a single `span` tag. ```{tip} See [this page][w3schools-breadcrumbs] for an example of how to stylise breadcrumbs with this structure. ``` ## Configurability There are 2 values that can be provided via the html-context, which provide control over the components shown in the breadcrumbs: - `breadcrumb_include_index_as`: If provided, this name is used as the first list-item of the breadcrumb on pages other than the `index` page.The corresponding list-item will have an additional class: `breadcrumb-nav-index-item`. - `breadcrumb_include_page`: If truthy, the current page is included in the breadcrumb as the final list-item, with only a `span` (there's no `a[href]` in it). The corresponding list-item will have an additional class: `breadcrumb-nav-page-item`. [w3schools-breadcrumbs]: https://www.w3schools.com/howto/howto_css_breadcrumbs.asp sphinx-basic-ng-1.0.0.beta2/docs/usage/components/edit-this-page.md000066400000000000000000000051451445232664700250670ustar00rootroot00000000000000# "Edit this page" link It is fairly common for technical documentation websites to contain a link to edit the original sources of a page. This makes it easy for a reader to quickly fix a typo and provides a decent way to navigate to the source repository of the project. ## Usage ```jinja {% include "components/edit-this-page.html" with context %} ``` This will add a single `a[href]` tag, with the text "Edit this page". You also need to declare the following in `theme.conf`'s `options` section: ```ini source_edit_link = source_repository = source_branch = source_directory = ``` ## Configurability The documentation author can set values in their `conf.py` file using `html_theme_options`: ```python html_theme_options = { "source_repository": "https://github.com/pradyunsg/sphinx-basic-ng/", "source_branch": "main", "source_directory": "docs/", } ``` ```python html_theme_options = { "source_edit_link": "https://my.host/project/edit/docs/{filename}", "source_repository": "https://my.host/project", "source_branch": "main", "source_directory": "docs/", } ``` Those user-provided values are used to determine the link for editing the generated page on their code hosting platform. This component can be customised in a theme-specific manner in two ways, both of which require adding a new template file (typically, `components/edit-this-page.html` file in the theme). 1. Extending This is be done by extending this file and overriding the the `link_available` and `link_not_available` blocks, which are used based on whether the edit link can be rendered -- i.e. whether the user has provided the configuration values noted above. ```jinja {% extends "basic-ng/components/edit-this-page.html" %} {% block link_not_available %} {{ warning("Hey user! Provide the repository information!" )}} {% endblock link_not_available %} ``` 2. Overriding This can be done by _not_ extending the base template. This allows the theme to have complete control over the way the URL provided is used. If a theme does this, it is also responsible for presenting warnings to the user when the user has not provided all the required configuration variables to the theme (see the sources of `edit-this-page.html`, after macros). It is possible to use the `determine_page_edit_link` macro, to get the relevant URL from the regular configuration (it assumes the user has it set). ```jinja {% from "basic-ng/components/edit-this-page.html" import determine_page_edit_link with context %} {{ _("Edit this page") }} ``` sphinx-basic-ng-1.0.0.beta2/docs/usage/components/ethical-ads.md000066400000000000000000000032221445232664700244330ustar00rootroot00000000000000# Ethical Ads A lot of Sphinx documentation is hosted on [ReadTheDocs], who provide free docs hosting for open source projects. [Ethical Ads] is a privacy-respecting ad network built by ReadTheDocs, and is one of the contributors to their sustainability. Adding this component to your page in the correct places, helps you make sure that when ReadTheDocs tries to show ethical ads in documentation built with your theme, they are well integrated with it and show up where you expect them to be visible. ## Usage ```jinja {% include "components/ethical-ads.html" %} ``` This will add an empty `div` tag, which would be populated by ReadTheDocs. It is also expected that the page will [manually load ads]. This is done for pages hosted by ReadTheDocs automatically. ## Configurability There are 3 values that can be provided via the html-context, which correspond to the following configuration attributes on the ethical ad `div`: - `ethical_ad_class`: maps to `class` - `ethical_ad_type`: maps to `data-ea-type` - `ethical_ad_publisher`: maps to `data-ea-publisher` If these values are not set, they will take reasonable values for ReadTheDocs-based documentation. The `div` for the ad is only included on the page if the documentation is being built on ReadTheDocs or `ethical_ad_publisher` is set. ```{tip} If you need additional control/configuration, it is recommended to include the this component as shown here, and to override the `components/ethical-ads.html` file in your theme. ``` [readthedocs]: https://readthedocs.org/ [ethical ads]: https://www.ethicalads.io/ [manually load ads]: https://ethical-ad-client.readthedocs.io/en/latest/#manually-loading-ads sphinx-basic-ng-1.0.0.beta2/docs/usage/components/index.md000066400000000000000000000004671445232664700233740ustar00rootroot00000000000000# Components The `basic-ng` theme provides various components. These serve as shared implementations of common needs and design patterns in documentation websites. ```{toctree} :maxdepth: 1 breadcrumbs edit-this-page ethical-ads logo related-pages search-hide search-input sidebar-toggles view-this-page ``` sphinx-basic-ng-1.0.0.beta2/docs/usage/components/logo.md000066400000000000000000000006161445232664700232210ustar00rootroot00000000000000# Site Logo Sphinx allows users to set a logo for their site, using the [`html_logo`][sphinx-html_logo] variable in `conf.py`. Themes are expected to have this on the page, if provided by the user. ## Usage ```jinja {% include "components/logo.html" %} ``` If the logo is set, this adds an `img.site-logo` with the correct URL for the logo. Otherwise, this is empty. ## Configurability None. sphinx-basic-ng-1.0.0.beta2/docs/usage/components/related-pages.md000066400000000000000000000021411445232664700247710ustar00rootroot00000000000000# Related Pages Sphinx provides "next page" and "previous page" information, when rendering a page. This information is useful for documentation which has some sort of flow, as well as providing more navigational capabilities to the reader. ## Usage ```jinja {% include "components/related-pages.html" with context %} ``` This will add a single `div.related-pages`, which may be empty if the relevant information is not available in the html-context. The structure of this component is: - `div.related-pages` - `a[href].next-page` (omitted if there's no next page) - `div.page-info` - `div.context` - `span` - "Next" with translation - `div.title` - Title of the page - `a[href].prev-page` (omitted if there's no previous page) - `div.page-info` - `div.context` - `span` - "Previous" with translation - `div.title` - Title of the page ## Configurability None. Derivative themes may want to expose their own mechanism that allows hiding this component for documentation authors that don't want to provide this to the reader. sphinx-basic-ng-1.0.0.beta2/docs/usage/components/search-hide.md000066400000000000000000000013121445232664700244270ustar00rootroot00000000000000# "Hide search matches" link Sphinx provides functionality to hide search matches, after the user lands on a page from search. This component exposes that to the user, allowing them to read the content once they've found it, without being distracted by the highlights. ## Usage ```jinja {% include "components/search-hide.html" %} {% include "components/toggle-sidebar-secondary.html" %} ``` This will add a single empty `div`, with the id `searchbox`. When a page has highlights, Sphinx's built-in search JS will inject the following HTML into this element: ```html ``` ## Configurability None. sphinx-basic-ng-1.0.0.beta2/docs/usage/components/search-input.md000066400000000000000000000011541445232664700246610ustar00rootroot00000000000000# Search input Sphinx provides offline search to allow users to search the generated documentation. ## Usage ```jinja {% include "components/search-input.html" %} ``` This will add a single `form.search-container`, containing a single `input.search-input` with the translated placeholder text: "Search". Pressing {kbd}`Enter` in this element redirects the user to the search page, with the appropriate query parameters. ```{important} Sphinx's search JS looks inside elements with `[role="main"]`, so make sure that all user provided content is within an element with that attribute. ``` ## Configurability None. sphinx-basic-ng-1.0.0.beta2/docs/usage/components/sidebar-toggles.md000066400000000000000000000015201445232664700253270ustar00rootroot00000000000000# Sidebar Drawer Toggles This is a component that is highly coupled with the skeleton provided. The skeleton uses sidebar drawers, as part of providing a responsive skeleton for the themes. As a part of this, the pages need to include toggles so that users can show/hide the corresponding sidebars. These components provide the user with the ability to include these drawers in an appropriate location on the page. ## Usage ```jinja {% include "components/toggle-sidebar-primary.html" %} {% include "components/toggle-sidebar-secondary.html" %} ``` This will add a single `label`, which contains a hamburger `svg` by default. These labels are hidden with `display: none` when the corresponding sidebar is visible-by-default. ## Configurability The theme author can change the inner contents of the label by overriding `{% block content %}`. sphinx-basic-ng-1.0.0.beta2/docs/usage/components/view-this-page.md000066400000000000000000000057531445232664700251210ustar00rootroot00000000000000# "View this page" link It is fairly common for technical documentation websites to contain a link to view the original sources of a page. This makes it easy for a reader to quickly see how something is written in the markup and provides a decent way to navigate to the source repository of the project. ## Usage ```jinja {% include "components/view-this-page.html" with context %} ``` This will add a single `a[href]` tag, with the text "View this page". This uses the user-provided source repository links if provided. If they're not provided and the documentation is built with `html_copy_source = True` _and_ `html_show_sourcelink = True` (which are the default), the link points to the Sphinx-copied sources. You also need to declare the following in `theme.conf`'s `options` section: ```ini source_view_link = source_repository = source_branch = source_directory = ``` ## Configurability The documentation author can set values in their `conf.py` file using `html_theme_options`: ```python html_theme_options = { "source_repository": "https://github.com/pradyunsg/sphinx-basic-ng/", "source_branch": "main", "source_directory": "docs/", } ``` ```python html_theme_options = { "source_view_link": "https://my.host/project/view/docs/{filename}", "source_repository": "https://my.host/project", "source_branch": "main", "source_directory": "docs/", } ``` Those user-provided values are used to determine the link for viewing the generated page on the hosting platform. Currently supported platforms are `https://github.com`, `https://bitbucket.org` and `https://gitlab.io/`. This component can be customised in a theme-specific manner in two ways, both of which require adding a new template file (typically, `components/view-this-page.html` file in the theme). 1. Extending This is be done by extending this file and overriding the the `link_available` and `link_not_available` blocks, which are used based on whether the view link can be rendered -- i.e. whether the user has provided the configuration values noted above. ```jinja {% extends "basic-ng/components/view-this-page.html" %} {% block link_not_available %} {{ warning("Hey user! Provide the repository information!" )}} {% endblock link_not_available %} ``` 2. Overriding This can be done by _not_ extending the base template. This allows the theme to have complete control over the way the URL provided is used. If a theme does this, it is also responsible for presenting warnings to the user when the user has not provided all the required configuration variables to the theme (see the sources of `view-this-page.html`, after macros). It is possible to use the `determine_page_view_link` macro, to get the relevant URL from the regular configuration (it assumes the user has it set). ```jinja {% from "basic-ng/components/view-this-page.html" import determine_page_view_link with context %} {{ _("View this page") }} ``` sphinx-basic-ng-1.0.0.beta2/docs/usage/getting-started.md000066400000000000000000000000731445232664700231760ustar00rootroot00000000000000# Getting Started ```{todo} Write this as a tutorial. ``` sphinx-basic-ng-1.0.0.beta2/docs/usage/skeleton.md000066400000000000000000000003321445232664700217130ustar00rootroot00000000000000# Skeleton ```{todo} Decide if this should be a single page or nested-bunch-of-pages. ``` ```{todo} Write this as reference sections, followed by how-to sections for various common things folks might want to do. ``` sphinx-basic-ng-1.0.0.beta2/example/000077500000000000000000000000001445232664700171465ustar00rootroot00000000000000sphinx-basic-ng-1.0.0.beta2/example/_static/000077500000000000000000000000001445232664700205745ustar00rootroot00000000000000sphinx-basic-ng-1.0.0.beta2/example/_static/sample.css000066400000000000000000000061271445232664700225750ustar00rootroot00000000000000/* This file doesn't really do much, and shouldn't be used as a basis of a theme. However, hopefully this does demonstrate that theme authors still need to write their own CSS for their theme. */ body { font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; } /* Announcement */ .site-announcement { background-color: #111; color: white; width: 100%; height: 3rem; display: flex; align-items: center; justify-content: center; } /* Header */ .sb-header label { display: flex; align-items: center; justify-content: center; height: 2rem; width: 2rem; } @media (max-width: 76rem) { .sb-header { border-bottom: 1px solid lightgray; height: 2rem; } .sb-header label[for="sb-sidebar-toggle--primary"] { float: left; } .sb-header label[for="sb-sidebar-toggle--secondary"] { float: right; } } /* Content */ h1 { margin-top: 1.5rem; font-size: 2rem; } h2 { font-size: 1.75rem; } h3 { font-size: 1.5rem; } h4 { font-size: 1.25rem; } h5 { font-size: 1.125rem; } h6 { text-transform: uppercase; } h1 .headerlink, h2 .headerlink, h3 .headerlink, h4 .headerlink, h5 .headerlink, h6 .headerlink { visibility: hidden; text-decoration: none; } h1:hover .headerlink, h2:hover .headerlink, h3:hover .headerlink, h4:hover .headerlink, h5:hover .headerlink, h6:hover .headerlink { visibility: visible; } /* Links */ a[href] { color: #0275d8; text-decoration: none; } a[href]:hover { color: #01447e; text-decoration: underline; } /* Sidebar (left) */ .sb-sidebar-primary { background: white; } /* Site name */ .site-name { margin: 1rem 2rem; font-size: 1.25rem; } .site-name a { color: inherit; } .site-name a:hover { text-decoration: none; } /* Search */ .search-container { margin: 1rem 2rem; } .search-input { box-sizing: border-box; width: 100%; padding: 0.5rem; font-size: 0.75rem; border: 0; border-radius: 0.25rem; background: #f8f9fa; color: black; } /* TOC tree */ .toctree-container { margin: 1rem 2rem; font-size: 0.875rem; } .toctree-container ul { list-style: none; padding-left: 1rem; margin: 0; } .toctree-container ul > li { padding: 0; padding-top: 0.5rem; } .toctree-container > ul { padding-left: 0; } .toctree-container > ul:first-child > li:first-child { padding-top: 0; } .toctree-container p.caption { margin-bottom: 0; } /* Sidebar (right) */ .sb-sidebar-secondary { background: white; } /* Table of contents */ .toc-container ul { font-size: 0.875rem; list-style: none; padding-left: 1rem; } .toc-container li { padding-top: 0.325rem; } /* Page footer */ .related-pages { height: 3rem; margin: 1rem 0; } .related-pages .context { font-size: 0.75rem; color: gray; } .related-pages a:hover { text-decoration: none; } .related-pages a:hover .title { text-decoration: underline; } .related-pages .next-page { height: 3rem; max-width: 50%; float: right; clear: right; text-align: right; } .related-pages .prev-page { height: 3rem; max-width: 50%; float: left; clear: left; text-align: left; } sphinx-basic-ng-1.0.0.beta2/example/_theme/000077500000000000000000000000001445232664700204075ustar00rootroot00000000000000sphinx-basic-ng-1.0.0.beta2/example/_theme/sections/000077500000000000000000000000001445232664700222365ustar00rootroot00000000000000sphinx-basic-ng-1.0.0.beta2/example/_theme/sections/announcement.html000066400000000000000000000001631445232664700256160ustar00rootroot00000000000000{% if theme_announcement is defined -%}
{{ theme_announcement }}
{%- endif %} sphinx-basic-ng-1.0.0.beta2/example/_theme/sections/article.html000066400000000000000000000000131445232664700245410ustar00rootroot00000000000000{{ body }} sphinx-basic-ng-1.0.0.beta2/example/_theme/sections/footer-article.html000066400000000000000000000012321445232664700260410ustar00rootroot00000000000000 sphinx-basic-ng-1.0.0.beta2/example/_theme/sections/footer-content.html000066400000000000000000000000461445232664700260720ustar00rootroot00000000000000 sphinx-basic-ng-1.0.0.beta2/example/_theme/sections/footer.html000066400000000000000000000000461445232664700244220ustar00rootroot00000000000000 sphinx-basic-ng-1.0.0.beta2/example/_theme/sections/header-article.html000066400000000000000000000000461445232664700257750ustar00rootroot00000000000000 sphinx-basic-ng-1.0.0.beta2/example/_theme/sections/header-secondary.html000066400000000000000000000000461445232664700263410ustar00rootroot00000000000000 sphinx-basic-ng-1.0.0.beta2/example/_theme/sections/header.html000066400000000000000000000001601445232664700243510ustar00rootroot00000000000000{% include "components/toggle-sidebar-primary.html" %} {% include "components/toggle-sidebar-secondary.html" %} sphinx-basic-ng-1.0.0.beta2/example/_theme/sections/sidebar-primary.html000066400000000000000000000003101445232664700262100ustar00rootroot00000000000000 {% include "components/search-input.html" %}
{{ toctree(titles_only=True) }}
sphinx-basic-ng-1.0.0.beta2/example/_theme/sections/sidebar-secondary.html000066400000000000000000000000531445232664700265200ustar00rootroot00000000000000
{{ toc }}
sphinx-basic-ng-1.0.0.beta2/example/conf.py000066400000000000000000000013551445232664700204510ustar00rootroot00000000000000# Configuration file for the Sphinx documentation builder. # # Full list of options can be found in the Sphinx documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # # -- Project information ----------------------------------------------------- # project = "sphinx-basic-ng sample" copyright = "2021, Pradyun Gedam" author = "Pradyun Gedam" # # -- General configuration --------------------------------------------------- # extensions = ["myst_parser"] # # -- Options for HTML output ------------------------------------------------- # html_theme = "basic-ng" html_style = "sample.css" templates_path = ["_theme"] html_static_path = ["_static"] html_context = { "theme_announcement": "Site wide announcement!", } sphinx-basic-ng-1.0.0.beta2/example/index.md000066400000000000000000000011021445232664700205710ustar00rootroot00000000000000# Sample Documentation This is sample documentation, showing how `sphinx-basic-ng` can be used to simplify the development of a Sphinx theme. ```{toctree} top-level-one section-one/index Second Section top-level-two ``` Lorem ipsum dolor sit amet consectetur adipisicing elit. Soluta quod nulla officia! Ratione voluptate distinctio in architecto! Reprehenderit neque dicta in eligendi similique obcaecati eos? Quibusdam assumenda pariatur dolore voluptas? ```{toctree} :caption: Caption! :titlesonly: top-level-three external ``` sphinx-basic-ng-1.0.0.beta2/example/requirements.txt000066400000000000000000000000441445232664700224300ustar00rootroot00000000000000sphinx sphinx-autobuild myst_parser sphinx-basic-ng-1.0.0.beta2/example/section-one/000077500000000000000000000000001445232664700213715ustar00rootroot00000000000000sphinx-basic-ng-1.0.0.beta2/example/section-one/index.md000066400000000000000000000000701445232664700230170ustar00rootroot00000000000000# Section 1 ```{toctree} page-one-one page-one-two ``` sphinx-basic-ng-1.0.0.beta2/example/section-one/page-one-one.md000066400000000000000000000004041445232664700241630ustar00rootroot00000000000000# Page 1 in Section 1 Lorem ipsum dolor sit amet consectetur adipisicing elit. Soluta quod nulla officia! Ratione voluptate distinctio in architecto! Reprehenderit neque dicta in eligendi similique obcaecati eos? Quibusdam assumenda pariatur dolore voluptas? sphinx-basic-ng-1.0.0.beta2/example/section-one/page-one-two.md000066400000000000000000000004041445232664700242130ustar00rootroot00000000000000# Page 2 in Section 1 Lorem ipsum dolor sit amet consectetur adipisicing elit. Soluta quod nulla officia! Ratione voluptate distinctio in architecto! Reprehenderit neque dicta in eligendi similique obcaecati eos? Quibusdam assumenda pariatur dolore voluptas? sphinx-basic-ng-1.0.0.beta2/example/section-two/000077500000000000000000000000001445232664700214215ustar00rootroot00000000000000sphinx-basic-ng-1.0.0.beta2/example/section-two/index.md000066400000000000000000000001141445232664700230460ustar00rootroot00000000000000# Section 2 ```{toctree} page-two-one Alternative title ``` sphinx-basic-ng-1.0.0.beta2/example/section-two/page-two-one.md000066400000000000000000000004041445232664700242430ustar00rootroot00000000000000# Page 1 in Section 2 Lorem ipsum dolor sit amet consectetur adipisicing elit. Soluta quod nulla officia! Ratione voluptate distinctio in architecto! Reprehenderit neque dicta in eligendi similique obcaecati eos? Quibusdam assumenda pariatur dolore voluptas? sphinx-basic-ng-1.0.0.beta2/example/section-two/page-two-two.md000066400000000000000000000004041445232664700242730ustar00rootroot00000000000000# Page 2 in Section 2 Lorem ipsum dolor sit amet consectetur adipisicing elit. Soluta quod nulla officia! Ratione voluptate distinctio in architecto! Reprehenderit neque dicta in eligendi similique obcaecati eos? Quibusdam assumenda pariatur dolore voluptas? sphinx-basic-ng-1.0.0.beta2/example/top-level-one.md000066400000000000000000000013571445232664700221640ustar00rootroot00000000000000# Page 1 Lorem ipsum dolor sit amet consectetur adipisicing elit. Soluta quod nulla officia! Ratione voluptate distinctio in architecto! Reprehenderit neque dicta in eligendi similique obcaecati eos? Quibusdam assumenda pariatur dolore voluptas? ## Heading 1 Lorem ipsum dolor sit amet consectetur adipisicing elit. Soluta quod nulla officia! Ratione voluptate distinctio in architecto! Reprehenderit neque dicta in eligendi similique obcaecati eos? Quibusdam assumenda pariatur dolore voluptas? ## Heading 2 Lorem ipsum dolor sit amet consectetur adipisicing elit. Soluta quod nulla officia! Ratione voluptate distinctio in architecto! Reprehenderit neque dicta in eligendi similique obcaecati eos? Quibusdam assumenda pariatur dolore voluptas? sphinx-basic-ng-1.0.0.beta2/example/top-level-three.md000066400000000000000000000106731445232664700225130ustar00rootroot00000000000000# Page 3 Lorem ipsum dolor sit amet consectetur adipisicing elit. Soluta quod nulla officia! Ratione voluptate distinctio in architecto! Reprehenderit neque dicta in eligendi similique obcaecati eos? Quibusdam assumenda pariatur dolore voluptas? ## Heading 1 Lorem ipsum dolor sit amet consectetur adipisicing elit. Soluta quod nulla officia! Ratione voluptate distinctio in architecto! Reprehenderit neque dicta in eligendi similique obcaecati eos? Quibusdam assumenda pariatur dolore voluptas? ## Heading 2 Lorem ipsum dolor sit amet consectetur adipisicing elit. Soluta quod nulla officia! Ratione voluptate distinctio in architecto! Reprehenderit neque dicta in eligendi similique obcaecati eos? Quibusdam assumenda pariatur dolore voluptas? ## Heading 3 Lorem ipsum dolor sit amet consectetur adipisicing elit. Soluta quod nulla officia! Ratione voluptate distinctio in architecto! Reprehenderit neque dicta in eligendi similique obcaecati eos? Quibusdam assumenda pariatur dolore voluptas? ## Heading 4 Lorem ipsum dolor sit amet consectetur adipisicing elit. Soluta quod nulla officia! Ratione voluptate distinctio in architecto! Reprehenderit neque dicta in eligendi similique obcaecati eos? Quibusdam assumenda pariatur dolore voluptas? ## Heading 5 Lorem ipsum dolor sit amet consectetur adipisicing elit. Soluta quod nulla officia! Ratione voluptate distinctio in architecto! Reprehenderit neque dicta in eligendi similique obcaecati eos? Quibusdam assumenda pariatur dolore voluptas? ## Heading 6 Lorem ipsum dolor sit amet consectetur adipisicing elit. Soluta quod nulla officia! Ratione voluptate distinctio in architecto! Reprehenderit neque dicta in eligendi similique obcaecati eos? Quibusdam assumenda pariatur dolore voluptas? ## Heading 7 Lorem ipsum dolor sit amet consectetur adipisicing elit. Soluta quod nulla officia! Ratione voluptate distinctio in architecto! Reprehenderit neque dicta in eligendi similique obcaecati eos? Quibusdam assumenda pariatur dolore voluptas? ## Heading 8 Lorem ipsum dolor sit amet consectetur adipisicing elit. Soluta quod nulla officia! Ratione voluptate distinctio in architecto! Reprehenderit neque dicta in eligendi similique obcaecati eos? Quibusdam assumenda pariatur dolore voluptas? ## Heading 9 Lorem ipsum dolor sit amet consectetur adipisicing elit. Soluta quod nulla officia! Ratione voluptate distinctio in architecto! Reprehenderit neque dicta in eligendi similique obcaecati eos? Quibusdam assumenda pariatur dolore voluptas? ## Heading 10 Lorem ipsum dolor sit amet consectetur adipisicing elit. Soluta quod nulla officia! Ratione voluptate distinctio in architecto! Reprehenderit neque dicta in eligendi similique obcaecati eos? Quibusdam assumenda pariatur dolore voluptas? ## Heading 11 Lorem ipsum dolor sit amet consectetur adipisicing elit. Soluta quod nulla officia! Ratione voluptate distinctio in architecto! Reprehenderit neque dicta in eligendi similique obcaecati eos? Quibusdam assumenda pariatur dolore voluptas? ## Heading 12 Lorem ipsum dolor sit amet consectetur adipisicing elit. Soluta quod nulla officia! Ratione voluptate distinctio in architecto! Reprehenderit neque dicta in eligendi similique obcaecati eos? Quibusdam assumenda pariatur dolore voluptas? ## Heading 13 Lorem ipsum dolor sit amet consectetur adipisicing elit. Soluta quod nulla officia! Ratione voluptate distinctio in architecto! Reprehenderit neque dicta in eligendi similique obcaecati eos? Quibusdam assumenda pariatur dolore voluptas? ## Heading 14 Lorem ipsum dolor sit amet consectetur adipisicing elit. Soluta quod nulla officia! Ratione voluptate distinctio in architecto! Reprehenderit neque dicta in eligendi similique obcaecati eos? Quibusdam assumenda pariatur dolore voluptas? ## Heading 15 Lorem ipsum dolor sit amet consectetur adipisicing elit. Soluta quod nulla officia! Ratione voluptate distinctio in architecto! Reprehenderit neque dicta in eligendi similique obcaecati eos? Quibusdam assumenda pariatur dolore voluptas? ## Heading 16 Lorem ipsum dolor sit amet consectetur adipisicing elit. Soluta quod nulla officia! Ratione voluptate distinctio in architecto! Reprehenderit neque dicta in eligendi similique obcaecati eos? Quibusdam assumenda pariatur dolore voluptas? ## Heading 17 Lorem ipsum dolor sit amet consectetur adipisicing elit. Soluta quod nulla officia! Ratione voluptate distinctio in architecto! Reprehenderit neque dicta in eligendi similique obcaecati eos? Quibusdam assumenda pariatur dolore voluptas? sphinx-basic-ng-1.0.0.beta2/example/top-level-two.md000066400000000000000000000013571445232664700222140ustar00rootroot00000000000000# Page 2 Lorem ipsum dolor sit amet consectetur adipisicing elit. Soluta quod nulla officia! Ratione voluptate distinctio in architecto! Reprehenderit neque dicta in eligendi similique obcaecati eos? Quibusdam assumenda pariatur dolore voluptas? ## Heading 1 Lorem ipsum dolor sit amet consectetur adipisicing elit. Soluta quod nulla officia! Ratione voluptate distinctio in architecto! Reprehenderit neque dicta in eligendi similique obcaecati eos? Quibusdam assumenda pariatur dolore voluptas? ## Heading 2 Lorem ipsum dolor sit amet consectetur adipisicing elit. Soluta quod nulla officia! Ratione voluptate distinctio in architecto! Reprehenderit neque dicta in eligendi similique obcaecati eos? Quibusdam assumenda pariatur dolore voluptas? sphinx-basic-ng-1.0.0.beta2/noxfile.py000066400000000000000000000116131445232664700175330ustar00rootroot00000000000000"""Development automation.""" import glob import os import shutil import tempfile import nox PACKAGE_NAME = "sphinx_basic_ng" nox.options.sessions = ["lint", "docs"] # # Development Sessions # @nox.session(name="docs-live", reuse_venv=True) def docs_live(session): if session.posargs: docs_dir, *additional_dependencies = session.posargs assert os.path.exists(docs_dir) and all( not arg[0] == "-" for arg in additional_dependencies ), "usage: [pip-install-arguments]..." else: docs_dir = "docs/" additional_dependencies = () session.install("-e", ".[docs]") session.install("sphinx-autobuild", *additional_dependencies) with tempfile.TemporaryDirectory() as destination: session.run( "sphinx-autobuild", # for sphinx-autobuild "--port=0", "--watch=src/", "--open-browser", # for sphinx "-b=dirhtml", "-a", "-v", docs_dir, destination, ) @nox.session(reuse_venv=True) def docs(session): session.install(".[docs]") # Generate documentation into `build/docs` session.run("sphinx-build", "-b", "dirhtml", "-v", "docs/", "build/docs") @nox.session(name="example-live", reuse_venv=True) def example_live(session): session.install("-e", ".") session.install("-r", "example/requirements.txt") with tempfile.TemporaryDirectory() as destination: session.run( "sphinx-autobuild", # for sphinx-autobuild "--port=0", "--watch=src/", "--open-browser", # for sphinx "-b=dirhtml", "-a", "example", destination, env={"PYTHONPATH": "example"}, ) @nox.session(reuse_venv=True) def example(session): session.install("-e", ".") session.install("-r", "example/requirements.txt") session.run( "sphinx-build", "-b=dirhtml", "-v", "example", "build/example-docs", env={"PYTHONPATH": "example"}, ) @nox.session(reuse_venv=True) def lint(session): session.install("pre-commit") args = list(session.posargs) args.append("--all-files") if "CI" in os.environ: args.append("--show-diff-on-failure") session.run("pre-commit", "run", *args) def get_release_versions(version_file): marker = "__version__ = " with open(version_file) as f: for line in f: if line.startswith(marker): version = line[len(marker) + 1 : -2] current_version, current_dev_number = version.split(".dev") break else: raise RuntimeError("Could not find current version.") next_dev_number = int(current_dev_number) + 1 release_version = f"{current_version}.beta{next_dev_number}" next_version = f"{current_version}.dev{next_dev_number}" return release_version, next_version @nox.session def release(session): version_file = f"src/{PACKAGE_NAME}/__init__.py" allowed_upstreams = [ f"git@github.com:pradyunsg/{PACKAGE_NAME.replace('_', '-')}.git" ] release_version, next_version = get_release_versions(version_file) session.install("build", "twine", "release-helper") # Sanity Checks session.run("release-helper", "version-check-validity", release_version) session.run("release-helper", "version-check-validity", next_version) session.run("release-helper", "directory-check-empty", "dist") session.run("release-helper", "git-check-branch", "main") session.run("release-helper", "git-check-clean") session.run("release-helper", "git-check-tag", release_version, "--does-not-exist") session.run("release-helper", "git-check-remote", "origin", *allowed_upstreams) # Prepare release commit session.run("release-helper", "version-bump", version_file, release_version) session.run("git", "add", version_file, external=True) session.run( "git", "commit", "-m", f"Prepare release: {release_version}", external=True ) # Build the package if os.path.exists("build"): shutil.rmtree("build") session.run("python", "-m", "build") session.run("twine", "check", *glob.glob("dist/*")) # Tag the commit session.run( # fmt: off "git", "tag", release_version, "-m", f"Release {release_version}", "-s", external=True, # fmt: on ) # Prepare back-to-development commit session.run("release-helper", "version-bump", version_file, next_version) session.run("git", "add", version_file, external=True) session.run("git", "commit", "-m", "Back to development", external=True) # Push the commits and tag. session.run("git", "push", "origin", "main", release_version, external=True) # Upload the distributions. session.run("twine", "upload", *glob.glob("dist/*")) sphinx-basic-ng-1.0.0.beta2/setup.cfg000066400000000000000000000020441445232664700173340ustar00rootroot00000000000000[metadata] name = sphinx_basic_ng version = attr:src.sphinx_basic_ng.__version__ author = Pradyun Gedam author_email = mail@pradyunsg.me description = A modern skeleton for Sphinx themes. long_description = file: README.md long_description_content_type = text/markdown url = https://github.com/pradyunsg/sphinx-basic-ng project_urls = Documentation = https://rtfd.io/sphinx-basic-ng/ classifiers = Framework :: Sphinx Framework :: Sphinx :: Theme License :: OSI Approved :: MIT License Environment :: Web Environment Intended Audience :: Developers Programming Language :: Python :: 3 Operating System :: OS Independent Topic :: Documentation Topic :: Software Development :: Documentation [options] python_requires = >=3.7 install_requires = sphinx >=4.0 include_package_data = True packages=find: package_dir= =src [options.packages.find] where=src [options.extras_require] docs = furo myst-parser sphinx-copybutton sphinx-inline-tabs ipython [options.entry_points] sphinx.html_themes = basic-ng = sphinx_basic_ng sphinx-basic-ng-1.0.0.beta2/setup.py000066400000000000000000000000461445232664700172250ustar00rootroot00000000000000from setuptools import setup setup() sphinx-basic-ng-1.0.0.beta2/src/000077500000000000000000000000001445232664700163025ustar00rootroot00000000000000sphinx-basic-ng-1.0.0.beta2/src/sphinx_basic_ng/000077500000000000000000000000001445232664700214405ustar00rootroot00000000000000sphinx-basic-ng-1.0.0.beta2/src/sphinx_basic_ng/__init__.py000066400000000000000000000010251445232664700235470ustar00rootroot00000000000000"""A modern skeleton for Sphinx themes.""" __version__ = "1.0.0.beta2" from pathlib import Path from typing import Any, Dict from sphinx.application import Sphinx _THEME_PATH = (Path(__file__).parent / "theme" / "basic-ng").resolve() def setup(app: Sphinx) -> Dict[str, Any]: """Entry point for sphinx theming.""" app.require_sphinx("4.0") app.add_html_theme("basic-ng", str(_THEME_PATH)) return { "parallel_read_safe": True, "parallel_write_safe": True, "version": __version__, } sphinx-basic-ng-1.0.0.beta2/src/sphinx_basic_ng/theme/000077500000000000000000000000001445232664700225425ustar00rootroot00000000000000sphinx-basic-ng-1.0.0.beta2/src/sphinx_basic_ng/theme/basic-ng/000077500000000000000000000000001445232664700242255ustar00rootroot00000000000000sphinx-basic-ng-1.0.0.beta2/src/sphinx_basic_ng/theme/basic-ng/changes/000077500000000000000000000000001445232664700256355ustar00rootroot00000000000000sphinx-basic-ng-1.0.0.beta2/src/sphinx_basic_ng/theme/basic-ng/changes/frameset.html000066400000000000000000000001031445232664700303230ustar00rootroot00000000000000{{ warning("This theme does not support changes/frameset.html") }} sphinx-basic-ng-1.0.0.beta2/src/sphinx_basic_ng/theme/basic-ng/changes/rstsource.html000066400000000000000000000001041445232664700305470ustar00rootroot00000000000000{{ warning("This theme does not support changes/rstsource.html") }} sphinx-basic-ng-1.0.0.beta2/src/sphinx_basic_ng/theme/basic-ng/changes/versionchanges.html000066400000000000000000000001111445232664700315320ustar00rootroot00000000000000{{ warning("This theme does not support changes/versionchanges.html") }} sphinx-basic-ng-1.0.0.beta2/src/sphinx_basic_ng/theme/basic-ng/components/000077500000000000000000000000001445232664700264125ustar00rootroot00000000000000sphinx-basic-ng-1.0.0.beta2/src/sphinx_basic_ng/theme/basic-ng/components/breadcrumbs.html000066400000000000000000000016331445232664700315740ustar00rootroot00000000000000{% if (breadcrumb_include_index_as and pagename != 'index') or parents or breadcrumb_include_page -%} {%- endif -%} sphinx-basic-ng-1.0.0.beta2/src/sphinx_basic_ng/theme/basic-ng/components/edit-this-page.html000066400000000000000000000043221445232664700321050ustar00rootroot00000000000000{%- macro sanitise_trailing_slash(s) -%}{{ s.rstrip("/") }}{%- endmacro -%} {%- macro determine_page_edit_link() -%} {%- if theme_source_edit_link -%} {{ theme_source_edit_link.format(filename=pagename+page_source_suffix) }} {%- else -%} {#- First, sanitise the trailing slashes. -#} {%- set repo = sanitise_trailing_slash(theme_source_repository) -%} {%- set branch = theme_source_branch -%} {%- set subdirectory = sanitise_trailing_slash(theme_source_directory) -%} {#- Figure out the document's source file path. -#} {%- set relative_path = pagename + page_source_suffix -%} {%- if not subdirectory -%} {%- set document_path = relative_path -%} {%- else -%} {%- set document_path = subdirectory + "/" + relative_path -%} {%- endif -%} {#- Don't allow http:// URLs -#} {%- if repo.startswith( ( "http://github.com/", "http://gitlab.com/", "http://bitbucket.org/", ) ) -%} {{ warning("Could not use `source_repository` provided. Please use https:// links in your `conf.py` file's `html_theme_options`.") }} {#- Handle the relevant cases -#} {%- elif repo.startswith("https://github.com/") -%} {{ repo }}/edit/{{ branch }}/{{ document_path }} {%- elif repo.startswith("https://gitlab.com/") -%} {{ repo }}/-/edit/{{ branch }}/{{ document_path }} {%- elif repo.startswith("https://bitbucket.org/") -%} {{ repo }}/src/{{ branch }}/{{ document_path }}?mode=edit&at={{ branch }} {#- Fail with a warning -#} {%- else -%} {{ warning( "Could not understand `source_repository` provided: " + repo + "\n" + "You should set `source_edit_link`, so that the edit link is presented." ) }} {%- endif -%} {%- endif -%} {%- endmacro -%} {%- if page_source_suffix -%} {%- set can_find_edit_link = ( (theme_source_edit_link and pagename) or (theme_source_repository and theme_source_branch) ) -%} {%- if can_find_edit_link -%} {%- block link_available -%} {{ _("Edit this page") }} {%- endblock link_available -%} {%- else -%} {%- block link_not_available -%}{%- endblock -%} {%- endif -%} {%- endif -%} sphinx-basic-ng-1.0.0.beta2/src/sphinx_basic_ng/theme/basic-ng/components/ethical-ads.html000066400000000000000000000005011445232664700314520ustar00rootroot00000000000000{% if READTHEDOCS or ethical_ad_publisher %}
{% endif %} sphinx-basic-ng-1.0.0.beta2/src/sphinx_basic_ng/theme/basic-ng/components/logo.html000066400000000000000000000001471445232664700302420ustar00rootroot00000000000000{% if logo %} {% endif %} sphinx-basic-ng-1.0.0.beta2/src/sphinx_basic_ng/theme/basic-ng/components/related-pages.html000066400000000000000000000014601445232664700320160ustar00rootroot00000000000000 sphinx-basic-ng-1.0.0.beta2/src/sphinx_basic_ng/theme/basic-ng/components/search-hide.html000066400000000000000000000000331445232664700314500ustar00rootroot00000000000000 sphinx-basic-ng-1.0.0.beta2/src/sphinx_basic_ng/theme/basic-ng/components/search-input.html000066400000000000000000000002351445232664700317020ustar00rootroot00000000000000
toggle-sidebar-primary.html000066400000000000000000000010611445232664700335700ustar00rootroot00000000000000sphinx-basic-ng-1.0.0.beta2/src/sphinx_basic_ng/theme/basic-ng/components toggle-sidebar-secondary.html000066400000000000000000000010651445232664700341000ustar00rootroot00000000000000sphinx-basic-ng-1.0.0.beta2/src/sphinx_basic_ng/theme/basic-ng/components sphinx-basic-ng-1.0.0.beta2/src/sphinx_basic_ng/theme/basic-ng/components/view-this-page.html000066400000000000000000000045451445232664700321410ustar00rootroot00000000000000{%- macro sanitise_trailing_slash(s) -%}{{ s.rstrip("/") }}{%- endmacro -%} {%- macro determine_page_view_link() -%} {%- if theme_source_view_link -%} {{ theme_source_view_link.format(filename=pagename+page_source_suffix) }} {%- elif theme_source_repository -%} {#- First, sanitise the trailing slashes. -#} {%- set repo = sanitise_trailing_slash(theme_source_repository) -%} {%- set branch = theme_source_branch -%} {%- set subdirectory = sanitise_trailing_slash(theme_source_directory) -%} {#- Figure out the document's source file path. -#} {%- set relative_path = pagename + page_source_suffix -%} {%- if not subdirectory -%} {%- set document_path = relative_path -%} {%- else -%} {%- set document_path = subdirectory + "/" + relative_path -%} {%- endif -%} {#- Don't allow http:// URLs -#} {%- if repo.startswith( ( "http://github.com/", "http://gitlab.com/", "http://bitbucket.org/", ) ) -%} {{ warning("Could not use `source_repository` provided. Please use https:// links in your `conf.py` file's `html_theme_options`.") }} {#- Handle the relevant cases -#} {%- elif repo.startswith("https://github.com/") -%} {{ repo }}/blob/{{ branch }}/{{ document_path }}?plain=true {%- elif repo.startswith("https://gitlab.com/") -%} {{ repo }}/blob/{{ branch }}/{{ document_path }} {%- elif repo.startswith("https://bitbucket.org/") -%} {{ repo }}/src/{{ branch }}/{{ document_path }} {#- Fail with a warning -#} {%- else -%} {{ warning( "Could not understand `source_repository` provided: " + repo + "\n" + "You should set `source_view_link`, so that the view link is presented." ) }} {%- endif -%} {%- elif show_source and has_source -%} {{ pathto('_sources/' + sourcename, true) }} {%- endif -%} {%- endmacro -%} {%- if page_source_suffix -%} {%- set can_find_view_link = ( (theme_source_view_link and pagename) or (show_source and has_source and sourcename) or (theme_source_repository and theme_source_branch) ) -%} {%- if can_find_view_link -%} {%- block link_available -%} {{ _("View sources") }} {%- endblock link_available -%} {%- else -%} {%- block link_not_available -%}{%- endblock -%} {%- endif -%} {%- endif -%} sphinx-basic-ng-1.0.0.beta2/src/sphinx_basic_ng/theme/basic-ng/defindex.html000066400000000000000000000000721445232664700267000ustar00rootroot00000000000000{{ warning('defindex.html template is not supported.') }} sphinx-basic-ng-1.0.0.beta2/src/sphinx_basic_ng/theme/basic-ng/domainindex.html000066400000000000000000000035661445232664700274240ustar00rootroot00000000000000{% extends "page.html" %} {% block head_title -%} {{ indextitle|striptags|e }} - {{ docstitle|striptags|e }} {% endblock head_title -%} {% block scripts -%} {{ super() }} {%- if not embedded and collapse_index %} {%- endif -%} {%- endblock scripts %} {% block content %}
{% block content_inner %}

{{ indextitle }}

{%- for (letter, entries) in content -%} {{ letter }} {%- if not loop.last %} | {% endif -%} {%- endfor -%}
{%- set groupid = idgen() %} {%- for letter, entries in content %} {%- for (name, grouptype, page, anchor, extra, qualifier, description) in entries %} {%- endfor %} {%- endfor %}
 
{{ letter }}
{% if grouptype == 1 -%} {%- endif %} {% if grouptype == 2 %}   {% endif %} {% if page %}{% endif -%} {{ name|e }} {%- if page %}{% endif %} {%- if extra %} ({{ extra|e }}){% endif -%} {% if qualifier %}{{ qualifier|e }}:{% endif %} {{ description|e }}
{% endblock content_inner %}
{% endblock content %} sphinx-basic-ng-1.0.0.beta2/src/sphinx_basic_ng/theme/basic-ng/genindex-single.html000066400000000000000000000031121445232664700301700ustar00rootroot00000000000000{# Module: single page index, split by a "key" #} {% extends "page.html" %} {% block head_title -%} {{ _("Index") }} - {{ docstitle|striptags|e }} {%- endblock head_title %} {% macro indexentries(firstname, links) -%} {% if links -%} {%- if links[0][0] %}{% endif -%} {{ firstname|e }} {%- if links[0][0] %}{% endif -%} {%- for ismain, link in links[1:] -%} , {%- if ismain %}{% endif -%} [{{ loop.index }}] {%- if ismain %}{% endif -%} {%- endfor %} {%- else %} {{ firstname|e }} {%- endif %} {% endmacro %} {% block content %}
{% block content_inner %}

{% trans key=key %}Index – {{ key }}{% endtrans %}

{%- for column in entries|slice(2) if column %} {%- endfor %}
    {%- for entryname, (links, subitems, _) in column %}
  • {{ indexentries(entryname, links) }} {%- if subitems %}
      {%- for subentryname, subentrylinks in subitems %}
    • {{ indexentries(subentryname, subentrylinks) }}
    • {%- endfor %}
    {%- endif -%}
  • {%- endfor %}
{% endblock content_inner %}
{% endblock %} sphinx-basic-ng-1.0.0.beta2/src/sphinx_basic_ng/theme/basic-ng/genindex-split.html000066400000000000000000000014471445232664700300530ustar00rootroot00000000000000{# Module: A single page of a multi-page index #} {% extends "page.html" %} {% block head_title -%} {{ _("Index") }} - {{ docstitle|striptags|e }} {%- endblock head_title %} {% block content %}
{% endblock %} sphinx-basic-ng-1.0.0.beta2/src/sphinx_basic_ng/theme/basic-ng/genindex.html000066400000000000000000000034371445232664700267230ustar00rootroot00000000000000{% extends "page.html" %} {% block head_title -%} {{ _("Index") }} - {{ docstitle|striptags|e }} {%- endblock head_title %} {% macro indexentries(firstname, links) -%} {% if links -%} {%- if links[0][0] %}{% endif -%} {{ firstname|e }} {%- if links[0][0] %}{% endif -%} {%- for ismain, link in links[1:] -%} , {%- if ismain %}{% endif -%} [{{ loop.index }}] {%- if ismain %}{% endif -%} {%- endfor %} {%- else %} {{ firstname|e }} {%- endif %} {% endmacro %} {% block content %}
{% block content_inner %}

{{ _('Index') }}

{%- for key, dummy in genindexentries -%} {{ key }} {%- if not loop.last %} | {% endif -%} {%- endfor -%}
{%- for key, entries in genindexentries %}

{{ key }}

{%- for column in entries|slice_index(2) if column %} {%- endfor %}
    {%- for entryname, (links, subitems, _) in column %}
  • {{ indexentries(entryname, links) }} {%- if subitems %}
      {%- for subentryname, subentrylinks in subitems %}
    • {{ indexentries(subentryname, subentrylinks) }}
    • {%- endfor %}
    {%- endif -%}
  • {%- endfor %}
{% endfor %} {% endblock content_inner %}
{% endblock %} sphinx-basic-ng-1.0.0.beta2/src/sphinx_basic_ng/theme/basic-ng/globaltoc.html000066400000000000000000000000741445232664700270620ustar00rootroot00000000000000{{ warning("This theme does not support globaltoc.html") }} sphinx-basic-ng-1.0.0.beta2/src/sphinx_basic_ng/theme/basic-ng/layout.html000066400000000000000000000041451445232664700264340ustar00rootroot00000000000000 {% block head_meta -%} {% if not skip_ua_compatible -%} {%- endif -%} {{ metatags }} {% endblock head_meta -%} {% block head_title %}{{ title|striptags|e }}{% endblock head_title %} {%- block head_links -%} {% if favicon -%} {%- endif -%} {% if hasdoc('about') -%} {%- endif -%} {% if hasdoc('genindex') -%} {%- endif -%} {% if hasdoc('search') -%} {%- endif -%} {% if hasdoc('copyright') -%} {%- endif -%} {% if next -%} {%- endif -%} {% if prev -%} {%- endif -%} {% endblock head_links -%} {% block head_stylesheets -%} {% if not omit_skeleton_css -%} {%- endif -%} {% for css in css_files -%} {%- if css|attr("filename") -%} {{ css_tag(css) }} {%- else -%} {%- endif -%} {% endfor -%} {%- endblock head_stylesheets -%} {% block head_javascript %}{% endblock %} {% block head_extra %}{% endblock %} {% block body %}{% endblock body -%} {% block body_javascript -%} {% for js in script_files -%} {{ js_tag(js) }} {% endfor -%} {%- endblock body_javascript -%} sphinx-basic-ng-1.0.0.beta2/src/sphinx_basic_ng/theme/basic-ng/localtoc.html000066400000000000000000000000731445232664700267130ustar00rootroot00000000000000{{ warning("This theme does not support localtoc.html") }} sphinx-basic-ng-1.0.0.beta2/src/sphinx_basic_ng/theme/basic-ng/page.html000066400000000000000000000053441445232664700260350ustar00rootroot00000000000000{# Layout: This is used by _every_ Sphinx content page #} {% extends "layout.html" %} {% block body %} {% block announcement %}
{% include "sections/announcement.html" %}
{% endblock announcement %} {% block header %}
{% include "sections/header.html" %}
{% endblock header %} {% block header_secondary %}
{% include "sections/header-secondary.html" %}
{% endblock header_secondary %} {% block container %}
{% block sidebar_primary %} {% endblock sidebar_primary %}
{% block header_content %}
{% include "sections/header-content.html" %}
{% endblock header_content %}
{% block content %}
{% include "sections/header-article.html" %}
{% include "sections/article.html" %}
{% include "sections/footer-article.html" %}
{% endblock content %} {% block sidebar_secondary %} {% endblock sidebar_secondary %}
{% block footer_content %}
{% endblock footer_content %}
{% endblock container %} {% block footer %}
{% endblock footer %} {% endblock body %} sphinx-basic-ng-1.0.0.beta2/src/sphinx_basic_ng/theme/basic-ng/relations.html000066400000000000000000000000741445232664700271140ustar00rootroot00000000000000{{ warning("This theme does not support relations.html") }} sphinx-basic-ng-1.0.0.beta2/src/sphinx_basic_ng/theme/basic-ng/search.html000066400000000000000000000016461445232664700263670ustar00rootroot00000000000000{% extends "page.html" %} {% block head_title %}{{ _("Search") }} - {{ docstitle }}{% endblock head_title %} {% block content %}
{% block before_results -%} {%- endblock %}
{% block after_results %}{% endblock %}
{% endblock content %} {% block body_javascript -%} {{ super() }} {%- endblock body_javascript %} sphinx-basic-ng-1.0.0.beta2/src/sphinx_basic_ng/theme/basic-ng/searchbox.html000066400000000000000000000000741445232664700270720ustar00rootroot00000000000000{{ warning("This theme does not support searchbox.html") }} sphinx-basic-ng-1.0.0.beta2/src/sphinx_basic_ng/theme/basic-ng/sections/000077500000000000000000000000001445232664700260545ustar00rootroot00000000000000sphinx-basic-ng-1.0.0.beta2/src/sphinx_basic_ng/theme/basic-ng/sections/announcement.html000066400000000000000000000000331445232664700314300ustar00rootroot00000000000000sections/announcement.html sphinx-basic-ng-1.0.0.beta2/src/sphinx_basic_ng/theme/basic-ng/sections/article.html000066400000000000000000000014521445232664700303670ustar00rootroot00000000000000sections/article.html

Hi there!

You seem to be trying to write a Sphinx theme! Nice!

What you're seeing is the initial scaffolding provided by sphinx-basic-ng which should serve as a decent base for most 3-column layouts. If this is the first time you're seeing this, you probably want to be looking at the Getting Started page in the documentation.

Every "section" of this page is populated using a template. The name of the template is visible in the sections. To override it, create your own template in the same path in your templates directory. For example, creating a template named sections/article.html will override this section.

sphinx-basic-ng-1.0.0.beta2/src/sphinx_basic_ng/theme/basic-ng/sections/footer-article.html000066400000000000000000000000351445232664700316570ustar00rootroot00000000000000sections/footer-article.html sphinx-basic-ng-1.0.0.beta2/src/sphinx_basic_ng/theme/basic-ng/sections/footer-content.html000066400000000000000000000000351445232664700317060ustar00rootroot00000000000000sections/footer-content.html sphinx-basic-ng-1.0.0.beta2/src/sphinx_basic_ng/theme/basic-ng/sections/footer.html000066400000000000000000000000251445232664700302350ustar00rootroot00000000000000sections/footer.html sphinx-basic-ng-1.0.0.beta2/src/sphinx_basic_ng/theme/basic-ng/sections/header-article.html000066400000000000000000000000351445232664700316110ustar00rootroot00000000000000sections/header-article.html sphinx-basic-ng-1.0.0.beta2/src/sphinx_basic_ng/theme/basic-ng/sections/header-content.html000066400000000000000000000000351445232664700316400ustar00rootroot00000000000000sections/header-content.html sphinx-basic-ng-1.0.0.beta2/src/sphinx_basic_ng/theme/basic-ng/sections/header-secondary.html000066400000000000000000000000371445232664700321570ustar00rootroot00000000000000sections/header-secondary.html sphinx-basic-ng-1.0.0.beta2/src/sphinx_basic_ng/theme/basic-ng/sections/header.html000066400000000000000000000000251445232664700301670ustar00rootroot00000000000000sections/header.html sphinx-basic-ng-1.0.0.beta2/src/sphinx_basic_ng/theme/basic-ng/sections/sidebar-primary.html000066400000000000000000000000361445232664700320330ustar00rootroot00000000000000sections/sidebar-primary.html sphinx-basic-ng-1.0.0.beta2/src/sphinx_basic_ng/theme/basic-ng/sections/sidebar-secondary.html000066400000000000000000000000401445232664700323320ustar00rootroot00000000000000sections/sidebar-secondary.html sphinx-basic-ng-1.0.0.beta2/src/sphinx_basic_ng/theme/basic-ng/sourcelink.html000066400000000000000000000000751445232664700272730ustar00rootroot00000000000000{{ warning("This theme does not support sourcelink.html") }} sphinx-basic-ng-1.0.0.beta2/src/sphinx_basic_ng/theme/basic-ng/static/000077500000000000000000000000001445232664700255145ustar00rootroot00000000000000sphinx-basic-ng-1.0.0.beta2/src/sphinx_basic_ng/theme/basic-ng/static/debug.css000066400000000000000000000023621445232664700273170ustar00rootroot00000000000000/* This CSS file should be overridden by the theme authors. It's meant for debugging and developing the skeleton that this theme provides. */ body { font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; background: lavender; } .sb-announcement { background: rgb(131, 131, 131); } .sb-announcement__inner { background: black; color: white; } .sb-header { background: lightskyblue; } .sb-header__inner { background: royalblue; color: white; } .sb-header-secondary { background: lightcyan; } .sb-header-secondary__inner { background: cornflowerblue; color: white; } .sb-sidebar-primary { background: lightgreen; } .sb-main { background: blanchedalmond; } .sb-main__inner { background: antiquewhite; } .sb-header-article { background: lightsteelblue; } .sb-article-container { background: snow; } .sb-article-main { background: white; } .sb-footer-article { background: lightpink; } .sb-sidebar-secondary { background: lightgoldenrodyellow; } .sb-footer-content { background: plum; } .sb-footer-content__inner { background: palevioletred; } .sb-footer { background: pink; } .sb-footer__inner { background: salmon; } .sb-article { background: white; } sphinx-basic-ng-1.0.0.beta2/src/sphinx_basic_ng/theme/basic-ng/static/skeleton.css000066400000000000000000000136221445232664700300560ustar00rootroot00000000000000/* Some sane resets. */ html { height: 100%; } body { margin: 0; min-height: 100%; } /* All the flexbox magic! */ body, .sb-announcement, .sb-content, .sb-main, .sb-container, .sb-container__inner, .sb-article-container, .sb-footer-content, .sb-header, .sb-header-secondary, .sb-footer { display: flex; } /* These order things vertically */ body, .sb-main, .sb-article-container { flex-direction: column; } /* Put elements in the center */ .sb-header, .sb-header-secondary, .sb-container, .sb-content, .sb-footer, .sb-footer-content { justify-content: center; } /* Put elements at the ends */ .sb-article-container { justify-content: space-between; } /* These elements grow. */ .sb-main, .sb-content, .sb-container, article { flex-grow: 1; } /* Because padding making this wider is not fun */ article { box-sizing: border-box; } /* The announcements element should never be wider than the page. */ .sb-announcement { max-width: 100%; } .sb-sidebar-primary, .sb-sidebar-secondary { flex-shrink: 0; width: 17rem; } .sb-announcement__inner { justify-content: center; box-sizing: border-box; height: 3rem; overflow-x: auto; white-space: nowrap; } /* Sidebars, with checkbox-based toggle */ .sb-sidebar-primary, .sb-sidebar-secondary { position: fixed; height: 100%; top: 0; } .sb-sidebar-primary { left: -17rem; transition: left 250ms ease-in-out; } .sb-sidebar-secondary { right: -17rem; transition: right 250ms ease-in-out; } .sb-sidebar-toggle { display: none; } .sb-sidebar-overlay { position: fixed; top: 0; width: 0; height: 0; transition: width 0ms ease 250ms, height 0ms ease 250ms, opacity 250ms ease; opacity: 0; background-color: rgba(0, 0, 0, 0.54); } #sb-sidebar-toggle--primary:checked ~ .sb-sidebar-overlay[for="sb-sidebar-toggle--primary"], #sb-sidebar-toggle--secondary:checked ~ .sb-sidebar-overlay[for="sb-sidebar-toggle--secondary"] { width: 100%; height: 100%; opacity: 1; transition: width 0ms ease, height 0ms ease, opacity 250ms ease; } #sb-sidebar-toggle--primary:checked ~ .sb-container .sb-sidebar-primary { left: 0; } #sb-sidebar-toggle--secondary:checked ~ .sb-container .sb-sidebar-secondary { right: 0; } /* Full-width mode */ .drop-secondary-sidebar-for-full-width-content .hide-when-secondary-sidebar-shown { display: none !important; } .drop-secondary-sidebar-for-full-width-content .sb-sidebar-secondary { display: none !important; } /* Mobile views */ .sb-page-width { width: 100%; } .sb-article-container, .sb-footer-content__inner, .drop-secondary-sidebar-for-full-width-content .sb-article, .drop-secondary-sidebar-for-full-width-content .match-content-width { width: 100vw; } .sb-article, .match-content-width { padding: 0 1rem; box-sizing: border-box; } @media (min-width: 32rem) { .sb-article, .match-content-width { padding: 0 2rem; } } /* Tablet views */ @media (min-width: 42rem) { .sb-article-container { width: auto; } .sb-footer-content__inner, .drop-secondary-sidebar-for-full-width-content .sb-article, .drop-secondary-sidebar-for-full-width-content .match-content-width { width: 42rem; } .sb-article, .match-content-width { width: 42rem; } } @media (min-width: 46rem) { .sb-footer-content__inner, .drop-secondary-sidebar-for-full-width-content .sb-article, .drop-secondary-sidebar-for-full-width-content .match-content-width { width: 46rem; } .sb-article, .match-content-width { width: 46rem; } } @media (min-width: 50rem) { .sb-footer-content__inner, .drop-secondary-sidebar-for-full-width-content .sb-article, .drop-secondary-sidebar-for-full-width-content .match-content-width { width: 50rem; } .sb-article, .match-content-width { width: 50rem; } } /* Tablet views */ @media (min-width: 59rem) { .sb-sidebar-secondary { position: static; } .hide-when-secondary-sidebar-shown { display: none !important; } .sb-footer-content__inner, .drop-secondary-sidebar-for-full-width-content .sb-article, .drop-secondary-sidebar-for-full-width-content .match-content-width { width: 59rem; } .sb-article, .match-content-width { width: 42rem; } } @media (min-width: 63rem) { .sb-footer-content__inner, .drop-secondary-sidebar-for-full-width-content .sb-article, .drop-secondary-sidebar-for-full-width-content .match-content-width { width: 63rem; } .sb-article, .match-content-width { width: 46rem; } } @media (min-width: 67rem) { .sb-footer-content__inner, .drop-secondary-sidebar-for-full-width-content .sb-article, .drop-secondary-sidebar-for-full-width-content .match-content-width { width: 67rem; } .sb-article, .match-content-width { width: 50rem; } } /* Desktop views */ @media (min-width: 76rem) { .sb-sidebar-primary { position: static; } .hide-when-primary-sidebar-shown { display: none !important; } .sb-footer-content__inner, .drop-secondary-sidebar-for-full-width-content .sb-article, .drop-secondary-sidebar-for-full-width-content .match-content-width { width: 59rem; } .sb-article, .match-content-width { width: 42rem; } } /* Full desktop views */ @media (min-width: 80rem) { .sb-article, .match-content-width { width: 46rem; } .sb-footer-content__inner, .drop-secondary-sidebar-for-full-width-content .sb-article, .drop-secondary-sidebar-for-full-width-content .match-content-width { width: 63rem; } } @media (min-width: 84rem) { .sb-article, .match-content-width { width: 50rem; } .sb-footer-content__inner, .drop-secondary-sidebar-for-full-width-content .sb-article, .drop-secondary-sidebar-for-full-width-content .match-content-width { width: 67rem; } } @media (min-width: 88rem) { .sb-footer-content__inner, .drop-secondary-sidebar-for-full-width-content .sb-article, .drop-secondary-sidebar-for-full-width-content .match-content-width { width: 67rem; } .sb-page-width { width: 88rem; } } sphinx-basic-ng-1.0.0.beta2/src/sphinx_basic_ng/theme/basic-ng/theme.conf000066400000000000000000000001051445232664700261720ustar00rootroot00000000000000[theme] inherit = basic stylesheet = debug.css sidebars = [options] sphinx-basic-ng-1.0.0.beta2/tests/000077500000000000000000000000001445232664700166555ustar00rootroot00000000000000sphinx-basic-ng-1.0.0.beta2/tests/barebones/000077500000000000000000000000001445232664700206155ustar00rootroot00000000000000sphinx-basic-ng-1.0.0.beta2/tests/barebones/conf.py000066400000000000000000000011561445232664700221170ustar00rootroot00000000000000# Configuration file for the Sphinx documentation builder. # # Full list of options can be found in the Sphinx documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # # -- Project information ----------------------------------------------------- # project = "sphinx-basic-ng demo" copyright = "2021, Pradyun Gedam" author = "Pradyun Gedam" # # -- General configuration --------------------------------------------------- # extensions = ["myst_parser"] # # -- Options for HTML output ------------------------------------------------- # html_theme = "basic-ng" templates_path = ["_templates"] sphinx-basic-ng-1.0.0.beta2/tests/barebones/index.md000066400000000000000000000006201445232664700222440ustar00rootroot00000000000000# sphinx-basic-ng A modern skeleton for Sphinx themes. The template for each section is displayed on this page. To override it, create your own template in the same location. For example, `sections/article-main.html` will override the announcement HTML. Below is a sample Table of Contents. ```{toctree} :glob: section-one/index ``` ```{toctree} :glob: :caption: Caption section-two/index ``` sphinx-basic-ng-1.0.0.beta2/tests/barebones/section-one/000077500000000000000000000000001445232664700230405ustar00rootroot00000000000000sphinx-basic-ng-1.0.0.beta2/tests/barebones/section-one/index.md000066400000000000000000000000701445232664700244660ustar00rootroot00000000000000# Section 1 ```{toctree} page-one-one page-one-two ``` sphinx-basic-ng-1.0.0.beta2/tests/barebones/section-one/page-one-one.md000066400000000000000000000004041445232664700256320ustar00rootroot00000000000000# Page 1 in Section 1 Lorem ipsum dolor sit amet consectetur adipisicing elit. Soluta quod nulla officia! Ratione voluptate distinctio in architecto! Reprehenderit neque dicta in eligendi similique obcaecati eos? Quibusdam assumenda pariatur dolore voluptas? sphinx-basic-ng-1.0.0.beta2/tests/barebones/section-one/page-one-two.md000066400000000000000000000004041445232664700256620ustar00rootroot00000000000000# Page 2 in Section 1 Lorem ipsum dolor sit amet consectetur adipisicing elit. Soluta quod nulla officia! Ratione voluptate distinctio in architecto! Reprehenderit neque dicta in eligendi similique obcaecati eos? Quibusdam assumenda pariatur dolore voluptas? sphinx-basic-ng-1.0.0.beta2/tests/barebones/section-two/000077500000000000000000000000001445232664700230705ustar00rootroot00000000000000sphinx-basic-ng-1.0.0.beta2/tests/barebones/section-two/index.md000066400000000000000000000000701445232664700245160ustar00rootroot00000000000000# Section 2 ```{toctree} page-two-one page-two-two ``` sphinx-basic-ng-1.0.0.beta2/tests/barebones/section-two/page-two-one.md000066400000000000000000000004041445232664700257120ustar00rootroot00000000000000# Page 1 in Section 2 Lorem ipsum dolor sit amet consectetur adipisicing elit. Soluta quod nulla officia! Ratione voluptate distinctio in architecto! Reprehenderit neque dicta in eligendi similique obcaecati eos? Quibusdam assumenda pariatur dolore voluptas? sphinx-basic-ng-1.0.0.beta2/tests/barebones/section-two/page-two-two.md000066400000000000000000000004041445232664700257420ustar00rootroot00000000000000# Page 2 in Section 2 Lorem ipsum dolor sit amet consectetur adipisicing elit. Soluta quod nulla officia! Ratione voluptate distinctio in architecto! Reprehenderit neque dicta in eligendi similique obcaecati eos? Quibusdam assumenda pariatur dolore voluptas?