Skip to content

Commit 211519d

Browse files
committed
[add] A Freelancer post
[optimize] update WebCell slideshow [optimize] upgrade Upstream packages
1 parent 402568f commit 211519d

File tree

6 files changed

+115
-42
lines changed

6 files changed

+115
-42
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@ node_modules/
77
package-lock.json
88
public/
99
.deploy*/
10+
.husky/_/
1011
resume.json

.husky/pre-commit

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/sh
2+
3+
. "$(dirname "$0")/_/husky.sh"
4+
5+
npm test

.husky/pre-push

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/sh
2+
3+
. "$(dirname "$0")/_/husky.sh"
4+
5+
npm run build

package.json

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"url": "https://github.com/TechQuery/TechQuery.github.io/issues"
1414
},
1515
"scripts": {
16+
"prepare": "husky install",
1617
"resume-json": "cd source/_data/ && yaml2json resume.yml -p | sed -r s/T[0-9]+:[0-9]+:[0-9]+\\.[0-9]+Z//g > resume.json",
1718
"resume-html": "mkdir public && cd source/_data/ && resume export ../../public/resume.html --theme kendall",
1819
"pack-resume": "npm run resume-json && npm run resume-html",
@@ -21,40 +22,34 @@
2122
"start": "hexo clean && npm run pack-resume && hexo server",
2223
"test": "lint-staged"
2324
},
24-
"husky": {
25-
"hooks": {
26-
"pre-commit": "npm test",
27-
"pre-push": "npm run build"
28-
}
29-
},
3025
"lint-staged": {
3126
"*.{html,md,css,less,js,json,yml,yaml}": "prettier --write"
3227
},
3328
"dependencies": {
3429
"hexo": "^4.2.1",
35-
"hexo-auto-category": "^0.2.0",
30+
"hexo-auto-category": "^0.2.1",
3631
"hexo-deployer-git": "^2.1.0",
3732
"hexo-generator-archive": "^1.0.0",
3833
"hexo-generator-category": "^1.0.0",
3934
"hexo-generator-feed": "^2.2.0",
4035
"hexo-generator-index": "^1.0.0",
41-
"hexo-generator-search": "^2.4.1",
36+
"hexo-generator-search": "^2.4.3",
4237
"hexo-generator-slidehtml": "0.0.62",
4338
"hexo-generator-tag": "^1.0.0",
44-
"hexo-migrator-web": "^1.0.3",
39+
"hexo-migrator-web": "^1.0.4",
4540
"hexo-permalink-pinyin": "^1.1.0",
4641
"hexo-prism-plugin": "^2.3.0",
4742
"hexo-renderer-ejs": "^1.0.0",
48-
"hexo-renderer-marked": "^2.0.0",
43+
"hexo-renderer-marked": "3.0.0",
4944
"hexo-renderer-stylus": "^1.1.0",
5045
"hexo-server": "^1.0.0",
5146
"object-assign": "^4.1.1"
5247
},
5348
"devDependencies": {
54-
"husky": "^4.3.7",
49+
"husky": "^6.0.0",
5550
"jsonresume-theme-kendall": "^0.2.0",
56-
"lint-staged": "^10.5.3",
57-
"prettier": "^2.2.1",
51+
"lint-staged": "^11.0.0",
52+
"prettier": "^2.3.1",
5853
"resume-cli": "^3.0.4",
5954
"yamljs": "^0.3.0"
6055
},
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
title: 自由职业者中文手册
3+
date: 2021-05-23 17:23:55
4+
categories:
5+
- Other
6+
tags:
7+
- FreeLancer
8+
- manual
9+
---
10+
11+
## 在线流程
12+
13+
### 合同签名
14+
15+
**合同终稿**生成 PDF 后,打开 [iLovePDF 签名工具][1],即可上传并签名,然后发给甲方重复同样步骤。
16+
17+
### 发票开具
18+
19+
#### 纸质版
20+
21+
进入[国家税务总局 12366 纳税服务平台][2],点击你常居地的省份即可进入当地税务局在线办税系统。
22+
23+
![](https://12366.chinatax.gov.cn/core-plugins/12366/css/images/mapchina.jpg)
24+
25+
#### 电子版
26+
27+
找公司代开发票时,其开票软件可能生成 [ODF 格式][3]文件,可用国产[永中 Office 文档阅读/转换器][4]
28+
29+
[1]: https://www.ilovepdf.com/zh-cn/sign-pdf
30+
[2]: https://12366.chinatax.gov.cn/bsfw/onlinetaxation/main
31+
[3]: https://zh.wikipedia.org/wiki/%E5%9B%BD%E5%AE%B6%E7%89%88%E5%BC%8F%E6%96%87%E6%A1%A3%E6%A0%BC%E5%BC%8F
32+
[4]: https://www.yozodcs.com/page/example.html

source/_posts/Programming/Web-components-practise.md

Lines changed: 64 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Web 组件标准实践
33
date: 2019-08-14 22:33:23
4-
updated: 2019-11-22 00:34:00
4+
updated: 2021-06-13 19:13:50
55
categories:
66
- Programming
77
tags:
@@ -303,40 +303,66 @@ export default class PageIndex extends mixin() {
303303
---
304304

305305
```javascript
306-
import { createCell, component } from 'web-cell';
307-
import { observer } from 'mobx-web-cell';
308-
import { HTMLRouter } from 'cell-router/source';
306+
import { documentReady, render, createCell, Fragment } from 'web-cell';
307+
import { History, PageProps, CellRouter } from 'cell-router/source';
308+
309+
const history = new History();
310+
311+
function TestPage({ path, history, defaultSlot, ...data }: PageProps) {
312+
return (
313+
<ul>
314+
<li>Path: {path}</li>
315+
<li>Data: {JSON.stringify(data)}</li>
316+
</ul>
317+
);
318+
}
309319

310-
import { history } from '../model';
320+
documentReady.then(() =>
321+
render(
322+
<>
323+
<nav>
324+
<a href="test?a=1">Test</a>
325+
<a href="example?b=2">Example</a>
326+
</nav>
327+
<CellRouter
328+
className="router"
329+
history={history}
330+
routes={[{ paths: ['test', /^example/], component: TestPage }]}
331+
/>
332+
</>
333+
)
334+
);
335+
```
311336

312-
const Page = ({ path }) => <span>{path}</span>;
337+
---
313338

314-
@observer
315-
@component({
316-
tagName: 'page-router',
317-
renderTarget: 'children'
318-
})
319-
export default class PageRouter extends HTMLRouter {
320-
protected history = history;
321-
protected routes = [
322-
{ paths: ['test'], component: Page },
323-
{ paths: ['example'], component: Page }
324-
];
325-
326-
render() {
327-
return (
328-
<main>
329-
<nav>
330-
<a href="test">Test</a>
331-
<a href="example">Example</a>
332-
</nav>
333-
{super.render()}
334-
</main>
335-
);
336-
}
339+
#### 异步加载页面
340+
341+
`tsconfig.json`
342+
343+
```json
344+
{
345+
"compilerOptions": {
346+
"module": "ESNext"
347+
}
337348
}
338349
```
339350

351+
`source/page/index.ts`
352+
353+
```javascript
354+
export default [
355+
{
356+
paths: ['', 'home'],
357+
component: async () => (await import('./Home.tsx')).default
358+
},
359+
{
360+
paths: ['list'],
361+
component: async () => (await import('./List.tsx')).default
362+
}
363+
];
364+
```
365+
340366
---
341367

342368
### 开箱即用
@@ -360,6 +386,15 @@ npm install parcel-bundler -D
360386
361387
---
362388

389+
### 官方组件库 —— Material Cell
390+
391+
<iframe
392+
src="https://material.web-cell.dev/"
393+
style="width: 100%; height: 35rem"
394+
></iframe>
395+
396+
---
397+
363398
### 竞争对手
364399

365400
Google Polymer

0 commit comments

Comments
 (0)