mirror of
https://github.com/instaloader/instaloader.git
synced 2024-08-17 12:19:38 +02:00
doc: Switch to mobile-friendlier bootstrap theme
It seems to be better supported than Alabaster and is easier to be configured to look good on both a phone and a desktop.
This commit is contained in:
parent
539273b963
commit
d533c60824
3
docs/_static/style.css
vendored
Normal file
3
docs/_static/style.css
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
code {
|
||||||
|
color: #222;
|
||||||
|
}
|
2
docs/_templates/caption.html
vendored
2
docs/_templates/caption.html
vendored
@ -1,2 +0,0 @@
|
|||||||
<h2><a href="index.html">Instaloader</a></h2>
|
|
||||||
<p>Download pictures (or videos) along with their captions and other metadata from Instagram.</p>
|
|
20
docs/_templates/layout.html
vendored
20
docs/_templates/layout.html
vendored
@ -1,17 +1,11 @@
|
|||||||
{% extends "!layout.html" %}
|
{% extends "!layout.html" %}
|
||||||
{% block extrahead %}
|
{% block extrahead %}
|
||||||
{{ super() }}
|
{{ super() }}
|
||||||
<meta name="google-site-verification" content="FNUsDdkOJM9obm9QEdrNBVd9AtAzHzA-aaSMCUrS6C8" />
|
<meta name="google-site-verification" content="FNUsDdkOJM9obm9QEdrNBVd9AtAzHzA-aaSMCUrS6C8" />
|
||||||
<script async defer src="https://buttons.github.io/buttons.js"></script>
|
{% if pagename == "index" %}
|
||||||
{% if READTHEDOCS %}
|
<link rel="canonical" href="https://instaloader.github.io/" />
|
||||||
<meta http-equiv="refresh" content="0; URL=https://instaloader.github.io/{{ pagename }}.html" />
|
{% else %}
|
||||||
<meta name="robots" content="noindex" />
|
<link rel="canonical" href="https://instaloader.github.io/{{ pagename }}.html" />
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<style type="text/css">
|
<script async defer src="https://buttons.github.io/buttons.js"></script>
|
||||||
div.document { width: 1008px; }
|
|
||||||
@media screen and (max-width: 1008px) {
|
|
||||||
div.sphinxsidebar { display: none; }
|
|
||||||
div.document { width: 100%!important; }
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
23
docs/_templates/links.html
vendored
23
docs/_templates/links.html
vendored
@ -1,23 +0,0 @@
|
|||||||
{% if next %}
|
|
||||||
<h3>Next</h3>
|
|
||||||
<ul>
|
|
||||||
<li class="toctree-l1"><a class="reference internal" href="{{ next.link|e }}">{{ next.title }}</a></li>
|
|
||||||
</ul>
|
|
||||||
{% endif %}
|
|
||||||
<h3>Current Release</h3>
|
|
||||||
<ul>
|
|
||||||
<li class="toctree-l1"><a href="https://github.com/instaloader/instaloader/releases/tag/v{{current_release}}">Version <b>{{current_release}}</b></a></li>
|
|
||||||
<li>Released on <b>{{current_release_date}}</b>.</li>
|
|
||||||
</ul>
|
|
||||||
<h3>Links</h3>
|
|
||||||
<ul>
|
|
||||||
<li><a href="https://github.com/instaloader/instaloader/issues">Issue Tracker</a></li>
|
|
||||||
<li><a href="https://github.com/instaloader/instaloader/releases">Version History</a></li>
|
|
||||||
<li><a href="https://pypi.python.org/pypi/instaloader">Instaloader on PyPI</a></li>
|
|
||||||
<li><a href="https://github.com/instaloader/instaloader">Instaloader on GitHub</a></li>
|
|
||||||
</ul>
|
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
<a class="github-button" href="https://github.com/instaloader/Instaloader" data-icon="octicon-star" data-size="large" data-show-count="true" aria-label="Star instaloader/Instaloader on GitHub">Star</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
58
docs/_templates/navbar.html
vendored
Normal file
58
docs/_templates/navbar.html
vendored
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
<div id="navbar" class="{{ theme_navbar_class }} navbar-default {% if theme_navbar_fixed_top|tobool -%} navbar-fixed-top{%- endif -%}">
|
||||||
|
<div class="container">
|
||||||
|
<div class="navbar-header">
|
||||||
|
<!-- .btn-navbar is used as the toggle for collapsed navbar content -->
|
||||||
|
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".nav-collapse">
|
||||||
|
<span class="icon-bar"></span>
|
||||||
|
<span class="icon-bar"></span>
|
||||||
|
<span class="icon-bar"></span>
|
||||||
|
</button>
|
||||||
|
<a class="navbar-brand" href="{{ pathto(master_doc) }}">
|
||||||
|
{%- block sidebarlogo %}
|
||||||
|
{%- if logo %}<span><img src="{{ pathto('_static/' + logo, 1) }}"></span>{%- endif %}
|
||||||
|
{%- endblock %}
|
||||||
|
{% if theme_navbar_title -%}{{ theme_navbar_title|e }}{%- else -%}{{ project|e }}{%- endif -%}
|
||||||
|
</a>
|
||||||
|
<span class="navbar-text navbar-version pull-left">
|
||||||
|
<a href="https://github.com/instaloader/instaloader/releases/tag/v{{current_release}}" title="Released on {{current_release_date}}.">v<b>{{current_release}}</b></a>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="collapse navbar-collapse nav-collapse">
|
||||||
|
<ul class="nav navbar-nav">
|
||||||
|
{% if theme_navbar_links %}
|
||||||
|
{%- for link in theme_navbar_links %}
|
||||||
|
<li><a href="{{ pathto(*link[1:]) }}">{{ link[0] }}</a></li>
|
||||||
|
{%- endfor %}
|
||||||
|
{% endif %}
|
||||||
|
{% block navbartoc %}
|
||||||
|
{% include "globaltoc.html" %}
|
||||||
|
{% if theme_navbar_pagenav %}
|
||||||
|
{% include "navbartoc.html" %}
|
||||||
|
{% endif %}
|
||||||
|
{% endblock %}
|
||||||
|
{% if theme_navbar_sidebarrel %}
|
||||||
|
{% block sidebarrel %}
|
||||||
|
{% include "relations.html" %}
|
||||||
|
{% endblock %}
|
||||||
|
{% endif %}
|
||||||
|
</ul>
|
||||||
|
<ul class="nav navbar-nav navbar-right">
|
||||||
|
<li class="dropdown">
|
||||||
|
<a role="button" id="dLabelUsefulLinks" data-toggle="dropdown" data-target="#" href="#">
|
||||||
|
Useful Links
|
||||||
|
<b class="caret"></b>
|
||||||
|
</a>
|
||||||
|
<ul class="dropdown-menu" role="menu" aria-labelledby="dLabelUsefulLinks">
|
||||||
|
<li><a href="https://github.com/instaloader/instaloader/issues">Issue Tracker</a></li>
|
||||||
|
<li><a href="https://github.com/instaloader/instaloader/releases">Version History</a></li>
|
||||||
|
<li><a href="https://pypi.python.org/pypi/instaloader">Instaloader on PyPI</a></li>
|
||||||
|
<li><a href="https://github.com/instaloader/instaloader">Instaloader on GitHub</a></li>
|
||||||
|
<li role="separator" class="divider"></li>
|
||||||
|
<li style="padding-left: 20px;"><a class="github-button" href="https://github.com/instaloader/instaloader" data-icon="octicon-star" data-size="large" data-show-count="true" aria-label="Star Instaloader on GitHub">Star</a></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
3
docs/_templates/rtdmessage.html
vendored
3
docs/_templates/rtdmessage.html
vendored
@ -1,3 +0,0 @@
|
|||||||
<h3>New Documentation URL</h3>
|
|
||||||
<div class="danger"><p style="margin-left: 1em"><b>Instaloader's Documentation has been moved to
|
|
||||||
<a class="reference external" href="https://instaloader.github.io/">https://instaloader.github.io</a>.</b></p></div>
|
|
25
docs/conf.py
25
docs/conf.py
@ -20,6 +20,9 @@
|
|||||||
import os
|
import os
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
import sphinx_bootstrap_theme
|
||||||
|
|
||||||
sys.path.insert(0, os.path.abspath('..'))
|
sys.path.insert(0, os.path.abspath('..'))
|
||||||
|
|
||||||
# -- General configuration ------------------------------------------------
|
# -- General configuration ------------------------------------------------
|
||||||
@ -133,15 +136,20 @@ todo_include_todos = False
|
|||||||
# The theme to use for HTML and HTML Help pages. See the documentation for
|
# The theme to use for HTML and HTML Help pages. See the documentation for
|
||||||
# a list of builtin themes.
|
# a list of builtin themes.
|
||||||
#
|
#
|
||||||
html_theme = 'alabaster'
|
html_theme = 'bootstrap'
|
||||||
|
html_theme_path = sphinx_bootstrap_theme.get_html_theme_path()
|
||||||
|
|
||||||
# Theme options are theme-specific and customize the look and feel of a theme
|
# 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
|
# further. For a list of options available for each theme, see the
|
||||||
# documentation.
|
# documentation.
|
||||||
#
|
#
|
||||||
html_theme_options = {
|
html_theme_options = {
|
||||||
'show_powered_by': False,
|
'navbar_site_name': 'Site Contents',
|
||||||
'sidebar_width': '290px' }
|
'navbar_pagenav_name': 'Page Contents',
|
||||||
|
'navbar_pagenav': True,
|
||||||
|
'navbar_sidebarrel': True,
|
||||||
|
'nosidebar': True,
|
||||||
|
}
|
||||||
|
|
||||||
# Add any paths that contain custom themes here, relative to this directory.
|
# Add any paths that contain custom themes here, relative to this directory.
|
||||||
# html_theme_path = []
|
# html_theme_path = []
|
||||||
@ -190,10 +198,8 @@ html_static_path = ['_static']
|
|||||||
|
|
||||||
# Custom sidebar templates, maps document names to template names.
|
# Custom sidebar templates, maps document names to template names.
|
||||||
#
|
#
|
||||||
if not os.environ.get("READTHEDOCS"):
|
#html_sidebars = {'**': ["relations.html", "links.html"] }
|
||||||
html_sidebars = {'**': ["caption.html", "globaltoc.html", "relations.html", "links.html"] }
|
html_sidebars = {}
|
||||||
else:
|
|
||||||
html_sidebars = {'**': ["caption.html", "rtdmessage.html", "globaltoc.html", "relations.html", "links.html"] }
|
|
||||||
|
|
||||||
# Additional templates that should be rendered to pages, maps page names to
|
# Additional templates that should be rendered to pages, maps page names to
|
||||||
# template names.
|
# template names.
|
||||||
@ -360,4 +366,7 @@ texinfo_documents = [
|
|||||||
current_release = subprocess.check_output(["git", "describe", "--abbrev=0"]).decode("ascii")[1:-1]
|
current_release = subprocess.check_output(["git", "describe", "--abbrev=0"]).decode("ascii")[1:-1]
|
||||||
current_release_date = subprocess.check_output(["git", "log", "-1", "--tags", "--format=%ad", "--date=format:%e %b %Y"]).decode("ascii")[:-1]
|
current_release_date = subprocess.check_output(["git", "log", "-1", "--tags", "--format=%ad", "--date=format:%e %b %Y"]).decode("ascii")[:-1]
|
||||||
|
|
||||||
html_context = {'current_release': current_release, 'current_release_date': current_release_date, 'READTHEDOCS': bool(os.environ.get('READTHEDOCS'))}
|
html_context = {'current_release': current_release, 'current_release_date': current_release_date}
|
||||||
|
|
||||||
|
def setup(app):
|
||||||
|
app.add_stylesheet("style.css")
|
@ -1,3 +1,4 @@
|
|||||||
requests
|
requests
|
||||||
sphinx
|
sphinx
|
||||||
sphinx-autodoc-typehints
|
sphinx-autodoc-typehints
|
||||||
|
sphinx-bootstrap-theme
|
||||||
|
Loading…
Reference in New Issue
Block a user