Skip to content

Commit

Permalink
feat: markdown
Browse files Browse the repository at this point in the history
  • Loading branch information
idmytro committed Apr 16, 2023
1 parent 88c6712 commit 17f20c6
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 29 deletions.
6 changes: 4 additions & 2 deletions markdown/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Vue 3 + Vite
# Vite + Vue 3

npx degit idmytro/vue3-multi-starter/minimal myproject
```
npx degit idmytro/vue3-multi-starter/markdown myproject
```
25 changes: 1 addition & 24 deletions markdown/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,5 @@ import HelloWorld from './components/HelloWorld.vue'
</script>

<template>
<div>
<a href="https://vitejs.dev" target="_blank">
<img src="/vite.svg" class="logo" alt="Vite logo" />
</a>
<a href="https://vuejs.org/" target="_blank">
<img src="./assets/vue.svg" class="logo vue" alt="Vue logo" />
</a>
</div>
<HelloWorld msg="Vite + Vue" />
<HelloWorld />
</template>

<style scoped>
.logo {
height: 6em;
padding: 1.5em;
will-change: filter;
transition: filter 300ms;
}
.logo:hover {
filter: drop-shadow(0 0 2em #646cffaa);
}
.logo.vue:hover {
filter: drop-shadow(0 0 2em #42b883aa);
}
</style>
24 changes: 23 additions & 1 deletion markdown/src/components/HelloWorld.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<script setup>
import { ref } from 'vue'
import { VueComponent as Readme } from '../../README.md'
defineProps({
msg: String,
Expand All @@ -9,7 +10,16 @@ const count = ref(0)
</script>

<template>
<h1>{{ msg }}</h1>
<div>
<a href="https://vitejs.dev" target="_blank">
<img src="/vite.svg" class="logo" alt="Vite logo" />
</a>
<a href="https://vuejs.org/" target="_blank">
<img src="../assets/vue.svg" class="logo vue" alt="Vue logo" />
</a>
</div>

<Readme />

<div class="card">
<button type="button" @click="count++">count is {{ count }}</button>
Expand All @@ -34,6 +44,18 @@ const count = ref(0)
</template>

<style scoped>
.logo {
height: 6em;
padding: 1.5em;
will-change: filter;
transition: filter 300ms;
}
.logo:hover {
filter: drop-shadow(0 0 2em #646cffaa);
}
.logo.vue:hover {
filter: drop-shadow(0 0 2em #42b883aa);
}
.read-the-docs {
color: #888;
}
Expand Down
10 changes: 8 additions & 2 deletions markdown/vite.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import mdPlugin from 'vite-plugin-markdown'


// https://vitejs.dev/config/
export default defineConfig({
plugins: [vue()],
plugins: [
vue(),
mdPlugin.plugin({
mode: 'vue'
})
],
})

0 comments on commit 17f20c6

Please sign in to comment.