Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
stefantaubert committed Apr 24, 2024
1 parent 4e21de1 commit 7fc3bf1
Show file tree
Hide file tree
Showing 7 changed files with 1,180 additions and 233 deletions.
6 changes: 6 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ build = "*"
mypy = "*"
pandas-stubs = "*"
types-tqdm = "*"
sphinx = ">=7.3.7"
furo = ">=2024.1.29"
docutils = ">=0.20.1"
sphinxcontrib-programoutput = ">=0.17"
sphinx_copybutton = ">=0.5.2"
sphinx_remove_toctrees = "*"

[packages]
numpy = ">=1.18.5"
Expand Down
1,208 changes: 986 additions & 222 deletions Pipfile.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Sphinx==7.3.7
sphinx==7.3.7
# Older versions break Sphinx even though they're declared to be supported.
docutils==0.20.1
sphinxcontrib-programoutput==0.17
Expand Down
126 changes: 126 additions & 0 deletions docs/source/_static/css/custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
/* Prevents two-dimensional scrolling and content loss. */
h1,
code,
li {
overflow-wrap: break-word;
}

/* Provides padding to push down the "breadcrumb" navigation in nested pages. */
.content {
padding: 1em 3em;
}

/* Improves spacing around custom sidebar section*/
.sidebar-div {
margin: var(--sidebar-caption-space-above) 0 0 0;
padding: var(--sidebar-item-spacing-vertical) var(--sidebar-item-spacing-horizontal);
}

/* Custom sidebar heading text. Example: Feedback Section heading. */
.sidebar-heading {
color: var(--color-sidebar-caption-text);
font-size: var(--font-size--normal);
font-weight: 700;
}

/* Improves text used in custom sidebar section. Example: Feedback section content.*/
.sidebar-text {
color: var(--color-sidebar-caption-text);
font-size: var(--sidebar-item-font-size);
line-height: 1.4;
}

/* Removes empty space above the sidebar-tree (under "Feedback" section) */
.sidebar-tree {
margin-top: 0px;
}

/* Adds padding around AWS Logo in the left sidebar. */
.sidebar-logo {
padding: 20% 15%;
}

/* Hides a div by default. */
.show-div-sm {
display: none;
}

/* Hides a div by default. */
.show-div-md {
display: none;
}

/* Positions items starting from the right. */
.justify-content-right {
justify-content: right;
}

/* Positions items starting from the left. */
.justify-content-left {
justify-content: left;
}

/* Hides the sidebar and prevents keyboard users from focusing on elements. */
.hide-sidebar {
visibility: hidden;
}

/* Hides the icon by default and applies relevant styling. */
.nav-close-icon {
color: var(--color-foreground-secondary);
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
}

/* Safeguard for ensuring menus are always visible on larger screens. */
@media (min-width: 82em) {
.hide-sidebar {
visibility: visible;
}
}

/* We only want to show the close-icon on medium-small screens. */
@media (max-width: 67em) {

/* Displays a div on a small screen. */
.show-div-sm {
display: flex;
}
}

@media (max-width: 82em) {

/* Displays a div on a medium screen. */
.show-div-md {
display: flex;
}
}

/* Apply furo styled admonition titles for <h3>. */
h3.admonition-title {
position: relative;
margin: 0 -0.5rem 0.5rem;
padding-left: 2.5rem;
padding-right: .5rem;
padding-top: .4rem;
padding-bottom: .4rem;
font-weight: 700;
font-size: 1.5em;
line-height: 1.25;
border-radius: unset;
background-color: var(--color-admonition-title-background);
}

/* Apply furo styled admonition icons before <h3>. */
h3.admonition-title::before {
content: "";
position: absolute;
left: 0.5rem;
width: 1.5rem;
height: 1.5rem;
background-color: var(--color-admonition-title);
mask-image: var(--icon-admonition-default);
mask-repeat: no-repeat;
}
8 changes: 8 additions & 0 deletions docs/source/_templates/sidebar/close-icon.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<div class="sidebar-div show-div-sm justify-content-right">
<label class="nav-close-icon" id="nav-menu-close" for="__navigation" tabindex="0">
<div class="visually-hidden">Toggle site navigation sidebar</div>
<i class="icon"><svg>
<use href="#svg-close"></use>
</svg></i>
</label>
</div>
7 changes: 7 additions & 0 deletions docs/source/_templates/sidebar/feedback.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<div class="sidebar-div">
<p class="sidebar-heading">Feedback</p>
<p class="sidebar-text">
Do you have a suggestion to improve this website or en-tts?
<a href="https://github.com/stefantaubert/en-tts/issues">Give us feedback</a>.
</p>
</div>
56 changes: 46 additions & 10 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,23 @@

# -- Project information -----------------------------------------------------

project = 'en-tts'
copyright = '2024, Stefan Taubert'
import datetime

from en_tts_app.globals import APP_NAME, APP_VERSION

project = APP_NAME
author = 'Stefan Taubert'

# The full version, including alpha/beta/rc tags
release = '0.0.2'
release = APP_VERSION


# -- General configuration ---------------------------------------------------

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
]
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode',
'sphinx_copybutton', 'sphinx_remove_toctrees']

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
Expand All @@ -41,15 +43,49 @@
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = []

# The suffix of source filenames.
source_suffix = '.rst'

# The master toctree document.
master_doc = 'index'

# General information about the project.
current_year = datetime.date.today().year
copyright = f'{current_year}, Stefan Taubert'

# -- Options for HTML output -------------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'alabaster'
html_theme = 'furo'

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
html_static_path = ['_static']

# List of custom CSS files relative to _static directory.
html_css_files = [
'css/custom.css',
]

# Custom sidebar templates, maps document names to template names.
html_show_sourcelink = False
html_sidebars = {
"**": [
"sidebar/close-icon.html",
"sidebar/brand.html",
"sidebar/search.html",
"sidebar/scroll-start.html",
"sidebar/feedback.html",
"sidebar/navigation.html",
"sidebar/scroll-end.html",
]
}

# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
html_show_sphinx = True

# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
html_show_copyright = True

0 comments on commit 7fc3bf1

Please sign in to comment.