aboutsummaryrefslogtreecommitdiff
path: root/communities/red-right-hand/vitepress/.vitepress/theme/index.js
blob: f8f80fc867027f08c790546fd01dcc35ac057cc1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// https://vitepress.dev/guide/custom-theme
import { h } from "vue";
import DefaultTheme from "vitepress/theme";
import "./style.css";

import ReloadPrompt from "./components/ReloadPrompt.vue";

import { enhanceAppWithTabs } from "vitepress-plugin-tabs/client";

/** @type {import('vitepress').Theme} */
export default {
  extends: DefaultTheme,
  Layout: () => {
    return h(DefaultTheme.Layout, null, {
      // https://vitepress.dev/guide/extending-default-theme#layout-slots
      "doc-before": () =>
        h(
          "p",
          {
            style: {
              backgroundColor: "yellow",
              color: "#111",
              padding: "0.75rem 1rem",
              fontWeight: "600",
              display: "block",
              marginBottom: "1rem",
            },
          },
          "WARNING: This documentation is very early and incomplete. It may contain inaccurate or missing content. Do not rely on this information yet. For official information, please refer to the classified channels or contact your commanding officer.",
        ),
      "layout-bottom": () => h(ReloadPrompt),
    });
  },
  enhanceApp({ app, router, siteData }) {
    enhanceAppWithTabs(app);
  },
};