diff --git a/content/showArticle.php b/content/showArticle.php index 4457dcc..704f8a5 100644 --- a/content/showArticle.php +++ b/content/showArticle.php @@ -54,8 +54,33 @@ include_once 'php/controller/showArticle-controller.php';
- -
+ + +
+ +
+ + +
+ Beitragsbild +
+ + +
+ +
+
diff --git a/css/showArticle.css b/css/showArticle.css index ca3b40a..8983996 100644 --- a/css/showArticle.css +++ b/css/showArticle.css @@ -105,6 +105,37 @@ cursor: default; } +.article-view-content { + margin-bottom: 3rem; + display: flex; + flex-direction: column; + gap: 1.5rem; /* Erzeugt einen sauberen Abstand zwischen den einzelnen Blöcken */ + width: 100%; +} + +.article-view-body { + font-size: 1.125rem; + color: #2d3748; + width: 100%; +} + +.article-view-body.block-text { + white-space: pre-line; + word-break: break-word; +} + +.article-view-body.block-image { + display: flex; + justify-content: center; /* Zentriert das Bild horizontal */ +} + +.article-view-body.block-image img { + max-width: 100%; /* Verhindert das Ausbrechen aus der Lesebreite */ + height: auto; /* Behält das originale Seitenverhältnis bei */ + border-radius: 6px; /* Optionale leichte Rundung für ein moderneres Layout */ + box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03); /* Minimaler, eleganter Schatten */ +} + /* Responsive Anpassungen unter 760px (für z.B. Smarticlephones) */ @media (max-width: 760px) { .article-view-container { diff --git a/php/controller/createArticle-controller.php b/php/controller/createArticle-controller.php index afbe985..5246566 100644 --- a/php/controller/createArticle-controller.php +++ b/php/controller/createArticle-controller.php @@ -64,7 +64,7 @@ require_once '../validator/article-validator.php'; $cleanedTags = array_unique($cleanedTags); $cleanedTags = implode(',', $cleanedTags); } - + // ----------------- Base64-Bilder verarbeiten und auf Server speichern ----------------- $blocks = json_decode($content, true); $uploadDir = __DIR__ . '/../../uploads/';