Skip to content

Commit fe12e97

Browse files
committed
Commit changes to fix broken logo links in tutorial pages
Change src relative location to fix logo broken link Update astropy_logo.png relative location to show logo image Change logo and banner paths to fix broken links Fixed missing space in L44 of navbar.html Change spacing in navbar code block Comment out button class in navbar code block to test Change bootstrap syntax in navbar code block Get rid of size specification to test navbar code block Fix the img src path for templating Change href to "#" to test navbar code block Add size specifications and empty alt to test navbar Change width and height specifications to test navbar code Change logo size to fit navbar Use "style" to specify height to test navbar code block Add html_logo assignment to theme.conf file Remove quotation marks for logo file name in theme.conf Make further changes to theme.conf file to test theme code Remove quotation marks around nav for source_link_position Change navBar to navbar to test theme code Revert changes from navbar to nav_bar for macro to test Add html_logo = "astropy_logo.png" to conf.py Remove logo portion that has been misplaced Change True back to true in theme.conf Revert to original syntax used with "style" Add missing space in code to test Change img src formatting to test navbar code Comment out astropy html favicon and logo files in conf.py Restore favicon definition statement in conf.py Clean up conf.py file Comment out button class in navbar code block to test Comment out nav-brand class to test navbar code block Rewrite navbar code snippets in navbar.html to test Change navbar code snippets back to test navbar.html Clean up navbar.html Polishing up on navbar.html to test code Clean up navbar.html further by getting rid of spaces Change width and height properties to fit logo in navbar Change html_favicon location to try and pick it up Change navbar properties to try to show logo Get rid of redundant "navbar" term in navbar.html Revert back to previous navbar.html settings Change height of logo to unhide image Change relative path of img src to try and pick up logo Change CSS attributes in navbar.html to test code Continue changing CSS attributes to test navbar code Uncomment html_logo path in conf.py file Correct logo path redirect to rst-tutorials behavior Change width of logo by implicit ratio-aspect lock Correct logo link redirection behavior To [http://www.astropy.org/astropy-tutorials/](http://www.astropy.org/astropy-tutorials/). Using HTML onerror attribute to correct remaining broken error link Fix syntax error in navbar.html file Add missing space and forward slash in L44 of navbar.html Change syntax to try and debug navbar.html Update coordinates.ipynb to debug NameResolveError NameResolveError: All Sesame queries failed. Unable to retrieve coordinates. Update Coordinates-Intro to debug NameResolveError Change data.conf.remote_timeout location and value in coordinates.ipynb Further update Coordinates-Intro.ipynb to debug Change name used in Sesame query to debug Revise syntax of img src for logo Remove html_logo from conf.py Change href for navbar-brand from html to relative path Revert Coordinates-Intro changes Get rid of redundant spaces in L93 Revert changes made to coordinates.ipynb tutorial Undo explicit print statement Remove unnecessary comments regarding html_logo
1 parent d3789d7 commit fe12e97

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)