Tree view und CSS refinement

This commit is contained in:
2026-09-03 21:37:28 +02:00
parent 88e89307c4
commit 30b1f09cdf
8 changed files with 199 additions and 97 deletions
@@ -0,0 +1,41 @@
/** layout Main Bereich */
main {
padding: var(--main-content-padding);
margin: 16px;
height: calc(100vh - var(--header-height) - var(--footer-height) - 4 * var(--main-content-padding) - 64px); /* 32px für die Margen */
overflow-y: auto; /* Scrollbar, wenn der Inhalt zu groß ist */
border: 1px solid var(--secondary-color);
border-radius: var(--box-border-radius);
}
.tree-view {
margin-top: 16px;
}
.node {
justify-content: center;
list-style-type: none; /* Entfernt die Standard-Aufzählungszeichen */
padding-left: 20px; /* Einrückung für die Unterlisten */
}
.node img {
height: 16px; /* Höhe des Bildes */
margin-right: 2px; /* Abstand zwischen Bild und Text */
}
.leaf {
padding-left: 20px; /* Einrückung für Blätter */
color: var(--primary-color);
font-weight: lighter;
}
/* Style für allgemeine Elemente */
.box {
border: 1px solid var(--primary-color);
border-radius: var(--box-border-radius);
}
.mt-16 {
margin-top: 16px;
}
@@ -0,0 +1,11 @@
/** footer styles */
footer {
height: var(--footer-height);
background-color: var(--primary-color);
border: 1px solid var(--secondary-color);
border-radius: var(--box-border-radius);
color: var(--secondary-font-color);
margin: 16px;
padding: 10px;
}
@@ -0,0 +1,39 @@
/** global styles */
/* globale Variablen */
:root {
/* colors */
--primary-color: #1976D2;
--secondary-color: #d27519;
--font-color: #333333;
--secondary-font-color: #f3f5f4;
--background-color: #f3f5f4;
/* Dimensions */
--header-height: 32px;
--footer-height: 32px;
--main-content-padding: 20px;
--box-border-radius: 10px;
}
/* 1. Schriftart definieren */
@font-face {
font-family: 'Inter'; /* Name, den du später im CSS verwendest */
src: url('/static/fonts/Inter.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
* {
margin: 0;
padding: 0;
}
/* 2. Schriftart anwenden und Ränder entfernen*/
body {
font-family: 'Inter', Arial, sans-serif;
background-color: var(--background-color);
color: var(--font-color);
}
@@ -0,0 +1,48 @@
/** Header and included nav styles */
/* Style für Header, Navigation, Main Content, Aside und Footer */
header {
display: flex;
justify-content: flex-start;
align-items: center;
height: var(--header-height);
background-color: var(--primary-color);
border: 1px solid var(--secondary-color);
border-radius: var(--box-border-radius);
color: var(--secondary-font-color);
margin: 16px;
padding: 10px;
}
header img {
height: calc(var(--header-height) - 5px); /* Adjust the image height to fit within the header */
margin-left: 10px; /* Space between the image and the header text */
padding-right: 16px; /* Space between the image and the header text */
}
header p {
font-weight: 100;
margin-left: 16px;
padding-right: 16px;
}
nav {
margin: 16px;
padding: 10px;
}
nav ul {
list-style-type: none; /* Entfernt die Standard-Aufzählungszeichen */
display: flex; /* Macht die Liste horizontal */
gap: 20px; /* Abstand zwischen den Listenelementen */
}
nav ul li a {
text-decoration: none; /* Entfernt die Unterstreichung */
color: var(--secondary-font-color); /* Setzt die Schriftfarbe */
}
nav ul li a:hover {
text-decoration: underline; /* Unterstreichung beim Überfahren mit der Maus */
font-weight: bold; /* Macht den Text fett */
}
@@ -1,95 +0,0 @@
/** global styles */
/* globale Variablen */
:root {
/* colors */
--primary-color: #1976D2;
--secondary-color: #d27519;
--font-color: #333333;
--secondary-font-color: #f3f5f4;
--background-color: #f3f5f4;
/* Dimensions */
--header-height: 32px;
--footer-height: 32px;
--main-content-padding: 20px;
--box-border-radius: 10px;
}
/* 1. Schriftart definieren */
@font-face {
font-family: 'Inter'; /* Name, den du später im CSS verwendest */
src: url('/static/fonts/Inter.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
* {
margin: 0;
padding: 0;
}
/* 2. Schriftart anwenden und Ränder entfernen*/
body {
font-family: 'Inter', Arial, sans-serif;
background-color: var(--background-color);
color: var(--font-color);
}
/* Style für allgemeine Elemente */
.box {
border: 1px solid var(--primary-color);
border-radius: var(--box-border-radius);
}
/* Style für Header, Navigation, Main Content, Aside und Footer */
header {
display: flex;
justify-content: flex-start;
align-items: center;
height: var(--header-height);
background-color: var(--primary-color);
border: 1px solid var(--secondary-color);
border-radius: var(--box-border-radius);
color: var(--secondary-font-color);
margin: 16px;
padding: 10px;
}
nav {
margin: 16px;
padding: 10px;
}
nav ul {
list-style-type: none; /* Entfernt die Standard-Aufzählungszeichen */
display: flex; /* Macht die Liste horizontal */
gap: 20px; /* Abstand zwischen den Listenelementen */
}
nav ul li a {
text-decoration: none; /* Entfernt die Unterstreichung */
color: var(--secondary-font-color); /* Setzt die Schriftfarbe */
font-weight: bold; /* Macht den Text fett */
}
main {
padding: var(--main-content-padding);
margin: 16px;
height: calc(100vh - var(--header-height) - var(--footer-height) - 4 * var(--main-content-padding) - 64px); /* 32px für die Margen */
overflow-y: auto; /* Scrollbar, wenn der Inhalt zu groß ist */
border: 1px solid var(--secondary-color);
border-radius: var(--box-border-radius);
}
footer {
height: var(--footer-height);
background-color: var(--primary-color);
border: 1px solid var(--secondary-color);
border-radius: var(--box-border-radius);
color: var(--secondary-font-color);
margin: 16px;
padding: 10px;
}
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#1976D2"><path d="M280-280q-83 0-141.5-58.5T80-480q0-83 58.5-141.5T280-680h400q83 0 141.5 58.5T880-480q0 83-58.5 141.5T680-280H280Zm0-80h400q50 0 85-35t35-85q0-50-35-85t-85-35H280q-50 0-85 35t-35 85q0 50 35 85t85 35Zm42-28 142-142-42-42-100 100-40-40-42 42 82 82Zm158-92Z"/></svg>

After

Width:  |  Height:  |  Size: 378 B

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#1976D2"><path d="M348.5-291.5Q360-303 360-320t-11.5-28.5Q337-360 320-360t-28.5 11.5Q280-337 280-320t11.5 28.5Q303-280 320-280t28.5-11.5Zm0-160Q360-463 360-480t-11.5-28.5Q337-520 320-520t-28.5 11.5Q280-497 280-480t11.5 28.5Q303-440 320-440t28.5-11.5Zm0-160Q360-623 360-640t-11.5-28.5Q337-680 320-680t-28.5 11.5Q280-657 280-640t11.5 28.5Q303-600 320-600t28.5-11.5ZM440-280h240v-80H440v80Zm0-160h240v-80H440v80Zm0-160h240v-80H440v80ZM200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Zm0-80h560v-560H200v560Zm0-560v560-560Z"/></svg>

After

Width:  |  Height:  |  Size: 695 B

+58 -2
View File
@@ -7,14 +7,18 @@
<link rel="icon" type="image/x-icon" href="/static/images/SimplyCPQ_Logo.svg" /> <link rel="icon" type="image/x-icon" href="/static/images/SimplyCPQ_Logo.svg" />
<title>X-CPQ by Simply CPQ</title> <title>X-CPQ by Simply CPQ</title>
<link rel="stylesheet" href="/static/css/simplycpq.css"> <link rel="stylesheet" href="/static/css/scpq_header.css">
<link rel="stylesheet" href="/static/css/scpq_global.css">
<link rel="stylesheet" href="/static/css/scpq_content.css">
<link rel="stylesheet" href="/static/css/scpq_footer.css">
<script src="/static/js/htmx.js"></script> <script src="/static/js/htmx.js"></script>
</head> </head>
<body> <body>
<header> <header>
<h1>X-CPQ by Simply CPQ</h1> <img src="/static/images/SimplyCPQ_Logo.svg" alt="Simply CPQ Logo"/>
<h1>X-CPQ Material Editor</h1> <p>by Simply CPQ</p>
<nav> <nav>
<!-- Navigation links can be added here --> <!-- Navigation links can be added here -->
<ul> <ul>
@@ -32,6 +36,58 @@
<!-- Main content can be added here --> <!-- Main content can be added here -->
<p>Der Software, die Dir hilft, Deine variantenreichen und ggf. erklärungsbedürftigen Produkte effizient zu <p>Der Software, die Dir hilft, Deine variantenreichen und ggf. erklärungsbedürftigen Produkte effizient zu
verwalten.</p> verwalten.</p>
<section class="tree-view">
<h3>Property Type Groups</h3>
<ul class="node mt-16">
<details open>
<summary>
<img src="/static/images/property_type_group.svg" alt="group"/>
Produktgruppe Root Details
</summary>
<ul class="node">
<details open>
<summary>
<img src="/static/images/property_type_group.svg" alt="group"/>
Produktgruppe 2 Details</summary>
<ul class="node">
<li class="leaf">
<img src="/static/images/property_type.svg" alt="property"/>
Eigenschaft 1
</li>
<li class="leaf">
<img src="/static/images/property_type.svg" alt="property"/>
Eigenschaft 2
</li>
</ul>
</details>
<details open>
<summary>
<img src="/static/images/property_type_group.svg" alt="group"/>
Produktgruppe 3 Details</summary>
<ul class="node">
<li class="leaf">
<img src="/static/images/property_type.svg" alt="property"/>
Eigenschaft 1
</li>
<li class="leaf">
<img src="/static/images/property_type.svg" alt="property"/>
Eigenschaft 2
</li>
</ul>
</details>
<li class="leaf">
<img src="/static/images/property_type.svg" alt="property"/>
Eigenschaft 1
</li>
<li class="leaf">
<img src="/static/images/property_type.svg" alt="property"/>
Eigenschaft 2
</li>
</ul>
</details>
</ul>
</section>
</section> </section>
<aside> <aside>
<!-- Additional content can be added here --> <!-- Additional content can be added here -->