Skip to content

Commit 98a5b63

Browse files
authored
Merge pull request #333 from kakirastern/fix-broken-logo
Debug navbar code to fix logo broken link
2 parents d3789d7 + fe12e97 commit 98a5b63

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-8
lines changed

tutorials/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@
9696
# The name of an image file (within the static path) to use as favicon of the
9797
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
9898
# pixels large.
99-
html_favicon = 'astropy_favicon.ico'
99+
html_favicon = "_static/astropy_favicon.ico"
100100

101101
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
102102
# using the given strftime format.

tutorials/themes/tutorials-theme/layout.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
<!DOCTYPE html>
2828
{%- endblock %}
2929

30-
{% macro navBar() %}
30+
{% macro nav_bar() %}
3131
{% include "navbar" + navbar_version + ".html" %}
3232
{% endmacro %}
3333

@@ -71,7 +71,7 @@
7171
{% block sidebarsourcelink %}{% endblock %}
7272

7373
{%- block content %}
74-
{{ navBar() }}
74+
{{ nav_bar() }}
7575
<div class="container">
7676
<div class="row">
7777
{%- block sidebar1 %}{{ bsidebar() }}{% endblock %}

tutorials/themes/tutorials-theme/navbar.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,10 @@ <h2 class="card-title text-center"><a href="{{ pathto('examples') }}" class="tex
3939
</div>
4040

4141
{% else %}
42-
4342
<nav class="navbar navbar-expand-lg bg-navbar">
44-
<a class="navbar-brand" href="/astropy-tutorials"style="padding: 0px 5px;"><img src="{{ pathto('_static/' + 'astropy_logo.png') }}" style="height:38px;"></a>
43+
<a class="navbar-brand" href="/astropy-tutorials" style="padding: 0px 5px;">
44+
<img src="{{ pathto('../_static/' + 'astropy_logo.png', 1) }}" onerror="this.onerror=null;this.src='{{ pathto("_static/" + "astropy_logo.png", 1) }}';" style="height: 38px;">
45+
</a>
4546
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarColor01" aria-controls="navbarColor01" aria-expanded="false" aria-label="Toggle navigation">
4647
<span class="navbar-toggler-icon"></span>
4748
</button>

tutorials/themes/tutorials-theme/theme.conf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ sidebars =
1414
navbar_title =
1515

1616
# Tab name for entire site. (Default: "Site")
17-
navbar_site_name = Site
17+
navbar_site_name = "Site"
1818

1919
# A list of tuples containting pages to link to. The value should be
2020
# in the form [(name, page), ..]
@@ -27,7 +27,7 @@ navbar_sidebarrel = true
2727
navbar_pagenav = true
2828

2929
# Tab name for the current pages TOC. (Default: "Page")
30-
navbar_pagenav_name = Page
30+
navbar_pagenav_name = "Page"
3131

3232
# Global TOC depth for "site" navbar tab. (Default: 1)
3333
# Switching to -1 shows all levels.
@@ -44,7 +44,7 @@ globaltoc_includehidden = true
4444

4545
# HTML navbar class (Default: "navbar") to attach to <div> element.
4646
# For black navbar, do "navbar navbar-inverse"
47-
navbar_class = navbar
47+
navbar_class = navbar navbar-inverse
4848

4949
# Fix navigation bar to top of page?
5050
# Values: "true" (default) or "false"

0 commit comments

Comments
 (0)