BinKhoaLe1812 commited on
Commit
0b7fae5
·
verified ·
1 Parent(s): 19e2f32
Files changed (2) hide show
  1. assets/app.js +5 -4
  2. assets/styles.css +27 -2
assets/app.js CHANGED
@@ -54,18 +54,18 @@ document.querySelectorAll('.tab').forEach(btn => {
54
  const targetDiagram = document.querySelector(target);
55
 
56
  if (targetDiagram) {
57
- // Hide all diagrams with fade out and update ARIA
58
  document.querySelectorAll('.diagram').forEach(d => {
59
  d.style.opacity = '0';
60
  d.style.transform = 'translateY(20px)';
 
61
  d.setAttribute('aria-hidden', 'true');
62
- setTimeout(() => {
63
- d.classList.remove('visible');
64
- }, 150);
65
  });
66
 
67
  // Show target diagram with fade in and update ARIA
68
  setTimeout(() => {
 
69
  targetDiagram.classList.add('visible');
70
  targetDiagram.style.opacity = '1';
71
  targetDiagram.style.transform = 'translateY(0)';
@@ -80,6 +80,7 @@ document.addEventListener('DOMContentLoaded', () => {
80
  const firstTab = document.querySelector('.tab.active');
81
  const firstDiagram = document.querySelector('.diagram.visible');
82
  if (firstTab && firstDiagram) {
 
83
  firstDiagram.style.opacity = '1';
84
  firstDiagram.style.transform = 'translateY(0)';
85
  }
 
54
  const targetDiagram = document.querySelector(target);
55
 
56
  if (targetDiagram) {
57
+ // Hide all diagrams completely and update ARIA
58
  document.querySelectorAll('.diagram').forEach(d => {
59
  d.style.opacity = '0';
60
  d.style.transform = 'translateY(20px)';
61
+ d.style.display = 'none';
62
  d.setAttribute('aria-hidden', 'true');
63
+ d.classList.remove('visible');
 
 
64
  });
65
 
66
  // Show target diagram with fade in and update ARIA
67
  setTimeout(() => {
68
+ targetDiagram.style.display = 'flex';
69
  targetDiagram.classList.add('visible');
70
  targetDiagram.style.opacity = '1';
71
  targetDiagram.style.transform = 'translateY(0)';
 
80
  const firstTab = document.querySelector('.tab.active');
81
  const firstDiagram = document.querySelector('.diagram.visible');
82
  if (firstTab && firstDiagram) {
83
+ firstDiagram.style.display = 'flex';
84
  firstDiagram.style.opacity = '1';
85
  firstDiagram.style.transform = 'translateY(0)';
86
  }
assets/styles.css CHANGED
@@ -63,6 +63,21 @@ h2:not(.section-header h2) {
63
  margin: 0 0 1rem 0;
64
  }
65
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
66
  section {
67
  padding: 4rem 0;
68
  }
@@ -374,8 +389,18 @@ section {
374
  border-radius: 2px;
375
  animation: pulseGlow 2s ease-in-out infinite;
376
  }
377
- .diagram { @apply hidden; }
378
- .diagram.visible { @apply block; }
 
 
 
 
 
 
 
 
 
 
379
  pre.mermaid {
380
  @apply rounded-2xl bg-slate-900/70 border border-white/10 p-4 overflow-auto;
381
  text-align: center;
 
63
  margin: 0 0 1rem 0;
64
  }
65
 
66
+ /* Override any conflicting h2 styles for section headers */
67
+ .section-header h2 {
68
+ font-size: 3rem !important;
69
+ font-weight: 800 !important;
70
+ line-height: 1.2 !important;
71
+ margin: 0 0 1rem 0 !important;
72
+ text-align: center !important;
73
+ }
74
+
75
+ @media (min-width: 1024px) {
76
+ .section-header h2 {
77
+ font-size: 4rem !important;
78
+ }
79
+ }
80
+
81
  section {
82
  padding: 4rem 0;
83
  }
 
389
  border-radius: 2px;
390
  animation: pulseGlow 2s ease-in-out infinite;
391
  }
392
+ .diagram {
393
+ display: none;
394
+ opacity: 0;
395
+ transform: translateY(20px);
396
+ transition: all 0.3s ease;
397
+ }
398
+
399
+ .diagram.visible {
400
+ display: flex;
401
+ opacity: 1;
402
+ transform: translateY(0);
403
+ }
404
  pre.mermaid {
405
  @apply rounded-2xl bg-slate-900/70 border border-white/10 p-4 overflow-auto;
406
  text-align: center;