Skip to content

Commit

Permalink
feat: 新增二维码工具介绍
Browse files Browse the repository at this point in the history
  • Loading branch information
whinc committed Jul 24, 2024
1 parent 059401f commit da7a5a0
Show file tree
Hide file tree
Showing 10 changed files with 31 additions and 4 deletions.
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@ npm run deploy:github
npm run deploy:gitee
```

### 新增工具流程

1. 更新运行截图 `public/assets/screenshots_raw/xxx_{light,dark}.png`
2. 更新二维码资源 `public/assets/screenshots_raw/xxx_qrcode.png`
2.1 [小程序码生成](https://mp.weixin.qq.com/wxamp/wxaqrcode/weappcode) 官方工具,页面路径格式为 `page/home/index?share=xxx`,具体参考 `project.private.config.json`
3. 更新 pages.ts
4. 更新 VerticalFeatures.tsx

### 更新图片资源

创建`.env.local`环境变量文件,并保存 tinypng 站点申请的秘钥
Expand All @@ -40,12 +48,13 @@ TINYPNG_API_KEY=<YOUR_API_KEY>
# 2.执行下面脚本,全量压缩图片
npm run update-assets

# 增量压缩图片,仅 --since 日期之后新增的图片会被压缩
# 增量压缩图片,仅 --since 日期之后新增的图片会被压缩(日期是本地时区,无需换算)
npm run update-assets -- --since='2024-04-29T10:00:00'
```

> 脚本依赖 zx 工具,请先确保全局安装`npm install -g zx`

### Gitee

为了方便国内用户访问,仓库也同步一份到 Gitee 上 [xiaohui_hubei/ucalc-website](https://gitee.com/xiaohui_hubei/ucalc-website)
Expand Down
Binary file added public/assets/screenshots/qrcode_dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/screenshots/qrcode_light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/screenshots/qrcode_qrcode.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/screenshots_raw/qrcode_dark.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/screenshots_raw/qrcode_light.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/screenshots_raw/qrcode_qrcode.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/templates/VerticalFeatures.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ const VerticalFeatures = () => (
description="输入身高和体重后,自动计算 BMI 指数,估算肥胖程度和疾病风险,迈向健康生活!"
reverse
/>
<VerticalFeatureRow
pageId="qrcode"
description="制作生成二维码,一键美化,满足个性化需求,包括 Logo(形状、图片、磁村、位置等)、码点(形状和颜色)、码眼(形状和颜色)、背景(颜色、图片、透明度等)、容错率、尺寸、版本"
/>
<VerticalFeatureRow
pageId="relationship"
description="按键输入或文字输入亲戚关系,自动计算亲戚的称呼,也可以反查对方对我的称呼,堪称走亲访友神器!"
Expand Down
16 changes: 15 additions & 1 deletion src/templates/pages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ export const pages = {
shareTitle: commonShareTitle,
} satisfies TPage,
dnf: {
title: '官网信息',
title: 'DNF小助手',
path: '/subpkg3/pages/dnf/index',
icon: 'dnf',
shareTitle: ['地下城与勇士·起源'],
Expand All @@ -173,6 +173,20 @@ export const pages = {
],
enableIndependentTheme: true,
} satisfies TPage,
qrcode: {
title: '二维码制作',
path: '/subpkg2/pages/qrcode/index',
icon: 'qrcode',
shareTitle: ['轻松生成美化二维码,创意无限,快来试试吧!'],
enableIndependentTheme: false,
enableRecommend: true,
} satisfies TPage,
qrcode_beautify: {
title: '二维码美化',
path: '/subpkg2/pages/qrcode_beautify/index',
enableIndependentTheme: false,
enableRecommend: false,
} satisfies TPage,
blank: {
title: '空白页',
path: '/subpkg2/pages/blank/index',
Expand Down
4 changes: 2 additions & 2 deletions tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ module.exports = {
},
},
animation: {
toggle: 'toggle 6s infinite',
toggle: 'toggle 20s infinite',
},
keyframes: {
toggle: {
'0%, 20%, 80%, 100%': { opacity: 100 },
'30%, 60%': { opacity: 0 },
'40%, 60%': { opacity: 0 },
},
},
lineHeight: {
Expand Down

0 comments on commit da7a5a0

Please sign in to comment.