Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ENH: Add pydata-sphinx-theme. Add example download link.
Remove unused templates from old theme.
- Loading branch information
Showing
8 changed files
with
44 additions
and
159 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{% extends "layout.html" %} | ||
|
||
{# emit a * for every slash so they can be counted #} | ||
{%- macro countslashes(str) %} | ||
{%- set slashcount = 0 %} | ||
{%- for char in str %} | ||
{%- if char == '/' -%} | ||
* | ||
{%- endif %} | ||
{%- endfor -%} | ||
{%- endmacro %} | ||
{%- set slashcount = countslashes(pagename)|length %} | ||
|
||
{%- macro examplename(str) %} | ||
{%- set slashcount = 0 %} | ||
{%- for char in str %} | ||
{%- if char == '/' -%} | ||
{%- set slashcount = slashcount + 1 %} | ||
{%- else %} | ||
{%- if slashcount > 2 and slashcount < 4 %}{{ char }}{%- endif %} | ||
{%- endif %} | ||
{%- endfor -%} | ||
{%- endmacro %} | ||
{%- set archivename = examplename(pagename)%} | ||
|
||
{% block body %} | ||
{%- if slashcount == 4 %} | ||
<p> | ||
<a href="{{ meta.get("name") ~ ".zip" }}"> | ||
<i class="fas fa-download"></i> <span class="hidden-sm hidden-tablet"> {{ _('Download this example') }}</span> | ||
</a> | ||
</p> | ||
{%- endif %} | ||
{{ body }} | ||
{% endblock %} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule pydata-sphinx-theme
deleted from
b80667