feat: Implement Algolia DocSearch, update build configurations, and refine UI components.

This commit is contained in:
gitfromwildan
2026-02-08 23:36:19 +07:00
parent d91f94b308
commit dff814e201
45 changed files with 1648 additions and 1146 deletions

View File

@@ -1,19 +1,23 @@
/* Modern Blue Theme with Primary #0353D3 */
/* Modern Blue Theme */
/* Light Mode */
.keyword {
color: #1e40af; /* Darker blue for better contrast */
color: #1e40af;
/* Darker blue for better contrast */
}
.function {
color: #0369a1; /* Deep blue */
color: #0369a1;
/* Deep blue */
}
.punctuation {
color: #4b5563; /* Slate gray */
color: #4b5563;
/* Slate gray */
}
.comment {
color: #6b7280; /* Muted gray */
color: #6b7280;
/* Muted gray */
font-style: italic;
}
@@ -22,29 +26,35 @@
.annotation,
.boolean,
.number {
color: #0d9488; /* Teal for better distinction */
color: #0d9488;
/* Teal for better distinction */
}
.tag {
color: #1e40af; /* Matching keyword color */
color: #1e40af;
/* Matching keyword color */
}
.attr-name {
color: #1d4ed8; /* Slightly lighter blue */
color: #1d4ed8;
/* Slightly lighter blue */
}
.attr-value {
color: #2563eb; /* Primary blue */
color: #2563eb;
/* Primary blue */
}
/* Dark Mode */
.dark .keyword {
color: #60a5fa; /* Soft blue - good contrast on dark */
color: #60a5fa;
/* Soft blue - good contrast on dark */
font-weight: 500;
}
.dark .function {
color: #38bdf8; /* Sky blue */
color: #38bdf8;
/* Sky blue */
}
.dark .string,
@@ -52,47 +62,60 @@
.dark .annotation,
.dark .boolean,
.dark .number {
color: #2dd4bf; /* Teal - good visibility */
color: #2dd4bf;
/* Teal - good visibility */
}
.dark .tag {
color: #60a5fa; /* Matching keyword color */
color: #60a5fa;
/* Matching keyword color */
}
.dark .attr-name {
color: #7dd3fc; /* Lighter blue - better visibility */
color: #7dd3fc;
/* Lighter blue - better visibility */
}
.dark .attr-value {
color: #60a5ff; /* Brighter blue - better visibility */
color: #60a5ff;
/* Brighter blue - better visibility */
}
.dark .comment {
color: #94a3b8; /* Light gray - better contrast for dark mode */
color: #94a3b8;
/* Light gray - better contrast for dark mode */
font-style: italic;
}
.dark .punctuation {
color: #cbd5e1; /* Lighter gray - better visibility */
color: #cbd5e1;
/* Lighter gray - better visibility */
opacity: 0.8;
}
.dark .operator {
color: #cbd5e1; /* Light gray for operators */
color: #cbd5e1;
/* Light gray for operators */
}
.dark .selector {
color: #f472b6; /* Pink for selectors - better visibility */
color: #f472b6;
/* Pink for selectors - better visibility */
}
.youtube {
position: relative;
padding-bottom: 56.25%; /* Rasio aspek 16:9 */
padding-bottom: 56.25%;
/* Rasio aspek 16:9 */
height: 0;
overflow: hidden;
background: #000; /* Latar belakang hitam untuk memadukan player */
border-radius: 8px; /* Sudut melengkung */
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2); /* Bayangan lembut */
background: #000;
/* Latar belakang hitam untuk memadukan player */
border-radius: 8px;
/* Sudut melengkung */
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
/* Bayangan lembut */
margin: 1.5rem 0;
}
.youtube iframe {
@@ -102,5 +125,95 @@
width: 100%;
height: 100%;
border: none;
border-radius: 8px; /* Sudut melengkung pada iframe */
border-radius: 8px;
/* Sudut melengkung pada iframe */
}
/* ======================================================================== */
/* Custom styling for code blocks */
/* ======================================================================== */
.code-block-container {
position: relative;
margin: 1.5rem 0;
border: 1px solid hsl(var(--border));
overflow: hidden;
font-size: 0.875rem;
border-radius: 0.75rem;
}
.code-block-header {
display: flex;
align-items: center;
gap: 0.5rem;
background-color: hsl(var(--muted));
padding: 0.5rem 1rem;
border-bottom: 1px solid hsl(var(--border));
color: hsl(var(--muted-foreground));
font-family: monospace;
font-size: 0.8rem;
}
.code-block-actions {
position: absolute;
top: 0.5rem;
right: 0.75rem;
z-index: 10;
}
.code-block-actions button {
color: hsl(var(--muted-foreground));
transition: color 0.2s ease-in-out;
}
.code-block-actions button:hover {
color: hsl(var(--foreground));
}
.code-block-body pre[class*="language-"] {
margin: 0 !important;
padding: 0 !important;
background: transparent !important;
}
.line-numbers-wrapper {
position: absolute;
top: 0;
left: 0;
width: 3rem;
padding-top: 1rem;
text-align: right;
color: var(--line-number-color);
user-select: none;
}
.line-highlight {
position: absolute;
left: 0;
right: 0;
background: hsl(var(--primary) / 0.1);
border-left: 2px solid hsl(var(--primary));
pointer-events: none;
}
.code-block-body pre[data-line-numbers="true"] .line-highlight {
padding-left: 3.5rem;
}
.code-block-body::-webkit-scrollbar {
height: 8px;
}
.code-block-body::-webkit-scrollbar-track {
background: transparent;
}
.code-block-body::-webkit-scrollbar-thumb {
background: hsl(var(--border));
border-radius: 4px;
}
.code-block-body::-webkit-scrollbar-thumb:hover {
background: hsl(var(--muted));
}