Skip to content

Commit d61d705

Browse files
committed
Merge branch 'dev' into main
2 parents 68c2a6f + 0dd7c62 commit d61d705

File tree

5 files changed

+89
-13
lines changed

5 files changed

+89
-13
lines changed

src/views/components/Code.vue

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
:class="tw`px-1 py-2 bg-gray-100 dark:bg-gray-800 overflow-auto`"
55
>
66
<Prism :language="lang === 'vue' ? 'html' : lang" :inline="inline">{{
7-
prettyCode
7+
formattedCode
88
}}</Prism>
99
</div>
1010
</template>
@@ -15,6 +15,7 @@ import { tw } from "twind";
1515
import Strip from "strip-indent";
1616
import PrismJs from "prismjs";
1717
import "prismjs/components/prism-json";
18+
import "prismjs/components/prism-bash";
1819
import "prismjs/plugins/line-numbers/prism-line-numbers.js";
1920
import Prism from "vue-prism-component";
2021
import { format } from "prettier/standalone";
@@ -34,7 +35,8 @@ export default defineComponent({
3435
lang: {
3536
type: String,
3637
default: "html",
37-
validator: (v: string) => ["js", "vue", "json", "html"].includes(v),
38+
validator: (v: string) =>
39+
["js", "vue", "json", "html", "bash"].includes(v),
3840
},
3941
inline: {
4042
type: Boolean,
@@ -61,14 +63,16 @@ export default defineComponent({
6163
plugins: [prettierPluginPackage],
6264
},
6365
};
64-
const prettierConfig = prettierConfigs?.[props?.lang];
65-
const prettyCode = computed(() =>
66-
format(Strip(props.code), prettierConfig)
66+
const prettierConfig = prettierConfigs?.[props.lang] ?? false;
67+
const formattedCode = computed(() =>
68+
prettierConfig
69+
? format(Strip(props.code), prettierConfig)
70+
: Strip(props.code)
6771
);
6872
onMounted(() => {
6973
PrismJs.highlightAll();
7074
});
71-
return { prettyCode, tw };
75+
return { formattedCode, tw };
7276
},
7377
});
7478
</script>

src/views/components/Footer.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
<template>
2-
<footer :class="tw`bg-gray-50 border-t border-gray-100 dark:bg-gray-800`">
2+
<footer
3+
:class="
4+
tw`bg-gray-50 border-t border-gray-100 dark:border-gray-700 dark:bg-gray-800`
5+
"
6+
>
37
<div
48
:class="tw`px-4 py-12 mx-auto overflow-hidden max-w-7xl sm:px-6 lg:px-8`"
59
>

src/views/pages/docs/install.vue

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,49 @@
33
<template #title> Installation </template>
44
<template #subtitle> Get started in seconds </template>
55
<template #notice>
6-
Vue Zephyr is actively being developed, however it is still very early. It
7-
is not recommended to use this in production. Please follow our Twitter
8-
account for updates.
6+
This project is in early development. There still may be significant
7+
changes in the future, so please use with caution. Follow us on
8+
<Anchor
9+
variant="primary"
10+
classAppend="space-x-1"
11+
classRemove="space-x-2"
12+
href="https://twitter.com/usezephyr"
13+
newTab
14+
>Twitter</Anchor
15+
>
16+
for updates.
917
</template>
1018
</DocHeader>
19+
<div :class="tw`my-12 space-y-12`">
20+
<section>
21+
<h3 :class="tw`font-medium text(gray-900 dark:gray-100 3xl)`">Install</h3>
22+
<div :class="tw`border(t gray-200 dark:gray-800) my-4`"></div>
23+
<div :class="tw`space-y-6`">
24+
<p>...</p>
25+
<div :class="tw`rounded-lg overflow-hidden`">
26+
<Code lang="bash" :code="codes.install" />
27+
</div>
28+
</div>
29+
</section>
30+
</div>
1131
</template>
1232

1333
<script lang="ts">
1434
import { defineComponent } from "vue";
1535
import DocHeader from "@/views/components/DocHeader.vue";
36+
import Code from "@/views/components/Code.vue";
37+
import { tw } from "twind";
1638
1739
export default defineComponent({
1840
components: {
1941
DocHeader,
42+
Code,
2043
},
2144
setup() {
22-
return {};
45+
const codes = {
46+
install: `npm i @usezephyr/vue-zephyr`,
47+
};
48+
return { codes, tw };
2349
},
2450
});
2551
</script>

src/views/pages/docs/prose.vue

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,28 @@
44
<template #subtitle
55
>Use Tailwind's typography plugin in component form</template
66
>
7-
<template #notice> This page is coming soon. </template>
7+
<template #notice>
8+
This component is coming soon. Please keep an eye on our
9+
<Anchor
10+
href="https://github.com/usezephyr/vue-zephyr"
11+
variant="primary"
12+
classAppend="space-x-1"
13+
classRemove="space-x-2"
14+
newTab
15+
>
16+
Github
17+
</Anchor>
18+
or follow us on
19+
<Anchor
20+
href="https://twitter.com/usezephyr"
21+
variant="primary"
22+
classAppend="space-x-1"
23+
classRemove="space-x-2"
24+
newTab
25+
>
26+
Twitter </Anchor
27+
>.
28+
</template>
829
</DocHeader>
930
</template>
1031

src/views/pages/docs/table.vue

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,28 @@
22
<DocHeader>
33
<template #title>Table</template>
44
<template #subtitle> Display data in table format </template>
5-
<template #notice> This page is coming soon. </template>
5+
<template #notice>
6+
This component is coming soon. Please keep an eye on our
7+
<Anchor
8+
href="https://github.com/usezephyr/vue-zephyr"
9+
variant="primary"
10+
classAppend="space-x-1"
11+
classRemove="space-x-2"
12+
newTab
13+
>
14+
Github
15+
</Anchor>
16+
or follow us on
17+
<Anchor
18+
href="https://twitter.com/usezephyr"
19+
variant="primary"
20+
classAppend="space-x-1"
21+
classRemove="space-x-2"
22+
newTab
23+
>
24+
Twitter </Anchor
25+
>.
26+
</template>
627
</DocHeader>
728
</template>
829

0 commit comments

Comments
 (0)