fix(docs): add data-app attribute and move CSS to index.html
- Add docs.css to main index.html CSS includes - Remove redundant link tag from docs.html - Add body data-app attribute in htmx-app.js when section changes - Use body[data-app='docs'] selector for reliable CSS targeting - Force light background on #main-content when docs is active
This commit is contained in:
parent
cc40ddb65f
commit
a9dc598dd1
4 changed files with 28 additions and 42 deletions
|
|
@ -18,36 +18,32 @@
|
||||||
|
|
||||||
/* =============================================================================
|
/* =============================================================================
|
||||||
MAIN LAYOUT - Full height, light background
|
MAIN LAYOUT - Full height, light background
|
||||||
|
Use body[data-app="docs"] for reliable targeting
|
||||||
============================================================================= */
|
============================================================================= */
|
||||||
|
|
||||||
|
/* When docs app is active - force light theme */
|
||||||
|
body[data-app="docs"] {
|
||||||
|
overflow: hidden !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
body[data-app="docs"] #main-content {
|
||||||
|
background: #f8f9fa !important;
|
||||||
|
background-color: #f8f9fa !important;
|
||||||
|
overflow: hidden !important;
|
||||||
|
height: calc(100vh - 40px) !important;
|
||||||
|
padding: 0 !important;
|
||||||
|
margin: 0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
.docs-app {
|
.docs-app {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
min-height: 100%;
|
width: 100%;
|
||||||
background: #f8f9fa !important;
|
background: #f8f9fa;
|
||||||
color: #202124;
|
color: #202124;
|
||||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Force light background everywhere */
|
|
||||||
html:has(.docs-app),
|
|
||||||
body:has(.docs-app),
|
|
||||||
#main-content:has(.docs-app),
|
|
||||||
.app-main:has(.docs-app),
|
|
||||||
.suite-content-panel:has(.docs-app),
|
|
||||||
[data-app="docs"] {
|
|
||||||
overflow: hidden !important;
|
|
||||||
background: #f8f9fa !important;
|
|
||||||
background-color: #f8f9fa !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
#main-content:has(.docs-app) {
|
|
||||||
height: 100% !important;
|
|
||||||
padding: 0 !important;
|
|
||||||
margin: 0 !important;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* =============================================================================
|
/* =============================================================================
|
||||||
|
|
@ -321,12 +317,10 @@ body:has(.docs-app),
|
||||||
.docs-main {
|
.docs-main {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
flex: 1 1 auto;
|
flex: 1;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
background: #f8f9fa !important;
|
background: #f8f9fa;
|
||||||
min-height: 0;
|
min-height: 0;
|
||||||
width: 100%;
|
|
||||||
position: relative;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* =============================================================================
|
/* =============================================================================
|
||||||
|
|
@ -334,16 +328,14 @@ body:has(.docs-app),
|
||||||
============================================================================= */
|
============================================================================= */
|
||||||
|
|
||||||
.docs-canvas {
|
.docs-canvas {
|
||||||
flex: 1 1 auto;
|
flex: 1;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
overflow-x: auto;
|
overflow-x: auto;
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
background: #f8f9fa !important;
|
background: #f8f9fa;
|
||||||
min-height: 0;
|
|
||||||
min-width: 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.editor-page {
|
.editor-page {
|
||||||
|
|
@ -538,30 +530,20 @@ body:has(.docs-app),
|
||||||
}
|
}
|
||||||
|
|
||||||
/* =============================================================================
|
/* =============================================================================
|
||||||
CHAT PANEL - RIGHT SIDE (MUST BE FLEX CHILD OF docs-main)
|
CHAT PANEL - RIGHT SIDE
|
||||||
============================================================================= */
|
============================================================================= */
|
||||||
|
|
||||||
.chat-panel {
|
.chat-panel {
|
||||||
width: 280px;
|
width: 280px;
|
||||||
min-width: 280px;
|
|
||||||
max-width: 280px;
|
|
||||||
flex: 0 0 280px;
|
flex: 0 0 280px;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
background: #ffffff;
|
background: #ffffff;
|
||||||
border-left: 1px solid #e0e0e0;
|
border-left: 1px solid #e0e0e0;
|
||||||
height: 100%;
|
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
order: 2; /* Ensure it's on the right */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.chat-panel.collapsed {
|
.chat-panel.collapsed {
|
||||||
width: 0;
|
|
||||||
min-width: 0;
|
|
||||||
max-width: 0;
|
|
||||||
flex: 0 0 0;
|
|
||||||
overflow: hidden;
|
|
||||||
border-left: none;
|
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,3 @@
|
||||||
<link rel="stylesheet" href="docs/docs.css" />
|
|
||||||
|
|
||||||
<div class="docs-app" id="docs-app">
|
<div class="docs-app" id="docs-app">
|
||||||
<div class="docs-toolbar">
|
<div class="docs-toolbar">
|
||||||
<div class="toolbar-left">
|
<div class="toolbar-left">
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,7 @@
|
||||||
<link rel="stylesheet" href="billing/billing.css" />
|
<link rel="stylesheet" href="billing/billing.css" />
|
||||||
<link rel="stylesheet" href="products/products.css" />
|
<link rel="stylesheet" href="products/products.css" />
|
||||||
<link rel="stylesheet" href="tickets/tickets.css" />
|
<link rel="stylesheet" href="tickets/tickets.css" />
|
||||||
|
<link rel="stylesheet" href="docs/docs.css" />
|
||||||
|
|
||||||
<!-- Local Libraries (no external CDN dependencies) -->
|
<!-- Local Libraries (no external CDN dependencies) -->
|
||||||
<script src="js/vendor/htmx.min.js"></script>
|
<script src="js/vendor/htmx.min.js"></script>
|
||||||
|
|
|
||||||
|
|
@ -392,6 +392,11 @@
|
||||||
section = getCurrentSection();
|
section = getCurrentSection();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Set data-app attribute on body for CSS targeting (e.g., docs app styling)
|
||||||
|
if (section) {
|
||||||
|
document.body.setAttribute("data-app", section);
|
||||||
|
}
|
||||||
|
|
||||||
// First, remove ALL active classes from all tabs, items, and apps button
|
// First, remove ALL active classes from all tabs, items, and apps button
|
||||||
document.querySelectorAll(".app-tab.active").forEach((item) => {
|
document.querySelectorAll(".app-tab.active").forEach((item) => {
|
||||||
item.classList.remove("active");
|
item.classList.remove("active");
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue