mirror of
https://github.com/woodchen-ink/md-wechat.git
synced 2025-07-17 21:22:02 +08:00
refactor(index.html, package-lock.json, src/components/CodemirrorEditor/EditorHeader/index.vue, src/config/theme.ts, src/stores/index.ts): Update favicon, scripts, and theme settings
Update MathJax script source, remove unused HelpDropdown component, adjust theme padding, and change default Mac code block setting
This commit is contained in:
parent
eb4ef9f660
commit
e3c92e9732
20
index.html
20
index.html
@ -10,11 +10,7 @@
|
||||
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"
|
||||
/>
|
||||
<title>微信 Markdown 编辑器 | Doocs 开源社区</title>
|
||||
<link rel="shortcut icon" href="https://cdn-doocs.oss-cn-shenzhen.aliyuncs.com/gh/doocs/md/images/favicon.png" />
|
||||
<link
|
||||
rel="apple-touch-icon-precomposed"
|
||||
href="https://cdn-doocs.oss-cn-shenzhen.aliyuncs.com/gh/doocs/md/images/1648303220922-7e14aefa-816e-44c1-8604-ade709ca1c69.png"
|
||||
/>
|
||||
<link rel="shortcut icon" href="./assets/favicon.png" />
|
||||
<style>
|
||||
.loading {
|
||||
position: fixed;
|
||||
@ -74,17 +70,7 @@
|
||||
<strong>Please enable JavaScript to continue.</strong>
|
||||
</noscript>
|
||||
<div id="app">
|
||||
<div class="loading">
|
||||
<strong>致力于让 Markdown 编辑更简单</strong>
|
||||
<p class="txt">正在加载编辑器</p>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
const theme = localStorage.getItem('vueuse-color-scheme')
|
||||
if (theme === 'dark' || (theme === 'auto' && window.matchMedia('(prefers-color-scheme: dark)').matches)) {
|
||||
document.querySelector('.loading').classList.add('dark')
|
||||
}
|
||||
</script>
|
||||
<script>
|
||||
MathJax = {
|
||||
loader: { load: ['[tex]/ams'] },
|
||||
@ -92,8 +78,8 @@
|
||||
svg: { fontCache: 'none' },
|
||||
}
|
||||
</script>
|
||||
<script id="MathJax-script" src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js"></script>
|
||||
<script id="MathJax-script" src="https://i-aws.czl.net/jsdelivr/npm/mathjax@3/es5/tex-svg.js"></script>
|
||||
<script type="module" src="/src/main.ts"></script>
|
||||
</body>
|
||||
<script src="https://cdn-doocs.oss-cn-shenzhen.aliyuncs.com/gh/wechatsync/article-syncjs@latest/dist/main.js"></script>
|
||||
<script src="./assets/js/js.js"></script>
|
||||
</html>
|
||||
|
24
package-lock.json
generated
24
package-lock.json
generated
@ -1527,9 +1527,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@eslint/plugin-kit": {
|
||||
"version": "0.2.0",
|
||||
"resolved": "https://registry.npmmirror.com/@eslint/plugin-kit/-/plugin-kit-0.2.0.tgz",
|
||||
"integrity": "sha512-vH9PiIMMwvhCx31Af3HiGzsVNULDbyVkHXwlemn/B0TFj/00ho3y55efXrUZTfQipxoHC5u4xq6zblww1zm1Ig==",
|
||||
"version": "0.2.3",
|
||||
"resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.3.tgz",
|
||||
"integrity": "sha512-2b/g5hRmpbb1o4GnTZax9N9m0FXzz9OV42ZzI4rDDMDuHUqigAiQCEWChBWCY4ztAGVRjoWT19v0yMmc5/L5kA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"levn": "^0.4.1"
|
||||
@ -4336,9 +4336,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/cross-spawn": {
|
||||
"version": "7.0.3",
|
||||
"resolved": "https://registry.npmmirror.com/cross-spawn/-/cross-spawn-7.0.3.tgz",
|
||||
"integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==",
|
||||
"version": "7.0.6",
|
||||
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",
|
||||
"integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==",
|
||||
"dependencies": {
|
||||
"path-key": "^3.1.0",
|
||||
"shebang-command": "^2.0.0",
|
||||
@ -5383,9 +5383,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/elliptic": {
|
||||
"version": "6.5.7",
|
||||
"resolved": "https://registry.npmmirror.com/elliptic/-/elliptic-6.5.7.tgz",
|
||||
"integrity": "sha512-ESVCtTwiA+XhY3wyh24QqRGBoP3rEdDUl3EDUUo9tft074fi19IrdpH7hLCMMP3CIj7jb3W96rn8lt/BqIlt5Q==",
|
||||
"version": "6.6.1",
|
||||
"resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.6.1.tgz",
|
||||
"integrity": "sha512-RaddvvMatK2LJHqFJ+YA4WysVN5Ita9E35botqIYspQ4TkRAlCicdzKOjlyv/1Za5RyTNn7di//eEV0uTAfe3g==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"bn.js": "^4.11.9",
|
||||
@ -9585,9 +9585,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/npm-run-all/node_modules/cross-spawn": {
|
||||
"version": "6.0.5",
|
||||
"resolved": "https://registry.npmmirror.com/cross-spawn/-/cross-spawn-6.0.5.tgz",
|
||||
"integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==",
|
||||
"version": "6.0.6",
|
||||
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.6.tgz",
|
||||
"integrity": "sha512-VqCUuhcd1iB+dsv8gxPttb5iZh/D0iubSP21g36KXdEuf6I5JiioesUVjpCdHV9MZRUfVFlvwtIUyPfxo5trtw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"nice-try": "^1.0.4",
|
||||
|
@ -1,23 +0,0 @@
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
|
||||
import AboutDialog from './AboutDialog.vue'
|
||||
|
||||
const aboutDialogVisible = ref(false)
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<MenubarMenu>
|
||||
<MenubarTrigger>
|
||||
帮助
|
||||
</MenubarTrigger>
|
||||
<MenubarContent align="start">
|
||||
<MenubarItem @click="aboutDialogVisible = true">
|
||||
<el-icon class="mr-2 h-4 w-4" />
|
||||
<span>关于</span>
|
||||
</MenubarItem>
|
||||
</MenubarContent>
|
||||
</MenubarMenu>
|
||||
|
||||
<AboutDialog :visible="aboutDialogVisible" @close="aboutDialogVisible = false" />
|
||||
</template>
|
@ -40,7 +40,6 @@ import { nextTick } from 'vue'
|
||||
import EditDropdown from './EditDropdown.vue'
|
||||
|
||||
import FileDropdown from './FileDropdown.vue'
|
||||
import HelpDropdown from './HelpDropdown.vue'
|
||||
|
||||
import PostInfo from './PostInfo.vue'
|
||||
import StyleDropdown from './StyleDropdown.vue'
|
||||
@ -195,7 +194,6 @@ function customStyle() {
|
||||
</MenubarMenu>
|
||||
<EditDropdown />
|
||||
<StyleDropdown />
|
||||
<HelpDropdown />
|
||||
</Menubar>
|
||||
|
||||
<Popover>
|
||||
|
@ -24,13 +24,14 @@ const defaultTheme: Theme = {
|
||||
// 二级标题
|
||||
h2: {
|
||||
'display': `table`,
|
||||
'padding': `0 0.2em`,
|
||||
'padding': `0 0.5em`,
|
||||
'margin': `4em auto 2em`,
|
||||
'color': `#fff`,
|
||||
'background': `var(--md-primary-color)`,
|
||||
'font-size': `1.2em`,
|
||||
'font-weight': `bold`,
|
||||
'text-align': `center`,
|
||||
'border-radius': `4px`,
|
||||
},
|
||||
|
||||
// 三级标题
|
||||
|
@ -17,7 +17,7 @@ export const useStore = defineStore(`store`, () => {
|
||||
const toggleDark = useToggle(isDark)
|
||||
|
||||
// 是否开启 Mac 代码块
|
||||
const isMacCodeBlock = useStorage(`isMacCodeBlock`, true)
|
||||
const isMacCodeBlock = useStorage(`isMacCodeBlock`, false)
|
||||
const toggleMacCodeBlock = useToggle(isMacCodeBlock)
|
||||
|
||||
// 是否在左侧编辑
|
||||
@ -25,7 +25,7 @@ export const useStore = defineStore(`store`, () => {
|
||||
const toggleEditOnLeft = useToggle(isEditOnLeft)
|
||||
|
||||
// 是否开启微信外链接底部引用
|
||||
const isCiteStatus = useStorage(`isCiteStatus`, false)
|
||||
const isCiteStatus = useStorage(`isCiteStatus`, true)
|
||||
const toggleCiteStatus = useToggle(isCiteStatus)
|
||||
|
||||
// 是否开启段落首行缩进
|
||||
|
Loading…
x
Reference in New Issue
Block a user