From 74452c80c09d1561536fd0ba512b3dd5b1c2c371 Mon Sep 17 00:00:00 2001 From: CyberMind-FR Date: Wed, 11 Mar 2026 17:33:23 +0100 Subject: [PATCH] refactor(metacatalog): Use template file for landing page generation - generate_landing() now uses /usr/share/metacatalog/templates/landing.html.tpl - Fallback to basic inline HTML if template missing - Enables easier landing page customization Co-Authored-By: Claude Opus 4.5 --- .../files/usr/sbin/metacatalogctl | 88 ++++++------------- 1 file changed, 27 insertions(+), 61 deletions(-) diff --git a/package/secubox/secubox-app-metacatalog/files/usr/sbin/metacatalogctl b/package/secubox/secubox-app-metacatalog/files/usr/sbin/metacatalogctl index 0f16bac7..45daf571 100644 --- a/package/secubox/secubox-app-metacatalog/files/usr/sbin/metacatalogctl +++ b/package/secubox/secubox-app-metacatalog/files/usr/sbin/metacatalogctl @@ -509,85 +509,51 @@ EOF generate_landing() { log_info "Generating landing page..." - cat > "$LANDING_PATH/index.html" <<'HTMLEOF' + local template="/usr/share/metacatalog/templates/landing.html.tpl" + if [ -f "$template" ]; then + cp "$template" "$LANDING_PATH/index.html" + else + # Fallback: generate basic landing page + cat > "$LANDING_PATH/index.html" <<'HTMLEOF' -Bibliotheque Virtuelle SecuBox +Bibliothèque Virtuelle SecuBox -

Bibliotheque Virtuelle

+

Bibliothèque Virtuelle

Chargement...
-
SecuBox Meta Cataloger v1.0
+
SecuBox Meta Cataloger
HTMLEOF + fi log_info "Landing page generated at $LANDING_PATH/index.html" }