Skip to content

Commit 23fef83

Browse files
committed
better notification banner
1 parent 16ed986 commit 23fef83

File tree

3 files changed

+66
-5
lines changed

3 files changed

+66
-5
lines changed

docs/.vitepress/theme/Layout.vue

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
<script setup>
2+
import DefaultTheme from 'vitepress/theme'
3+
4+
const { Layout } = DefaultTheme
5+
</script>
6+
7+
<template>
8+
<Layout>
9+
<template #layout-top>
10+
<div class="preview-banner">
11+
<strong>Developer Preview</strong> — This project is in active development. APIs may change.
12+
<a href="https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/issues" target="_blank">Provide feedback</a>
13+
</div>
14+
</template>
15+
</Layout>
16+
</template>
17+
18+
<style scoped>
19+
.preview-banner {
20+
background: linear-gradient(90deg, #0070d2 0%, #00a1e0 100%);
21+
color: white;
22+
text-align: center;
23+
padding: 8px 16px;
24+
font-size: 14px;
25+
position: relative;
26+
z-index: 100;
27+
}
28+
29+
.preview-banner a {
30+
color: white;
31+
text-decoration: underline;
32+
margin-left: 8px;
33+
}
34+
35+
.preview-banner a:hover {
36+
opacity: 0.9;
37+
}
38+
</style>
39+
40+
<style>
41+
:root {
42+
--vp-banner-height: 38px;
43+
}
44+
45+
.VPNav {
46+
top: var(--vp-banner-height) !important;
47+
}
48+
49+
.VPSidebar {
50+
top: calc(var(--vp-nav-height) + var(--vp-banner-height)) !important;
51+
height: calc(100vh - var(--vp-nav-height) - var(--vp-banner-height)) !important;
52+
}
53+
54+
.VPContent {
55+
padding-top: var(--vp-banner-height) !important;
56+
}
57+
58+
.VPLocalNav {
59+
top: calc(var(--vp-nav-height) + var(--vp-banner-height)) !important;
60+
}
61+
</style>

docs/.vitepress/theme/index.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
import DefaultTheme from 'vitepress/theme';
2+
import Layout from './Layout.vue';
23
import './custom.css';
34

4-
export default DefaultTheme;
5+
export default {
6+
extends: DefaultTheme,
7+
Layout,
8+
};

docs/index.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,3 @@ features:
2626
- title: SDK Library
2727
details: Use the @salesforce/b2c-tooling-sdk package to build your own integrations.
2828
---
29-
30-
::: info Developer Preview
31-
This project is currently in **Developer Preview**. Not all features are implemented, and the API may change in future releases. Please provide feedback via GitHub issues.
32-
:::

0 commit comments

Comments
 (0)