diff options
Diffstat (limited to 'theme/mkdocs_windmill/base.html')
-rw-r--r-- | theme/mkdocs_windmill/base.html | 166 |
1 files changed, 166 insertions, 0 deletions
diff --git a/theme/mkdocs_windmill/base.html b/theme/mkdocs_windmill/base.html new file mode 100644 index 0000000..8b4feb8 --- /dev/null +++ b/theme/mkdocs_windmill/base.html @@ -0,0 +1,166 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + {% set is_top = (page and page.is_homepage) and not force_plain_page %} + {% set base_url = base_url or "." %} + + {%- block site_meta %} + <meta charset="utf-8"> + <meta http-equiv="X-UA-Compatible" content="IE=edge"> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + {% if page and page.is_homepage %}<meta name="description" content="{{ config.site_description }}">{% endif %} + {% if config.site_author %}<meta name="author" content="{{ config.site_author }}">{% endif %} + {% if page and page.canonical_url %}<link rel="canonical" href="{{ page.canonical_url }}">{% endif %} + {% if config.site_favicon %}<link rel="shortcut icon" href="/img/favicon.ico"> + {% else %}<link rel="shortcut icon" href="/img/favicon.ico">{% endif %} + <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" /> + {%- endblock %} + + {%- block htmltitle %} + <title>{% if page and page.title and not page.is_homepage %}{{ page.title }} - {% endif %}{{ config.site_name }}</title> + {%- endblock %} + + {%- block styles %} + <link href="{{ base_url }}/css/bootstrap-3.3.7.min.css" rel="stylesheet"> + <link href="{{ base_url }}/css/font-awesome-4.7.0.css" rel="stylesheet"> + <link href="{{ base_url }}/css/base.css" rel="stylesheet"> + <link rel="stylesheet" href="{{ base_url }}/css/highlight.css"> + {%- for path in extra_css %} + <link href="{{ path }}" rel="stylesheet"> + {%- endfor %} + {%- endblock %} + + {%- block libs %} + <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries --> + <!--[if lt IE 9]> + <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script> + <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script> + <![endif]--> + + <script src="{{ base_url }}/js/jquery-3.2.1.min.js"></script> + <script src="{{ base_url }}/js/bootstrap-3.3.7.min.js"></script> + <script src="{{ base_url }}/js/highlight.pack.js"></script> + {% if is_top %} + <script src="{{ base_url }}/js/elasticlunr.min.js"></script> + {% endif %} + <base target="_top"> + {%- endblock %} + + {%- block scripts %} + <script> + var base_url = '{{ base_url }}'; + var is_top_frame = {% if is_top %}(window === window.parent){% else %}false{% endif %}; + {%- if page %} + {# Include the first two levels of TOC data as a JS object, to be rendered in top frame #} + var pageToc = [ + {%- for item in page.toc %} + {title: {{ item.title|tojson }}, url: {{ ('#_top' if loop.first else item.url)|tojson }}, children: [ + {%- for item in item.children %} + {title: {{ item.title|tojson }}, url: {{ item.url|tojson }} }, + {%- endfor %} + ]}, + {%- endfor %} + ]; + {%- else %} + var page_toc = null; + {%- endif %} + + </script> + <script src="{{ base_url }}/js/base.js"></script> + {%- for path in extra_javascript %} + <script src="{{ path }}"></script> + {%- endfor %} + {%- endblock %} + + {%- block analytics %} + {%- if config.google_analytics %} + <script> + (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ + (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), + m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) + })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); + + ga('create', '{{ config.google_analytics[0] }}', '{{ config.google_analytics[1] }}'); + ga('send', 'pageview'); + </script> + {%- endif %} + {%- endblock %} + + {%- block extrahead %} {% endblock %} +</head> + +<body> +<script> +if (is_top_frame) { $('body').addClass('wm-top-page'); } +</script> + +{# + # Code for the top frame. It should ideally be separate from the index page (which is likely + # possible once theme_config is released with mkdocs 1.0). + #} +{%- if is_top -%} + {% include 'topbar.html' %} + + <div id="main-content" class="wm-page-top-frame"> + {% include 'nav-pane.html' %} + <div class="wm-content-pane"> + <iframe class="wm-article" name="article"></iframe> + </div> + </div> + +{%- endif -%} + +{# Code for the main template for all content pages. #} + +<div class="container-fluid wm-page-content"> + <a name="_top"></a> + {%- if config.extra.article_nav_top != False %} + {% include "article-nav.html" %} + {%- endif %} + + {%- block content %} + {% if page and page.meta.source %} + <div class="source-links"> + {% for filename in page.meta.source %} + <span class="label label-primary">{{ filename }}</span> + {% endfor %} + </div> + {% endif %} + + {{ page.content }} + {%- endblock %} + + <br> + {%- if config.extra.article_nav_bottom != False %} + {% include "article-nav.html" %} + <br> + {%- endif %} +</div> + +<footer class="container-fluid wm-page-content"> +{%- block footer %} + {%- block repo %} + {%- if page and page.edit_url %} + <p> + <a href="{{ page.edit_url }}">{% include 'repo-icon.html' %}Edit on {{ config.repo_name }}</a> + </p> + {%- elif config.repo_url %} + <p> + <a href="{{ config.repo_url }}">{% include 'repo-icon.html' %}{{ config.repo_name }}</a> + </p> + {%- endif %} + {%- endblock %} + + {%- if config.copyright %}<p>{{ config.copyright }}</p>{%- endif %} + <p>Documentation built with <a href="http://www.mkdocs.org/">MkDocs</a> using <a href="https://github.com/gristlabs/mkdocs-windmill">Windmill</a> theme by Grist Labs.</p> +{%- endblock %} +</footer> + +</body> +</html> +{%- if is_top %} +<!-- +MkDocs version : {{ mkdocs_version }} +Build Date UTC : {{ build_date_utc }} +--> +{%- endif %} |