feat: Implement Algolia DocSearch, enhance MDX components, and update build configurations.
This commit is contained in:
@@ -1,10 +1,131 @@
|
||||
@tailwind base;
|
||||
@tailwind components;
|
||||
@tailwind utilities;
|
||||
@import 'tailwindcss';
|
||||
@plugin '@tailwindcss/typography';
|
||||
|
||||
@import url("../styles/syntax.css");
|
||||
|
||||
/* ocean */
|
||||
@custom-variant dark (&:is(.dark *));
|
||||
|
||||
@utility container {
|
||||
margin-inline: auto;
|
||||
padding-inline: 2rem;
|
||||
|
||||
@media (width >=--theme(--breakpoint-sm)) {
|
||||
max-width: none;
|
||||
}
|
||||
|
||||
@media (width >=1440px) {
|
||||
max-width: 1440px;
|
||||
}
|
||||
}
|
||||
|
||||
@theme {
|
||||
--color-border: hsl(var(--border));
|
||||
--color-input: hsl(var(--input));
|
||||
--color-ring: hsl(var(--ring));
|
||||
--color-background: hsl(var(--background));
|
||||
--color-foreground: hsl(var(--foreground));
|
||||
|
||||
--color-primary: hsl(var(--primary));
|
||||
--color-primary-foreground: hsl(var(--primary-foreground));
|
||||
|
||||
--color-secondary: hsl(var(--secondary));
|
||||
--color-secondary-foreground: hsl(var(--secondary-foreground));
|
||||
|
||||
--color-destructive: hsl(var(--destructive));
|
||||
--color-destructive-foreground: hsl(var(--destructive-foreground));
|
||||
|
||||
--color-muted: hsl(var(--muted));
|
||||
--color-muted-foreground: hsl(var(--muted-foreground));
|
||||
|
||||
--color-accent: hsl(var(--accent));
|
||||
--color-accent-foreground: hsl(var(--accent-foreground));
|
||||
|
||||
--color-popover: hsl(var(--popover));
|
||||
--color-popover-foreground: hsl(var(--popover-foreground));
|
||||
|
||||
--color-card: hsl(var(--card));
|
||||
--color-card-foreground: hsl(var(--card-foreground));
|
||||
|
||||
--color-sidebar: hsl(var(--sidebar-background));
|
||||
--color-sidebar-foreground: hsl(var(--sidebar-foreground));
|
||||
--color-sidebar-primary: hsl(var(--sidebar-primary));
|
||||
--color-sidebar-primary-foreground: hsl(var(--sidebar-primary-foreground));
|
||||
--color-sidebar-accent: hsl(var(--sidebar-accent));
|
||||
--color-sidebar-accent-foreground: hsl(var(--sidebar-accent-foreground));
|
||||
--color-sidebar-border: hsl(var(--sidebar-border));
|
||||
--color-sidebar-ring: hsl(var(--sidebar-ring));
|
||||
|
||||
--radius-lg: var(--radius);
|
||||
--radius-md: calc(var(--radius) - 2px);
|
||||
--radius-sm: calc(var(--radius) - 4px);
|
||||
|
||||
--font-code: var(--font-geist-mono);
|
||||
--font-regular: var(--font-geist-sans);
|
||||
|
||||
--animate-accordion-down: accordion-down 0.2s ease-out;
|
||||
--animate-accordion-up: accordion-up 0.2s ease-out;
|
||||
--animate-shiny-text: shiny-text 8s infinite;
|
||||
|
||||
@keyframes accordion-down {
|
||||
from {
|
||||
height: 0;
|
||||
}
|
||||
|
||||
to {
|
||||
height: var(--radix-accordion-content-height);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes accordion-up {
|
||||
from {
|
||||
height: var(--radix-accordion-content-height);
|
||||
}
|
||||
|
||||
to {
|
||||
height: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes shiny-text {
|
||||
|
||||
0%,
|
||||
90%,
|
||||
100% {
|
||||
background-position: calc(-100% - var(--shiny-width)) 0;
|
||||
}
|
||||
|
||||
30%,
|
||||
60% {
|
||||
background-position: calc(100% + var(--shiny-width)) 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
The default border color has changed to `currentcolor` in Tailwind CSS v4,
|
||||
so we've added these compatibility styles to make sure everything still
|
||||
looks the same as it did with Tailwind CSS v3.
|
||||
|
||||
If we ever want to remove these styles, we need to add an explicit border
|
||||
color utility to any element that depends on these defaults.
|
||||
*/
|
||||
@layer base {
|
||||
|
||||
*,
|
||||
::after,
|
||||
::before,
|
||||
::backdrop,
|
||||
::file-selector-button {
|
||||
border-color: var(--color-gray-200, currentcolor);
|
||||
}
|
||||
}
|
||||
|
||||
@utility animate-shine {
|
||||
--animate-shine: shine var(--duration) infinite linear;
|
||||
animation: var(--animate-shine);
|
||||
background-size: 200% 200%;
|
||||
}
|
||||
|
||||
/* Modern Blue Theme */
|
||||
@layer base {
|
||||
:root {
|
||||
--background: 210 50% 95%;
|
||||
@@ -21,17 +142,18 @@
|
||||
--muted-foreground: 220 20% 40%;
|
||||
--accent: 132 86% 32%;
|
||||
--accent-foreground: 0 0% 100%;
|
||||
--destructive: 0 65% 55%;
|
||||
--destructive-foreground: 220 20% 95%;
|
||||
--border: 220 15% 90%;
|
||||
--input: 220 15% 90%;
|
||||
--ring: 132 86% 42%;
|
||||
--destructive: 0 85% 60%;
|
||||
--destructive-foreground: 0 0% 100%;
|
||||
--border: 210 20% 85%;
|
||||
--input: 210 20% 85%;
|
||||
--ring: 210 81% 56%;
|
||||
--radius: 0.5rem;
|
||||
--chart-1: 210 60% 50%;
|
||||
--chart-2: 220 40% 65%;
|
||||
--chart-3: 132 86% 42%;
|
||||
--chart-4: 200 60% 55%;
|
||||
--chart-5: 240 30% 40%;
|
||||
--chart-1: 210 81% 56%;
|
||||
--chart-2: 200 100% 40%;
|
||||
--chart-3: 220 76% 60%;
|
||||
--chart-4: 190 90% 50%;
|
||||
--chart-5: 230 86% 45%;
|
||||
--line-number-color: rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
|
||||
.dark {
|
||||
@@ -72,82 +194,66 @@
|
||||
}
|
||||
}
|
||||
|
||||
.prose {
|
||||
margin: 0 !important;
|
||||
}
|
||||
@layer utilities {
|
||||
.prose {
|
||||
margin: 0 !important;
|
||||
}
|
||||
|
||||
pre {
|
||||
padding: 2px 0 !important;
|
||||
width: inherit !important;
|
||||
overflow-x: auto;
|
||||
}
|
||||
pre {
|
||||
padding: 2px 0 !important;
|
||||
width: inherit !important;
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
pre>code {
|
||||
display: grid;
|
||||
max-width: inherit !important;
|
||||
padding: 14px 0 !important;
|
||||
}
|
||||
pre>code {
|
||||
display: grid;
|
||||
max-width: inherit !important;
|
||||
padding: 14px 0 !important;
|
||||
border: 0 !important;
|
||||
}
|
||||
|
||||
.code-line {
|
||||
padding: 0.75px 16px;
|
||||
@apply border-l-2 border-transparent
|
||||
}
|
||||
.code-line {
|
||||
padding: 0.75px 16px;
|
||||
@apply border-l-2 border-transparent;
|
||||
}
|
||||
|
||||
.line-number::before {
|
||||
display: inline-block;
|
||||
width: 1rem;
|
||||
margin-right: 22px;
|
||||
margin-left: -2px;
|
||||
color: rgb(110, 110, 110);
|
||||
content: attr(line);
|
||||
font-size: 13.5px;
|
||||
text-align: right;
|
||||
}
|
||||
.line-number::before {
|
||||
display: inline-block;
|
||||
width: 1rem;
|
||||
margin-right: 22px;
|
||||
margin-left: -2px;
|
||||
color: rgb(110, 110, 110);
|
||||
content: attr(line);
|
||||
font-size: 13.5px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.highlight-line {
|
||||
@apply bg-primary/5 border-l-2 border-primary/30;
|
||||
}
|
||||
.highlight-line {
|
||||
@apply bg-primary/5 border-l-2 border-primary/30;
|
||||
}
|
||||
|
||||
.rehype-code-title {
|
||||
@apply px-2 -mb-8 w-full text-sm pb-5 font-medium mt-5 font-code;
|
||||
}
|
||||
.rehype-code-title {
|
||||
@apply px-2 -mb-8 w-full text-sm pb-5 font-medium mt-5 font-code;
|
||||
}
|
||||
|
||||
.highlight-comp>code {
|
||||
background-color: transparent !important;
|
||||
}
|
||||
|
||||
.line-clamp-3 {
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 3;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.line-clamp-2 {
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
.highlight-comp>code {
|
||||
background-color: transparent !important;
|
||||
}
|
||||
}
|
||||
|
||||
@layer utilities {
|
||||
.animate-shine {
|
||||
--animate-shine: shine var(--duration) infinite linear;
|
||||
animation: var(--animate-shine);
|
||||
background-size: 200% 200%;
|
||||
|
||||
@keyframes shine {
|
||||
0% {
|
||||
background-position: 0% 0%;
|
||||
}
|
||||
|
||||
@keyframes shine {
|
||||
0% {
|
||||
background-position: 0% 0%;
|
||||
}
|
||||
50% {
|
||||
background-position: 100% 100%;
|
||||
}
|
||||
100% {
|
||||
background-position: 0% 0%;
|
||||
}
|
||||
50% {
|
||||
background-position: 100% 100%;
|
||||
}
|
||||
|
||||
100% {
|
||||
background-position: 0% 0%;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user