-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
basic tutorial layout using tailwind
- Loading branch information
Showing
19 changed files
with
650 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,26 @@ | ||
// https://vitepress.dev/guide/custom-theme | ||
import { h } from 'vue' | ||
import { useRoute } from 'vitepress' | ||
import Theme from 'vitepress/theme' | ||
import TutorialLayout from './tutorial/Layout.vue' | ||
import './custom.css' | ||
import './tutorial.css' | ||
|
||
export default { | ||
extends: Theme, | ||
Layout: () => { | ||
return h(Theme.Layout, null, { | ||
// https://vitepress.dev/guide/extending-default-theme#layout-slots | ||
}) | ||
const route = useRoute() | ||
if (/^\/tutorial\//.test(route.path)) { | ||
return h(TutorialLayout) | ||
} else { | ||
return h(Theme.Layout, null, { | ||
// https://vitepress.dev/guide/extending-default-theme#layout-slots | ||
}) | ||
} | ||
|
||
}, | ||
enhanceApp({ app, router, siteData }) { | ||
//app.component('tutorial', TutorialLayout) | ||
// ... | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
@tailwind base; | ||
@tailwind components; | ||
@tailwind utilities; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<template> | ||
<div>EDITOR</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<template> | ||
<div> | ||
FILES | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<template> | ||
<div class="Layout tutorial"> | ||
<VPNav :inert="false" /> | ||
|
||
<main class="flex flex-auto"> | ||
<article class="flex flex-col w-2/5"> | ||
<NavSelect /> | ||
<div class="flex-auto px-9 py-6 overflow-y-auto"> | ||
<Content class="w-full max-w-2xl mx-auto | vp-doc" /> | ||
</div> | ||
<Pager /> | ||
</article> | ||
<div class="flex flex-auto flex-col bg-neutral-800"> | ||
<div class="flex flex-auto border-b border-neutral-700"> | ||
<FileDrawer class="w-52 border-r border-neutral-700" /> | ||
<Editor class="flex-auto" /> | ||
</div> | ||
<div class="flex flex-col h-2/5"> | ||
<Terminal class="flex-auto" /> | ||
<StatusBar /> | ||
</div> | ||
</div> | ||
</main> | ||
</div> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import VPNav from 'vitepress/dist/client/theme-default/components/VPNav.vue' | ||
import Editor from './Editor.vue' | ||
import FileDrawer from './FileDrawer.vue' | ||
import NavSelect from './NavSelect.vue' | ||
import Pager from './Pager.vue' | ||
import StatusBar from './StatusBar.vue' | ||
import Terminal from './Terminal.vue' | ||
</script> | ||
|
||
<style scoped> | ||
.Layout { | ||
display: flex; | ||
flex-direction: column; | ||
min-height: 100vh; | ||
} | ||
.code-wrap .editor { | ||
flex: auto; | ||
} | ||
.terminal-wrap { | ||
display: flex; | ||
flex-direction: column; | ||
height: 38.2%; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<template> | ||
<div class="flex items-center h-12 px-4 py-3 bg-neutral-900"> | ||
Nav Select | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<template> | ||
<footer class="flex items-center h-12 text-14 bg-neutral-800"> | ||
<PagerLink :link="control.prev?.link">« Prev</PagerLink> | ||
<div class="flex-auto px-4 text-neutral-200 text-center"> | ||
Page x / y | ||
</div> | ||
<PagerLink :link="control.next?.link" class="text-right">Next »</PagerLink> | ||
</footer> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { usePrevNext } from 'vitepress/dist/client/theme-default/composables/prev-next' | ||
import PagerLink from './PagerLink.vue' | ||
const control = usePrevNext() | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<template> | ||
<component | ||
:is="linkComponent" | ||
:href="link" | ||
class="w-40 px-4 py-3" | ||
:class="!!link ? 'text-neutral-100 bg-neutral-700 hover:bg-neutral-600 transition-colors' : 'text-neutral-400'"> | ||
<slot></slot> | ||
</component> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { computed } from 'vue' | ||
const props = defineProps<{ | ||
link?: string | ||
}>() | ||
const linkComponent = computed(() => { | ||
return !!props.link ? 'a' : 'div' | ||
}) | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<template> | ||
<footer class="flex items-center justify-end h-12 text-14 bg-neutral-800"> | ||
<div class="w-40 px-4 py-3 text-neutral-100 bg-sky-600 hover:bg-sky-500 transition-colors cursor-pointer"> | ||
Solve | ||
</div> | ||
</footer> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<template> | ||
<div> | ||
TERMINAL | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,8 +14,11 @@ | |
}, | ||
"packageManager": "[email protected]", | ||
"devDependencies": { | ||
"autoprefixer": "^10.4.15", | ||
"markdown-it": "^13.0.1", | ||
"npm-run-all": "^4.1.5", | ||
"postcss": "^8.4.29", | ||
"tailwindcss": "^3.3.3", | ||
"typedoc": "^0.25.0", | ||
"typedoc-json-parser": "^8.2.0", | ||
"typedoc-plugin-markdown": "^3.16.0", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
export default { | ||
plugins: { | ||
tailwindcss: {}, | ||
autoprefixer: {}, | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/** @type {import('tailwindcss').Config} */ | ||
export default { | ||
content: [ | ||
"./**/*/index.md", | ||
"./.vitepress/**/*.{vue,js,ts,jsx,tsx}", | ||
], | ||
theme: { | ||
fontSize: { | ||
'12': '0.75rem', | ||
'14': '0.875rem', | ||
'16': '1rem', | ||
'18': '1.125rem', | ||
'20': '1.25rem', | ||
'24': '1.5rem', | ||
'28': '1.75rem', | ||
'32': '2rem', | ||
'36': '2.25rem', | ||
'42': '2.625rem', | ||
'48': '3rem', | ||
}, | ||
|
||
extend: {}, | ||
}, | ||
plugins: [], | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
layout: tutorial | ||
--- | ||
|
||
# Next | ||
|
||
Moving on |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
sidebar: false | ||
--- | ||
|
||
# Tutorial | ||
|
||
Starting here |
Oops, something went wrong.