Skip to content

POC: Add PyGMT logo to README & docs #3845

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 21 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 19 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# PyGMT

> A Python interface for the Generic Mapping Tools
<img alt="PyGMT - A Python interface for the Generic Mapping Tools" class="right" style="width: 65%" src="https://github.com/sfrooti/PyGMT-Logo/blob/75add2ab7fc522bcfd5ce199e7cc73e82bbab910/PyGMT_Transparent_Horizontal.png"/>

[Documentation (development version)](https://www.pygmt.org/dev) | [Contact](https://forum.generic-mapping-tools.org) | [TryOnline](https://github.com/GenericMappingTools/try-gmt)

Expand Down
Binary file modified doc/_static/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/_static/pygmt_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 0 additions & 21 deletions doc/_templates/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,27 +30,6 @@
{% endif %}
{% endblock %}


{% block sidebartitle %}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/readthedocs/sphinx_rtd_theme/blob/5a263753d52c1628c88392fbf52c729f5a8e79b5/sphinx_rtd_theme/layout.html#L114-L139

For reference, the above link is the default template for the sidebartitle block in the sphinx_rtd_theme.

Removing the custom sidebartitle block may make the version selector disappear (#3542), so we need to update this block instead of removing it.

<a href="{{ pathto(root_doc) }}"><h2 class="sidebar-title">{{ project }}</h2></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 menu %}
{{ super() }}

Expand Down
6 changes: 4 additions & 2 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,11 +203,13 @@

# Options for HTML output.
html_theme = "sphinx_rtd_theme"
html_theme_options = {}
html_theme_options = {
"logo_only": True,
}
html_title = project
html_short_title = project
html_baseurl = f"{doc_url}/dev/" if isdev else f"{doc_url}/latest/"
html_logo = ""
html_logo = "_static/pygmt_logo.png"
html_favicon = "_static/favicon.png"
html_css_files = ["style.css"]
html_static_path = ["_static"]
Expand Down
2 changes: 1 addition & 1 deletion doc/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
```

<div class="banner">
<h1>PyGMT<h1>
<img src="_static/pygmt_logo.png" alt="PyGMT Logo" style="width: 600px; height: auto;">
<h2>
A Python interface for the
<a href="https://www.generic-mapping-tools.org/">Generic Mapping Tools</a>
Expand Down