From cc6f424e3c6964d45f53dee6c34ad6353db080cc Mon Sep 17 00:00:00 2001 From: "arnaud.morvan@camptocamp.com" Date: Mon, 23 Feb 2026 14:12:44 +0100 Subject: [PATCH] Stop ticker from moving and use shorter text on mobile --- thinkhazard/static/less/index.less | 25 +++++++++++-------------- thinkhazard/templates/index.jinja2 | 11 ++++++----- 2 files changed, 17 insertions(+), 19 deletions(-) diff --git a/thinkhazard/static/less/index.less b/thinkhazard/static/less/index.less index 83f5b29d..bac16cd9 100644 --- a/thinkhazard/static/less/index.less +++ b/thinkhazard/static/less/index.less @@ -153,29 +153,26 @@ footer { .news-ticker { width: 100%; background: #D91F2C; - overflow: hidden; padding: 8px 0; } -.ticker-track { - display: flex; - width: 200%; - animation: ticker-scroll 20s linear infinite; -} - .ticker-text { - width: 50%; text-align: center; color: #fff; font-size: 14px; - flex-shrink: 0; } -@keyframes ticker-scroll { - 0% { - transform: translateX(0); +.ticker-text-short { + display: block; +} +.ticker-text-full { + display: none; +} +@media (min-width: 769px) { + .ticker-text-short { + display: none; } - 100% { - transform: translateX(-50%); + .ticker-text-full { + display: block; } } diff --git a/thinkhazard/templates/index.jinja2 b/thinkhazard/templates/index.jinja2 index 58e0513f..6ca6721d 100644 --- a/thinkhazard/templates/index.jinja2 +++ b/thinkhazard/templates/index.jinja2 @@ -6,12 +6,13 @@ {% block name %}index{% endblock %} {% block content %} - {% set ticker_message = "Data update 2026 - New global hazard layers - Refined classification approach - Hazard classification extented to 3,000 urban areas - Please check updated documentation" %} + {% set ticker_message_full = "Data update 2026 - New global hazard layers - Refined classification approach - Hazard classification extented to 3,000 urban areas - Please check updated documentation" %} + {% set ticker_message_short = "Update 2026: new hazard layers and refined classification approach extented to 3,000 urban areas." %}
-
- {{ ticker_message }} - {{ ticker_message }} -
+ + {{ ticker_message_full }} + {{ ticker_message_short }} +