Stadionzeitung: Live-Seiten (Tabellen, Ergebnisse, Vorschau, Termine, News, Kontakt, Historie, Sportheim, Partner, Momente, Impressum), automatisches Cover, Swipe-Viewer mit Vollbildmodus und die Druckfassung als Falt-Heft. Anzeigen kommen jetzt aus dem Bestand und werden gleichmäßig verteilt, nie mehr als zwei hintereinander (vorher vier Blöcke à fünf). Die Doppelseiten-Regel rechnet das Skript selbst, statt sie von Hand zu prüfen. Veranstaltungen: Bereich /veranstaltungen mit Detailseite pro Fest, Lebenszyklus über das Datum (Ankündigung vor dem Fest, Rückblick danach), Galerie mit Lightbox. veranstaltungen.json ist dritte Termin-Quelle, damit ein Fest nie doppelt gepflegt wird. News-Artikel als dritte dynamische Prefix-Route, gemeinsamer detail-head. Behobene Fehler: - Wappen-Kontexte setzten Zeilen-Layout auf .crest statt auf die Zeile; das Wappen wurde zum Grid, Vereinsname und Tore rutschten darunter zusammen (Ergebnis-Rückblick, Vorschau, Cover). - --header-h (60px) unterschätzt die Kopfleiste um 32px (Logo 72px + 20px Versatz): neues abgeleitetes --header-space, sonst klebten Zurück-Links unter dem Logo. - base_url in der Produktions-Config ohne www, während .htaccess auf www umleitet; preflight prüft das jetzt. - .lightbox brauchte display:none mit (0,2,0), sonst lag das Overlay offen. Neue Werkzeuge: bin/anzeige-add.php (Anzeigen-Bestand), bin/veranstaltung-bilder.php (Plakate und Galerien, Alt-Texte folgen der Quelldatei), bin/qr.php (Druck-QR mit Warnung, wenn base_url nicht auf die echte Domain zeigt). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NzeVVgMCrzCDJAKeLEdKr7
85 lines
2.3 KiB
JavaScript
85 lines
2.3 KiB
JavaScript
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
|
// Distributed under an MIT license: https://codemirror.net/5/LICENSE
|
|
|
|
(function(mod) {
|
|
if (typeof exports == "object" && typeof module == "object")
|
|
mod(require("../../lib/codemirror"));
|
|
else if (typeof define == "function" && define.amd)
|
|
define(["../../lib/codemirror"], mod);
|
|
else
|
|
mod(CodeMirror);
|
|
})(function(CodeMirror) {
|
|
"use strict";
|
|
|
|
CodeMirror.defineMode('troff', function() {
|
|
|
|
var words = {};
|
|
|
|
function tokenBase(stream) {
|
|
if (stream.eatSpace()) return null;
|
|
|
|
var sol = stream.sol();
|
|
var ch = stream.next();
|
|
|
|
if (ch === '\\') {
|
|
if (stream.match('fB') || stream.match('fR') || stream.match('fI') ||
|
|
stream.match('u') || stream.match('d') ||
|
|
stream.match('%') || stream.match('&')) {
|
|
return 'string';
|
|
}
|
|
if (stream.match('m[')) {
|
|
stream.skipTo(']');
|
|
stream.next();
|
|
return 'string';
|
|
}
|
|
if (stream.match('s+') || stream.match('s-')) {
|
|
stream.eatWhile(/[\d-]/);
|
|
return 'string';
|
|
}
|
|
if (stream.match('\(') || stream.match('*\(')) {
|
|
stream.eatWhile(/[\w-]/);
|
|
return 'string';
|
|
}
|
|
return 'string';
|
|
}
|
|
if (sol && (ch === '.' || ch === '\'')) {
|
|
if (stream.eat('\\') && stream.eat('\"')) {
|
|
stream.skipToEnd();
|
|
return 'comment';
|
|
}
|
|
}
|
|
if (sol && ch === '.') {
|
|
if (stream.match('B ') || stream.match('I ') || stream.match('R ')) {
|
|
return 'attribute';
|
|
}
|
|
if (stream.match('TH ') || stream.match('SH ') || stream.match('SS ') || stream.match('HP ')) {
|
|
stream.skipToEnd();
|
|
return 'quote';
|
|
}
|
|
if ((stream.match(/[A-Z]/) && stream.match(/[A-Z]/)) || (stream.match(/[a-z]/) && stream.match(/[a-z]/))) {
|
|
return 'attribute';
|
|
}
|
|
}
|
|
stream.eatWhile(/[\w-]/);
|
|
var cur = stream.current();
|
|
return words.hasOwnProperty(cur) ? words[cur] : null;
|
|
}
|
|
|
|
function tokenize(stream, state) {
|
|
return (state.tokens[0] || tokenBase) (stream, state);
|
|
};
|
|
|
|
return {
|
|
startState: function() {return {tokens:[]};},
|
|
token: function(stream, state) {
|
|
return tokenize(stream, state);
|
|
}
|
|
};
|
|
});
|
|
|
|
CodeMirror.defineMIME('text/troff', 'troff');
|
|
CodeMirror.defineMIME('text/x-troff', 'troff');
|
|
CodeMirror.defineMIME('application/x-troff', 'troff');
|
|
|
|
});
|