From d2af9037ba96e3682f39b9a996ba284dcaa5d651 Mon Sep 17 00:00:00 2001 From: FichteFoll Date: Sun, 29 Oct 2023 21:29:47 +0100 Subject: [PATCH 1/3] Adopt spacings for contributors box from VPFeatures --- docs/.vitepress/components/Contributors.vue | 66 ++++++++++++++------- docs/.vitepress/theme/custom.css | 34 ----------- docs/index.md | 34 ++++++++++- 3 files changed, 78 insertions(+), 56 deletions(-) diff --git a/docs/.vitepress/components/Contributors.vue b/docs/.vitepress/components/Contributors.vue index 2b645a26..b591f6bc 100644 --- a/docs/.vitepress/components/Contributors.vue +++ b/docs/.vitepress/components/Contributors.vue @@ -1,31 +1,47 @@ diff --git a/docs/.vitepress/theme/custom.css b/docs/.vitepress/theme/custom.css index 80b297f6..d5e67541 100644 --- a/docs/.vitepress/theme/custom.css +++ b/docs/.vitepress/theme/custom.css @@ -39,7 +39,6 @@ } - .VPNavBar:not(.has-sidebar):not(.top) { border-bottom-color: transparent !important; } @@ -48,40 +47,7 @@ background-color: var(--vp-c-bg-elv); } -.VPTeamMembers.small .container { - grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important; - gap: 10px; -} - /* Custom Stlye */ -.custom-layout { - background-color: var(--vp-c-bg-soft); - color: var(--vp-c-text-1); - padding: 1.5rem; - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - text-align: center; - gap: 1rem; - min-height: 400px; - max-width: 1152px; - margin: 6rem auto 0; - border-radius: 10px; -} - -.custom-layout h1 { - font-size: 1.75rem; - font-weight: 600; -} - -.custom-layout .btn { - background-color: var(--vp-button-brand-bg); - color: var(--vp-button-brand-text); - border-radius: 20px; - padding: 0.5rem 1.4rem; -} - dt.defined-term { color: var(--vp-c-brand) !important; text-transform: uppercase; diff --git a/docs/index.md b/docs/index.md index 3eb52b0d..2f8236bb 100644 --- a/docs/index.md +++ b/docs/index.md @@ -48,6 +48,38 @@ head:
- +
+ +
+ From 28bc3340fc6d4967aa92a47bd543a81298185326 Mon Sep 17 00:00:00 2001 From: FichteFoll Date: Sun, 29 Oct 2023 21:48:20 +0100 Subject: [PATCH 2/3] Use a single VPTeamMembers component Here, we use max-height and `overflow: hidden` to display at most 2 rows of contributors, regardless of the page width. For this, we explicitly need to set a height for all items. Since we don't know ahead of time how many those will be, we might as well "render" everything at once, even though it will be hidden. At least FireFox would download the avatars of all images on the page regardless, also when `display: none` was used on a parent DOM element. Also make the "button" to expand the list show a pointer. --- docs/.vitepress/components/Contributors.vue | 53 ++++++++++----------- 1 file changed, 26 insertions(+), 27 deletions(-) diff --git a/docs/.vitepress/components/Contributors.vue b/docs/.vitepress/components/Contributors.vue index b591f6bc..00796f7b 100644 --- a/docs/.vitepress/components/Contributors.vue +++ b/docs/.vitepress/components/Contributors.vue @@ -5,11 +5,7 @@ - - - - - +