Files
Hugo_MAP-NSU-Komplex/themes/op-dz/layouts/partials/linkify.html
T
maik d351ba2b3a feat: Externe Quellen mit klickbaren Links (neuer Tab) + Kiosk-Modus
- Label "Externe Quelle (Links)" -> "Externe Quellen" (de/en)
- Quelle-URLs werden via linkify-Partial anklickbar, oeffnen in neuem Tab
- Neuer Kiosk-Modus: ?kiosk=true macht externe Links unklickbar
  (bleibt fuer die Session aktiv, verlassen mit ?kiosk=false)
2026-08-18 17:58:53 +02:00

11 lines
528 B
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{{- /*
linkify.html wandelt nackte http(s)-URLs in einem Textblock in anklickbare
Links um (neuer Tab). Alles andere bleibt unveraendert.
Aufruf: {{ partial "linkify.html" .Params.quelle }}
Die erzeugten Links tragen die Klasse op-quelle-link; im Kiosk-Modus
(?kiosk=true) werden externe Links per kiosk.js ohnehin deaktiviert.
*/ -}}
{{- $s := . -}}
{{- $s = replaceRE `(https?://[^\s<>\]]+)` `<a class="op-quelle-link" href="${1}" target="_blank" rel="noopener noreferrer">${1}</a>` $s -}}
{{- $s | safeHTML -}}