From 67c16722e3b22d6f950d7b705392196bbd45d443 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Fri, 30 Jun 2023 22:53:22 +0200 Subject: [PATCH] css/tabs --- build.py | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/build.py b/build.py index 6fc5119..56a0c5d 100755 --- a/build.py +++ b/build.py @@ -259,7 +259,42 @@ text-align: center; .card img {{ border: none; height: 4em; -}}''' +}} + +/**/ + +.tabs {{ +display: flex; +flex-wrap: wrap; +}} +.tabs > input {{ +display: none; +}} +.tabs > input:checked + label + div {{ +display: block; +}} +.tabs > label {{ +order: 1; +}} +.tabs > div {{ +display: none; +flex-basis: 100%; +order: 2; +}} + +.tabs {{ +border: 1px solid; +}} +.tabs > input:checked + label {{ +background-color: gray; +}} +.tabs > label {{ +padding: 10px; +}} +.tabs > div {{ +padding: 10px; +}} +''' js_file = os.path.join(js, 'index.js') js_text = f'''\ function check(tab) {{