From adc0763d8a07a4019fad5f4c83476328a453247a Mon Sep 17 00:00:00 2001
From: liliana <liliana.sanfilippo@uni-bielefeld.de>
Date: Sat, 20 Jul 2024 14:31:08 +0200
Subject: [PATCH] tabs

---
 src/App/App.css                  |  7 +++----
 src/components/Tabs.tsx          | 15 +++++++++++----
 src/contents/description.tsx     |  2 +-
 src/contents/human-practices.tsx |  4 ++--
 4 files changed, 17 insertions(+), 11 deletions(-)

diff --git a/src/App/App.css b/src/App/App.css
index 191df1c8..d42223a4 100644
--- a/src/App/App.css
+++ b/src/App/App.css
@@ -2534,11 +2534,10 @@ html[dir=rtl] .hint-container.danger .hint-container-title:before {
   display: flex !important;
 }
 
-#All, #MediAbout {
-  display: block;
+.FirstTab{
+  display: block !important;
 }
-
-.tabtabs, .tabbys, .meditabs, .timelinecardtabs, .timelinepersontabs{
+.tabcontent{
   display: none;
 }
 
diff --git a/src/components/Tabs.tsx b/src/components/Tabs.tsx
index 342b917d..27b24528 100644
--- a/src/components/Tabs.tsx
+++ b/src/components/Tabs.tsx
@@ -1,10 +1,13 @@
-// If new cla (class) is added it has to be added to css giving it display: none; as default
-// The main tab has to be given display: block; via id css
+// The main tab has to be given display: block; via id css or be given the id "First"
 export function ButtonRowTabs({data, cla}: {data: Array<TabDatensatz>, cla: string}) {
     let rows = []
+    let classy = "tabcontent " + cla; 
     for ( let i = 0;  i < data.length; i++ ){
+      if (i === 1){
+        classy += " First"
+      }
       rows.push(
-        <div id={data[i].cssname} className={cla}>
+        <div id={data[i].cssname} className={classy}>
             {data[i].node}
         </div>
       )
@@ -13,9 +16,13 @@ export function ButtonRowTabs({data, cla}: {data: Array<TabDatensatz>, cla: stri
   }
   export function BFHStyleTabs({data, cla}: {data: Array<NodeDatensatz>, cla: string}) {
     let rows = []
+    let classy = "tabcontent " + cla; 
     for ( let i = 0;  i < data.length; i++ ){
+      if (i === 1){
+        classy += " First"
+      }
       rows.push(
-        <div id={data[i].cssname} className={cla}>
+        <div id={data[i].cssname} className={classy}>
             {data[i].node}
         </div>
       )
diff --git a/src/contents/description.tsx b/src/contents/description.tsx
index d2f86f49..4249a383 100644
--- a/src/contents/description.tsx
+++ b/src/contents/description.tsx
@@ -276,7 +276,7 @@ export function Description() {
     {
         node: <div>About</div>, 
         buttonname: "About", 
-        cssname: "MediAbout"
+        cssname: "First"
         
     },
     {   
diff --git a/src/contents/human-practices.tsx b/src/contents/human-practices.tsx
index d211a5e0..1e1a79d7 100644
--- a/src/contents/human-practices.tsx
+++ b/src/contents/human-practices.tsx
@@ -16,7 +16,7 @@ let timelinebuttonrowdata = [
   {
     buttonname: "All", 
     node: <TimeHori tab="" ></TimeHori>, 
-    cssname: "All"
+    cssname: "First"
   },
   { 
     node: <TimeHori tab="Patient" ></TimeHori>,
@@ -25,7 +25,7 @@ let timelinebuttonrowdata = [
   },
   {
     node: <TimeHori tab="Medical Professional" ></TimeHori>,
-    buttonname: "Mediacl Professionals", 
+    buttonname: "Medical Professionals", 
     cssname: "Medical"
   },
   {
-- 
GitLab