-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.vue
More file actions
executable file
·174 lines (144 loc) · 3.24 KB
/
App.vue
File metadata and controls
executable file
·174 lines (144 loc) · 3.24 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
<template>
<v-app id="home">
<!-- ====================================================== App Bar -->
<AppBar
@changed-theme="updateCodeBlockTheme"
@updated-drawer="toggleDrawer"
/>
<!-- ====================================================== Menu -->
<MenuComponent v-model="drawer" />
<!-- ====================================================== Main Container -->
<v-main class="pb-10">
<v-container
class="px-7"
style="max-width: 1368px;"
>
<DocsPage />
</v-container>
</v-main>
</v-app>
</template>
<script setup lang="ts">
import Prism from 'prismjs';
import { useDisplay } from 'vuetify';
import MenuComponent from './documentation/components/MenuComponent.vue';
import DocsPage from './documentation/DocsPage.vue';
import AppBar from './documentation/layout/AppBar.vue';
import { useCoreStore } from './stores/index';
import 'prismjs/components/prism-typescript.js';
onMounted(() => {
Prism.highlightAll();
});
const { smAndUp } = useDisplay();
const isSmAndUp = computed<boolean>(() => smAndUp.value);
const store = useCoreStore();
const drawer = ref<boolean>(isSmAndUp.value);
const drawerOptions: Ref<Docs.DrawerOptions> = ref<Docs.DrawerOptions>({
absolute: false,
color: '',
elevation: 10,
});
const codeBlockPlugin: string = 'prismjs';
const codeBlockLightTheme: string = 'tomorrow';
const codeBlockDarkTheme: string = 'tomorrow';
const codeBlockSettings: Ref<Docs.CodeBlockSettings> = ref<Docs.CodeBlockSettings>({
plugin: codeBlockPlugin,
theme: codeBlockDarkTheme,
});
function updateCodeBlockTheme(val: string): void {
codeBlockSettings.value.theme = codeBlockLightTheme;
if (val === 'dark') {
codeBlockSettings.value.theme = codeBlockDarkTheme;
}
}
provide<Docs.CodeBlockSettings>('codeBlockSettings', codeBlockSettings.value);
provide<Docs.DrawerOptions>('drawerOptions', drawerOptions.value);
provide<Docs.Links>('links', store.links);
function toggleDrawer(): void {
drawer.value = !drawer.value;
}
</script>
<style lang="scss">
:root {
--list-item-padding-left: 50px;
--list-item-level-3-padding-left: 26px;
}
html {
scroll-behavior: smooth;
scroll-padding-top: 70px;
}
a {
&:not(.v-list-item, .v-btn, .v-icon, .app-link) {
color: #bb86fc;
&:hover {
color: #b39ddb;
}
}
}
.v-theme--light {
a {
&:not(.v-list-item, .v-btn, .v-icon, .app-link) {
color: #6200ee;
&:hover {
color: #3700b3;
}
}
}
}
.top-app-bar {
z-index: 99 !important;
.nav-drawer-btn {
.nav-drawer-icon {
height: 18px;
width: 18px;
}
}
}
.v-heading {
position: relative;
> a {
color: rgb(var(--v-theme-primary));
display: inline-block;
inset: 0;
margin: 0 -0.7em;
position: absolute;
&:hover {
color: rgb(var(--v-theme-primary));
}
&:not(:hover, :focus) {
opacity: 0;
}
}
&.text-secondary {
> a {
color: rgb(var(--v-theme-secondary));
}
}
}
.name-item:not(:hover, :focus) span {
opacity: 0;
}
.v-divider {
margin: 0;
}
</style>
<style lang="scss" scoped>
:deep(pre),
:deep(code) {
&.ic {
background-color: rgb(255 255 255 / 10%) !important;
border-radius: 3px;
font-size: 85%;
font-weight: normal;
padding: 0.2em 0.4em;
}
}
.v-theme--light {
:deep(pre),
:deep(code) {
&.ic {
background-color: rgb(0 0 0 / 10%) !important;
}
}
}
</style>