-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Refactor HTML templates #467
Closed
+32
−169
Closed
Changes from 9 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
050a570
Clean up head block
Blendify 3d880c4
Add super tag and fix indent
Blendify 728a21e
Add back theme_canonical_url
Blendify 954b2a1
Try to fix build
Blendify 962ffb8
remove unwanted changes
Blendify 82fb7ba
Merge branch 'master' into refactor_html
Blendify d7a1bcb
Remove duplicated script tags
Blendify 65ec396
Remove code that is in layout.html
Blendify e44d14b
Delete search.html
Blendify 9fe79b0
Fix compilation error
Blendify 05c5e3b
Fix error with body tag
Blendify eb8f0bc
Remove unstyled, inhereted "related" blocks
jessetan a8052da
Merge branch 'master' into refactor_html
jessetan eae393c
Merge branch 'master' into refactor_html
Blendify 08619b7
Use full standards doctype
jessetan 3965c80
Remove some whitespace
jessetan 9ab2760
Merge branch 'master' into refactor_html
Blendify File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 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 |
---|---|---|
@@ -1,43 +1,13 @@ | ||
{# TEMPLATE VAR SETTINGS #} | ||
{%- set url_root = pathto('', 1) %} | ||
{%- if url_root == '#' %}{% set url_root = '' %}{% endif %} | ||
{%- if not embedded and docstitle %} | ||
{%- set titlesuffix = " — "|safe + docstitle|e %} | ||
{%- else %} | ||
{%- set titlesuffix = "" %} | ||
{%- endif %} | ||
{%- set lang_attr = 'en' if language == None else (language | replace('_', '-')) %} | ||
|
||
<!DOCTYPE html> | ||
<!--[if IE 8]><html class="no-js lt-ie9" lang="{{ lang_attr }}" > <![endif]--> | ||
<!--[if gt IE 8]><!--> <html class="no-js" lang="{{ lang_attr }}" > <!--<![endif]--> | ||
<head> | ||
<meta charset="utf-8"> | ||
{{ metatags }} | ||
{%- extends "basic/layout.html" %} | ||
|
||
{%- block extrahead %} | ||
{{ super() }} | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
{% block htmltitle %} | ||
<title>{{ title|striptags|e }}{{ titlesuffix }}</title> | ||
{% endblock %} | ||
|
||
{# FAVICON #} | ||
{% if favicon %} | ||
<link rel="shortcut icon" href="{{ pathto('_static/' + favicon, 1) }}"/> | ||
{% endif %} | ||
{# CANONICAL URL #} | ||
{% if theme_canonical_url %} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Note that this can be removed also if sphinx-doc/sphinx#4193 gets merged |
||
<link rel="canonical" href="{{ theme_canonical_url }}{{ pagename }}.html"/> | ||
{% endif %} | ||
|
||
{# CSS #} | ||
|
||
{# OPENSEARCH #} | ||
{% if not embedded %} | ||
{% if use_opensearch %} | ||
<link rel="search" type="application/opensearchdescription+xml" title="{% trans docstitle=docstitle|e %}Search within {{ docstitle }}{% endtrans %}" href="{{ pathto('_static/opensearch.xml', 1) }}"/> | ||
{% endif %} | ||
|
||
{% endif %} | ||
|
||
{# RTD hosts this file, so just load on non RTD builds #} | ||
{% if not READTHEDOCS %} | ||
<link rel="stylesheet" href="{{ pathto('_static/' + style, 1) }}" type="text/css" /> | ||
|
@@ -51,41 +21,13 @@ | |
<link rel="stylesheet" href="{{ pathto(cssfile, 1) }}" type="text/css" /> | ||
{% endfor %} | ||
|
||
{%- block linktags %} | ||
{%- if hasdoc('about') %} | ||
<link rel="author" title="{{ _('About these documents') }}" | ||
href="{{ pathto('about') }}"/> | ||
{%- endif %} | ||
{%- if hasdoc('genindex') %} | ||
<link rel="index" title="{{ _('Index') }}" | ||
href="{{ pathto('genindex') }}"/> | ||
{%- endif %} | ||
{%- if hasdoc('search') %} | ||
<link rel="search" title="{{ _('Search') }}" href="{{ pathto('search') }}"/> | ||
{%- endif %} | ||
{%- if hasdoc('copyright') %} | ||
<link rel="copyright" title="{{ _('Copyright') }}" href="{{ pathto('copyright') }}"/> | ||
{%- endif %} | ||
<link rel="top" title="{{ docstitle|e }}" href="{{ pathto('index') }}"/> | ||
{%- if parents %} | ||
<link rel="up" title="{{ parents[-1].title|striptags|e }}" href="{{ parents[-1].link|e }}"/> | ||
{%- endif %} | ||
{%- if next %} | ||
<link rel="next" title="{{ next.title|striptags|e }}" href="{{ next.link|e }}"/> | ||
{%- endif %} | ||
{%- if prev %} | ||
<link rel="prev" title="{{ prev.title|striptags|e }}" href="{{ prev.link|e }}"/> | ||
{%- endif %} | ||
{%- endblock %} | ||
{%- block extrahead %} {% endblock %} | ||
|
||
{# Keep modernizr in head - http://modernizr.com/docs/#installing #} | ||
<script src="{{ pathto('_static/js/modernizr.min.js', 1) }}"></script> | ||
{% endblock %} | ||
|
||
</head> | ||
|
||
<body class="wy-body-for-nav" role="document"> | ||
|
||
{%- block content %} | ||
<div class="wy-body-for-nav" role="document"> | ||
{%- block document %} | ||
{% block extrabody %} {% endblock %} | ||
<div class="wy-grid-for-nav"> | ||
|
||
|
@@ -120,7 +62,6 @@ | |
{% endif %} | ||
|
||
{% include "searchbox.html" %} | ||
|
||
{% endblock %} | ||
</div> | ||
|
||
|
@@ -176,25 +117,6 @@ | |
</div> | ||
{% include "versions.html" %} | ||
|
||
{% if not embedded %} | ||
|
||
<script type="text/javascript"> | ||
var DOCUMENTATION_OPTIONS = { | ||
URL_ROOT:'{{ url_root }}', | ||
VERSION:'{{ release|e }}', | ||
LANGUAGE:'{{ language }}', | ||
COLLAPSE_INDEX:false, | ||
FILE_SUFFIX:'{{ '' if no_search_suffix else file_suffix }}', | ||
HAS_SOURCE: {{ has_source|lower }}, | ||
SOURCELINK_SUFFIX: '{{ sourcelink_suffix }}' | ||
}; | ||
</script> | ||
{%- for scriptfile in script_files %} | ||
<script type="text/javascript" src="{{ pathto(scriptfile, 1) }}"></script> | ||
{%- endfor %} | ||
|
||
{% endif %} | ||
|
||
{# RTD hosts this file, so just load on non RTD builds #} | ||
{% if not READTHEDOCS %} | ||
<script type="text/javascript" src="{{ pathto('_static/js/theme.js', 1) }}"></script> | ||
|
@@ -209,7 +131,6 @@ | |
</script> | ||
{% endif %} | ||
|
||
{%- endblock %} | ||
{%- endblock %} | ||
{%- block footer %} {% endblock %} | ||
|
||
</body> | ||
</html> |
This file was deleted.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Blendify why was this removed? When building the demo docs, this does not show up anymore, so I don't think it is inserted elsewhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought it was inherited from the main layout file but I think that is not working. I can add it back.