Skip to content

Commit a8aa690

Browse files
committed
Instance user management and image zoom
1 parent 224c2c0 commit a8aa690

29 files changed

+379
-95
lines changed

β€Ždocs/.vitepress/config.mtsβ€Ž

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ export default withMermaid(
138138
"Self-host Plane, integrate with our API, configure webhooks, and extend your project management platform.",
139139
},
140140
],
141-
["meta", { property: "og:image", content: "https://media.docs.plane.so/logo/og-docs.webp" }],
141+
["meta", { property: "og:image", content: "https://media.docs.plane.so/logo/og-docs.webp#hero" }],
142142
["meta", { property: "og:url", content: "https://developers.plane.so" }],
143143

144144
// Twitter Card meta tags
@@ -152,7 +152,7 @@ export default withMermaid(
152152
"Self-host Plane, integrate with our API, configure webhooks, and extend your project management platform.",
153153
},
154154
],
155-
["meta", { name: "twitter:image", content: "https://media.docs.plane.so/logo/og-docs.webp" }],
155+
["meta", { name: "twitter:image", content: "https://media.docs.plane.so/logo/og-docs.webp#hero" }],
156156
],
157157

158158
transformPageData(pageData) {
@@ -319,6 +319,7 @@ export default withMermaid(
319319
{ text: "View Logs", link: "/self-hosting/manage/view-logs" },
320320
{ text: "Migrate Plane", link: "/self-hosting/manage/migrate-plane" },
321321
{ text: "Prime CLI", link: "/self-hosting/manage/prime-cli" },
322+
{ text: "Manage users", link: "/self-hosting/manage/manage-instance-users" },
322323
],
323324
},
324325
{

β€Ždocs/.vitepress/theme/index.tsβ€Ž

Lines changed: 37 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
import DefaultTheme from "vitepress/theme";
22
import type { Theme } from "vitepress";
3-
import { onMounted, nextTick, h } from "vue";
3+
import { onMounted, watch, nextTick, h } from "vue";
4+
import { useRoute } from "vitepress";
45
import { enhanceAppWithTabs } from "vitepress-plugin-tabs/client";
6+
import mediumZoom from "medium-zoom";
57

68
import "./style.css";
79
import "vitepress-plugin-tabs/client";
@@ -126,27 +128,48 @@ export default {
126128
router.onAfterRouteChanged = () => {
127129
nextTick(() => {
128130
updateLayout();
129-
handleTabHash();
130-
setupTabHashUpdates();
131131
});
132132
};
133+
}
134+
},
135+
setup() {
136+
if (typeof window === "undefined") return;
137+
138+
const route = useRoute();
139+
let zoom: ReturnType<typeof mediumZoom> | null = null;
140+
141+
const initZoom = () => {
142+
zoom?.detach();
143+
zoom = mediumZoom(".vp-doc :not(a) > img:not(.VPImage)", {
144+
background: "rgba(0, 0, 0, 0.8)",
145+
});
146+
};
147+
148+
onMounted(() => {
149+
initZoom();
150+
151+
// Delay tab hash handling to ensure tabs are rendered
152+
setTimeout(() => {
153+
handleTabHash();
154+
setupTabHashUpdates();
155+
}, 100);
133156

134157
// Listen for hash changes
135158
window.addEventListener("hashchange", () => {
136159
nextTick(handleTabHash);
137160
});
138-
}
139-
},
140-
setup() {
141-
if (typeof window !== "undefined") {
142-
onMounted(() => {
143-
updateLayout();
144-
// Delay tab hash handling to ensure tabs are rendered
145-
setTimeout(() => {
161+
});
162+
163+
// Watch for route changes
164+
watch(
165+
() => route.path,
166+
() => {
167+
nextTick(() => {
168+
initZoom();
146169
handleTabHash();
147170
setupTabHashUpdates();
148-
}, 100);
149-
});
150-
}
171+
});
172+
},
173+
);
151174
},
152175
} satisfies Theme;

β€Ždocs/.vitepress/theme/style.cssβ€Ž

Lines changed: 195 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -663,3 +663,198 @@ a.VPLink.VPNavBarMenuLink[href*="sign-in"]:hover {
663663
background: #0078b8 !important;
664664
box-shadow: 0 2px 8px rgba(0, 99, 153, 0.35) !important;
665665
}
666+
667+
668+
/* ================================================
669+
HERO IMAGE STYLES
670+
================================================ */
671+
672+
.vp-doc p:has(> img[src$="#hero"]),
673+
article p:has(> img[src$="#hero"]) {
674+
max-width: 841px;
675+
padding: 36px 56px 0px 56px;
676+
background: #f1f3f3;
677+
border-radius: 12px;
678+
box-sizing: border-box;
679+
overflow: hidden;
680+
}
681+
682+
.vp-doc img[src$="#hero"],
683+
article img[src$="#hero"] {
684+
width: 100%;
685+
height: auto;
686+
display: block;
687+
margin: 0;
688+
border-radius: 8px 8px 0px 0px;
689+
border-width: 1px 1px 0px 1px;
690+
border-style: solid;
691+
border-color: #eaebeb;
692+
object-fit: cover;
693+
box-shadow:
694+
0px 2px 4px -1px rgba(41, 47, 61, 0.04),
695+
0px 4px 6px -1px rgba(41, 47, 61, 0.05);
696+
}
697+
698+
.vp-doc p:has(> img[src$="#hero-tl"]),
699+
article p:has(> img[src$="#hero-tl"]) {
700+
max-width: 841px;
701+
padding: 36px 0px 0px 56px;
702+
background: #f1f3f3;
703+
border-radius: 12px;
704+
box-sizing: border-box;
705+
overflow: hidden;
706+
}
707+
708+
.vp-doc img[src$="#hero-tl"],
709+
article img[src$="#hero-tl"] {
710+
width: 100%;
711+
height: auto;
712+
display: block;
713+
margin: 0;
714+
border-radius: 8px 0px 0px 0px;
715+
border-width: 1px 0px 0px 1px;
716+
border-style: solid;
717+
border-color: #eaebeb;
718+
object-fit: cover;
719+
box-shadow:
720+
0px 2px 4px -1px rgba(41, 47, 61, 0.04),
721+
0px 4px 6px -1px rgba(41, 47, 61, 0.05);
722+
}
723+
724+
.vp-doc p:has(> img[src$="#hero-tr"]),
725+
article p:has(> img[src$="#hero-tr"]) {
726+
max-width: 841px;
727+
padding: 36px 56px 0px 0px;
728+
background: #f1f3f3;
729+
border-radius: 12px;
730+
box-sizing: border-box;
731+
overflow: hidden;
732+
}
733+
734+
.vp-doc img[src$="#hero-tr"],
735+
article img[src$="#hero-tr"] {
736+
width: 100%;
737+
height: auto;
738+
display: block;
739+
margin: 0;
740+
border-radius: 0px 8px 0px 0px;
741+
border-width: 1px 1px 0px 0px;
742+
border-style: solid;
743+
border-color: #eaebeb;
744+
object-fit: cover;
745+
box-shadow:
746+
0px 2px 4px -1px rgba(41, 47, 61, 0.04),
747+
0px 4px 6px -1px rgba(41, 47, 61, 0.05);
748+
}
749+
750+
.vp-doc p:has(> img[src$="#hero-bl"]),
751+
article p:has(> img[src$="#hero-bl"]) {
752+
max-width: 841px;
753+
padding: 0px 0px 36px 56px;
754+
background: #f1f3f3;
755+
border-radius: 12px;
756+
box-sizing: border-box;
757+
overflow: hidden;
758+
}
759+
760+
.vp-doc img[src$="#hero-bl"],
761+
article img[src$="#hero-bl"] {
762+
width: 100%;
763+
height: auto;
764+
display: block;
765+
margin: 0;
766+
border-radius: 0px 0px 0px 8px;
767+
border-width: 0px 0px 1px 1px;
768+
border-style: solid;
769+
border-color: #eaebeb;
770+
object-fit: cover;
771+
box-shadow:
772+
0px 2px 4px -1px rgba(41, 47, 61, 0.04),
773+
0px 4px 6px -1px rgba(41, 47, 61, 0.05);
774+
}
775+
776+
.vp-doc p:has(> img[src$="#hero-br"]),
777+
article p:has(> img[src$="#hero-br"]) {
778+
max-width: 841px;
779+
padding: 0px 56px 36px 0px;
780+
background: #f1f3f3;
781+
border-radius: 12px;
782+
box-sizing: border-box;
783+
overflow: hidden;
784+
}
785+
786+
.vp-doc img[src$="#hero-br"],
787+
article img[src$="#hero-br"] {
788+
width: 100%;
789+
height: auto;
790+
display: block;
791+
margin: 0;
792+
border-radius: 0px 0px 8px 0px;
793+
border-width: 0px 1px 1px 0px;
794+
border-style: solid;
795+
border-color: #eaebeb;
796+
object-fit: cover;
797+
box-shadow:
798+
0px 2px 4px -1px rgba(41, 47, 61, 0.04),
799+
0px 4px 6px -1px rgba(41, 47, 61, 0.05);
800+
}
801+
802+
/* ================================================
803+
MOBILE IMAGE LAYOUT
804+
================================================ */
805+
806+
.mobile-img-container {
807+
display: flex;
808+
flex-direction: row;
809+
justify-content: center;
810+
align-items: center;
811+
flex-wrap: wrap;
812+
}
813+
814+
.mobile-img-box {
815+
display: flex;
816+
flex-direction: column;
817+
align-items: center;
818+
justify-content: center;
819+
max-width: 25rem;
820+
min-width: 15rem;
821+
text-align: center;
822+
margin: 10px;
823+
}
824+
825+
/* ================================================
826+
HOMEPAGE FEATURE ICONS - DARK MODE
827+
================================================ */
828+
829+
/* Feature card icons use currentColor in SVG, but since they're
830+
loaded as <img> tags, currentColor defaults to black. This filter
831+
inverts them for visibility in dark mode. */
832+
.dark .VPFeature .VPImage {
833+
filter: invert(1) hue-rotate(180deg);
834+
}
835+
836+
.dark .VPFeatures .VPFeature .icon img {
837+
filter: invert(1) hue-rotate(180deg);
838+
}
839+
840+
/* ================================================
841+
MEDIUM ZOOM - IMAGE LIGHTBOX
842+
================================================ */
843+
844+
.vp-doc img {
845+
cursor: zoom-in;
846+
}
847+
848+
.medium-zoom-overlay {
849+
z-index: 9999 !important;
850+
background: rgba(0, 0, 0, 0.8) !important;
851+
}
852+
853+
.medium-zoom-image {
854+
z-index: 10000 !important;
855+
}
856+
857+
.medium-zoom-image--opened {
858+
z-index: 10000 !important;
859+
cursor: zoom-out;
860+
}
-2.09 KB
Loading
-4.59 KB
Loading
-42.4 KB
Loading
-20.6 KB
Loading
17.7 KB
Loading
11.2 KB
Loading
24.8 KB
Loading

0 commit comments

Comments
Β (0)