Merge pull request #1839 from rkratky/FR-5688_add-missing-artifacts

Add missing docs artifacts (to fix docs styling)
This commit is contained in:
Dan Bungert 2023-10-18 08:04:16 -06:00 committed by GitHub
commit 65da5078a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 744 additions and 1 deletions

9
doc/.gitignore vendored
View File

@ -1,2 +1,9 @@
/*env*/
.sphinx/venv/
.sphinx/warnings.txt
.sphinx/.wordlist.dic
.sphinx/.doctrees/
_build _build
.sphinx .DS_Store
__pycache__
.idea/

View File

@ -0,0 +1,189 @@
/** Fix the font weight (300 for normal, 400 for slightly bold) **/
div.page, h1, h2, h3, h4, h5, h6, .sidebar-tree .current-page>.reference, button, input, optgroup, select, textarea, th.head {
font-weight: 300
}
.toc-tree li.scroll-current>.reference, dl.glossary dt, dl.simple dt, dl:not([class]) dt {
font-weight: 400;
}
/** Table styling **/
th.head {
text-transform: uppercase;
font-size: var(--font-size--small);
}
table.docutils {
border: 0;
box-shadow: none;
width:100%;
}
table.docutils td, table.docutils th, table.docutils td:last-child, table.docutils th:last-child, table.docutils td:first-child, table.docutils th:first-child {
border-right: none;
border-left: none;
}
/* Allow to centre text horizontally in table data cells */
table.align-center {
text-align: center !important;
}
/** No rounded corners **/
.admonition, code.literal, .sphinx-tabs-tab, .sphinx-tabs-panel, .highlight {
border-radius: 0;
}
/** Admonition styling **/
.admonition {
border-top: 1px solid #d9d9d9;
border-right: 1px solid #d9d9d9;
border-bottom: 1px solid #d9d9d9;
}
/** Color for the "copy link" symbol next to headings **/
a.headerlink {
color: var(--color-brand-primary);
}
/** Line to the left of the current navigation entry **/
.sidebar-tree li.current-page {
border-left: 2px solid var(--color-brand-primary);
}
/** Some tweaks for issue #16 **/
[role="tablist"] {
border-bottom: 1px solid var(--color-sidebar-item-background--hover);
}
.sphinx-tabs-tab[aria-selected="true"] {
border: 0;
border-bottom: 2px solid var(--color-brand-primary);
background-color: var(--color-sidebar-item-background--current);
font-weight:300;
}
.sphinx-tabs-tab{
color: var(--color-brand-primary);
font-weight:300;
}
.sphinx-tabs-panel {
border: 0;
border-bottom: 1px solid var(--color-sidebar-item-background--hover);
background: var(--color-background-primary);
}
button.sphinx-tabs-tab:hover {
background-color: var(--color-sidebar-item-background--hover);
}
/** Custom classes to fix scrolling in tables by decreasing the
font size or breaking certain columns.
Specify the classes in the Markdown file with, for example:
```{rst-class} break-col-4 min-width-4-8
```
**/
table.dec-font-size {
font-size: smaller;
}
table.break-col-1 td.text-left:first-child {
word-break: break-word;
}
table.break-col-4 td.text-left:nth-child(4) {
word-break: break-word;
}
table.min-width-1-15 td.text-left:first-child {
min-width: 15em;
}
table.min-width-4-8 td.text-left:nth-child(4) {
min-width: 8em;
}
/** Underline for abbreviations **/
abbr[title] {
text-decoration: underline solid #cdcdcd;
}
/** Use the same style for right-details as for left-details **/
.bottom-of-page .right-details {
font-size: var(--font-size--small);
display: block;
}
/** Version switcher */
button.version_select {
color: var(--color-foreground-primary);
background-color: var(--color-toc-background);
padding: 5px 10px;
border: none;
}
.version_select:hover, .version_select:focus {
background-color: var(--color-sidebar-item-background--hover);
}
.version_dropdown {
position: relative;
display: inline-block;
text-align: right;
font-size: var(--sidebar-item-font-size);
}
.available_versions {
display: none;
position: absolute;
right: 0px;
background-color: var(--color-toc-background);
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
z-index: 11;
}
.available_versions a {
color: var(--color-foreground-primary);
padding: 12px 16px;
text-decoration: none;
display: block;
}
.available_versions a:hover {background-color: var(--color-sidebar-item-background--current)}
.show {display:block;}
/** Fix for nested numbered list - the nested list is lettered **/
ol.arabic ol.arabic {
list-style: lower-alpha;
}
/** Make expandable sections look like links **/
details summary {
color: var(--color-link);
}
/** Fix the styling of the version box for readthedocs **/
#furo-readthedocs-versions .rst-versions, #furo-readthedocs-versions .rst-current-version, #furo-readthedocs-versions:focus-within .rst-current-version, #furo-readthedocs-versions:hover .rst-current-version {
background: var(--color-sidebar-item-background--hover);
}
.rst-versions .rst-other-versions dd a {
color: var(--color-link);
}
#furo-readthedocs-versions:focus-within .rst-current-version .fa-book, #furo-readthedocs-versions:hover .rst-current-version .fa-book, .rst-versions .rst-other-versions {
color: var(--color-sidebar-link-text);
}
.rst-versions .rst-current-version {
color: var(--color-version-popup);
font-weight: bolder;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -0,0 +1,88 @@
body {
--color-code-background: #f8f8f8;
--color-code-foreground: black;
--font-stack: Ubuntu, -apple-system, Segoe UI, Roboto, Oxygen, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
--font-stack--monospace: Ubuntu Mono, Consolas, Monaco, Courier, monospace;
--color-foreground-primary: #111;
--color-foreground-secondary: var(--color-foreground-primary);
--color-foreground-muted: #333;
--color-background-secondary: #FFF;
--color-background-hover: #f2f2f2;
--color-brand-primary: #111;
--color-brand-content: #06C;
--color-api-background: #cdcdcd;
--color-inline-code-background: rgba(0,0,0,.03);
--color-sidebar-link-text: #111;
--color-sidebar-item-background--current: #ebebeb;
--color-sidebar-item-background--hover: #f2f2f2;
--toc-font-size: var(--font-size--small);
--color-admonition-title-background--note: var(--color-background-primary);
--color-admonition-title-background--tip: var(--color-background-primary);
--color-admonition-title-background--important: var(--color-background-primary);
--color-admonition-title-background--caution: var(--color-background-primary);
--color-admonition-title--note: #24598F;
--color-admonition-title--tip: #24598F;
--color-admonition-title--important: #C7162B;
--color-admonition-title--caution: #F99B11;
--color-highlighted-background: #EbEbEb;
--color-link-underline: var(--color-background-primary);
--color-link-underline--hover: var(--color-background-primary);
--color-version-popup: #772953;
}
@media not print {
body[data-theme="dark"] {
--color-code-background: #202020;
--color-code-foreground: #d0d0d0;
--color-foreground-secondary: var(--color-foreground-primary);
--color-foreground-muted: #CDCDCD;
--color-background-secondary: var(--color-background-primary);
--color-background-hover: #666;
--color-brand-primary: #fff;
--color-brand-content: #06C;
--color-sidebar-link-text: #f7f7f7;
--color-sidebar-item-background--current: #666;
--color-sidebar-item-background--hover: #333;
--color-admonition-background: transparent;
--color-admonition-title-background--note: var(--color-background-primary);
--color-admonition-title-background--tip: var(--color-background-primary);
--color-admonition-title-background--important: var(--color-background-primary);
--color-admonition-title-background--caution: var(--color-background-primary);
--color-admonition-title--note: #24598F;
--color-admonition-title--tip: #24598F;
--color-admonition-title--important: #C7162B;
--color-admonition-title--caution: #F99B11;
--color-highlighted-background: #666;
--color-link-underline: var(--color-background-primary);
--color-link-underline--hover: var(--color-background-primary);
--color-version-popup: #F29879;
}
@media (prefers-color-scheme: dark) {
body:not([data-theme="light"]) {
--color-code-background: #202020;
--color-code-foreground: #d0d0d0;
--color-foreground-secondary: var(--color-foreground-primary);
--color-foreground-muted: #CDCDCD;
--color-background-secondary: var(--color-background-primary);
--color-background-hover: #666;
--color-brand-primary: #fff;
--color-brand-content: #06C;
--color-sidebar-link-text: #f7f7f7;
--color-sidebar-item-background--current: #666;
--color-sidebar-item-background--hover: #333;
--color-admonition-background: transparent;
--color-admonition-title-background--note: var(--color-background-primary);
--color-admonition-title-background--tip: var(--color-background-primary);
--color-admonition-title-background--important: var(--color-background-primary);
--color-admonition-title-background--caution: var(--color-background-primary);
--color-admonition-title--note: #24598F;
--color-admonition-title--tip: #24598F;
--color-admonition-title--important: #C7162B;
--color-admonition-title--caution: #F99B11;
--color-highlighted-background: #666;
--color-link-underline: var(--color-background-primary);
--color-link-underline--hover: var(--color-background-primary);
--color-version-popup: #F29879;
}
}
}

View File

@ -0,0 +1,24 @@
.github-issue-link-container {
padding-right: 0.5rem;
}
.github-issue-link {
font-size: var(--font-size--small);
font-weight: bold;
background-color: #DD4814;
padding: 13px 23px;
text-decoration: none;
}
.github-issue-link:link {
color: #FFFFFF;
}
.github-issue-link:visited {
color: #FFFFFF
}
.muted-link.github-issue-link:hover {
color: #FFFFFF;
text-decoration: underline;
}
.github-issue-link:active {
color: #FFFFFF;
text-decoration: underline;
}

View File

@ -0,0 +1,34 @@
// if we already have an onload function, save that one
var prev_handler = window.onload;
window.onload = function() {
// call the previous onload function
if (prev_handler) {
prev_handler();
}
const link = document.createElement("a");
link.classList.add("muted-link");
link.classList.add("github-issue-link");
link.text = "Give feedback";
link.href = (
github_url
+ "/issues/new?"
+ "title=docs%3A+TYPE+YOUR+QUESTION+HERE"
+ "&body=*Please describe the question or issue you're facing with "
+ `"${document.title}"`
+ ".*"
+ "%0A%0A%0A%0A%0A"
+ "---"
+ "%0A"
+ `*Reported+from%3A+${location.href}*`
);
link.target = "_blank";
const div = document.createElement("div");
div.classList.add("github-issue-link-container");
div.append(link)
const container = document.querySelector(".article-container > .content-icon-container");
container.prepend(div);
};

View File

@ -0,0 +1,10 @@
$(document).ready(function() {
$(document).on("click", function () {
$(".more-links-dropdown").hide();
});
$('.nav-more-links').click(function(event) {
$('.more-links-dropdown').toggle();
event.stopPropagation();
});
})

View File

@ -0,0 +1,167 @@
.p-navigation {
border-bottom: 1px solid var(--color-sidebar-background-border);
}
.p-navigation__nav {
background: #333333;
display: flex;
}
.p-logo {
display: flex !important;
padding-top: 0 !important;
text-decoration: none;
}
.p-logo-image {
height: 44px;
padding-right: 10px;
}
.p-logo-text {
margin-top: 18px;
color: white;
text-decoration: none;
}
ul.p-navigation__links {
display: flex;
list-style: none;
margin-left: 0;
margin-top: auto;
margin-bottom: auto;
max-width: 800px;
width: 100%;
}
ul.p-navigation__links li {
margin: 0 auto;
text-align: center;
width: 100%;
}
ul.p-navigation__links li a {
background-color: rgba(0, 0, 0, 0);
border: none;
border-radius: 0;
color: var(--color-sidebar-link-text);
display: block;
font-weight: 400;
line-height: 1.5rem;
margin: 0;
overflow: hidden;
padding: 1rem 0;
position: relative;
text-align: left;
text-overflow: ellipsis;
transition-duration: .1s;
transition-property: background-color, color, opacity;
transition-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
white-space: nowrap;
width: 100%;
}
ul.p-navigation__links .p-navigation__link {
color: #ffffff;
font-weight: 300;
text-align: center;
text-decoration: none;
}
ul.p-navigation__links .p-navigation__link:hover {
background-color: #2b2b2b;
}
ul.p-navigation__links .p-dropdown__link:hover {
background-color: var(--color-sidebar-item-background--hover);
}
ul.p-navigation__links .p-navigation__sub-link {
background: var(--color-background-primary);
padding: .5rem 0 .5rem .5rem;
font-weight: 300;
}
ul.p-navigation__links .more-links-dropdown li a {
border-left: 1px solid var(--color-sidebar-background-border);
border-right: 1px solid var(--color-sidebar-background-border);
}
ul.p-navigation__links .more-links-dropdown li:first-child a {
border-top: 1px solid var(--color-sidebar-background-border);
}
ul.p-navigation__links .more-links-dropdown li:last-child a {
border-bottom: 1px solid var(--color-sidebar-background-border);
}
ul.p-navigation__links .p-navigation__logo {
padding: 0.5rem;
}
ul.p-navigation__links .p-navigation__logo img {
width: 40px;
}
ul.more-links-dropdown {
display: none;
overflow-x: visible;
height: 0;
z-index: 55;
padding: 0;
position: relative;
list-style: none;
margin-bottom: 0;
margin-top: 0;
}
.nav-more-links::after {
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3E%3Cpath fill='%23111' d='M8.187 11.748l6.187-6.187-1.06-1.061-5.127 5.127L3.061 4.5 2 5.561z'/%3E%3C/svg%3E");
background-position: center;
background-repeat: no-repeat;
background-size: contain;
content: "";
display: block;
filter: invert(100%);
height: 1rem;
pointer-events: none;
position: absolute;
right: 1rem;
text-indent: calc(100% + 10rem);
top: calc(1rem + 0.25rem);
width: 1rem;
}
.nav-ubuntu-com {
display: none;
}
@media only screen and (min-width: 480px) {
ul.p-navigation__links li {
width: 100%;
}
.nav-ubuntu-com {
display: inherit;
}
}
@media only screen and (max-width: 800px) {
.nav-more-links {
margin-left: auto !important;
padding-right: 2rem !important;
width: 8rem !important;
}
}
@media only screen and (min-width: 800px) {
ul.p-navigation__links li {
width: 100% !important;
}
}
@media only screen and (min-width: 1310px) {
ul.p-navigation__links {
margin-left: calc(50% - 41em);
}
}

BIN
doc/.sphinx/_static/tag.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

View File

@ -0,0 +1,12 @@
{% extends "furo/base.html" %}
{% block theme_scripts %}
<script>
const github_url = "{{ github_url }}";
</script>
{% endblock theme_scripts %}
{# ru-fu: don't include the color variables from the conf.py file, but use a
separate CSS file to save space #}
{% block theme_styles %}
{% endblock theme_styles %}

View File

@ -0,0 +1,99 @@
{# ru-fu: copied from Furo, with modifications as stated below. Modifications are marked 'mod:'. #}
<div class="related-pages">
{# mod: Per-page navigation #}
{% if meta %}
{% if 'sequential_nav' in meta %}
{% set sequential_nav = meta.sequential_nav %}
{% endif %}
{% endif %}
{# mod: Conditional wrappers to control page navigation buttons #}
{% if sequential_nav != "none" -%}
{% if next and (sequential_nav == "next" or sequential_nav == "both") -%}
<a class="next-page" href="{{ next.link }}">
<div class="page-info">
<div class="context">
<span>{{ _("Next") }}</span>
</div>
<div class="title">{{ next.title }}</div>
</div>
<svg class="furo-related-icon"><use href="#svg-arrow-right"></use></svg>
</a>
{%- endif %}
{% if prev and (sequential_nav == "prev" or sequential_nav == "both") -%}
<a class="prev-page" href="{{ prev.link }}">
<svg class="furo-related-icon"><use href="#svg-arrow-right"></use></svg>
<div class="page-info">
<div class="context">
<span>{{ _("Previous") }}</span>
</div>
{% if prev.link == pathto(master_doc) %}
<div class="title">{{ _("Home") }}</div>
{% else %}
<div class="title">{{ prev.title }}</div>
{% endif %}
</div>
</a>
{%- endif %}
{%- endif %}
</div>
<div class="bottom-of-page">
<div class="left-details">
{%- if show_copyright %}
<div class="copyright">
{%- if hasdoc('copyright') %}
{% trans path=pathto('copyright'), copyright=copyright|e -%}
<a href="{{ path }}">Copyright</a> &#169; {{ copyright }}
{%- endtrans %}
{%- else %}
{% trans copyright=copyright|e -%}
Copyright &#169; {{ copyright }}
{%- endtrans %}
{%- endif %}
</div>
{%- endif %}
{# mod: removed "Made with" #}
{%- if last_updated -%}
<div class="last-updated">
{% trans last_updated=last_updated|e -%}
Last updated on {{ last_updated }}
{%- endtrans -%}
</div>
{%- endif %}
{%- if show_source and has_source and sourcename %}
<div class="show-source">
<a class="muted-link" href="{{ pathto('_sources/' + sourcename, true)|e }}"
rel="nofollow">Show source</a>
</div>
{%- endif %}
</div>
<div class="right-details">
{# mod: replaced RTD icons with our links #}
{% if discourse %}
<div class="ask-discourse">
<a class="muted-link" href="{{ discourse }}">Ask a question on Discourse</a>
</div>
{% endif %}
{% if github_url and github_version and github_folder %}
{% if github_issues %}
<div class="issue-github">
<a class="muted-link" href="{{ github_url }}/issues/new?title=doc%3A+ADD+A+TITLE&body=DESCRIBE+THE+ISSUE%0A%0A---%0ADocument: {{ pagename }}{{ page_source_suffix }}">Open a GitHub issue for this page</a>
</div>
{% endif %}
<div class="edit-github">
<a class="muted-link" href="{{ github_url }}/edit/{{ github_version }}{{ github_folder }}{{ pagename }}{{ page_source_suffix }}">Edit this page on GitHub</a>
</div>
{% endif %}
</div>
</div>
</div>

View File

@ -0,0 +1,36 @@
<header id="header" class="p-navigation">
<div class="p-navigation__nav" role="menubar">
<ul class="p-navigation__links" role="menu">
<li>
<a class="p-logo" href="https://{{ product_page }}" aria-current="page">
<img src="{{ pathto(product_tag,1) }}" alt="Logo" class="p-logo-image">
<div class="p-logo-text p-heading--4">{{ project }}
</div>
</a>
</li>
<li class="nav-ubuntu-com">
<a href="https://{{ product_page }}" class="p-navigation__link">{{ product_page }}</a>
</li>
<li>
<a href="#" class="p-navigation__link nav-more-links">More resources</a>
<ul class="more-links-dropdown">
<li>
<a href="{{ discourse }}" class="p-navigation__sub-link p-dropdown__link">Forum</a>
</li>
<li>
<a href="{{ github_url }}" class="p-navigation__sub-link p-dropdown__link">GitHub</a>
</li>
</ul>
</li>
</ul>
</div>
</header>

View File

@ -0,0 +1,49 @@
{% extends "furo/page.html" %}
{% block footer %}
{% include "footer.html" %}
{% endblock footer %}
{% block body -%}
{% include "header.html" %}
{{ super() }}
{%- endblock body %}
{% if meta and ((meta.discourse and discourse_prefix) or meta.relatedlinks) %}
{% set furo_hide_toc_orig = furo_hide_toc %}
{% set furo_hide_toc=false %}
{% endif %}
{% block right_sidebar %}
<div class="toc-sticky toc-scroll">
{% if not furo_hide_toc_orig %}
<div class="toc-title-container">
<span class="toc-title">
{{ _("Contents") }}
</span>
</div>
<div class="toc-tree-container">
<div class="toc-tree">
{{ toc }}
</div>
</div>
{% endif %}
{% if meta and ((meta.discourse and discourse_prefix) or meta.relatedlinks) %}
<div class="relatedlinks-title-container">
<span class="relatedlinks-title">
Related links
</span>
</div>
<div class="relatedlinks-container">
<div class="relatedlinks">
{% if meta.discourse and discourse_prefix %}
{{ discourse_links(meta.discourse) }}
{% endif %}
{% if meta.relatedlinks %}
{{ related_links(meta.relatedlinks) }}
{% endif %}
</div>
</div>
{% endif %}
</div>
{% endblock right_sidebar %}

View File

@ -0,0 +1,28 @@
matrix:
- name: rST files
aspell:
lang: en
d: en_GB
dictionary:
wordlists:
- .wordlist.txt
- .custom_wordlist.txt
output: .sphinx/.wordlist.dic
sources:
- _build/**/*.html
pipeline:
- pyspelling.filters.html:
comments: false
attributes:
- title
- alt
ignores:
- code
- pre
- spellexception
- link
- title
- div.relatedlinks
- div.visually-hidden
- img
- a.p-navigation__link