forked from david-swift/duckling
Make more XHTML5 compliant in theory (fixes #31)
This commit is contained in:
parent
425de4235d
commit
0866d0725b
@ -7,10 +7,8 @@
|
||||
{%- set rtl_languages = ["ar", "arc", "az", "dv", "ff", "he", "ku", "nqo", "fa", "rhg", "syc", "ur"] -%}
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html {% if lang in rtl_languages %}dir="rtl"{% endif %} lang="{{ lang }}">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" {% if lang in rtl_languages %}dir="rtl"{% endif %} lang="{{ lang }}">
|
||||
{% include "partials/head.html" %}
|
||||
|
||||
<body>
|
||||
{%- if config.extra.nav.links %}
|
||||
{% include "partials/nav.html" %}
|
||||
|
||||
@ -34,7 +34,7 @@
|
||||
<p>{{ macros_translate::translate(key="comments_noscript", default="Loading comments relies on JavaScript. Try enabling JavaScript and reloading, or visit the original post on Mastodon.", language_strings=language_strings) }}</p>
|
||||
</noscript>
|
||||
</div>
|
||||
<script>
|
||||
<script type="text/javascript">
|
||||
function escapeHtml(unsafe) {
|
||||
return unsafe
|
||||
.replace(/&/g, "&")
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{#- Based on https://www.roboleary.net/2022/01/13/copy-code-to-clipboard-blog.html -#}
|
||||
|
||||
<script>
|
||||
<script type="text/javascript">
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
let blocks = document.querySelectorAll("pre[class^='language-']");
|
||||
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
<head>
|
||||
<!-- {{ now() | date(format='%F %a %R') }} -->
|
||||
<meta charset="UTF-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta name="description" content="{{ config.description }}" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<meta name="theme-color" content="{{ config.extra.primary_color | default(value='#9a9996') }}" />
|
||||
@ -10,10 +9,10 @@
|
||||
|
||||
{%- if config.markdown.highlight_code and config.markdown.highlight_theme == "css" %}
|
||||
{%- if config.markdown.highlight_themes_css | length > 0 %}
|
||||
<link rel="stylesheet" href="{{ get_url(path='syntax-theme-light.css') }}" media="(prefers-color-scheme: light)" />
|
||||
<link rel="stylesheet" href="{{ get_url(path='syntax-theme-dark.css') }}" media="(prefers-color-scheme: dark)" />
|
||||
<link type="text/css" rel="stylesheet" href="{{ get_url(path='syntax-theme-light.css') }}" media="(prefers-color-scheme: light)" />
|
||||
<link type="text/css" rel="stylesheet" href="{{ get_url(path='syntax-theme-dark.css') }}" media="(prefers-color-scheme: dark)" />
|
||||
{%- else %}
|
||||
<link rel="stylesheet" href="{{ get_url(path='syntax-theme.css') }}" />
|
||||
<link type="text/css" rel="stylesheet" href="{{ get_url(path='syntax-theme.css') }}" />
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
|
||||
@ -30,10 +29,10 @@
|
||||
{%- endif %}
|
||||
|
||||
{%- for stylesheet in stylesheets %}
|
||||
<link rel="stylesheet" href="{{ get_url(path=stylesheet) | safe }}" />
|
||||
<link type="text/css" rel="stylesheet" href="{{ get_url(path=stylesheet) | safe }}" />
|
||||
{%- endfor %}
|
||||
|
||||
<style>
|
||||
<style type="text/css">
|
||||
:root {
|
||||
--primary-color: {{ config.extra.primary_color | default(value="#9a9996") }};
|
||||
--primary-color-alpha: {{ config.extra.primary_color_alpha | default(value="rgba(154, 153, 150, 0.2)") }};
|
||||
@ -41,7 +40,7 @@
|
||||
</style>
|
||||
|
||||
{%- if config.extra.goatcounter %}
|
||||
<script data-goatcounter="https://{{ config.extra.goatcounter.user }}.{{ config.extra.goatcounter.host | default(value='goatcounter.com') }}/count" async src="//gc.zgo.at/count.js"></script>
|
||||
<script type="text/javascript" data-goatcounter="https://{{ config.extra.goatcounter.user }}.{{ config.extra.goatcounter.host | default(value='goatcounter.com') }}/count" async src="//gc.zgo.at/count.js"></script>
|
||||
<noscript>
|
||||
<img src="https://{{ config.extra.goatcounter.user }}.{{ config.extra.goatcounter.host | default(value='goatcounter.com') }}/count?p={{ current_path | default(value='/') | safe }}" />
|
||||
</noscript>
|
||||
@ -70,7 +69,7 @@
|
||||
|
||||
{%- if scripts | length > 0 %}
|
||||
{%- for script in scripts %}
|
||||
<script src="{{ get_url(path=script) | safe }}"></script>
|
||||
<script type="text/javascript" src="{{ get_url(path=script) | safe }}"></script>
|
||||
{%- endfor %}
|
||||
{%- endif %}
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{#- Based on https://github.com/getzola/zola/blob/master/docs/static/search.js -#}
|
||||
|
||||
<script>
|
||||
<script type="text/javascript">
|
||||
function debounce(func, wait) {
|
||||
var timeout;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user