Skip to content

Commit

Permalink
Merge pull request #16 from longbridgeapp/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
ihavecoke authored Nov 6, 2023
2 parents d5965f9 + 80e9776 commit 8ad04bb
Show file tree
Hide file tree
Showing 137 changed files with 594 additions and 1,762 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/download_feishu_pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ on:
push:
branches:
- feishu/*
pull_request:
branches:
- dev
jobs:
download_feishu_pages:
name: Download feishu pages
Expand Down Expand Up @@ -33,7 +36,7 @@ jobs:
- name: Copy feishu pages to repo
run: |
bun install
bun run setup:vitepress
bun run setup
- name: Commit feishu pages to repo
run: |
Expand Down
6 changes: 4 additions & 2 deletions .vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export default defineConfig({
appearance: false,
lang: "zh-HK",
cleanUrls: true,
srcExclude: ["SUMMARY.md"],
srcExclude: ["SUMMARY.md", 'zh-HK.md', "zh-CN.md", "en.md"],
srcDir: "locales",
lastUpdated: true,
head: [
Expand All @@ -84,6 +84,7 @@ export default defineConfig({
lang: "en",
link: "/en/docs",
themeConfig: {
siteTitle: "Whale docs",
editLink: {
pattern: editLinkPattern,
},
Expand All @@ -94,6 +95,7 @@ export default defineConfig({
lang: "zh-CN",
link: "/zh-CN/docs",
themeConfig: {
siteTitle: "帮助中心",
editLink: {
pattern: editLinkPattern,
text: "在 GitHub 上编辑此页",
Expand All @@ -109,6 +111,7 @@ export default defineConfig({
lang: "zh-HK",
link: "/zh-HK/docs",
themeConfig: {
siteTitle: "幫助中心",
editLink: {
pattern: editLinkPattern,
text: "在 GitHub 上编辑此页",
Expand All @@ -123,7 +126,6 @@ export default defineConfig({

// https://vitepress.dev/reference/default-theme-config
themeConfig: {
siteTitle: "",
logo: "https://assets.lbkrs.com/uploads/d29e591d-0c3d-4def-b837-cd06dfb4d738/whale-logo.svg",
nav: [{ text: "Whale Home", link: "https://longbridgewhale.com" }],
sidebar: {
Expand Down
21 changes: 20 additions & 1 deletion .vitepress/theme/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import DefaultTheme from "vitepress/theme";
import "../../style.scss";
import "./style.scss";
import VPBadge from "vitepress/dist/client/theme-default/components/VPBadge.vue";
import mediumZoom from "medium-zoom";
import { useRoute } from "vitepress";
import { onMounted, watch, nextTick } from "vue";

const theme = {
...DefaultTheme,
enhanceApp: (ctx) => {
Expand All @@ -10,5 +14,20 @@ const theme = {
window.WhaleDocs = ctx;
}
},
setup() {
// Support zooming images
const route = useRoute();
const initZoom = () => {
new mediumZoom(".content-container .main img", { background: "#dddde3" });
};
onMounted(() => {
initZoom();
});
watch(
() => route.path,
() => nextTick(() => initZoom()),
);

},
};
export default theme;
22 changes: 22 additions & 0 deletions style.scss → .vitepress/theme/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,25 @@ ol {
.grid {
margin: 1.5em 0;
}

/* medium plugin styles*/
.medium-zoom-overlay {
z-index: 9998;
}

.medium-zoom-image {
z-index: 9999;
}

/* overwrite vitepress components styles*/
.VPNavBarTitle {
.VPImage {
margin-right: 24px;
}
}

.level-0 {
.items {
padding-left: 16px;
}
}
Binary file modified bun.lockb
Binary file not shown.
Loading

0 comments on commit 8ad04bb

Please sign in to comment.