refactor: simplify link to bv
This commit is contained in:
36
package.json
36
package.json
@@ -15,51 +15,51 @@
|
|||||||
"typecheck": "vue-tsc --noEmit"
|
"typecheck": "vue-tsc --noEmit"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@gtm-support/vue-gtm": "^1.4.0",
|
"@gtm-support/vue-gtm": "^1.6.0",
|
||||||
"@vueuse/core": "^8.4.2",
|
"@vueuse/core": "^8.6.0",
|
||||||
"@vueuse/head": "^0.7.6",
|
"@vueuse/head": "^0.7.6",
|
||||||
"nprogress": "^0.2.0",
|
"nprogress": "^0.2.0",
|
||||||
"pinia": "^2.0.14",
|
"pinia": "^2.0.14",
|
||||||
"prism-theme-vars": "^0.2.2",
|
"prism-theme-vars": "^0.2.3",
|
||||||
"vue": "^3.2.33",
|
"vue": "^3.2.36",
|
||||||
"vue-about-me": "^1.2.7",
|
"vue-about-me": "^1.2.7",
|
||||||
"vue-demi": "^0.12.5",
|
"vue-demi": "^0.13.1",
|
||||||
"vue-router": "^4.0.15"
|
"vue-router": "^4.0.15"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@antfu/eslint-config": "^0.23.0",
|
"@antfu/eslint-config": "^0.25.1",
|
||||||
"@iconify-json/fe": "^1.1.1",
|
"@iconify-json/fe": "^1.1.1",
|
||||||
"@iconify-json/gg": "^1.1.1",
|
"@iconify-json/gg": "^1.1.1",
|
||||||
"@iconify-json/ic": "^1.1.3",
|
"@iconify-json/ic": "^1.1.4",
|
||||||
"@iconify-json/mdi": "^1.1.12",
|
"@iconify-json/mdi": "^1.1.19",
|
||||||
"@iconify-json/ri": "^1.1.1",
|
"@iconify-json/ri": "^1.1.2",
|
||||||
"@types/markdown-it-link-attributes": "^3.0.1",
|
"@types/markdown-it-link-attributes": "^3.0.1",
|
||||||
"@types/nprogress": "^0.2.0",
|
"@types/nprogress": "^0.2.0",
|
||||||
"@vitejs/plugin-vue": "^2.3.3",
|
"@vitejs/plugin-vue": "^2.3.3",
|
||||||
"consola": "^2.15.3",
|
"consola": "^2.15.3",
|
||||||
"critters": "^0.0.16",
|
"critters": "^0.0.16",
|
||||||
"cross-env": "^7.0.3",
|
"cross-env": "^7.0.3",
|
||||||
"eslint": "^8.15.0",
|
"eslint": "^8.17.0",
|
||||||
"esno": "^0.14.1",
|
"esno": "^0.14.1",
|
||||||
"https-localhost": "^4.7.1",
|
"https-localhost": "^4.7.1",
|
||||||
"markdown-it-link-attributes": "^4.0.0",
|
"markdown-it-link-attributes": "^4.0.0",
|
||||||
"markdown-it-prism": "^2.2.4",
|
"markdown-it-prism": "^2.2.4",
|
||||||
"pnpm": "^7.0.1",
|
"pnpm": "^7.1.8",
|
||||||
"sass": "^1.51.0",
|
"sass": "^1.52.2",
|
||||||
"star-markdown-css": "^0.3.3",
|
"star-markdown-css": "^0.3.3",
|
||||||
"typescript": "^4.6.4",
|
"typescript": "^4.7.3",
|
||||||
"unocss": "^0.33.2",
|
"unocss": "^0.37.4",
|
||||||
"unplugin-auto-import": "^0.7.1",
|
"unplugin-auto-import": "^0.7.1",
|
||||||
"unplugin-vue-components": "^0.19.5",
|
"unplugin-vue-components": "^0.19.6",
|
||||||
"vite": "^2.9.9",
|
"vite": "^2.9.9",
|
||||||
"vite-plugin-inspect": "^0.5.0",
|
"vite-plugin-inspect": "^0.5.0",
|
||||||
"vite-plugin-md": "^0.13.1",
|
"vite-plugin-md": "^0.13.1",
|
||||||
"vite-plugin-pages": "^0.23.0",
|
"vite-plugin-pages": "^0.23.0",
|
||||||
"vite-plugin-pwa": "^0.12.0",
|
"vite-plugin-pwa": "^0.12.0",
|
||||||
"vite-plugin-vue-layouts": "^0.6.0",
|
"vite-plugin-vue-layouts": "^0.6.0",
|
||||||
"vite-ssg": "^0.20.0",
|
"vite-ssg": "0.20.1",
|
||||||
"vite-ssg-sitemap": "^0.2.6",
|
"vite-ssg-sitemap": "^0.2.7",
|
||||||
"vue-toastification": "^2.0.0-rc.5",
|
"vue-toastification": "^2.0.0-rc.5",
|
||||||
"vue-tsc": "^0.34.12"
|
"vue-tsc": "^0.36.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
1216
pnpm-lock.yaml
generated
1216
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -12,7 +12,7 @@ function run() {
|
|||||||
const csvData = fs.readFileSync(recipeCsvFile, 'utf-8')
|
const csvData = fs.readFileSync(recipeCsvFile, 'utf-8')
|
||||||
const lines = csvData.split(/\r?\n/)
|
const lines = csvData.split(/\r?\n/)
|
||||||
|
|
||||||
const headers = 'name,stuff,link,difficulty,tags,methods,tools,'
|
const headers = 'name,stuff,bv,difficulty,tags,methods,tools,'
|
||||||
if (lines[0].trim() !== headers) {
|
if (lines[0].trim() !== headers) {
|
||||||
consola.warn(`Headers Changed: ${lines[0]}`)
|
consola.warn(`Headers Changed: ${lines[0]}`)
|
||||||
return
|
return
|
||||||
@@ -29,7 +29,9 @@ function run() {
|
|||||||
name: attrs[0].trim(),
|
name: attrs[0].trim(),
|
||||||
stuff,
|
stuff,
|
||||||
emojis: generateEmojisFromStuff(stuff),
|
emojis: generateEmojisFromStuff(stuff),
|
||||||
link: attrs[2].trim(),
|
// link: attrs[2].trim(),
|
||||||
|
// bv id
|
||||||
|
bv: attrs[2].trim().replace('https://www.bilibili.com/video/', ''),
|
||||||
difficulty: attrs[3] && attrs[3].trim() as RecipeItem['difficulty'],
|
difficulty: attrs[3] && attrs[3].trim() as RecipeItem['difficulty'],
|
||||||
tags: attrs[4] ? attrs[4].trim().split(sep) : [],
|
tags: attrs[4] ? attrs[4].trim().split(sep) : [],
|
||||||
methods: attrs[5] ? (attrs[5].trim().split(sep)) as RecipeItem['methods'] : [],
|
methods: attrs[5] ? (attrs[5].trim().split(sep)) as RecipeItem['methods'] : [],
|
||||||
|
|||||||
1
src/auto-imports.d.ts
vendored
1
src/auto-imports.d.ts
vendored
@@ -133,6 +133,7 @@ declare global {
|
|||||||
const useDisplayMedia: typeof import('@vueuse/core')['useDisplayMedia']
|
const useDisplayMedia: typeof import('@vueuse/core')['useDisplayMedia']
|
||||||
const useDocumentVisibility: typeof import('@vueuse/core')['useDocumentVisibility']
|
const useDocumentVisibility: typeof import('@vueuse/core')['useDocumentVisibility']
|
||||||
const useDraggable: typeof import('@vueuse/core')['useDraggable']
|
const useDraggable: typeof import('@vueuse/core')['useDraggable']
|
||||||
|
const useDropZone: typeof import('@vueuse/core')['useDropZone']
|
||||||
const useElementBounding: typeof import('@vueuse/core')['useElementBounding']
|
const useElementBounding: typeof import('@vueuse/core')['useElementBounding']
|
||||||
const useElementByPoint: typeof import('@vueuse/core')['useElementByPoint']
|
const useElementByPoint: typeof import('@vueuse/core')['useElementByPoint']
|
||||||
const useElementHover: typeof import('@vueuse/core')['useElementHover']
|
const useElementHover: typeof import('@vueuse/core')['useElementHover']
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ const triggerGtm = (val: string) => {
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<a
|
<a
|
||||||
:href="dish.link" target="_blank" class="tag rounded" p="x-2"
|
:href="dish.link || `https://www.bilibili.com/video/${dish.bv}`" target="_blank" class="tag rounded" p="x-2"
|
||||||
border="~ blue-200 dark:blue-800"
|
border="~ blue-200 dark:blue-800"
|
||||||
bg="blue-300 opacity-20"
|
bg="blue-300 opacity-20"
|
||||||
@click="triggerGtm(dish.name)"
|
@click="triggerGtm(dish.name)"
|
||||||
|
|||||||
@@ -133,6 +133,10 @@ export const meat: StuffItem[] = [
|
|||||||
name: '骨头',
|
name: '骨头',
|
||||||
emoji: '🦴',
|
emoji: '🦴',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: '鱼(Todo)',
|
||||||
|
emoji: '🐟',
|
||||||
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
1214
src/data/recipe.csv
1214
src/data/recipe.csv
File diff suppressed because it is too large
Load Diff
@@ -8,7 +8,11 @@ export interface RecipeItem {
|
|||||||
/**
|
/**
|
||||||
* 链接
|
* 链接
|
||||||
*/
|
*/
|
||||||
link: string
|
link?: string
|
||||||
|
/**
|
||||||
|
* BiliBili video id
|
||||||
|
*/
|
||||||
|
bv?: string
|
||||||
/**
|
/**
|
||||||
* 材料
|
* 材料
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user