Skip to content

Commit

Permalink
chore(deps): update deps and eslint config
Browse files Browse the repository at this point in the history
  • Loading branch information
FuckDoctors committed Feb 28, 2024
1 parent c59a9d9 commit a893370
Show file tree
Hide file tree
Showing 32 changed files with 1,830 additions and 2,379 deletions.
34 changes: 0 additions & 34 deletions .eslintrc

This file was deleted.

1 change: 1 addition & 0 deletions .markdownlint.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"AutoCatalog",
"Catalog",
"Replit",
"SiteInfo",
"Hanzi"
]
}
Expand Down
4 changes: 2 additions & 2 deletions .stylelintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ module.exports = {
// Enables parsing of vue files. Required since Stylelint 14 (along with postcss-html)
'stylelint-config-html/vue',
// Extends both the standard css as well as standard scss configs (includes both packages)
'stylelint-config-standard-scss',
// 'stylelint-config-standard-scss',
// Enforce a standard order for CSS properties
'stylelint-config-hudochenkov/full',
// Tweaks stylelint rules to accept css modules specific syntax.
// 'stylelint-config-css-modules',
// Turns of all the rules that would interfere with Prettier
'stylelint-config-prettier',
// 'stylelint-config-prettier',
],
}
10 changes: 6 additions & 4 deletions docs/.vuepress/client.ts
Original file line number Diff line number Diff line change
@@ -1,25 +1,27 @@
// import { defineClientConfig } from '@vuepress/client'
import { ClientConfig } from '@vuepress/client'
import type { ClientConfig } from '@vuepress/client'

import AutoArticleListLayout from './theme/layouts/AutoArticleListLayout'
import AutoArticleList from './theme/components/AutoArticleList'
import Hanzi from './theme/components/hanzi/Hanzi.vue'

// 为项目主页的特性添加闪光效果
import 'vuepress-theme-hope/presets/shinning-feature-panel.scss'

// 为页面图标添加鼠标悬停的跳动效果
import 'vuepress-theme-hope/presets/bounce-icon.scss'

const defineClientConfig = (clientConfig: ClientConfig = {}): ClientConfig =>
clientConfig
function defineClientConfig(clientConfig: ClientConfig = {}): ClientConfig {
return clientConfig
}

export default defineClientConfig({
// You can override or add layouts here
layouts: {
AutoArticleListLayout,
},

enhance: ({ app, router, siteData }) => {
enhance: ({ app }) => {
app.component('AutoArticleList', AutoArticleList)
app.component('Hanzi', Hanzi)
},
Expand Down
3 changes: 2 additions & 1 deletion docs/.vuepress/config.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import process from 'node:process'
import { defineUserConfig } from 'vuepress'
import { docsearchPlugin } from '@vuepress/plugin-docsearch'
import { seoPlugin } from '@vuepress/plugin-seo'
Expand All @@ -7,7 +8,7 @@ import { sitemapPlugin } from '@vuepress/plugin-sitemap'
import { themeOptions } from './theme.js'
import themeZhaobc from './theme/index'

import { docsearch, seo, pwa } from './plugin-config'
import { docsearch, pwa, seo } from './plugin-config'

const base = (process.env.BASE as '/' | `/${string}/`) || '/'

Expand Down
2 changes: 1 addition & 1 deletion docs/.vuepress/plugin-config/docsearch.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { DocsearchPluginOptions } from '@vuepress/plugin-docsearch'
import type { DocsearchPluginOptions } from '@vuepress/plugin-docsearch'

export const docsearch: DocsearchPluginOptions = {
// apiKey: '42aa919526e1dad9c0e214772fe71289',
Expand Down
11 changes: 6 additions & 5 deletions docs/.vuepress/public/assets/js/clarity.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
(function(c,l,a,r,i,t,y){
c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)};
t=l.createElement(r);t.async=1;t.src="https://www.clarity.ms/tag/"+i;
y=l.getElementsByTagName(r)[0];y.parentNode.insertBefore(t,y);
})(window, document, "clarity", "script", "g1boqnmsaf");
/*eslint-disable*/
(function (c, l, a, r, i, t, y) {
c[a] = c[a] || function () { (c[a].q = c[a].q || []).push(arguments) }
t = l.createElement(r); t.async = 1; t.src = `https://www.clarity.ms/tag/${i}`
y = l.getElementsByTagName(r)[0]; y.parentNode.insertBefore(t, y)
})(window, document, 'clarity', 'script', 'g1boqnmsaf')
2 changes: 1 addition & 1 deletion docs/.vuepress/public/zhaobc.site/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html>
<head>
<meta charset="UTF-8" />
Expand Down
8 changes: 4 additions & 4 deletions docs/.vuepress/public/zhaobc.site/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
function initTitleAnimation() {
document.querySelector('.domain').style.animation = 'bounceOut 1s'
document.querySelector('.domain').classList.add('bounceOut')
//document.querySelector('.domain').style.animation = 'hide 1s linear';
// document.querySelector('.domain').style.animation = 'hide 1s linear';
document.querySelector('.domain').classList.add('invisible')

// 为zhao,b,c,site设置blink和translate动画
Expand All @@ -22,13 +22,13 @@ function initTitleAnimation() {
'show 0.3s linear 2.2s 1 forwards'

// 恢复A developer's site
setTimeout(function () {
setTimeout(() => {
// document.querySelectorAll('.zhaobc-site').forEach(function() {
// this.style.animation = 'bounceIn 1s';
// this.style.animation = 'bounceIn 1s';
// });
/* eslint-disable-next-line no-var */
var items = document.querySelectorAll('.zhaobc-site')
;[].forEach.call(items, function (item) {
;[].forEach.call(items, item => {
item.style.animation = 'bounceIn 1s'
})
}, 2200)
Expand Down
4 changes: 3 additions & 1 deletion docs/.vuepress/styles/column-layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@
background: var(--bg-color);
width: 2rem;
text-align: center;
transition: color, background var(--color-transition);
transition:
color,
background var(--color-transition);
}
}

Expand Down
4 changes: 3 additions & 1 deletion docs/.vuepress/theme.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import { hopeTheme, ThemeOptions } from 'vuepress-theme-hope'
import process from 'node:process'
import type { ThemeOptions } from 'vuepress-theme-hope'
import { hopeTheme } from 'vuepress-theme-hope'

import * as navbar from './navbar'
import * as sidebar from './sidebar'
Expand Down
7 changes: 4 additions & 3 deletions docs/.vuepress/theme/components/AutoArticleList.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { type VNode, defineComponent, h, ref, computed } from 'vue'
import { type VNode, computed, defineComponent, h } from 'vue'

import BreadCrumb from '@theme-hope/components/BreadCrumb'
import MarkdownContent from '@theme-hope/components/MarkdownContent'
Expand All @@ -8,15 +8,16 @@ import { useArticles } from '@theme-hope/modules/blog/composables/index'

import '../styles/auto-article-list.scss'
import { useRouter } from 'vue-router'
import { usePageData } from '@vuepress/client'

// import { usePageData } from '@vuepress/client'

export default defineComponent({
name: 'AutoArticleList',

setup() {
const articles = useArticles()
const router = useRouter()
const page = usePageData()
// const page = usePageData()

const currRoute = router.currentRoute

Expand Down
52 changes: 20 additions & 32 deletions docs/.vuepress/theme/components/hanzi/Hanzi.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script setup>
import { ref, onMounted, shallowRef } from 'vue'
import { onMounted, ref, shallowRef } from 'vue'
import cnchar from 'cnchar'
import draw from 'cnchar-draw'
Expand All @@ -8,10 +8,10 @@ import radical from 'cnchar-radical'
import words from 'cnchar-words'
import voice from 'cnchar-voice'
cnchar.use(draw, order, radical, words, voice)
import { CARD_WIDTH } from './constants'
import './hanzi.css'
const props = defineProps({
zi: String,
pinyin: String,
Expand All @@ -35,6 +35,8 @@ const props = defineProps({
},
})
cnchar.use(draw, order, radical, words, voice)
const printRef = ref(null)
const aniRef = ref(null)
const writingRef = ref(null)
Expand Down Expand Up @@ -92,11 +94,11 @@ onMounted(() => {
}
})
const handleVoice = () => {
function handleVoice() {
cnchar.voice(props.zi)
}
const handlePlay = () => {
function handlePlay() {
writingRef.value.style.display = 'none'
aniRef.value.style.display = 'block'
Expand All @@ -109,7 +111,7 @@ const handlePlay = () => {
})
}
const handleWriting = () => {
function handleWriting() {
aniRef.value.style.display = 'none'
writingRef.value.style.display = 'block'
Expand All @@ -121,70 +123,56 @@ const handleWriting = () => {
},
})
}
import './hanzi.css'
</script>

<template>
<div class="hanzi-main-container">
<div class="hanzi-main">
<div class="hanzi-main__left">
<div class="hanzi-card print" ref="printRef"></div>
<div class="hanzi-card animation" ref="aniRef"></div>
<div class="hanzi-card writing" ref="writingRef"></div>
<div ref="printRef" class="hanzi-card print" />
<div ref="aniRef" class="hanzi-card animation" />
<div ref="writingRef" class="hanzi-card writing" />
<div class="hanzi-controls">
<button
class="btn btn-voice"
title="发音"
@click="handleVoice"
></button>
<button
class="btn btn-play"
title="笔划"
@click="handlePlay"
></button>
<button
class="btn btn-write"
title="书写"
@click="handleWriting"
></button>
<button class="btn-voice btn" title="发音" @click="handleVoice" />
<button class="btn-play btn" title="笔划" @click="handlePlay" />
<button class="btn-write btn" title="书写" @click="handleWriting" />
</div>
</div>
<div class="hanzi-main__right">
<div class="hanzi-detail">
<div class="hanzi-detail__top">
<div class="info pinyin">
<span class="tag">拼音</span>
<span class="content" ref="pinyinRef">{{
<span ref="pinyinRef" class="content">{{
props.pinyin || pinyinRet
}}</span>
</div>
<div class="info bushou">
<span class="tag">部首</span>
<span class="content" ref="bushouRef">{{
<span ref="bushouRef" class="content">{{
props.bushou || bushouRet[0].radical
}}</span>
</div>
<div class="info jiegou">
<span class="tag">结构</span>
<span class="content" ref="jiegouRef">{{
<span ref="jiegouRef" class="content">{{
props.jiegou || bushouRet[0].struct
}}</span>
</div>
<div class="info bihuashu">
<span class="tag">笔划数</span>
<span class="content" ref="bihuaRef">{{
<span ref="bihuaRef" class="content">{{
props.bihuashu || bihuaCountRet[0]
}}</span>
</div>
<div class="info bihua">
<span class="tag">笔划</span>
<span class="content" ref="bihuaRef">{{
<span ref="bihuaRef" class="content">{{
bihuaNameRet[0].join('-')
}}</span>
</div>
</div>
<div class="hanzi-detail__strokes" ref="strokesRef"></div>
<div ref="strokesRef" class="hanzi-detail__strokes" />
<div class="words-container">
{{ zuciRet.slice(0, 5).join(' ') }}&nbsp;
</div>
Expand Down
4 changes: 2 additions & 2 deletions docs/.vuepress/theme/layouts/AutoArticleListLayout.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { type VNode, defineComponent, h } from 'vue'

import { usePageData } from '@vuepress/client'
// import { usePageData } from '@vuepress/client'

import CommonWrapper from '@theme-hope/components/CommonWrapper'
import SkipLink from '@theme-hope/components/SkipLink'
Expand All @@ -12,7 +12,7 @@ export default defineComponent({
name: 'AutoArticleListLayout',

setup() {
const page = usePageData()
// const page = usePageData()

return (): VNode[] => [
h(SkipLink),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,4 +94,4 @@ python day-01-15/day-03/if-demo-triangle.py
[^海伦公式]:
海伦公式又译作希伦公式、海龙公式、希罗公式、海伦-秦九韶公式。它是利用三角形的三条边的边长直接求三角形面积的公式。表达式为:S=√p(p-a)(p-b)(p-c),它的特点是形式漂亮,便于记忆。

引用:https://baike.baidu.com/item/%E6%B5%B7%E4%BC%A6%E5%85%AC%E5%BC%8F/106956
引用:<https://baike.baidu.com/item/%E6%B5%B7%E4%BC%A6%E5%85%AC%E5%BC%8F/106956>
4 changes: 3 additions & 1 deletion docs/notes/frontend/vue/vue3/built-ins/transition.md
Original file line number Diff line number Diff line change
Expand Up @@ -704,7 +704,9 @@ const transitionName = ref('fade')
.slide-enter-active,
.slide-leave-active {
transition: opacity, transform 0.5s ease;
transition:
opacity,
transform 0.5s ease;
}
.slide-enter-from {
Expand Down
4 changes: 3 additions & 1 deletion docs/posts/theme/column-layout.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ head:
background: var(--bg-color);
width: 2rem;
text-align: center;
transition: color, background var(--color-transition);
transition:
color,
background var(--color-transition);
}
}

Expand Down
Loading

0 comments on commit a893370

Please sign in to comment.