From bad19e9ca52aa358e2835a273e5e1de606f3102a Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Thu, 10 Apr 2025 21:19:15 +0200 Subject: [PATCH] docs: add layout.html template from guzzle_sphinx_theme 0.7.11 --- docs/_templates/layout.html | 173 ++++++++++++++++++++++++++++++++++++ 1 file changed, 173 insertions(+) create mode 100644 docs/_templates/layout.html diff --git a/docs/_templates/layout.html b/docs/_templates/layout.html new file mode 100644 index 000000000..85be1c51e --- /dev/null +++ b/docs/_templates/layout.html @@ -0,0 +1,173 @@ +{%- extends "basic/layout.html" %} + +{# Do this so that bootstrap is included before the main css file #} +{%- block htmltitle %} + {% set script_files = script_files + ["_static/myscript.js"] %} + + + + + + + + {{ super() }} +{%- endblock %} + +{%- block extrahead %} + {% if theme_touch_icon %} + + {% endif %} + {{ super() }} +{% endblock %} + +{# Displays the URL for the homepage if it's set or the master_doc if it is not #} +{% macro homepage() -%} + {%- if theme_homepage %} + {%- if hasdoc(theme_homepage) %} + {{ pathto(theme_homepage) }} + {%- else %} + {{ theme_homepage }} + {%- endif %} + {%- else %} + {{ pathto(master_doc) }} + {%- endif %} +{%- endmacro %} + +{# Displays the URL for the tospage if it's set or falls back to homepage macro #} +{% macro tospage() -%} + {%- if theme_tospage %} + {%- if hasdoc(theme_tospage) %} + {{ pathto(theme_tospage) }} + {%- else %} + {{ theme_tospage }} + {%- endif %} + {%- else %} + {{ homepage() }} + {%- endif %} +{%- endmacro %} + +{# Displays the URL for the projectpage if it's set or falls back to homepage macro #} +{% macro projectlink() -%} + {%- if theme_projectlink %} + {%- if hasdoc(theme_projectlink) %} + {{ pathto(theme_projectlink) }} + {%- else %} + {{ theme_projectlink }} + {%- endif %} + {%- else %} + {{ homepage() }} + {%- endif %} +{%- endmacro %} + +{# Displays the next and previous links both before and after content #} +{% macro render_relations() -%} + {% if prev or next %} + +
+ {% endif %} +{%- endmacro %} + +{%- macro guzzle_sidebar() %} +
+
+ {%- if sidebars != None %} + {#- new style sidebar: explicitly include/exclude templates #} + {%- for sidebartemplate in sidebars %} + {%- include sidebartemplate %} + {%- endfor %} + {% else %} + {% include "logo-text.html" %} + {% include "globaltoc.html" %} + {% include "searchbox.html" %} + {%- endif %} +
+
+{%- endmacro %} + +{%- block content %} + + {%- if pagename == 'index' and theme_index_template %} + {% include theme_index_template %} + {%- else %} +
+ +
+ +
+ + {%- block sidebar1 %}{{ guzzle_sidebar() }}{% endblock %} + + {%- block document_wrapper %} + {%- block document %} +
+ {% block breadcrumbs %} +
+ +
+ {% endblock %} +
+ {% block body %} {% endblock %} +
+ {%- block bottom_rel_links %} + {{ render_relations() }} + {%- endblock %} +
+
+ {%- endblock %} + {%- endblock %} + + {%- block comments -%} + {% if theme_disqus_comments_shortname %} +
+ {% include "comments.html" %} +
+ {% endif %} + {%- endblock %} +
+ {%- endif %} + {%- endblock %} + +{%- block footer %} + + +{%- block footer_wrapper %} + +{%- endblock %} +{%- block ga %} + {%- if theme_google_analytics_account %} + + {%- endif %} +{%- endblock %} +{%- endblock %}