Skip to content

Commit 0e43f6d

Browse files
authored
Instance user management and image zoom (#240)
* Instance user management and image zoom * Updated image * removed plan tag * formatting fixes * minor fixes
1 parent 5c9f931 commit 0e43f6d

29 files changed

Lines changed: 378 additions & 98 deletions

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

0 commit comments

Comments
Β (0)