From 3e1d9161817ca531b33d17e84879dfae265de41c Mon Sep 17 00:00:00 2001
From: yahiko <yahiko012000@gmail.com>
Date: Wed, 15 Jan 2025 22:10:19 +0100
Subject: [PATCH] Add tables and modifications to details

---
 simple-erreur503/static/css/style.css | 53 +++++++++++++++++++++++++--
 1 file changed, 49 insertions(+), 4 deletions(-)

diff --git a/simple-erreur503/static/css/style.css b/simple-erreur503/static/css/style.css
index 356bc7b..58946dd 100644
--- a/simple-erreur503/static/css/style.css
+++ b/simple-erreur503/static/css/style.css
@@ -13,7 +13,7 @@
 	--body-font: 'Georgia', serif;
 	--global-width: 100ch;
 	/* --img-shadow: 0; */
-
+	--table-detail-hover: #2e2e2e;
 }
 
 /* For light mode */
@@ -21,10 +21,12 @@
 	:root {
 		--bg-color: #eff2f8;
 		--bg-main-color: #ffffff;
+		--bg-article-color: white;
 		--txt-color: #333333;
 		--txt-hover: #747474;
 		--bg-quote-color: #eff2f8;
 		--img-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
+		--table-detail-hover: #dddddd;
 	}
 }
 
@@ -309,6 +311,30 @@ ul.categories {
 	}
 }
 
+/* tables */
+table {
+	border-collapse: collapse;
+	border: 1px solid grey;
+}
+
+thead {
+	background-color: var(--bg-article-color);
+	text-align: left;
+}
+
+td, th {
+	border: 1px solid grey;
+	padding: 5px;
+}
+
+tbody > tr:nth-child(even) {
+	background-color: var(--bg-main-color);
+}
+
+tbody > tr:hover {
+	background-color: var(--table-detail-hover);
+}
+
 /* Fancy stuff */
 /* code block */
 pre {
@@ -376,6 +402,27 @@ details {
 	margin: 0px auto;
 }
 
+summary {
+	font-size: 1.25em;
+	font-weight: bold;
+}
+
+
+details[open] summary {
+	margin-bottom: 0.5em;
+}
+
+details:first-of-type summary::marker {
+	content: "+ ";
+	letter-spacing: 2px;
+}
+
+details[open]:first-of-type summary::marker {
+	content: "− ";
+	letter-spacing: 2px;
+}
+
+/* details style */
 details.question::before {
 	position: absolute;
 	top: 5px;
@@ -403,8 +450,6 @@ details.warning::before {
 	font-size: 30px;
 }
 
-
-
 /* warning */
 .avertissement {
 	position: relative;
@@ -448,4 +493,4 @@ figcaption {
 	text-align: center;
 	font-style: italic;
 	margin: 1ch 0 2ch 0;
-}
+}
\ No newline at end of file
-- 
GitLab