Skip to content

Commit

Permalink
Update code: Added WeChat component, modified copy feedback, added ne…
Browse files Browse the repository at this point in the history
…w styles, and updated dependencies.
  • Loading branch information
Penggeor committed Mar 31, 2024
1 parent 240d8d1 commit fb16d1c
Show file tree
Hide file tree
Showing 12 changed files with 227 additions and 11 deletions.
1 change: 0 additions & 1 deletion docs-book/《为什么精英都是时间控》.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ slug: time
黄金时间:早晨到上午

> 睡了一觉,大脑垃圾和疲惫基本消除掉了
>
适合:理论性强的工作,比如创作理论性文章,学习外语 以及需要高度专注的工作

Expand Down
2 changes: 1 addition & 1 deletion docs-book/檀东东/01- 四步复盘法.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ slug: /tango/4-steps-to-review

没有复盘,没有进步。这是来自 B 站 Up 主**檀东东Tango**的复盘四步法:

👉 https://www.bilibili.com/video/BV1EV411R7iK/?share_source=copy_web&vd_source=d2ccb0630a0a92ceb5b5801eeaaad7b7
👉 https://www.bilibili.com/video/BV1EV411R7iK

什么时候复盘?复盘哪些东西?如何进行复盘?等等

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
slug: /IELTS/youdao/reading/base-part/assignment/02

---

15. taste buds
16. baleen whales
17. forward and downward
18. freshwater dolphins
19. in-air vision ❎ water
20. lower frequencies
21. bowhead whales and humpback whales
22. touch
23. freshwater dolphins
24. airborne flying fish
25. -❎ clear open waters
26. acoustic sense
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,10 @@ slug: /IELTS/youdao/reading/base-part/note/02
> 先读题,不要去通读文章,有些文章翻译成中文也不一定,另外通读文章会浪费时间
> 雅思出题人原话:阅读理解考察两个方面,一个是搜索信息的能力,一个是同义替换的能力
3. 分析空格的词性和词义(词性做题,词义检查)
3. 分析空格的**词性和词义**(词性做题,词义检查)
4. 寻找同义改写,得出答案



框架阅读法
框架阅读法:用 `//` 去给阅读文章**做分段**,如何分段可以自己定,比如:段落、主题、细节等等
> 实际上是分治算法,将大问题分解成小问题,然后逐个解决
8 changes: 4 additions & 4 deletions docs-engh/12-IELTS 雅思/复习策略.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ unlisted: true
学习雅思的策略。

雅思有 4 个部分,个人分配的精力:
听力:个人弱项,需要加强,30%
口语:低频是用,不需要太多精力,10%
阅读:个人强项,30%
写作:和别人交流,需要加强,30%
- 听力:个人弱项,需要加强,30%
- 口语:低频使用,不需要太多精力,10%
- 阅读:个人强项,30%
- 写作:和别人交流,需要加强,30%
4 changes: 4 additions & 0 deletions docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,10 @@ const config: Config = {
to: 'sandwich',
label: '🥪 文章前后添加固定内容',
},
{
to: 'what-week-of-the-year-is-it-this-week',
label: '📅 本周是今年的第几周',
}
],
},
{
Expand Down
130 changes: 130 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"@grnet/docusaurus-terminology": "^1.0.0",
"@mdx-js/react": "^3.0.0",
"clsx": "^1.1.1",
"dayjs": "^1.11.10",
"docusaurus-plugin-sass": "^0.2.2",
"dodollar": "^0.1.0",
"dotenv": "^16.3.1",
Expand All @@ -34,6 +35,7 @@
"posthog-docusaurus": "^2.0.0",
"prism-react-renderer": "^2.1.0",
"react": "^18.2.0",
"react-calendar": "^4.8.0",
"react-dom": "^18.2.0",
"rehype-katex": "^7.0.0",
"remark-math": "^6.0.0",
Expand Down
4 changes: 2 additions & 2 deletions src/pages/sandwich/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ export default function () {
}
const handleCopy = () => {
navigator.clipboard.writeText(result)
setCopyFeedback('copied')
setCopyFeedback('Copied!')
setTimeout(() => {
setCopyFeedback('copy')
setCopyFeedback('Copy')
}, 1000)
}
const handlePaste = async () => {
Expand Down
1 change: 0 additions & 1 deletion src/pages/wechat/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React from 'react';

import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
import WeChat from '@site/src/components/WeChat';
import Layout from '@theme/Layout';
Expand Down
17 changes: 17 additions & 0 deletions src/pages/what-week-of-the-year-is-it-this-week/index.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
.main {
margin-left: auto;
margin-right: auto;
margin-top: 20px;
margin-bottom: 20px;
}

.text {
display: flex;
justify-content: center;
margin-top: 20px;
}

.copyButton {
margin-left: 10px;
margin-right: 10px;
}
47 changes: 47 additions & 0 deletions src/pages/what-week-of-the-year-is-it-this-week/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import React, { useState, useEffect } from 'react'
import Layout from '@theme/Layout'
import dayjs from 'dayjs'
import 'dayjs/locale/zh-cn'
import utc from 'dayjs/plugin/utc'
import timezone from 'dayjs/plugin/timezone'
import Calendar from 'react-calendar'
import styles from './index.module.scss'
import 'react-calendar/dist/Calendar.css'
import weekOfYear from 'dayjs/plugin/weekOfYear' // Import the weekOfYear plugin

dayjs.locale('zh-cn')
dayjs.extend(utc)
dayjs.extend(timezone)
dayjs.tz.setDefault('Asia/Shanghai')

dayjs.extend(weekOfYear) // Apply the weekOfYear plugin to the dayjs instance

export default function () {
const week = dayjs().week() // Use the week() method to get the week of the year

const [copyFeedback, setCopyFeedback] = useState<string>('')

const handleCopy = () => {
navigator.clipboard.writeText(week.toString())
setCopyFeedback('Copied!')
setTimeout(() => {
setCopyFeedback('')
}, 1000)
}

return (
<Layout>
<main className={styles.main}>
<Calendar />
<h3 className={styles.text} onClick={handleCopy}>
本周是今年的第
<button className={styles.copyButton}>
&nbsp;{week}&nbsp;
<span className={styles.copyFeedback}>{copyFeedback}</span>
</button>
</h3>
</main>
</Layout>
)
}

0 comments on commit fb16d1c

Please sign in to comment.