Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 42 additions & 43 deletions .vitepress/theme/components/AuthButtons/linkStyles.scss
Original file line number Diff line number Diff line change
@@ -1,48 +1,47 @@

.link {
--outline-color-hsl: 0, 0%, 100%;
--outline-opacity: 0.08;
--text-strong-color: #fff;
display: flex;
align-items: center;
height: 36px;
padding: 0 20px;
border-radius: 8px;
color: var(--text-strong-color);
font-size: 13px;
font-weight: 500;
text-decoration: none;
box-shadow: inset 0 0 0 1px hsla(var(--outline-color-hsl), var(--outline-opacity));
background-color: hsla(224, 32%, 28%, 0.24);
backdrop-filter: blur(8px);
transition: 0.1s ease;
transition-property: background-color, box-shadow, color;
}

.light {
&:hover {
--outline-opacity: 0.14;
color: var(--text-strong-color);
background-color: hsla(224, 32%, 28%, 0.54);
}
:root:not(.dark) & {
--outline-color-hsl: 224, 32%, 28%;
--outline-opacity: 0.1;
color: hsl(240, 6%, 23%);
background-color: hsla(224, 32%, 28%, 0.1);
&:hover {
--outline-opacity: 0.2;
background-color: transparent;
}
}
}

.accent {
--outline-color-hsl: 0, 0%, 100%;
--outline-opacity: 0.08;
--text-strong-color: #fff;
display: flex;
align-items: center;
height: 36px;
padding: 0 20px;
border-radius: 8px;
color: var(--text-strong-color);
font-size: 13px;
font-weight: 500;
text-decoration: none;
box-shadow: inset 0 0 0 1px hsla(var(--outline-color-hsl), var(--outline-opacity));
background-color: hsla(224, 32%, 28%, 0.24);
backdrop-filter: blur(8px);
transition: 0.1s ease;
transition-property: background-color, box-shadow, color;
}

.light {
&:hover {
--outline-opacity: 0.14;
color: var(--text-strong-color);
background-color: hsl(214, 87%, 51%);
background-color: hsla(224, 32%, 28%, 0.54);
}
:root:not(.dark) & {
--outline-color-hsl: 224, 32%, 28%;
--outline-opacity: 0.1;
color: hsl(240, 6%, 23%);
background-color: hsla(224, 32%, 28%, 0.1);
&:hover {
--outline-opacity: 0.24;
background-color: hsl(208, 100%, 53%);
--outline-opacity: 0.2;
background-color: transparent;
}
}
}
}

.accent {
--outline-opacity: 0.14;
color: var(--text-strong-color);
background-color: hsl(214, 87%, 51%);
&:hover {
--outline-opacity: 0.24;
background-color: hsl(208, 100%, 53%);
}
}
7 changes: 4 additions & 3 deletions .vitepress/theme/icons/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Tell Vite to load all SVG icons in the icons folder as part of the build.
const importedIconsUrls = import.meta.glob('./*.svg', {
as: 'url',
query: '?url',
import: 'default',
eager: true,
});

Expand All @@ -9,6 +10,6 @@ const iconNamePattern = /([0-9a-zA-Z-]+)\.svg$/;
export const iconsUrls: Record<string, string> = Object.fromEntries(
Object.entries(importedIconsUrls).map(([path, url]) => {
const nameMatches = path.match(iconNamePattern);
return [nameMatches ? nameMatches[1] : path, url];
})
return [nameMatches ? nameMatches[1] : path, url as string];
}),
);
47 changes: 47 additions & 0 deletions .vitepress/theme/styles/content-aside.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
// --------------------------------
// -- Aside / Table of Contents

// Widen aside
.VPDoc .aside {
max-width: 300px !important;
position: relative;
padding-left: 0;
@media (min-width: 1380px) {
max-width: 248px;
}
@media (min-width: 1500px) {
max-width: 300px;
}
@media (min-width: 1600px) {
max-width: 328px;
}
}
.aside-container {
width: 300px !important;
max-width: 300px;
}
.aside-content {
padding-top: 56px;
}

// Add gap between title and list, but account for hardcoded `outline-marker` `top`
.VPDocAside .outline-title {
margin-block-end: -1px;
transform: translateY(-6px);
}

// Space out links without affecting `outline-marker` too much
.VPDocAside .outline-link {
padding: 6px 0;
font-size: 12.5px;
transition-duration: 0.1s;
}

// Don't clip text in the outline
.VPDocAsideOutline .outline-link {
white-space: normal;
text-overflow: initial;
padding: 5px 0;
font-size: 13px;
line-height: 18px;
}
183 changes: 182 additions & 1 deletion .vitepress/theme/styles/content.scss
Original file line number Diff line number Diff line change
@@ -1,11 +1,81 @@
.vp-doc a {
transition: 0.1s ease;
}

.vp-doc p > strong > a,
.vp-doc p > a,
.vp-doc li > strong > a,
.vp-doc li > a,
.vp-doc td > strong > a,
.vp-doc td > a {
text-decoration: underline;
text-underline-offset: 2px;
text-decoration-thickness: 1px;
transition: 0.1s ease;
transition-property: color, text-underline-offset;
:root.dark & {
color: rgb(131, 222, 255);
}
&:hover,
:root.dark &:hover {
color: var(--vp-c-text-1);
text-decoration-thickness: 1px;
text-underline-offset: 4px;
}
}

.vp-doc h1,
.vp-doc h2,
.vp-doc h3,
.vp-doc h4,
.vp-doc h5,
.vp-doc h6 {
width: max-content;
max-width: 100%;
}

.vp-doc .header-anchor {
@media (min-width: 960px) {
position: absolute;
left: -28px;
padding: 0 18px;
transform: scale(0.94);
}
}

.vp-doc h1 + p,
.vp-doc h2 + p {
margin-top: 0;
}

.vp-doc h1 {
margin-bottom: 24px;
}

.vp-doc h2 {
margin: 44px 0 24px;
padding-top: 16px !important;
border-top: 1px solid var(--vp-c-divider-light);
padding-top: 32px;
}

.vp-doc h2 .header-anchor {
top: 16px;
}

.vp-doc h3 {
margin-top: 40px !important;
}

.vp-doc pre code {
font-size: 13px !important;
}

.vp-doc :not(pre) > code {
color: var(--vp-text-code);
}

.vp-doc div[class*='language-'] {
margin: 32px 0 40px;
}

// Wrap code examples
Expand All @@ -16,6 +86,15 @@
word-break: break-word;
}

.vp-doc p,
.vp-doc li {
font-size: 15px;
line-height: 1.8;
}
.vp-doc p {
margin: 24px 0;
}

.vp-doc td,
.vp-doc th {
font-size: 14px;
Expand All @@ -29,10 +108,22 @@
cursor: default;
}

.vp-doc p a {
display: inline-block;
text-underline-offset: 2px;
text-decoration-thickness: 1px;
}

.vp-doc img {
margin: 8px 0;
}

.vp-doc p > img,
.vp-doc > div > img {
margin: 40px 0;
border-radius: 6px;
}

.vp-doc figure {
margin-top: 1.5rem;
margin-bottom: 1.5rem;
Expand Down Expand Up @@ -75,6 +166,11 @@
}
}

.vp-code-group .tabs label {
font-size: 13px !important;
font-weight: 600;
}

.vp-doc .footnotes-sep {
margin: 44px 0 32px;
border-top: 1px solid var(--vp-c-divider-light);
Expand All @@ -96,3 +192,88 @@
margin-left: auto !important;
margin-right: auto !important;
}

// --------------------------------
// Community Projects

.community-project-screenshot {
width: 100%;
max-width: 760px;
border-radius: 12px;
overflow: hidden;
img {
max-width: min(100%, 800px);
margin: 0 !important;
}
@media screen and (max-height: 768px) {
max-width: 680px;
max-height: 352px;
}
@media screen and (max-width: 960px) {
max-width: 680px;
max-height: 352px;
}
}

// --------------------------------
// Twitter Tweet Embed

.twitter-tweet {
position: relative;
display: block;
max-width: 640px;
padding: 64px 32px 16px !important;
margin: 52px 0 !important;
color: var(--vp-c-text-2);
font-size: 14px;
font-weight: 500;
@media screen and (max-width: 960px) {
padding: 64px 24px 16px !important;
padding-right: 0 !important;
}

& > p {
margin-bottom: 16px !important;
color: var(--vp-c-text-1) !important;
font-size: 16px;
@media screen and (max-width: 500px) {
font-size: 14px !important;
}
}

&::before {
--twitter-icon-mask-size: 26px;
--block-icon-url: url(https://github.com/'@theme/icons/fa-twitter.svg');
content: '';
position: absolute;
top: 16px;
left: 32px;
width: var(--twitter-icon-mask-size);
height: var(--twitter-icon-mask-size);
transition: background-color 0.14s ease;
background-color: #1da1f2;
mask-image: var(--twitter-icon-img);
mask-position: center;
mask-repeat: no-repeat;
mask-size: cover;
}
}

// --------------------------------
// Footer / Above Footer

.VPLink.link.edit-link-button {
gap: 4px;
font-size: 13px;
svg {
transform: scale(0.92);
}
}

.content-container footer.VPDocFooter .edit-info {
margin-top: 20px;
}

.edit-info {
padding-bottom: 24px !important;
}
Loading