Files
spearhead/_docs/style/style.css
T
dutchie031GitHubex61widutchie032 <dutchie032>
5db860a7a2 Docs rework (#21)
* wip

* docs reworked

* reworked docs

* updated docs and pipeline

---------

Co-authored-by: ex61wi <tim.rorije@ing.com>
Co-authored-by: dutchie032 <dutchie032>
2025-04-25 14:44:19 +02:00

595 lines
14 KiB
CSS

:root {
/* Dark Theme (Default) */
--color-bg-primary: #070a17; /* Darkened primary background */
--color-bg-secondary: #121a30; /* Adjusted secondary background */
--color-bg-tertiary: #182040; /* Slightly darkened tertiary */
--color-bg-header: #050715; /* Darkened header */
--color-bg-code: rgba(11, 16, 35, 0.75); /* Increased opacity for code blocks */
--color-bg-note: rgba(18, 28, 58, 0.75); /* Increased opacity for notes */
--color-bg-hover: rgba(86, 100, 210, 0.2); /* Slightly increased hover opacity */
--color-bg-inline-lua: rgba(25, 18, 8, 0.7); /* Background for inline lua code */
--color-bg-note-dark: rgba(50, 40, 15, 0.7); /* Background for note boxes */
--color-text-primary: #ffffff; /* Made whiter (was #f0f3ff) */
--color-text-secondary: #d8e0ff; /* Made whiter (was #bbc8ff) */
--color-text-accent: #90c0ff; /* Made brighter (was #70aaff) */
--color-text-light: #ffffff; /* Unchanged */
--color-border-primary: #3a4980; /* Brightened primary border */
--color-border-accent: #5c75d9; /* Brightened accent border */
--color-link: #90c0ff; /* Made brighter (was #70aaff) */
--color-link-hover: #d0e5ff; /* Made brighter (was #b0d0ff) */
/* Lua syntax highlighting colors with improved contrast */
--color-lua-variable: #ffe080; /* Brighter variable color */
--color-lua-comment: #c0b8a0; /* Brighter comment color */
--color-lua-operator: #ffffff;
--color-lua-keyword: #ffd8a0; /* Brighter keyword color */
--color-lua-string: #c0ffb8; /* Brighter string color */
--color-lua-function: #fff0a0; /* Brighter function color */
/* Shadow and transparency values - unchanged */
--shadow-small: 0 2px 5px rgba(0, 0, 0, 0.3);
--shadow-medium: 0 3px 8px rgba(0, 0, 0, 0.5);
--shadow-large: 0 4px 12px rgba(0, 0, 0, 0.6);
/* Common opacity values */
--opacity-sidenav: 0.85; /* Increased opacity for better contrast */
/* Responsive margins - unchanged */
--margin-left: 20%;
--margin-xlarge: 10%;
--margin-large: 8%;
--margin-medium: 8%;
--margin-small: 5%;
/* Scrollbar colors */
--color-scrollbar-track: rgba(7, 10, 23, 0.8);
--color-scrollbar-thumb-start: #5c75d9;
--color-scrollbar-thumb-end: #3a4980;
--color-scrollbar-thumb-hover-start: #90c0ff;
--color-scrollbar-thumb-hover-end: #5c75d9;
--color-scrollbar-shadow: rgba(144, 192, 255, 0.3);
--color-scrollbar-shadow-hover: rgba(144, 192, 255, 0.5);
}
[data-theme="light"] {
--color-bg-primary: #f5f7ff;
--color-bg-secondary: #e8ecf7;
--color-bg-tertiary: #dce2f0;
--color-bg-header: #f0f2fa;
--color-bg-code: rgba(220, 225, 240, 0.75);
--color-bg-note: rgba(215, 228, 245, 0.75);
--color-bg-hover: rgba(100, 120, 200, 0.1);
--color-bg-inline-lua: rgba(230, 235, 245, 0.7);
--color-bg-note-dark: rgba(235, 240, 250, 0.7);
--color-text-primary: #151720;
--color-text-secondary: #2a2e40;
--color-text-accent: #3050b0;
--color-text-light: #2a2e40;
--color-border-primary: #a0b0e0;
--color-border-accent: #5c75d9;
--color-link: #3050b0;
--color-link-hover: #4060c0;
/* Lua syntax highlighting colors for light theme */
--color-lua-variable: #0050a0;
--color-lua-comment: #606080;
--color-lua-operator: #202030;
--color-lua-keyword: #6030a0;
--color-lua-string: #008060;
--color-lua-function: #0070a0;
/* Shadow values adjusted for light theme */
--shadow-small: 0 2px 5px rgba(0, 0, 0, 0.15);
--shadow-medium: 0 3px 8px rgba(0, 0, 0, 0.2);
--shadow-large: 0 4px 12px rgba(0, 0, 0, 0.25);
/* Common opacity values */
--opacity-sidenav: 0.92;
/* Scrollbar colors */
--color-scrollbar-track: rgba(220, 225, 240, 0.8);
--color-scrollbar-thumb-start: #5c75d9;
--color-scrollbar-thumb-end: #a0b0e0;
--color-scrollbar-thumb-hover-start: #3050b0;
--color-scrollbar-thumb-hover-end: #5c75d9;
--color-scrollbar-shadow: rgba(48, 80, 176, 0.2);
--color-scrollbar-shadow-hover: rgba(48, 80, 176, 0.4);
}
html {
background-color: var(--color-bg-primary);
height: 100%;
scroll-behavior: smooth;
}
body {
color: var(--color-text-primary);
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
height: 100%;
display: flex;
flex-direction: column;
font-size: 16px;
line-height: 1.6;
transition: background-color 0.3s ease, color 0.3s ease;
}
a {
color: var(--color-link);
text-decoration: none;
}
a:hover {
color: var(--color-link-hover);
text-decoration: underline;
}
header {
background: linear-gradient(to right, var(--color-bg-header), var(--color-bg-primary));
box-shadow: var(--shadow-large);
}
.header-box {
padding: 1em;
margin-left: var(--margin-left);
min-height: 5em;
display: flex;
flex-direction: row;
justify-content: start;
align-items: center;
margin-bottom: 0%;
position: relative;
padding: 0 0;
}
.header-right {
width: 50%;
margin-left: 10em;
display: flex;
justify-content: space-between;
align-items: center;
}
.logo {
font-size: 2.5em;
font-weight: 600;
background: linear-gradient(120deg, var(--color-text-secondary), var(--color-text-accent));
-webkit-background-clip: text;
background-clip: text;
color: transparent;
text-shadow: var(--shadow-small);
transition: all 0.3s ease;
}
.logo:hover {
transform: scale(1.02);
text-decoration: none;
}
header nav {
display: flex;
flex-direction: row;
align-items: center;
gap: 1.2rem;
}
nav {
display: flex;
align-items: center;
}
header nav a {
position: relative;
color: var(--color-text-primary);
font-weight: 500;
padding: 0.5em 0.8em;
border-radius: 4px;
transition: all 0.2s ease-in-out;
}
header nav a:hover {
color: var(--color-text-accent);
background-color: var(--color-bg-hover);
text-decoration: none;
}
header nav a::after {
content: '';
position: absolute;
bottom: 0;
left: 50%;
width: 0;
height: 2px;
background-color: var(--color-text-accent);
transition: all 0.3s ease;
transform: translateX(-50%);
}
header nav a:hover::after {
width: 80%;
}
header.collapsible {
cursor: pointer;
position: relative;
}
header.collapsible::after {
content: '\25BC'; /* Downward arrow */
position: absolute;
right: 0;
font-size: 0.8em;
color: var(--color-text-light);
}
header.collapsible.collapsed::after {
content: '\25B6'; /* Rightward arrow */
}
h2.collapsible, h3.collapsible {
cursor: pointer;
position: relative;
}
h2.collapsible::before, h3.collapsible::before {
content: '';
margin-right: 0;
width: 0;
display: none;
}
h2.collapsible.collapsed::before, h3.collapsible.collapsed::before {
content: '';
display: none;
}
footer {
padding-left: var(--margin-left);
background-color: var(--color-bg-header);
color: var(--color-text-primary);
padding-top: 1em;
padding-bottom: 1em;
}
main {
flex: 1;
position: relative;
}
/* Side navigation styles */
.reference-container {
margin-top: 2em;
display: flex;
margin-left: var(--margin-left);
flex-direction: row;
gap: 2em;
position: relative;
}
.side-nav {
width: 250px; /* Fixed width instead of percentage */
min-width: 250px; /* Same fixed minimum width */
padding: 1em;
position: sticky;
top: 2em;
min-height: calc(100vh - 20em);
overflow-y: auto;
border-right: 2px solid var(--color-border-accent);
}
.side-nav h4 {
margin-top: 0;
margin-bottom: 0.5em;
}
.side-nav ul {
list-style-type: none;
padding-left: 1em;
margin-top: 0.5em;
}
.side-nav li {
margin-bottom: 0.5em;
}
.side-nav a {
color: var(--color-text-primary);
text-decoration: none;
}
.side-nav a:hover {
color: var(--color-link-hover);
text-decoration: underline;
}
.side-nav-h2 {
color: var(--color-text-primary);
font-weight: bold;
}
.side-nav-h3 {
color: var(--color-text-primary);
padding-left: 1em;
font-size: 0.9em;
}
.content-wrapper {
flex: 1;
max-width: 900px;
}
/* Heading styles */
h1, h2, h3, h4, h5, h6 {
margin-top: 1.5em;
margin-bottom: 0.8em;
color: var(--color-text-secondary);
font-weight: 600;
line-height: 1.3;
}
h1 {
font-size: 2.2em;
border-bottom: 2px solid var(--color-border-primary);
padding-bottom: 0.3em;
}
h2 {
font-size: 1.8em;
border-bottom: 1px solid var(--color-border-primary);
padding-bottom: 0.2em;
}
h3 {
font-size: 1.4em;
color: var(--color-text-accent);
}
h4 {
font-size: 1.2em;
}
p {
margin-bottom: 1.2em;
}
/* List styling for better readability */
ul, ol {
margin: 1em 0 1.5em 0;
padding-left: 2em;
}
li {
margin-bottom: 0.5em;
}
/* Add better spacing between sections */
main > section {
margin-bottom: 2em;
}
/* Improve table styling if tables are used */
table {
border-collapse: collapse;
width: 100%;
margin: 1.5em 0;
overflow-x: auto;
display: block;
}
th, td {
padding: 0.75em 1em;
border: 1px solid var(--color-border-primary);
}
th {
background-color: var(--color-bg-secondary);
font-weight: bold;
}
/* Code and syntax highlighting with improved contrast */
.inline-lua {
background-color: var(--color-bg-inline-lua); /* Darker background for better contrast */
padding: 0.1em 0.3em;
border-radius: 3px;
font-family: 'Courier New', monospace;
white-space: nowrap;
}
/* Code block styling with improved contrast */
pre {
background-color: var(--color-bg-inline-lua); /* Darker background for better contrast */
border: 1px solid var(--color-border-primary);
border-radius: 5px;
padding: 1em;
margin: 1.5em 0;
overflow-x: auto;
font-family: 'Courier New', monospace;
line-height: 1.4;
}
.lua-variable {
color: var(--color-lua-variable); /* Brighter variable color */
}
.lua-comment {
color: var(--color-lua-comment); /* Brighter comment color */
font-style: italic;
}
.lua-operator {
color: var(--color-lua-operator); /* Bright white for better contrast */
}
.lua-keyword {
color: var(--color-lua-keyword); /* Brighter keyword color */
font-weight: bold;
}
.lua-string {
color: var(--color-lua-string); /* Brighter string color */
}
.lua-function {
color: var(--color-lua-function); /* Brighter function color */
font-weight: bold;
}
.inline-ref {
color: var(--color-text-accent);
font-weight: bold;
padding: 0 2px;
}
/* Note boxes */
.note {
background-color: var(--color-bg-note-dark);
border-left: 4px solid var(--color-border-accent);
padding: 0.8em 1em;
margin: 1.5em 0;
border-radius: 0 4px 4px 0;
}
.note p:last-child {
margin-bottom: 0;
}
/* Image styling */
img {
max-width: 100%;
height: auto;
border-radius: 4px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
/* Custom Scrollbar - Enhanced version */
::-webkit-scrollbar {
width: 12px;
height: 12px;
}
::-webkit-scrollbar-track {
background: var(--color-scrollbar-track);
border-radius: 10px;
box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.4);
}
::-webkit-scrollbar-thumb {
background: linear-gradient(to bottom, var(--color-scrollbar-thumb-start), var(--color-scrollbar-thumb-end));
border-radius: 10px;
border: 2px solid var(--color-scrollbar-track);
box-shadow: 0 0 3px var(--color-scrollbar-shadow);
transition: all 0.3s ease;
}
::-webkit-scrollbar-thumb:hover {
background: linear-gradient(to bottom, var(--color-scrollbar-thumb-hover-start), var(--color-scrollbar-thumb-hover-end));
border-width: 1px;
box-shadow: 0 0 5px var(--color-scrollbar-shadow-hover);
}
::-webkit-scrollbar-corner {
background: var(--color-bg-header);
}
/* Firefox scrollbar styling */
* {
scrollbar-width: thin;
scrollbar-color: var(--color-border-accent) var(--color-scrollbar-track);
}
/* Responsive layout adjustments */
@media screen and (max-width: 1500px) {
:root {
--margin-left: var(--margin-xlarge);
}
}
/* Responsive layout adjustments */
@media screen and (max-width: 1200px) {
:root {
--margin-left: var(--margin-large);
}
}
@media screen and (max-width: 900px) {
:root {
--margin-left: var(--margin-small);
}
}
/* Mobile responsive styles */
@media screen and (max-width: 768px) {
:root {
--margin-left: 1em;
}
.side-nav {
display: none; /* Hide side navigation on mobile devices */
}
.content-wrapper {
width: 100%; /* Make content take full width */
}
main {
margin-left: 5%;
margin-right: 5%;
padding-left: 5%;
padding-right: 5%;
}
header {
padding-left: 5%;
padding-right: 5%;
flex-direction: column;
align-items: center;
min-height: auto;
padding-top: 1em;
padding-bottom: 1em;
}
header nav {
margin-left: 0;
margin-top: 1em;
flex-wrap: wrap;
justify-content: center;
}
}
/* Theme Toggle Button */
.theme-toggle {
background: none;
border: none;
color: var(--color-text-primary);
cursor: pointer;
font-size: 1.2rem;
margin-left: 15px;
padding: 5px;
display: flex;
align-items: center;
justify-content: center;
width: 36px;
height: 36px;
border-radius: 50%;
background-color: var(--color-bg-tertiary);
transition: background-color 0.3s ease;
}
.theme-toggle:hover {
background-color: var(--color-bg-hover);
}
.theme-toggle svg {
width: 20px;
height: 20px;
fill: var(--color-text-primary);
}