commit 74c682074963abd6479c8d20cf90f7b7cfdd9fbe
parent 1e769313d0084ccc4ac6ce2b75e4b2d2ba5c6946
Author: William Lindholm <william_lindholm@outlook.com>
Date: Tue, 22 Sep 2026 21:03:25 +0200
Added do not break for certain parts for print version
Diffstat:
3 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/cv/index.html b/cv/index.html
@@ -104,7 +104,7 @@
<p class="skip-print"><a href="https://git.lindholmlabs.com" target="_blank" rel="noopener" aria-label="View more projects on Stagit (opens in a new tab)">View more projects on Stagit <span aria-hidden="true" class="skip-print external-link-icon">↗︎</span></a></p>
</section>
- <section aria-labelledby="skills">
+ <section aria-labelledby="skills" class="do-not-break">
<h2 id="skills">Technical skills</h2>
<dl>
<dt>Languages & frameworks</dt>
@@ -116,7 +116,7 @@
</dl>
</section>
- <section aria-labelledby="awards">
+ <section aria-labelledby="awards" class="do-not-break">
<h2 id="awards">Awards and certificates</h2>
<ul>
<li>Harmonized Amateur Radio Examination Certificate (HAREC) ยท <time datetime="2026">2026</time></li>
@@ -126,7 +126,7 @@
</ul>
</section>
- <section aria-labelledby="contact">
+ <section aria-labelledby="contact" class="do-not-break">
<h2 id="contact">Contact and external links</h2>
<address>
<ul>
diff --git a/cv/main.py b/cv/main.py
@@ -8,6 +8,18 @@ from markupsafe import Markup
app = Flask(__name__, static_folder=None, template_folder=".")
+@app.after_request
+def security_headers(response):
+ response.headers["Content-Security-Policy"] = (
+ "default-src 'none'; style-src 'self'; img-src 'self'; "
+ "base-uri 'none'; form-action 'none'; frame-ancestors 'none'"
+ )
+ response.headers["Strict-Transport-Security"] = "max-age=31536000"
+ response.headers["X-Content-Type-Options"] = "nosniff"
+ response.headers["Referrer-Policy"] = "no-referrer"
+ return response
+
+
@app.get("/")
def resume():
return render_template("index.html", duration=duration, current_year=date.today().year)
diff --git a/cv/style.css b/cv/style.css
@@ -76,7 +76,7 @@ kbd { margin-inline: 0.1rem; padding: 0.1rem 0.3rem; border: 1px solid var(--dar
a { color: var(--primary-text); }
a[href^="https://"]::after { content: " (" attr(href) ")"; font-size: 0.85em; }
h1, h2, h3, dt, .entry-meta { break-after: avoid; }
- article, address { break-inside: avoid; }
+ article, address, .do-not-break { break-inside: avoid; }
p, li, dd { orphans: 3; widows: 3; }
}