From 773491a43dcfc8cda53c25701171dfda4d0fb442 Mon Sep 17 00:00:00 2001
From: Rasmus Fuhse <fuhse@data-quest.de>
Date: Wed, 19 Jul 2023 13:45:27 +0000
Subject: [PATCH] =?UTF-8?q?Resolve=20"Banner=20sind=20zu=20gro=C3=9F"?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Closes #2943

Merge request studip/studip!1983
---
 lib/models/Banner.class.php                  | 2 +-
 resources/assets/stylesheets/scss/start.scss | 9 +++++++++
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/lib/models/Banner.class.php b/lib/models/Banner.class.php
index 8c283e540d8..7f3309bfaf3 100644
--- a/lib/models/Banner.class.php
+++ b/lib/models/Banner.class.php
@@ -226,6 +226,6 @@ class Banner extends SimpleORMap
         $this->views += 1;
         $this->store();
 
-        return sprintf('<div style="padding: 5px; text-align: center;">%s</div>', $link);
+        return sprintf('<div class="studip-banner">%s</div>', $link);
    }
 }
diff --git a/resources/assets/stylesheets/scss/start.scss b/resources/assets/stylesheets/scss/start.scss
index 29a3f2762e6..d3539f5f2dc 100644
--- a/resources/assets/stylesheets/scss/start.scss
+++ b/resources/assets/stylesheets/scss/start.scss
@@ -213,3 +213,12 @@ div.available-widgets {
         }
     }
 }
+
+
+.studip-banner {
+    padding-bottom: 5px;
+    text-align: center;
+    img {
+        max-width: 100%;
+    }
+}
-- 
GitLab