Merge branch 'main' of github.com:jcalixte/tps

This commit is contained in:
Julien Calixte
2025-05-27 17:28:39 +02:00
6 changed files with 46 additions and 31 deletions

View File

@@ -1,3 +1,3 @@
# Thinking People System # Thinking People System
An interactive website to better understand the Thinking People System. [An interactive website](https://thinking-people-system.house) to better understand the Thinking People System.

View File

@@ -4,6 +4,9 @@
--primary-color: #002992; --primary-color: #002992;
--primary-color-no-focus: #abbbdf; --primary-color-no-focus: #abbbdf;
--color: white; --color: white;
--font-size: 28px;
--min-font-size: 15px;
--gap: 1rem;
} }
*:not(td):not(th) { *:not(td):not(th) {
@@ -26,7 +29,7 @@ main {
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
gap: 0; gap: 0;
margin: 1rem 1rem 0; padding: 1rem 1rem 0;
color: var(--color); color: var(--color);
} }
@@ -42,4 +45,4 @@ main {
.meaning::after { .meaning::after {
content: ')'; content: ')';
} }

View File

@@ -1,5 +1,5 @@
body { body {
font-size: clamp(11px, 2.1vw, 28px); font-size: clamp(var(--min-font-size, 11px), 2.1vw, var(--font-size, 28px));
} }
ul { ul {
@@ -11,7 +11,7 @@ li {
flex: 1; flex: 1;
list-style: none; list-style: none;
text-align: center; text-align: center;
padding: 0.5rem 1rem; padding: calc(var(--gap) / 2) var(--gap);
} }
.focusable { .focusable {
@@ -46,32 +46,33 @@ li {
color: var(--color); color: var(--color);
} }
.customer-satisfaction-roof-parent { .customer-satisfaction-parent {
filter: url(#round); filter: url(#round);
/* Making the triangle fit the rest of the house */ /* Making the triangle fit the rest of the house */
margin: 0 -1rem; margin: 0 -var(--gap);
} }
.customer-satisfaction-roof { .customer-satisfaction {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: flex-end; justify-content: flex-end;
align-items: center; align-items: center;
text-align: center; text-align: center;
clip-path: polygon(0% 100%, 50% 0%, 100% 100%); clip-path: polygon(0% 100%, 50% 0%, 100% 100%);
min-height: 150px; /* Set --min-height in JS or fallback to 150px if --font-size is 28px, otherwise 110px */
font-size: clamp(15px, 2.1vw, 28px); min-height: var(--min-height, 150px);
font-size: clamp(var(--min-font-size, 11px), 2.1vw, var(--font-size, 28px));
} }
.customer-satisfaction-roof h2, .customer-satisfaction h2,
.customer-satisfaction-roof p { .customer-satisfaction p {
margin: 0; margin: 0;
padding: 0 0.5rem 0.5rem; padding: 0 calc(var(--gap) / 2) calc(var(--gap) / 2);
border-radius: 0; border-radius: 0;
} }
.levers { .levers {
margin: 0.5rem 0; margin: calc(var(--gap) / 2) 0;
} }
.levers ul { .levers ul {
@@ -81,8 +82,8 @@ li {
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
padding-left: 0; padding-left: 0;
row-gap: 0.5rem; row-gap: calc(var(--gap) / 2);
gap: 0.5rem; gap: calc(var(--gap) / 2);
} }
.people-improvement { .people-improvement {
@@ -107,7 +108,7 @@ li {
.pilars h3 { .pilars h3 {
margin-top: 0; margin-top: 0;
margin-bottom: 0; margin-bottom: 0;
padding: 1rem 2rem; padding: var(--gap) 2rem;
width: calc(100% - (2rem * 2)); width: calc(100% - (2rem * 2));
text-align: center; text-align: center;
} }
@@ -118,7 +119,7 @@ li {
flex: 2; flex: 2;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
gap: 1rem; gap: var(--gap);
} }
.pilars ul { .pilars ul {
@@ -127,7 +128,7 @@ li {
flex-direction: column; flex-direction: column;
justify-content: space-evenly; justify-content: space-evenly;
align-items: center; align-items: center;
gap: 0.5rem; gap: calc(var(--gap) / 2);
} }
.pilars li { .pilars li {
@@ -141,8 +142,8 @@ li {
.ground { .ground {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
margin: 0.5rem 0; margin: calc(var(--gap) / 2) 0;
gap: 1rem; gap: var(--gap);
} }
.improvement ul, .improvement ul,
@@ -173,7 +174,7 @@ main a:focus-visible {
details.hud { details.hud {
font-size: 16px; font-size: 16px;
margin: 1rem; margin: var(--gap);
} }
details.hud li { details.hud li {

View File

@@ -20,9 +20,9 @@
<h1 class="thinking-people-system">Thinking People System</h1> <h1 class="thinking-people-system">Thinking People System</h1>
</header> </header>
<main id="thinking-people-system"> <main id="thinking-people-system">
<div class="customer-satisfaction-roof-parent"> <div class="customer-satisfaction-parent">
<section class="customer-satisfaction-roof focusable"> <section class="customer-satisfaction focusable">
<h2 class="customer-satisfaction">Customer Satisfaction</h2> <h2 class="customer-satisfaction-title">Customer Satisfaction</h2>
<p class="value-analysis-value-engineering"> <p class="value-analysis-value-engineering">
<span class="use-value">Use</span> Value analysis / <span class="use-value">Use</span> Value analysis /
<span class="use-value">Use</span> Value engineering <span class="use-value">Use</span> Value engineering
@@ -33,7 +33,7 @@
<ul> <ul>
<li class="safety focusable">Safety</li> <li class="safety focusable">Safety</li>
<li class="quality focusable">Quality</li> <li class="quality focusable">Quality</li>
<li class="lead-time focusable">Lead&nbsp;time</li> <li class="delivery focusable">Delivery</li>
<li class="cost focusable">Cost</li> <li class="cost focusable">Cost</li>
<li class="environment focusable">Environment</li> <li class="environment focusable">Environment</li>
</ul> </ul>

11
main.ts
View File

@@ -31,12 +31,21 @@ if (display === 'house-only') {
document.querySelectorAll('.hud')?.forEach((hud) => hud.remove()) document.querySelectorAll('.hud')?.forEach((hud) => hud.remove())
} }
const simpleCustomerSatisfaction = params.get('customer-satisfaction')
if (simpleCustomerSatisfaction === 'simple') {
document.querySelector('.value-analysis-value-engineering')?.remove()
}
const size = params.get('size') const size = params.get('size')
if (size === 'small') { if (size === 'small') {
const body = document.querySelector('body') const body = document.querySelector('body')
if (body) { if (body) {
body.style.fontSize = '15px' document.documentElement.style.setProperty('--min-height', '100px')
document.documentElement.style.setProperty('--gap', '0.5rem')
document.documentElement.style.setProperty('--font-size', '13px')
document.documentElement.style.setProperty('--min-font-size', '8px')
} }
} }

View File

@@ -20,16 +20,18 @@
<h1 class="thinking-people-system">Thinking People System</h1> <h1 class="thinking-people-system">Thinking People System</h1>
</header> </header>
<main id="thinking-people-system"> <main id="thinking-people-system">
<div class="customer-satisfaction-roof-parent"> <div class="customer-satisfaction-parent">
<section class="customer-satisfaction-roof focusable"> <section class="customer-satisfaction focusable">
<h2 class="customer-satisfaction">Is the customer satisfied?</h2> <h2 class="customer-satisfaction-title">
Is the customer satisfied?
</h2>
</section> </section>
</div> </div>
<section class="levers"> <section class="levers">
<ul> <ul>
<li class="safety focusable">Safety</li> <li class="safety focusable">Safety</li>
<li class="quality focusable">Quality</li> <li class="quality focusable">Quality</li>
<li class="lead-time focusable">Lead&nbsp;time</li> <li class="delivery focusable">Delivery</li>
<li class="cost focusable">Cost</li> <li class="cost focusable">Cost</li>
<li class="environment focusable">Environment</li> <li class="environment focusable">Environment</li>
</ul> </ul>