about summary refs log tree commit diff stats
path: root/themes/bear/templates
diff options
context:
space:
mode:
authorAlan Pearce2023-09-09 19:23:38 +0200
committerAlan Pearce2023-09-09 19:23:38 +0200
commitc8d206442c65eaf999445db6c104ee55a07dd931 (patch)
tree753a4e6d1c69753d3bc7b396a80465950ff66ecd /themes/bear/templates
parentb2c15923b33fa65bffe8a5eaef869e6b66d70078 (diff)
parenta961bc284bb130e44468c07aaaa028652c151e08 (diff)
downloadwebsite-c8d206442c65eaf999445db6c104ee55a07dd931.tar.lz
website-c8d206442c65eaf999445db6c104ee55a07dd931.tar.zst
website-c8d206442c65eaf999445db6c104ee55a07dd931.zip
Merge commit 'a961bc284bb130e44468c07aaaa028652c151e08'
Diffstat (limited to 'themes/bear/templates')
-rw-r--r--themes/bear/templates/base.html5
-rw-r--r--themes/bear/templates/security_tags.html2
-rw-r--r--themes/bear/templates/seo_tags.html2
-rw-r--r--themes/bear/templates/style.css1
l---------themes/bear/templates/style.css.html (renamed from themes/bear/templates/style.html)0
5 files changed, 8 insertions, 2 deletions
diff --git a/themes/bear/templates/base.html b/themes/bear/templates/base.html
index e3e68b4..3a2d565 100644
--- a/themes/bear/templates/base.html
+++ b/themes/bear/templates/base.html
@@ -1,6 +1,9 @@
 <!DOCTYPE html>
 <html lang="{{ lang | default(value="en-US" ) }}">
 <head>
+  {%- if config.webserver_sends_csp_headers %}
+  {%- include "security_tags.html" ignore missing %}
+  {%- endif %}
   <meta charset="utf-8">
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   <link rel="shortcut icon" href="{{ config.extra.favicon | default(value="data:,") }}">
@@ -12,7 +15,7 @@
   {%- endblock -%}
   {%- endif %}
   <style>
-  {% include "style.html" ignore missing -%}
+  {%- include "style.css.html" ignore missing -%}
   </style>
   {% include "custom_head.html" ignore missing -%}
 </head>
diff --git a/themes/bear/templates/security_tags.html b/themes/bear/templates/security_tags.html
new file mode 100644
index 0000000..0f922ea
--- /dev/null
+++ b/themes/bear/templates/security_tags.html
@@ -0,0 +1,2 @@
+<!-- These tags are here for demostration. It's recommended to send them via HTTP headers instead. -->
+<meta http-equiv="Content-Security-Policy" content="default-src 'none'; img-src 'self'; object-src 'none'; script-src 'none'; style-src 'unsafe-inline'">
diff --git a/themes/bear/templates/seo_tags.html b/themes/bear/templates/seo_tags.html
new file mode 100644
index 0000000..4eb2bc8
--- /dev/null
+++ b/themes/bear/templates/seo_tags.html
@@ -0,0 +1,2 @@
+<meta name="title" content="{% if page.title %}{{ page.title }}{% else %}{{ config.title }}{% endif %}">
+<meta name="description" content="{{ config.description }}" />
diff --git a/themes/bear/templates/style.css b/themes/bear/templates/style.css
index 49b3680..e1e12aa 100644
--- a/themes/bear/templates/style.css
+++ b/themes/bear/templates/style.css
@@ -1,4 +1,3 @@
-/* -*- mode: css; -*- */
 body {
   font-family: Verdana, sans-serif;
   margin: auto;
diff --git a/themes/bear/templates/style.html b/themes/bear/templates/style.css.html
index f6b71cc..f6b71cc 120000
--- a/themes/bear/templates/style.html
+++ b/themes/bear/templates/style.css.html