forked from Kholid060/MkDown2
-
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.
- Loading branch information
Showing
99 changed files
with
3,421 additions
and
2,142 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
 | ||
|
||
# MkDown | ||
|
||
MkDown is an online markdown editor built with [vueJs](https://vuejs.org) | ||
|
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -2,5 +2,6 @@ module.exports = { | |
plugins: { | ||
tailwindcss: {}, | ||
autoprefixer: {}, | ||
'postcss-nested': {}, | ||
}, | ||
}; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
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,40 +1,42 @@ | ||
<template> | ||
<div class="app"> | ||
<router-view v-if="retrieved" /> | ||
<router-view /> | ||
<div | ||
class="h-full w-full absolute splash" | ||
v-else> | ||
<div class="content"> | ||
<h1 class="text-6xl font-bold">MkDown</h1> | ||
<p class="text-2xl text-lighter">Online Markdown Editor</p> | ||
<p class="text-lighter mt-6">Loading...</p> | ||
v-if="needRefresh" | ||
class="absolute p-5 absolute z-50 bottom-0 right-0 bg-gray-700 m-5 max-w-xs shadow-xl rounded-xl" | ||
> | ||
<p class="leading-tight">New content available, click on reload button to update.</p> | ||
<div class="space-x-2 flex mt-4"> | ||
<ui-button class="w-64" @click="needRefresh = false">Close</ui-button> | ||
<ui-button variant="primary" class="w-64" @click="updateServiceWorker">Reload</ui-button> | ||
</div> | ||
</div> | ||
</div> | ||
</template> | ||
<script> | ||
import { ref, computed, watch, onMounted } from 'vue'; | ||
import { useRoute } from 'vue-router'; | ||
import { useStore } from 'vuex'; | ||
import { useRegisterSW } from 'virtual:pwa-register/vue'; | ||
export default { | ||
data: () => ({ | ||
retrieved: false, | ||
}), | ||
watch: { | ||
activeFile({ title }) { | ||
document.title = title; | ||
}, | ||
}, | ||
computed: { | ||
activeFile() { | ||
return this.$store.getters['files/activeFile']; | ||
}, | ||
}, | ||
created() { | ||
if (this.$route.name === 'Home') { | ||
this.$store.dispatch('retrieve').then(() => { | ||
this.retrieved = true; | ||
}); | ||
} else { | ||
this.retrieved = true; | ||
} | ||
setup() { | ||
const store = useStore(); | ||
const { needRefresh, updateServiceWorker } = useRegisterSW(); | ||
watch( | ||
() => store.state.files.activeFile, | ||
() => { | ||
const activeFile = store.getters['files/active']; | ||
document.title = activeFile.title; | ||
} | ||
); | ||
return { | ||
needRefresh, | ||
updateServiceWorker, | ||
}; | ||
}, | ||
}; | ||
</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,15 @@ | ||
body { | ||
font-family: 'Inter', sans-serif; | ||
color: theme('colors.gray.50'); | ||
background-color: theme('colors.gray.800'); | ||
} | ||
|
||
.preview-content { | ||
@apply py-8 px-4 mx-auto w-full; | ||
} | ||
|
||
@screen lg { | ||
.preview-content { | ||
@apply w-8/12; | ||
} | ||
} |
Oops, something went wrong.