Compare commits

..
Author SHA1 Message Date
blandClaude Opus 5.5 c723932fbf Forsiden uten bildestripe igjen: bare kartet
lint-and-reload / lint (push) Successful in 5s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L5fbDmSQSb6u27EiEuwzoM
2026-11-07 19:38:44 +01:00
bl 698ed2c808 Merge pull request 'Bildestripa tilbake, med kartet først (vent på portal-bump)' (#23) from kart-forst-i-stripa into main
lint-and-reload / lint (push) Successful in 5s
Reviewed-on: #23
2026-11-07 19:32:07 +01:00
blandClaude Opus 5.5 664380eea6 Bildestripa tilbake på forsiden, med kartet som første bilde
lint-and-reload / lint (push) Successful in 4s
Krever portal med uhhm/portal#71: før det står kartet over stripa.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L5fbDmSQSb6u27EiEuwzoM
2026-11-07 19:19:06 +01:00
bl f733d687ab Merge pull request 'Kartet kant i kant, ordmerket til venstre' (#22) from kart-hero-kant into main
lint-and-reload / lint (push) Successful in 5s
Reviewed-on: #22
2026-11-07 19:09:34 +01:00
blandClaude Opus 5.5 2b910c93a0 Kartet kant i kant, ordmerket til venstre, og litt raskere dreining
lint-and-reload / lint (push) Successful in 5s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L5fbDmSQSb6u27EiEuwzoM
2026-11-07 19:07:39 +01:00
bl 0fe0420790 Merge pull request 'Tomter fra lufta på forsiden, uten bildestripe' (#21) from kart-hero into main
lint-and-reload / lint (push) Successful in 4s
Reviewed-on: #21
2026-11-07 18:03:35 +01:00
blandClaude Opus 5.5 a0c6b4cd99 Forsiden uten bildestripe: kartet står der i stedet
lint-and-reload / lint (push) Successful in 5s
Bildene av elvestien står fortsatt på /elvestien.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L5fbDmSQSb6u27EiEuwzoM
2026-11-07 17:57:33 +01:00
blandClaude Opus 5.5 af80cc3839 Tomter fra lufta på forsiden: et kart som snur seg sakte
lint-and-reload / lint (push) Successful in 4s
hero.js tegner Tomter med MapLibre fra portalens egen proxy
(/maplibre-gl.js, /map/style.json, /map/tiles), så ingenting fra
tredjepart lastes i siden og Mapbox-nøkkelen blir på serveren. Uten
MAPBOX_TOKEN på instansen svarer stilen 404, og stykket er tomt. Ikke
interaktivt, skjult for skjermlesere, og stille med prefers-reduced-motion.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L5fbDmSQSb6u27EiEuwzoM
2026-11-07 17:50:51 +01:00
bl b66319118b Merge pull request 'E-posten går ut fra post@tomtervel.no' (#20) from post-tomtervel-avsender into main
lint-and-reload / lint (push) Successful in 5s
Reviewed-on: #20
2026-11-07 17:34:57 +01:00
bl e3e2cf0eb1 Merge main into post-tomtervel-avsender
lint-and-reload / lint (push) Successful in 5s
2026-11-07 17:29:05 +01:00
bl 4f5d09af7b Merge pull request 'Kartnål, titler på listene, og middagen teller gjester' (#19) from innhold-0-13 into main
lint-and-reload / lint (push) Successful in 4s
Reviewed-on: #19
2026-11-07 17:28:15 +01:00
blandClaude Opus 5.5 849a691a85 E-posten går ut fra post@tomtervel.no
lint-and-reload / lint (pull_request) Failing after 6s
Krever DKIM-nøkkelen kasse._domainkey.tomtervel.no og kasse i SPF-en
før den pushes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L5fbDmSQSb6u27EiEuwzoM
2026-11-07 14:17:42 +01:00
4 changed files with 200 additions and 17 deletions

No files matched your search

+24
View File
@@ -128,3 +128,27 @@ button:hover, .button:hover, input[type="submit"]:hover {
margin: 0.8rem auto 0; margin: 0.8rem auto 0;
text-align: center; text-align: center;
} }
/* Kartet på forsiden går kant i kant: portalens .hero er en smal,
polstret spalte, så kartet fikk marg over og på sidene. Spalten
flyttes inn til teksten under, og kartet får hele bredden. */
.hero.hero-module {
max-width: none;
padding: 0 0 2.5rem;
}
.hero.hero-module .hero-copy {
box-sizing: border-box;
width: 100%;
max-width: 46rem;
margin: 0 auto;
padding: 0 1.5rem;
}
/* Ordmerket står til venstre, i flukt med innholdet under, og
innloggingen til høyre på samme linje. */
.hero.hero-module .hero-top {
justify-content: space-between;
}
.hero.hero-module .hero-top .session {
position: static;
transform: none;
}
+165
View File
@@ -0,0 +1,165 @@
// Tomter from above, on the landing page: a map of the village, the
// river path and the playgrounds, turning slowly under the heading.
//
// Everything comes from this site's own origin: portal serves MapLibre
// (/maplibre-gl.js, /maplibre-gl.css), a raster style (/map/style.json)
// and the tiles (/map/tiles/...), fetching them from Mapbox itself with
// the token kept on the server. No third party loads in the page.
// Without MAPBOX_TOKEN on the instance the style answers 404, and the
// hero is simply empty: the heading stands on the page's own paper.
//
// The map is a picture, not a tool: no panning, no zoom, hidden from
// screen readers. prefers-reduced-motion keeps it still.
const STYLE_ID = 'tomtervel-hero-style';
// Between the station, the river path and the playgrounds; the same
// place the report form's map opens on (questions/melde-fra).
const CENTER = [11.004, 59.6635];
const ZOOM = 13.8;
const PITCH = 42;
const DEGREES_PER_SECOND = 1.4;
const CSS = `
.tomtervel-map {
position: absolute;
inset: 0;
overflow: hidden;
}
.tomtervel-map .maplibregl-map,
.tomtervel-map .tomtervel-map-canvas {
position: absolute;
inset: 0;
}
/* Softer than the street map's own colours, so the heading reads. */
.tomtervel-map canvas {
filter: saturate(0.55) contrast(0.92) brightness(1.04);
}
/* The map fades into the page at the bottom, under the copy. */
.tomtervel-map::after {
content: "";
position: absolute;
inset: 0;
pointer-events: none;
background: linear-gradient(to bottom,
transparent 45%,
var(--paper, #fffceb) 100%);
}
.tomtervel-map .maplibregl-ctrl-attrib {
font-size: 10px;
background: var(--card-bg, rgba(255, 255, 255, 0.6));
}
.tomtervel-map .maplibregl-ctrl-bottom-right {
z-index: 2;
}
`;
function ensureStyle() {
if (document.getElementById(STYLE_ID)) return;
const style = document.createElement('style');
style.id = STYLE_ID;
style.textContent = CSS;
document.head.appendChild(style);
}
const reducedMotion = () => window.matchMedia('(prefers-reduced-motion: reduce)').matches;
let maplibreLoading = null;
// MapLibre once per document, from portal's own copy.
function loadMaplibre() {
if (window.maplibregl) return Promise.resolve(window.maplibregl);
if (maplibreLoading) return maplibreLoading;
if (!document.querySelector('link[href="/maplibre-gl.css"]')) {
const link = document.createElement('link');
link.rel = 'stylesheet';
link.href = '/maplibre-gl.css';
document.head.appendChild(link);
}
maplibreLoading = new Promise((resolve, reject) => {
const existing = document.querySelector('script[src="/maplibre-gl.js"]');
const script = existing || document.createElement('script');
script.addEventListener('load', () => resolve(window.maplibregl), { once: true });
script.addEventListener('error', () => reject(new Error('maplibre did not load')), { once: true });
if (!existing) {
script.src = '/maplibre-gl.js';
script.async = true;
document.head.appendChild(script);
} else if (window.maplibregl) {
resolve(window.maplibregl);
}
}).catch((err) => {
maplibreLoading = null;
throw err;
});
return maplibreLoading;
}
class MapHero {
constructor(container) {
ensureStyle();
this.root = document.createElement('div');
this.root.className = 'tomtervel-map';
this.root.setAttribute('aria-hidden', 'true');
container.appendChild(this.root);
this.stopped = false;
this.ready = this.start().catch(() => {
// No maps on this instance, or MapLibre missing: an empty
// piece, and the page goes on.
});
}
async start() {
// Ask for the style first: 404 means maps are off here.
const res = await fetch('/map/style.json', { credentials: 'same-origin' });
if (!res.ok || this.stopped) return;
const style = await res.json();
const maplibregl = await loadMaplibre();
if (this.stopped) return;
const el = document.createElement('div');
el.className = 'tomtervel-map-canvas';
this.root.appendChild(el);
this.map = new maplibregl.Map({
container: el,
style,
center: CENTER,
zoom: ZOOM,
pitch: PITCH,
bearing: 0,
interactive: false,
attributionControl: { compact: true },
fadeDuration: 0,
});
await new Promise((resolve) => {
this.map.once('load', resolve);
this.map.once('error', resolve);
});
if (this.stopped || reducedMotion()) return;
this.last = performance.now();
const turn = (now) => {
if (this.stopped) return;
const dt = Math.min(now - this.last, 100) / 1000;
this.last = now;
if (!document.hidden) {
this.map.setBearing((this.map.getBearing() + DEGREES_PER_SECOND * dt) % 360);
}
this.raf = requestAnimationFrame(turn);
};
this.raf = requestAnimationFrame(turn);
}
stop() {
this.stopped = true;
if (this.raf) cancelAnimationFrame(this.raf);
if (this.map) this.map.remove();
this.root.remove();
}
}
export function mount(container) {
return new MapHero(container);
}
-11
View File
@@ -4,17 +4,6 @@ responsible:
name: Redaksjonen i Tomter Vel name: Redaksjonen i Tomter Vel
contact: post@tomtervel.no contact: post@tomtervel.no
group: redaktor group: redaktor
slideshow:
max_height: 34
slides:
- image: images/elvestien-jernbanebroen.webp
caption: Jernbanebroen over Hobølelva, sett fra lufta mot nord
width: 1300
height: 780
- image: images/elvestien-infotavle.webp
caption: Elvestien, med infotavla ved elva
width: 1400
height: 1050
alternatives: alternatives:
- name: Velforeningen for Tomter siden 1947 - name: Velforeningen for Tomter siden 1947
description: Sju komiteer jobber på fritida for bygda vår, fra elvestien og lekeplassene til trafikken og julegrantenningen. description: Sju komiteer jobber på fritida for bygda vår, fra elvestien og lekeplassene til trafikken og julegrantenningen.
+11 -6
View File
@@ -5,11 +5,16 @@ wordmark_invert: false
wordmark_height: 2.4 wordmark_height: 2.4
stylesheet: custom.css stylesheet: custom.css
favicon: images/logo.svg favicon: images/logo.svg
# Who mail from this site comes from (portal 0.3.43, delivered by gdo # Tomter from above on the landing page: this repo's own module, served
# on kasse). klingenbergbygg.no is what kasse's postfix may sign and # at /site/hero.js. The map comes from portal's own proxy, so it needs
# send for today; a sender on the vel's own domain waits for its DKIM # MAPBOX_TOKEN on the instance; without it the piece is empty.
# key (the `mail` stage of the go-live). Replies go to the board's real hero:
# inbox. kind: module
module: hero.js
# Who mail from this site comes from (delivered by gdo through kasse's
# postfix). kasse signs @tomtervel.no with its own DKIM key (selector
# `kasse`), and the vel's SPF lets kasse send beside Zoho, so the mail
# is the vel's own and replies land in the board's inbox at Zoho.
mail: mail:
from: Tomter Vel <tomtervel@klingenbergbygg.no> from: Tomter Vel <post@tomtervel.no>
reply_to: post@tomtervel.no reply_to: post@tomtervel.no