kopia lustrzana https://github.com/simonw/datasette
Switch docs theme to Furo, refs #1746
rodzic
1465fea479
commit
1d33fd03b3
|
@ -1,7 +1,8 @@
|
|||
a.external {
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
|
||||
div .wy-side-nav-search > div.version {
|
||||
color: rgba(0,0,0,0.75);
|
||||
body[data-theme="dark"] .sidebar-logo-container {
|
||||
background-color: white;
|
||||
padding: 5px;
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
|
|
@ -1,35 +1,3 @@
|
|||
{%- extends "!layout.html" %}
|
||||
|
||||
{% block htmltitle %}
|
||||
{{ super() }}
|
||||
<script defer data-domain="docs.datasette.io" src="https://plausible.io/js/plausible.js"></script>
|
||||
{% endblock %}
|
||||
|
||||
{% block sidebartitle %}
|
||||
|
||||
<a href="https://datasette.io/">
|
||||
<img src="{{ pathto('_static/' + logo, 1) }}" class="logo" alt="{{ _('Logo') }}"/>
|
||||
</a>
|
||||
|
||||
{% if theme_display_version %}
|
||||
{%- set nav_version = version %}
|
||||
{% if READTHEDOCS and current_version %}
|
||||
{%- set nav_version = current_version %}
|
||||
{% endif %}
|
||||
{% if nav_version %}
|
||||
<div class="version">
|
||||
{{ nav_version }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% include "searchbox.html" %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block footer %}
|
||||
{{ super() }}
|
||||
<script>
|
||||
jQuery(function ($) {
|
||||
// Show banner linking to /stable/ if this is a /latest/ page
|
||||
if (!/\/latest\//.test(location.pathname)) {
|
||||
|
@ -57,5 +25,3 @@ jQuery(function ($) {
|
|||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
|
@ -0,0 +1,6 @@
|
|||
{%- extends "!base.html" %}
|
||||
|
||||
{% block site_meta %}
|
||||
{{ super() }}
|
||||
<script defer data-domain="docs.datasette.io" src="https://plausible.io/js/plausible.js"></script>
|
||||
{% endblock %}
|
|
@ -0,0 +1,16 @@
|
|||
<div class="sidebar-brand centered">
|
||||
{% block brand_content %}
|
||||
<div class="sidebar-logo-container">
|
||||
<a href="https://datasette.io/"><img class="sidebar-logo" src="{{ logo_url }}" alt="Datasette"></a>
|
||||
</div>
|
||||
{%- set nav_version = version %}
|
||||
{% if READTHEDOCS and current_version %}
|
||||
{%- set nav_version = current_version %}
|
||||
{% endif %}
|
||||
{% if nav_version %}
|
||||
<div class="version">
|
||||
{{ nav_version }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock brand_content %}
|
||||
</div>
|
|
@ -0,0 +1,11 @@
|
|||
<div class="sidebar-tree">
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="{{ pathto(master_doc) }}">Contents</a></li>
|
||||
</ul>
|
||||
{{ toctree(
|
||||
collapse=True,
|
||||
titles_only=False,
|
||||
maxdepth=3,
|
||||
includehidden=True,
|
||||
) }}
|
||||
</div>
|
24
docs/conf.py
24
docs/conf.py
|
@ -90,18 +90,15 @@ todo_include_todos = False
|
|||
# The theme to use for HTML and HTML Help pages. See the documentation for
|
||||
# a list of builtin themes.
|
||||
#
|
||||
html_theme = "sphinx_rtd_theme"
|
||||
html_theme = "furo"
|
||||
|
||||
# Theme options are theme-specific and customize the look and feel of a theme
|
||||
# further. For a list of options available for each theme, see the
|
||||
# documentation.
|
||||
html_theme_options = {
|
||||
"logo_only": True,
|
||||
"style_nav_header_background": "white",
|
||||
"prev_next_buttons_location": "both",
|
||||
"sidebar_hide_name": True,
|
||||
}
|
||||
|
||||
|
||||
# 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".
|
||||
|
@ -112,20 +109,9 @@ html_logo = "datasette-logo.svg"
|
|||
html_css_files = [
|
||||
"css/custom.css",
|
||||
]
|
||||
|
||||
|
||||
# Custom sidebar templates, must be a dictionary that maps document names
|
||||
# to template names.
|
||||
#
|
||||
# This is required for the alabaster theme
|
||||
# refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars
|
||||
html_sidebars = {
|
||||
"**": [
|
||||
"relations.html", # needs 'show_related': True theme option to display
|
||||
"searchbox.html",
|
||||
]
|
||||
}
|
||||
|
||||
html_js_files = [
|
||||
"js/custom.js"
|
||||
]
|
||||
|
||||
# -- Options for HTMLHelp output ------------------------------------------
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@ If you want to start making contributions to the Datasette project by installing
|
|||
|
||||
.. contents::
|
||||
:local:
|
||||
:class: this-will-duplicate-information-and-it-is-still-useful-here
|
||||
|
||||
.. _installation_basic:
|
||||
|
||||
|
|
|
@ -20,6 +20,7 @@ For example, you can implement the ``render_cell`` plugin hook like this even th
|
|||
|
||||
.. contents:: List of plugin hooks
|
||||
:local:
|
||||
:class: this-will-duplicate-information-and-it-is-still-useful-here
|
||||
|
||||
.. _plugin_hook_prepare_connection:
|
||||
|
||||
|
|
2
setup.py
2
setup.py
|
@ -65,7 +65,7 @@ setup(
|
|||
setup_requires=["pytest-runner"],
|
||||
extras_require={
|
||||
"docs": [
|
||||
"sphinx_rtd_theme",
|
||||
"furo==2022.4.7",
|
||||
"sphinx-autobuild",
|
||||
"codespell",
|
||||
"blacken-docs",
|
||||
|
|
Ładowanie…
Reference in New Issue