| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- {% extends '!layout.html' %}
- {% block footer %}
- {{ super() }}
- <div class="sdk-footer">
- <div class="sdk-footer__inner">
- <div class="sdk-footer__left">
- <strong>{{ project|e }}</strong>
- {% if release %}<span class="sdk-footer__sep">•</span> 版本:{{ release|e }}{% endif %}
- </div>
- <div class="sdk-footer__right">
- 构建时间:<span id="sdk-build-time"></span>
- </div>
- </div>
- </div>
- <script>
- (function(){
- try {
- var el = document.getElementById('sdk-build-time');
- if (el) {
- var d = new Date(document.lastModified);
- el.textContent = d.toLocaleString();
- }
- } catch(e) {}
- })();
- </script>
- {% endblock %}
- {# 将 giscus 插入到正文(内容)块的末尾,紧跟文章内容之后 #}
- {% block content %}
- {{ super() }}
- {% if giscus and giscus.get('enabled') and giscus.get('repo') and giscus.get('repo_id') and (giscus.get('category_id') or giscus.get('category')) %}
- <div id="giscus_thread" class="giscus" style="margin: 2rem 0;"></div>
- <script src="https://giscus.app/client.js"
- data-repo="{{ giscus.get('repo') }}"
- data-repo-id="{{ giscus.get('repo_id') }}"
- {% if giscus.get('category_id') %}
- data-category-id="{{ giscus.get('category_id') }}"
- {% elif giscus.get('category') %}
- data-category="{{ giscus.get('category') }}"
- {% endif %}
- data-mapping="{{ giscus.get('mapping', 'pathname') }}"
- data-strict="{{ giscus.get('strict', 0) }}"
- data-reactions-enabled="{{ giscus.get('reactions_enabled', 1) }}"
- data-emit-metadata="{{ giscus.get('emit_metadata', 0) }}"
- data-input-position="{{ giscus.get('input_position', 'bottom') }}"
- data-theme="{{ giscus.get('theme', 'preferred_color_scheme') }}"
- data-lang="{{ giscus.get('lang', 'zh-CN') }}"
- {% if giscus.get('lazy') %} data-loading="lazy"{% endif %}
- crossorigin="anonymous"
- async>
- </script>
- {% endif %}
- {% endblock %}
- {% block extrahead %}
- {{ super() }}
- {# 将 edit_base_url 暴露为 window 变量与 meta,供前端脚本读取 #}
- {% if edit_base_url %}
- <script>window.SPHINX_EDIT_BASE_URL = {{ edit_base_url|tojson|safe }};</script>
- <meta name="edit-base-url" content="{{ edit_base_url }}">
- {% endif %}
- {% endblock %}
|