Skip to content

Commit 49dbbc4

Browse files
authored
Add logo to doc (#576)
1 parent f50403d commit 49dbbc4

File tree

3 files changed

+55
-3
lines changed

3 files changed

+55
-3
lines changed

docs/_templates/navbar.html

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
<div id="navbar" class="{{ theme_navbar_class }} navbar-default {% if theme_navbar_fixed_top|tobool -%} navbar-fixed-top{%- endif -%}">
2+
<div class="container">
3+
<div class="navbar-header">
4+
<!-- .btn-navbar is used as the toggle for collapsed navbar content -->
5+
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".nav-collapse">
6+
<span class="icon-bar"></span>
7+
<span class="icon-bar"></span>
8+
<span class="icon-bar"></span>
9+
</button>
10+
<a class="navbar-brand" href="{{ pathto(master_doc) }}">
11+
{%- block sidebarlogo %}
12+
{%- if logo_url %}<span><img src="{{ logo_url }}"></span>{%- endif %}
13+
{%- endblock %}
14+
{% if theme_navbar_title -%}{{ theme_navbar_title|e }}{%- else -%}{{ project|e }}{%- endif -%}
15+
</a>
16+
<span class="navbar-text navbar-version pull-left"><b>{{ version|e }}</b></span>
17+
</div>
18+
19+
<div class="collapse navbar-collapse nav-collapse">
20+
<ul class="nav navbar-nav">
21+
{% if theme_navbar_links %}
22+
{%- for link in theme_navbar_links %}
23+
<li><a href="{{ pathto(*link[1:]) }}">{{ link[0] }}</a></li>
24+
{%- endfor %}
25+
{% endif %}
26+
{% block navbartoc %}
27+
{% include "globaltoc.html" %}
28+
{% if theme_navbar_pagenav %}
29+
{% include "navbartoc.html" %}
30+
{% endif %}
31+
{% endblock %}
32+
{% if theme_navbar_sidebarrel %}
33+
{% block sidebarrel %}
34+
{% include "relations.html" %}
35+
{% endblock %}
36+
{% endif %}
37+
{% block navbarextra %}
38+
{% endblock %}
39+
{% if theme_source_link_position == "nav" %}
40+
<li class="hidden-sm">{% include "sourcelink.html" %}</li>
41+
{% endif %}
42+
</ul>
43+
44+
{% block navbarsearch %}
45+
{% include "navbarsearchbox.html" %}
46+
{% endblock %}
47+
</div>
48+
</div>
49+
</div>

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ def matplotlib_svg_scraper(*args, **kwargs):
226226

227227
# The name of an image file (relative to this directory) to place at the top
228228
# of the sidebar.
229-
#html_logo = None
229+
html_logo = "_static/tslearn_logo.svg"
230230

231231
# The name of an image file (within the static path) to use as favicon of the
232232
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32

docs/index.rst

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,11 @@
2020
2121
</style>
2222

23-
``tslearn``'s documentation
24-
===========================
23+
|logo| ``tslearn``'s documentation
24+
==================================
25+
26+
.. |logo| image:: _static/tslearn_logo.svg
27+
:height: 50px
2528

2629
.. raw:: html
2730

0 commit comments

Comments
 (0)