Skip to content

Commit

Permalink
import starter pack
Browse files Browse the repository at this point in the history
  • Loading branch information
evilnick committed Oct 4, 2024
1 parent 83ca3ed commit 3effb05
Show file tree
Hide file tree
Showing 32 changed files with 1,108 additions and 189 deletions.
13 changes: 13 additions & 0 deletions docs/tools/.sphinx/_static/404.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
91 changes: 81 additions & 10 deletions docs/tools/.sphinx/_static/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@
Based on: https://github.com/canonical/vanilla-framework/blob/main/scss/_base_typography-definitions.scss
regular text: 400,
bold: 550,
thin: 300,
bold: 550,
thin: 300,
h1: bold,
h2: 180;
Expand Down Expand Up @@ -168,34 +168,63 @@ a.headerlink {
border-left: 2px solid var(--color-brand-primary);
}

/** Some tweaks for issue #16 **/
/** Some tweaks for Sphinx tabs **/

[role="tablist"] {
border-bottom: 1px solid var(--color-sidebar-item-background--hover);
}

.sphinx-tabs-tab[aria-selected="true"] {
.sphinx-tabs-tab[aria-selected="true"], .sd-tab-set>input:checked+label{
border: 0;
border-bottom: 2px solid var(--color-brand-primary);
background-color: var(--color-sidebar-item-background--current);
font-weight:300;
font-weight: 400;
font-size: 1rem;
color: var(--color-brand-primary);
}

body[data-theme="dark"] .sphinx-tabs-tab[aria-selected="true"] {
background: var(--color-background-primary);
border-bottom: 2px solid var(--color-brand-primary);
}

button.sphinx-tabs-tab[aria-selected="false"]:hover, .sd-tab-set>input:not(:checked)+label:hover {
border-bottom: 2px solid var(--color-foreground-border);
}

button.sphinx-tabs-tab[aria-selected="false"]{
border-bottom: 2px solid var(--color-background-primary);
}

.sphinx-tabs-tab{
body[data-theme="dark"] .sphinx-tabs-tab {
background: var(--color-background-primary);
}

.sphinx-tabs-tab, .sd-tab-set>label{
color: var(--color-brand-primary);
font-weight:300;
font-family: var(--font-stack);
font-weight: 400;
font-size: 1rem;
padding: 1em 1.25em .5em
}

.sphinx-tabs-panel {
border: 0;
border-bottom: 1px solid var(--color-sidebar-item-background--hover);
background: var(--color-background-primary);
padding: 0.75rem 0 0.75rem 0;
}

button.sphinx-tabs-tab:hover {
background-color: var(--color-sidebar-item-background--hover);
body[data-theme="dark"] .sphinx-tabs-panel {
background: var(--color-background-primary);
}

/** A tweak for issue #190 **/

.highlight .hll {
background-color: var(--color-highlighted-background);
}


/** 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:
Expand Down Expand Up @@ -268,6 +297,15 @@ button.version_select {

.available_versions a:hover {background-color: var(--color-sidebar-item-background--current)}

/** Suppress link underlines outside on-hover **/
a {
text-decoration: none;
}

a:hover, a:visited:hover {
text-decoration: underline;
}

.show {display:block;}

/** Fix for nested numbered list - the nested list is lettered **/
Expand Down Expand Up @@ -319,3 +357,36 @@ details summary {
.sidebar-search-container input[type=submit]:hover {
text-decoration: underline;
}

/* Make inline code the same size as code blocks */
p code.literal {
border: 0;
font-size: var(--code-font-size);
}

/* Use the general admonition font size for inline code */
.admonition p code.literal {
font-size: var(--admonition-font-size);
}

.highlight .s, .highlight .s1, .highlight .s2 {
color: #3F8100;
}

.highlight .o {
color: #BB5400;
}

.rubric > .hclass2 {
display: block;
font-size: 2em;
border-radius: .5rem;
font-weight: 300;
line-height: 1.25;
margin-top: 1.75rem;
margin-right: -0.5rem;
margin-bottom: 0.5rem;
margin-left: -0.5rem;
padding-left: .5rem;
padding-right: .5rem;
}
47 changes: 47 additions & 0 deletions docs/tools/.sphinx/_static/footer.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
.display-contributors {
color: var(--color-sidebar-link-text);
cursor: pointer;
}
.all-contributors {
display: none;
z-index: 55;
list-style: none;
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
width: 200px;
height: 200px;
overflow-y: scroll;
margin: auto;
padding: 0;
background: var(--color-background-primary);
scrollbar-color: var(--color-foreground-border) transparent;
scrollbar-width: thin;
}

.all-contributors li:hover {
background: var(--color-sidebar-item-background--hover);
width: 100%;
}

.all-contributors li a{
color: var(--color-sidebar-link-text);
padding: 1rem;
display: inline-block;
}

#overlay {
position: fixed;
display: none;
width: 100%;
height: 100%;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0,0,0,0.5);
z-index: 2;
cursor: pointer;
}
12 changes: 12 additions & 0 deletions docs/tools/.sphinx/_static/footer.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
$(document).ready(function() {
$(document).on("click", function () {
$(".all-contributors").hide();
$("#overlay").hide();
});

$('.display-contributors').click(function(event) {
$('.all-contributors').toggle();
$("#overlay").toggle();
event.stopPropagation();
});
})
20 changes: 10 additions & 10 deletions docs/tools/.sphinx/_static/furo_colors.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ body {
--color-background-hover: #f2f2f2;
--color-brand-primary: #111;
--color-brand-content: #06C;
--color-api-background: #cdcdcd;
--color-api-background: #E3E3E3;
--color-inline-code-background: rgba(0,0,0,.03);
--color-sidebar-link-text: #111;
--color-sidebar-item-background--current: #ebebeb;
Expand All @@ -25,9 +25,11 @@ body {
--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-highlighted-background: #EBEBEB;
--color-link-underline: var(--color-link);
--color-link-underline--hover: var(--color-link);
--color-link-underline--visited: var(--color-link--visited);
--color-link-underline--visited--hover: var(--color-link--visited);
--color-version-popup: #772953;
}

Expand All @@ -40,7 +42,7 @@ body {
--color-background-secondary: var(--color-background-primary);
--color-background-hover: #666;
--color-brand-primary: #fff;
--color-brand-content: #06C;
--color-brand-content: #69C;
--color-sidebar-link-text: #f7f7f7;
--color-sidebar-item-background--current: #666;
--color-sidebar-item-background--hover: #333;
Expand All @@ -54,20 +56,19 @@ body {
--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-api-background: #A4A4A4;
--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-brand-content: #69C;
--color-sidebar-link-text: #f7f7f7;
--color-sidebar-item-background--current: #666;
--color-sidebar-item-background--hover: #333;
Expand All @@ -81,8 +82,7 @@ body {
--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-link: #F9FCFF;
--color-version-popup: #F29879;
}
}
Expand Down
3 changes: 1 addition & 2 deletions docs/tools/.sphinx/_static/github_issue_links.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ window.onload = function() {
link.href = (
github_url
+ "/issues/new?"
+ "title=Docs:+ADD+YOUR+TITLE"
+ "&labels=documentation"
+ "title=docs%3A+TYPE+YOUR+QUESTION+HERE"
+ "&body=*Please describe the question or issue you're facing with "
+ `"${document.title}"`
+ ".*"
Expand Down
17 changes: 17 additions & 0 deletions docs/tools/.sphinx/_templates/404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{% extends "page.html" %}

{% block content -%}
<section>
<h1>Page not found</h1>
<div class="sd-container-fluid sd-sphinx-override sd-mb-4 docutils">
<div class="sd-row sd-row-cols-1 sd-row-cols-xs-1 sd-row-cols-sm-1 sd-row-cols-md-2 sd-row-cols-lg-2 sd-g-5 sd-g-xs-5 sd-g-sm-5 sd-g-md-5 sd-g-lg-5 docutils">
<div class="sd-col sd-d-flex-column docutils">
{{ body }}
</div>
<div class="sd-col sd-d-flex-column docutils">
<img alt="Penguin with a question mark" class="align-center" height="283" src="{{ pathto('_static/404.svg',1) }}" width="287" />
</div>
</div>
</div>
</section>
{%- endblock content %}
28 changes: 27 additions & 1 deletion docs/tools/.sphinx/_templates/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,26 @@
</div>
{%- endif %}
</div>
<div>
{% if github_url and github_folder and pagename and page_source_suffix and display_contributors %}
{% set contributors = get_contribs(github_url, github_folder, pagename, page_source_suffix, display_contributors_since) %}
{% if contributors %}
{% if contributors | length > 1 %}
<a class="display-contributors">Thanks to the {{ contributors |length }} contributors!</a>
{% else %}
<a class="display-contributors">Thanks to our contributor!</a>
{% endif %}
<div id="overlay"></div>
<ul class="all-contributors">
{% for contributor in contributors %}
<li>
<a href="{{ contributor['github_page'] }}" class="contributor">{{ contributor['name'] }}</a>
</li>
{% endfor %}
</ul>
{% endif %}
{% endif %}
</div>
<div class="right-details">

{# mod: replaced RTD icons with our links #}
Expand All @@ -80,6 +100,12 @@
</div>
{% endif %}

{% if mattermost %}
<div class="ask-mattermost">
<a class="muted-link" href="{{ mattermost }}">Ask a question on Mattermost</a>
</div>
{% endif %}

{% if matrix %}
<div class="ask-matrix">
<a class="muted-link" href="{{ matrix }}">Ask a question on Matrix</a>
Expand All @@ -95,7 +121,7 @@
{% endif %}

<div class="edit-github">
<a class="muted-link" href="{{ github_url }}/edit/{{ github_version }}{{ github_folder }}src/{{ pagename }}{{ page_source_suffix }}">Edit this page on GitHub</a>
<a class="muted-link" href="{{ github_url }}/edit/{{ github_version }}{{ github_folder }}{{ pagename }}{{ page_source_suffix }}">Edit this page on GitHub</a>
</div>
{% endif %}

Expand Down
Loading

0 comments on commit 3effb05

Please sign in to comment.