From 3c9e56838fbe74f1eb1a0ff1634269c5cfb3c66c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20MARQUET?= Date: Thu, 19 Sep 2024 09:42:59 +0200 Subject: [PATCH] Add darkmode table --- _layouts/default.html | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/_layouts/default.html b/_layouts/default.html index 198f6d6..3a662a1 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -98,6 +98,33 @@ left: 0; } + body.dark-mode table { + width: 100%; + border-collapse: collapse; + background-color: #333; + color: white; + } + + body.dark-mode table th, + body.dark-mode table td { + border: 1px solid #555; + padding: 8px; + text-align: left; + } + + body.dark-mode table th { + background-color: #444; + } + + body.dark-mode table tr:nth-child(even) { + background-color: #3a3a3a; + } + + body.dark-mode table tr:hover { + background-color: #555; + } + + @media (max-width: 768px) { .toc { width: 100%;