From 23d9ecd2c7b2b3baccf7457e748f2493c3b89073 Mon Sep 17 00:00:00 2001
From: Jan-Hendrik Willms <tleilax+studip@gmail.com>
Date: Wed, 24 May 2023 08:10:10 +0000
Subject: [PATCH] resurrect article.studip layout and refine wiki layout (also
 introduce article...

Closes #2417

Merge request studip/studip!1806
---
 .../assets/stylesheets/scss/article.scss      | 27 +++++++++----------
 resources/assets/stylesheets/scss/wiki.scss   |  8 ++++++
 2 files changed, 20 insertions(+), 15 deletions(-)

diff --git a/resources/assets/stylesheets/scss/article.scss b/resources/assets/stylesheets/scss/article.scss
index 291392a4553..1b70ae72e54 100644
--- a/resources/assets/stylesheets/scss/article.scss
+++ b/resources/assets/stylesheets/scss/article.scss
@@ -1,14 +1,11 @@
-article.studip {
+$article-padding: 10px;
 
-    &:not(.wiki) {
-        border-color: $content-color-40;
-        border-style: solid;
-        border-width: 1px;
-    }
+article.studip {
+    border: 1px solid $content-color-40;
 
-    margin-bottom: 10px;
+    margin-bottom: $article-padding;
+    padding: $article-padding;
     transition: all 300ms ease 0s;
-    padding: 10px;
 
     &:last-child {
         margin-bottom: 0;
@@ -22,8 +19,8 @@ article.studip {
 
         padding: 2px;
         background-color: $content-color-20;
-        margin: -10px;
-        margin-bottom: 10px;
+        margin: -$article-padding;
+        margin-bottom: $article-padding;
 
         > * {
             /* Try to get header aligned by forcing children into centering */
@@ -99,7 +96,7 @@ article.studip {
                 }
                 width: 100%;
             }
-            margin-bottom: -10px;
+            margin-bottom: -$article-padding;
 
             > *:first-child {
                 cursor: pointer;
@@ -116,16 +113,16 @@ article.studip {
                         transform: rotate(90deg);
                     }
                 }
-                margin-bottom: 10px;
+                margin-bottom: $article-padding;
             }
         }
     }
 
     > footer {
         text-align: center;
-        border-color: $content-color-40;
-        border-top-style: solid;
-        border-width: 1px;
+        border-top: 1px solid $content-color-40;
+        margin: -$article-padding;
+        margin-top: $article-padding;
 
         &:empty {
             display: none !important;
diff --git a/resources/assets/stylesheets/scss/wiki.scss b/resources/assets/stylesheets/scss/wiki.scss
index fdc86804d67..f428410e6d0 100644
--- a/resources/assets/stylesheets/scss/wiki.scss
+++ b/resources/assets/stylesheets/scss/wiki.scss
@@ -131,3 +131,11 @@ $authors: (
         background-color: $bgcolor;
     }
 }
+
+article.studip.wiki {
+    border: 0;
+
+    > footer {
+        margin: 0;
+    }
+}
-- 
GitLab