-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update code: Added WeChat component, modified copy feedback, added ne…
…w styles, and updated dependencies.
- Loading branch information
Showing
12 changed files
with
227 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,6 @@ slug: time | |
黄金时间:早晨到上午 | ||
|
||
> 睡了一觉,大脑垃圾和疲惫基本消除掉了 | ||
> | ||
适合:理论性强的工作,比如创作理论性文章,学习外语 以及需要高度专注的工作 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
src/pages/what-week-of-the-year-is-it-this-week/index.module.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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}> | ||
{week} | ||
<span className={styles.copyFeedback}>{copyFeedback}</span> | ||
</button> | ||
周 | ||
</h3> | ||
</main> | ||
</Layout> | ||
) | ||
} |