mirror of
https://github.com/luckjiawei/podux.git
synced 2026-12-01 07:46:53 +00:00
260 lines
5.9 KiB
CSS
260 lines
5.9 KiB
CSS
/**
|
|
* Customize default theme styling by overriding CSS variables:
|
|
* https://github.com/vuejs/vitepress/blob/main/src/client/theme-default/styles/vars.css
|
|
*/
|
|
|
|
/**
|
|
* Colors
|
|
*
|
|
* Each colors have exact same color scale system with 3 levels of solid
|
|
* colors with different brightness, and 1 soft color.
|
|
*
|
|
* - `XXX-1`: The most solid color used mainly for colored text. It must
|
|
* satisfy the contrast ratio against when used on top of `XXX-soft`.
|
|
*
|
|
* - `XXX-2`: The color used mainly for hover state of the button.
|
|
*
|
|
* - `XXX-3`: The color for solid background, such as bg color of the button.
|
|
* It must satisfy the contrast ratio with pure white (#ffffff) text on
|
|
* top of it.
|
|
*
|
|
* - `XXX-soft`: The color used for subtle background such as custom container
|
|
* or badges. It must satisfy the contrast ratio when putting `XXX-1` colors
|
|
* on top of it.
|
|
*
|
|
* The soft color must be semi transparent alpha channel. This is crucial
|
|
* because it allows adding multiple "soft" colors on top of each other
|
|
* to create a accent, such as when having inline code block inside
|
|
* custom containers.
|
|
*
|
|
* - `default`: The color used purely for subtle indication without any
|
|
* special meanings attched to it such as bg color for menu hover state.
|
|
*
|
|
* - `brand`: Used for primary brand colors, such as link text, button with
|
|
* brand theme, etc.
|
|
*
|
|
* - `tip`: Used to indicate useful information. The default theme uses the
|
|
* brand color for this by default.
|
|
*
|
|
* - `warning`: Used to indicate warning to the users. Used in custom
|
|
* container, badges, etc.
|
|
*
|
|
* - `danger`: Used to show error, or dangerous message to the users. Used
|
|
* in custom container, badges, etc.
|
|
* -------------------------------------------------------------------------- */
|
|
|
|
:root {
|
|
--vp-c-default-1: var(--vp-c-gray-1);
|
|
--vp-c-default-2: var(--vp-c-gray-2);
|
|
--vp-c-default-3: var(--vp-c-gray-3);
|
|
--vp-c-default-soft: var(--vp-c-gray-soft);
|
|
|
|
--vp-c-brand-1: #6366f1;
|
|
--vp-c-brand-2: #818cf8;
|
|
--vp-c-brand-3: #6366f1;
|
|
--vp-c-brand-soft: rgba(99, 102, 241, 0.14);
|
|
|
|
--vp-c-tip-1: var(--vp-c-brand-1);
|
|
--vp-c-tip-2: var(--vp-c-brand-2);
|
|
--vp-c-tip-3: var(--vp-c-brand-3);
|
|
--vp-c-tip-soft: var(--vp-c-brand-soft);
|
|
|
|
--vp-c-warning-1: var(--vp-c-yellow-1);
|
|
--vp-c-warning-2: var(--vp-c-yellow-2);
|
|
--vp-c-warning-3: var(--vp-c-yellow-3);
|
|
--vp-c-warning-soft: var(--vp-c-yellow-soft);
|
|
|
|
--vp-c-danger-1: var(--vp-c-red-1);
|
|
--vp-c-danger-2: var(--vp-c-red-2);
|
|
--vp-c-danger-3: var(--vp-c-red-3);
|
|
--vp-c-danger-soft: var(--vp-c-red-soft);
|
|
}
|
|
|
|
.dark {
|
|
--vp-c-brand-1: #818cf8;
|
|
--vp-c-brand-2: #6366f1;
|
|
--vp-c-brand-3: #818cf8;
|
|
--vp-c-brand-soft: rgba(129, 140, 248, 0.16);
|
|
}
|
|
|
|
/**
|
|
* Component: Home
|
|
* -------------------------------------------------------------------------- */
|
|
|
|
:root {
|
|
--vp-home-hero-name-color: transparent;
|
|
--vp-home-hero-name-background: -webkit-linear-gradient(
|
|
120deg,
|
|
#6366f1 30%,
|
|
#fcd34d
|
|
);
|
|
|
|
--vp-home-hero-image-background-image: linear-gradient(
|
|
-45deg,
|
|
#6366f170 50%,
|
|
#fcd34d50 50%
|
|
);
|
|
--vp-home-hero-image-filter: blur(44px);
|
|
}
|
|
|
|
@media (min-width: 640px) {
|
|
:root {
|
|
--vp-home-hero-image-filter: blur(56px);
|
|
}
|
|
}
|
|
|
|
@media (min-width: 960px) {
|
|
:root {
|
|
--vp-home-hero-image-filter: blur(68px);
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Component: Screenshot Gallery
|
|
* -------------------------------------------------------------------------- */
|
|
|
|
.sg-gallery {
|
|
display: grid;
|
|
grid-template-columns: repeat(3, 1fr);
|
|
gap: 1.25rem;
|
|
margin: 2rem 0;
|
|
}
|
|
|
|
@media (max-width: 768px) {
|
|
.sg-gallery {
|
|
grid-template-columns: repeat(2, 1fr);
|
|
}
|
|
}
|
|
|
|
@media (max-width: 480px) {
|
|
.sg-gallery {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
}
|
|
|
|
.sg-item {
|
|
border-radius: 12px;
|
|
overflow: hidden;
|
|
cursor: zoom-in;
|
|
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
|
|
transition: transform 0.25s ease, box-shadow 0.25s ease;
|
|
background: var(--vp-c-bg-soft);
|
|
}
|
|
|
|
.sg-item:hover {
|
|
transform: translateY(-4px);
|
|
box-shadow: 0 14px 40px rgba(0, 0, 0, 0.22);
|
|
}
|
|
|
|
.sg-item img {
|
|
width: 100%;
|
|
display: block;
|
|
margin: 0 !important;
|
|
}
|
|
|
|
.sg-caption {
|
|
padding: 0.5rem 0.75rem;
|
|
font-size: 0.78rem;
|
|
color: var(--vp-c-text-2);
|
|
text-align: center;
|
|
border-top: 1px solid var(--vp-c-divider);
|
|
}
|
|
|
|
/* Lightbox */
|
|
|
|
.sg-lightbox {
|
|
position: fixed;
|
|
inset: 0;
|
|
z-index: 9999;
|
|
background: rgba(0, 0, 0, 0.88);
|
|
backdrop-filter: blur(10px);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: 2rem;
|
|
}
|
|
|
|
.sg-lightbox-inner {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
max-width: min(90vw, 960px);
|
|
}
|
|
|
|
.sg-lightbox-inner img {
|
|
max-width: 100%;
|
|
max-height: calc(85vh - 3rem);
|
|
border-radius: 10px;
|
|
object-fit: contain;
|
|
margin: 0 !important;
|
|
box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
|
|
}
|
|
|
|
.sg-lightbox-caption {
|
|
margin-top: 0.9rem;
|
|
color: rgba(255, 255, 255, 0.8);
|
|
font-size: 0.9rem;
|
|
text-align: center;
|
|
}
|
|
|
|
.sg-close {
|
|
position: fixed;
|
|
top: 1.25rem;
|
|
right: 1.5rem;
|
|
background: rgba(255, 255, 255, 0.15);
|
|
border: none;
|
|
color: white;
|
|
width: 2.25rem;
|
|
height: 2.25rem;
|
|
border-radius: 50%;
|
|
font-size: 1rem;
|
|
cursor: pointer;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
transition: background 0.2s;
|
|
z-index: 1;
|
|
}
|
|
|
|
.sg-close:hover {
|
|
background: rgba(255, 255, 255, 0.28);
|
|
}
|
|
|
|
.sg-nav {
|
|
position: fixed;
|
|
top: 50%;
|
|
transform: translateY(-50%);
|
|
background: rgba(255, 255, 255, 0.15);
|
|
border: none;
|
|
color: white;
|
|
width: 2.75rem;
|
|
height: 2.75rem;
|
|
border-radius: 50%;
|
|
font-size: 1.6rem;
|
|
line-height: 1;
|
|
cursor: pointer;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
transition: background 0.2s;
|
|
z-index: 1;
|
|
}
|
|
|
|
.sg-nav:hover {
|
|
background: rgba(255, 255, 255, 0.28);
|
|
}
|
|
|
|
.sg-nav-prev { left: 1.25rem; }
|
|
.sg-nav-next { right: 1.25rem; }
|
|
|
|
/* Lightbox fade transition */
|
|
.sg-fade-enter-active,
|
|
.sg-fade-leave-active {
|
|
transition: opacity 0.2s ease;
|
|
}
|
|
|
|
.sg-fade-enter-from,
|
|
.sg-fade-leave-to {
|
|
opacity: 0;
|
|
}
|