Skip to content

Commit

Permalink
Do some tweakin'.
Browse files Browse the repository at this point in the history
  • Loading branch information
damiendart committed Sep 20, 2024
1 parent e95c1d8 commit 4600c76
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion private/apache2/virtualhost.conf
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ ScriptAliasMatch \
# information, see "../../src/ssg/input/.templates/base.html.twig").
# - The hash in the "style-src" directive refers to the inline CSS
# styles in "../../protected/fatal.php".
Header always set Content-Security-Policy "default-src 'self'; script-src 'self' 'sha256-JsTl2cIbsqIAKcFRcFuPO29mhSmbSKC1xm83yg4zuyE='; style-src 'self' 'sha256-+z2YBo+yffemCeDyDKyXM2PO7IYHS8Oau6x6mVNZ9og='; frame-ancestors 'none'"
Header always set Content-Security-Policy "default-src 'self'; script-src 'self' 'sha256-Ec1euMuXxrx7KA3rAVXG6+5pbyDXkCi8Kz87haBzIv8='; style-src 'self' 'sha256-+z2YBo+yffemCeDyDKyXM2PO7IYHS8Oau6x6mVNZ9og='; frame-ancestors 'none'"
Header always set X-Frame-Options "deny"
2 changes: 1 addition & 1 deletion src/javascript/site-preferences.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class SitePreferencesDialog extends HTMLElement {
};

this.innerHTML = `
<button id="open-preferences-dialog">Preferences</button>
<button id="open-preferences-dialog" type="button">Preferences</button>
<dialog class="dialog">
<form method="dialog">
<div class="dialog__header">
Expand Down
15 changes: 10 additions & 5 deletions src/ssg/input/.templates/base.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,21 @@
<head>
<meta charset="utf-8">
<meta content="initial-scale=1, width=device-width" name="viewport">
<title>{{ metaTitle | smartypants }}</title>

{#
If this script block is modified, the CSP hash in
"virtualhost.conf" must be updated accordingly.
#}
<script>document.documentElement.className+='javascript';localStorage.getItem('theme')&&document.documentElement.setAttribute('data-theme',localStorage.getItem('theme'))</script>

{% block head %}
<link href="/assets/style.{{ site.releaseTimestamp }}.css" rel="stylesheet">
{% endblock %}

<link href="{{ site.urlBase ~ slug }}" rel="canonical">
<meta content="{{ site.author | smartypants }}" name="author">
<meta content="light dark" name="color-scheme">

{% if description is defined %}
<meta content="{{ description | smartypants }}" name="description">
Expand All @@ -28,16 +36,13 @@
<meta content="{{ metaTitle | smartypants }}" property="og:title">
<meta content="website" property="og:type">
<meta content="{{ site.urlBase ~ slug }}" property="og:url">
<meta content="{{ site.metaTwitterAuthor | smartypants }}" property="twitter:creator">
<meta content="{{ site.metaTwitterSite | smartypants }}" property="twitter:site">
<meta content="{{ site.metaTwitterAuthor | smartypants }}" name="twitter:creator">
<meta content="{{ site.metaTwitterSite | smartypants }}" name="twitter:site">
<meta content="summary_large_image" name="twitter:card">

{% if metaNoCrawl | default(false) %}
<meta content="noindex, nofollow" name="robots">
{% endif %}

<script>{% block headJavaScript "document.documentElement.className+='javascript',localStorage.getItem('theme')&&document.documentElement.setAttribute('data-theme',localStorage.getItem('theme'))" %}</script>
<title>{{ metaTitle | smartypants }}</title>
</head>
<body class="u-stack">
<header class="page__header">
Expand Down

0 comments on commit 4600c76

Please sign in to comment.