Skip to content

Commit

Permalink
add pdf download
Browse files Browse the repository at this point in the history
  • Loading branch information
Zhanwei-Liu committed Sep 16, 2023
1 parent e64b4c4 commit 0d42d4c
Show file tree
Hide file tree
Showing 8 changed files with 176 additions and 333 deletions.
166 changes: 0 additions & 166 deletions doc/plots/.ipynb_checkpoints/economic-parameters-checkpoint.ipynb

This file was deleted.

166 changes: 0 additions & 166 deletions doc/plots/economic-parameters.ipynb

This file was deleted.

Binary file removed doc/plots/varcost.pdf
Binary file not shown.
Binary file removed doc/plots/varcost.png
Binary file not shown.
40 changes: 40 additions & 0 deletions doc/source/_templates/breadcrumbs.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{%- extends "sphinx_rtd_theme/breadcrumbs.html" %}

{% block breadcrumbs %}
<li>
<div style="font-size: 105%;font-weight: 600;">
{{ godot_docs_title | replace("%s", godot_version) }}
</div>
<ul class="wy-breadcrumbs">
{{ super() }}
</ul>
</li>
{% endblock %}

{% block breadcrumbs_aside %}
{% if not meta or meta.get('github_url') != 'hide' %}
<li style="float: right; text-align: right;">
<ul>
{{ super() }}
</ul>

<style>
.godot-edit-guidelines {
font-size: 14px;
float: right;
clear: both;
padding-top: 4px;
}

@media screen and (max-width: 480px) {
.godot-edit-guidelines {
display: none;
}
}
</style>
<a class="godot-edit-guidelines" href="https://docs.godotengine.org/en/latest/contributing/documentation/index.html#writing-documentation">
Learn how to contribute!
</a>
</li>
{% endif %}
{% endblock %}
76 changes: 76 additions & 0 deletions doc/source/_templates/layout.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
{% extends "!layout.html" -%}
{# Refer to https://github.com/readthedocs/sphinx_rtd_theme/blob/master/sphinx_rtd_theme/layout.html #}

{% block htmltitle -%}
<title>{{ godot_title_prefix }}{{ title|striptags|e }}{{ titlesuffix }}</title>
{% endblock -%}

{% block extrahead -%}
<meta name="doc_version" content="{{ version }}">
<meta name="doc_is_latest" content="{{ godot_is_latest }}">
{% endblock -%}

{% block linktags -%}
<meta name="theme-color" content="#3d8fcc">
{% if godot_inject_language_links -%}
{% for alternate_lang in godot_docs_supported_languages -%}
{# Convert to ISO 639-1 format, e.g. zh_CN -> zh-cn -#}
{% set alternate_lang_href = alternate_lang.lower().replace("_", "-") -%}
<link rel="alternate" hreflang="{{ alternate_lang_href }}" href="{{ godot_docs_basepath }}{{ alternate_lang }}/{{ godot_canonical_version }}/{{ pagename }}{{ godot_docs_suffix }}" />
{% endfor -%}
<link rel="alternate" hreflang="x-default" href="{{ godot_docs_basepath }}{{ godot_default_lang }}/{{ godot_canonical_version }}/{{ pagename }}{{ godot_docs_suffix }}" />

<link rel="canonical" href="{{ godot_docs_basepath }}{{ lang_attr }}/{{ godot_canonical_version }}/{{ pagename }}{{ godot_docs_suffix }}" />
{% endif -%}
{{ super() }}
{% endblock -%}

{%- block document %}
<div itemprop="articleBody">
{% if godot_is_latest or godot_show_article_status %}
<div class="admonition-grid">
{% if godot_is_latest %}
<div class="admonition attention latest-notice">
<p class="first admonition-title">Attention: Here be dragons</p>
<p>
This is the <code class="docutils literal notranslate"><span class="pre">latest</span></code>
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
</p>
<p class="last latest-notice-link">
Checking the stable version of the documentation...
</p>
</div>
{% endif %}

{% if godot_show_article_status and not godot_is_latest %}
<div class="admonition tip article-status">
{% if meta and meta.get('article_outdated') == 'True' %}
<p class="first admonition-title">Work in progress</p>
<p>
The content of this page was not yet updated for Godot
<code class="docutils literal notranslate">{{ godot_version }}</code>
and may be <strong>outdated</strong>. If you know how to improve this page or you can confirm
that it's up to date, feel free to <a href="https://github.com/godotengine/godot-docs">open a pull request</a>.
</p>
{% else %}
<p class="first admonition-title">Up to date</p>
<p>
This page is <strong>up to date</strong> for Godot <code class="docutils literal notranslate">{{ godot_version }}</code>.
If you still find outdated information, please <a href="https://github.com/godotengine/godot-docs">open an issue</a>.
</p>
{% endif %}
</div>
{% endif %}
</div>
{% endif %}

{% block body %}{% endblock %}
</div>
{%- if self.comments()|trim %}
<div class="articleComments">
{%- block comments %}{% endblock %}
</div>
{%- endif%}
</div>
{%- endblock %}
60 changes: 60 additions & 0 deletions doc/source/_templates/versions.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{# Add rst-badge after rst-versions for small badge style. #}
{% set display_version = version -%}
{% set listed_languages = ({"en":"#"}).items() -%} <!-- , "de":"#", "es":"#", "fr":"#" -->
{% set listed_versions = ({"stable":"#", "latest":"#"}).items() -%}

{% if READTHEDOCS and current_version %}
{% set display_version = current_version -%}
{% endif %}
{% if READTHEDOCS and versions %}
{% set listed_versions = versions -%}
{% endif %}

<div class="rst-versions" data-toggle="rst-versions" role="note" aria-label="versions">
<span class="rst-current-version" data-toggle="rst-current-version">
<span class="fa fa-book"> Read the Docs</span>
v: {{ display_version }}{% if display_version != godot_version %} ({{ godot_version }}){% endif %}
<span class="fa fa-caret-down"></span>
</span>
<div class="rst-other-versions">
{#
The contents of this element will be replaced in production.
But we can still have some mock data for testing.
#}

<dl>
<dt>{{ _('Languages') }}</dt>
{% for slug, url in listed_languages %}
<dd><a href="{{ url }}">{{ slug }}</a></dd>
{% endfor %}
</dl>
<!-- <dl>
<dt>{{ _('Versions') }}</dt>
{% for slug, url in listed_versions %}
<dd><a href="{{ url }}">{{ slug }}</a></dd>
{% endfor %}
</dl> -->
<dl>
{# Translators: The phrase "Read the Docs" is not translated #}
<dt>{{ _('On Read the Docs') }}</dt>
<dd>
<a href="https://github.com/PREP-NexT/PREP-SHOT/tree/main">{{ _('Project Home') }}</a>
</dd>
<!-- <dd>
<a href="//{{ PRODUCTION_DOMAIN }}/projects/{{ slug }}/builds/">{{ _('Builds') }}</a>
</dd> -->
<dd>
<a href="https://github.com/PREP-NexT/PREP-SHOT/raw/gh-pages/_static/PREP-SHOT.pdf">{{ _('PDF') }}</a>
</dd>
</dl>

<hr>
<small>
<span>Hosted by <a href="https://readthedocs.org">Read the Docs</a></span>
<span> · </span>
<a href="https://docs.readthedocs.io/page/privacy-policy.html">Privacy Policy</a>
</small>

{##}
</div>
</div>
1 change: 0 additions & 1 deletion doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ class MyReferenceStyle(AuthorYearReferenceStyle):
bibtex_reference_style = "author_year_round"
######################## references ##########################################


# -- General configuration ------------------------------------------------

needs_sphinx = "1.3"
Expand Down

0 comments on commit 0d42d4c

Please sign in to comment.