Favicon: såpestykke på en trekasse (SVG)

Lenkes relativt fra temaet (theme/favicon.svg) og fra admin-basen, så
nettleseren slipper å gjette på /favicon.ico.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JcEy43fNYpwg6K6oTKakWR
This commit is contained in:
Ole-Morten Duesund 2026-08-26 13:34:18 +02:00
commit 8d40a39187
5 changed files with 35 additions and 0 deletions

View file

@ -0,0 +1,16 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
<!-- Såpeboks: en trekasse man kan stå på, med et såpestykke oppå. -->
<!-- Kassen -->
<rect x="8" y="34" width="48" height="24" rx="2" fill="#1f6b3a"/>
<rect x="12" y="38" width="40" height="16" fill="none" stroke="#7fd39a" stroke-width="2"/>
<!-- Planker -->
<line x1="12" y1="46" x2="52" y2="46" stroke="#7fd39a" stroke-width="2"/>
<line x1="32" y1="38" x2="32" y2="54" stroke="#7fd39a" stroke-width="2"/>
<!-- Såpestykke -->
<rect x="17" y="21" width="30" height="13" rx="6" fill="#e8f5ec" stroke="#154d29" stroke-width="2"/>
<ellipse cx="27" cy="26" rx="5" ry="2" fill="#fff" opacity=".8"/>
<!-- Bobler -->
<circle cx="48" cy="14" r="4" fill="none" stroke="#7fd39a" stroke-width="2"/>
<circle cx="40" cy="8" r="2.5" fill="none" stroke="#7fd39a" stroke-width="2"/>
<circle cx="54" cy="6" r="1.5" fill="#7fd39a"/>
</svg>

After

Width:  |  Height:  |  Size: 919 B

View file

@ -5,6 +5,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{% block title %}Admin{% endblock %} {{ site.title }}</title>
<link rel="stylesheet" href="{{ url_for('admin.static', filename='admin.css') }}">
<link rel="icon" type="image/svg+xml" href="{{ url_for('admin.static', filename='favicon.svg') }}">
</head>
<body>
<a class="skip" href="#main">Hopp til innhold</a>

View file

@ -0,0 +1,16 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
<!-- Såpeboks: en trekasse man kan stå på, med et såpestykke oppå. -->
<!-- Kassen -->
<rect x="8" y="34" width="48" height="24" rx="2" fill="#1f6b3a"/>
<rect x="12" y="38" width="40" height="16" fill="none" stroke="#7fd39a" stroke-width="2"/>
<!-- Planker -->
<line x1="12" y1="46" x2="52" y2="46" stroke="#7fd39a" stroke-width="2"/>
<line x1="32" y1="38" x2="32" y2="54" stroke="#7fd39a" stroke-width="2"/>
<!-- Såpestykke -->
<rect x="17" y="21" width="30" height="13" rx="6" fill="#e8f5ec" stroke="#154d29" stroke-width="2"/>
<ellipse cx="27" cy="26" rx="5" ry="2" fill="#fff" opacity=".8"/>
<!-- Bobler -->
<circle cx="48" cy="14" r="4" fill="none" stroke="#7fd39a" stroke-width="2"/>
<circle cx="40" cy="8" r="2.5" fill="none" stroke="#7fd39a" stroke-width="2"/>
<circle cx="54" cy="6" r="1.5" fill="#7fd39a"/>
</svg>

After

Width:  |  Height:  |  Size: 919 B

View file

@ -6,6 +6,7 @@
<title>{% block title %}{{ site.title }}{% endblock %}</title>
{% if site.description %}<meta name="description" content="{{ site.description }}">{% endif %}
<link rel="stylesheet" href="{{ rel('theme/style.css') }}">
<link rel="icon" type="image/svg+xml" href="{{ rel('theme/favicon.svg') }}">
<link rel="alternate" type="application/rss+xml" title="{{ site.title }}" href="{{ rel('feed.xml') }}">
</head>
<body>

View file

@ -60,6 +60,7 @@ def test_full_flow_owner(client, cfg):
html = client.get("/groent-er-skjoent/").text
assert "<strong>verden</strong>" in html
assert 'href="../theme/style.css"' in html
assert 'href="../theme/favicon.svg"' in html
assert 'href="../"' in html # intern lenke omskrevet til relativ
assert client.get("/groent-er-skjoent/mitt-bilde.png").status_code == 200
front = client.get("/").text