Skip to content

Commit

Permalink
create working docs for 1.31 (#800)
Browse files Browse the repository at this point in the history
  • Loading branch information
evilnick authored Nov 15, 2024
1 parent a988a93 commit 5cc306c
Show file tree
Hide file tree
Showing 62 changed files with 2,324 additions and 1,904 deletions.
14 changes: 14 additions & 0 deletions docs/canonicalk8s/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/*env*/
.sphinx/venv/
.sphinx/warnings.txt
.sphinx/.wordlist.dic
.sphinx/.doctrees/
.sphinx/node_modules/
package*.json
_build
.DS_Store
__pycache__
.idea/
.vscode/
.sphinx/styles/*
.sphinx/vale.ini
16 changes: 16 additions & 0 deletions docs/canonicalk8s/.markdownlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"default": false,
"MD003": { "style": "atx" },
"MD013": { "code_blocks": false, "tables": false, "stern": true, "line_length": 80},
"MD014": true,
"MD018": true,
"MD022": true,
"MD023": true,
"MD026": { "punctuation": ".,;。,;"},
"MD031": { "list_items": false},
"MD032": true,
"MD035": true,
"MD042": true,
"MD045": true,
"MD052": true
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,26 @@ build:
# If there are no changes (git diff exits with 0) we force the command to return with 183.
# This is a special exit code on Read the Docs that will cancel the build immediately.
- |
git fetch --unshallow || true
if [ "$READTHEDOCS_VERSION_TYPE" = "external" ] && git diff --quiet origin/main -- docs/ .readthedocs.yaml;
then
exit 183;
fi
pre_build:
- cp -r docs/src/* docs/tools/
ls
# Build documentation in the docs/ directory with Sphinx
sphinx:
builder: dirhtml
configuration: docs/tools/conf.py
configuration: docs/canonicalk8s/conf-rtd.py

# If using Sphinx, optionally build your docs in additional formats such as PDF
formats:
- pdf
# formats:
# - pdf

# Optionally declare the Python requirements required to build your docs
python:
install:
- requirements: docs/tools/.sphinx/requirements.txt
- requirements: docs/canonicalk8s/.sphinx/requirements.txt



13 changes: 13 additions & 0 deletions docs/canonicalk8s/.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.
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;
}
File renamed without changes
47 changes: 47 additions & 0 deletions docs/canonicalk8s/.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/canonicalk8s/.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();
});
})
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
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
File renamed without changes.
File renamed without changes.
File renamed without changes
17 changes: 17 additions & 0 deletions docs/canonicalk8s/.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 %}
File renamed without changes.
Loading

0 comments on commit 5cc306c

Please sign in to comment.