Skip to content

Commit 1b8ddd1

Browse files
committed
✨ feat: 新增一些栏目和资源
1 parent 40b6f4d commit 1b8ddd1

File tree

16 files changed

+313
-6
lines changed

16 files changed

+313
-6
lines changed

docs/.vitepress/config.mjs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,10 @@ let web3_basics_items = [
6262
{ text: "为什么不能碰合约?", link: "/web3/basics/why-can’t-we-touch-the-contract" },
6363
{ text: "教训合集", link: "/web3/basics/lesson" },
6464
{ text: "炒币感悟", link: "/web3/basics/insights" },
65-
{ text: "币圈骗局合集鉴赏", link: "/web3/basics/insights" },
65+
{ text: "币圈骗局合集鉴赏", link: "/web3/basics/crypto-scams" },
6666
{ text: "优质资源", link: "/web3/basics/high-quality-materials" },
67+
{ text: "个人准则", link: "/web3/basics/rules" },
68+
{ text: "赞助", link: "/web3/basics/support" },
6769
{ text: "敬请期待...", link: "/web3/basics/..." },
6870

6971
];
@@ -76,6 +78,8 @@ let block_walk_items = [
7678
{ text: "P6-投资比特币和以太坊的风险", link: "/web3/block-walk/risks-of-investing-in-bitcoin-and-ethereum.md" },
7779

7880
];
81+
82+
7983
let python_items = [
8084
{ text: "学习路线", link: "/python/学习路线" },
8185
{
@@ -523,14 +527,17 @@ export default defineConfig({
523527

524528
// 像小鱼一样的鼠标
525529
// ['link', { rel: 'stylesheet', href: '/css/nomouse.css' }],
530+
['link', { rel: 'stylesheet', href: '/css/index.css' }],
526531
// 引入外部 JavaScript 文件
527532
// ['script', { src: '/js/pointer.js' }],
528533

529534
// 星露谷物语的飞鸟
530535
["script", { src: "/js/birdfly.js" }],
531-
532536
// 鼠标拖尾
533537
["script", { src: "/js/mouse-trail.js" }], // 引入自定义的 JavaScript 文件,前端反爬js文件
538+
539+
// ["script", { src: "/js/copy.js" }], // 引入自定义的 JavaScript 文件,前端反爬js文件
540+
// ["script", { src: "/js/alertify.min.js" }], // 引入自定义的 JavaScript 文件,前端反爬js文件
534541
// ['script', { src: '/js/fuckspider.js' }],
535542
["link", { rel: "icon", href: "/logo.svg" }], // 点击彩虹
536543
// <!--鼠标点击特效-->

docs/.vitepress/theme/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import DefaultTheme from 'vitepress/theme'
22
// giscus,评论
33
import giscusTalk from 'vitepress-plugin-comment-with-giscus';
44
import { useData, useRoute } from 'vitepress';
5+
import 'alertifyjs/build/css/alertify.min.css'
56

67
// 图片缩放
78
import mediumZoom from 'medium-zoom';

docs/components/CopyButton.vue

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
<script setup>
2+
import copy_text from '../utils/copy.js'
3+
import alertify from 'alertifyjs'
4+
5+
import { ref } from 'vue'
6+
7+
8+
const props = defineProps({
9+
label: {
10+
type: String,
11+
default: "比特币地址:" // 默认值
12+
},
13+
text: {
14+
type: String,
15+
required: true
16+
}
17+
})
18+
19+
const copied = ref(false)
20+
const handleCopy = () => {
21+
copy_text(props.text)
22+
.then(() => {
23+
copied.value = true
24+
setTimeout(() => (copied.value = false), 2000)
25+
console.log('复制成功:', props.text)
26+
alertify.success('复制成功!')
27+
})
28+
.catch(() => {
29+
alertify.warning('复制失败~')
30+
})
31+
}
32+
33+
</script>
34+
35+
<template>
36+
<div class="copy-container">
37+
<span class="label">{{ props.label }}</span>
38+
<code class="copy-text">{{ props.text }}</code>
39+
<button class="copy-btn" @click="handleCopy">
40+
{{ copied ? "✅ 已复制" : "📋 点击复制" }}
41+
</button>
42+
</div>
43+
</template>
44+
45+
<style scoped>
46+
.copy-container {
47+
display: flex;
48+
align-items: center;
49+
gap: 8px;
50+
}
51+
52+
.label {
53+
font-weight: bold;
54+
color: #444;
55+
}
56+
57+
.copy-text {
58+
padding: 2px 6px;
59+
background: #f5f5f5;
60+
border-radius: 4px;
61+
font-size: 14px;
62+
color: #333;
63+
}
64+
65+
.copy-btn {
66+
padding: 4px 10px;
67+
font-size: 14px;
68+
border: 1px solid #ccc;
69+
border-radius: 4px;
70+
background: #fff;
71+
color: #333;
72+
cursor: pointer;
73+
transition: all 0.2s ease;
74+
}
75+
76+
.copy-btn:hover {
77+
background: #f0f0f0;
78+
}
79+
80+
.copy-btn:active {
81+
background: #e0e0e0;
82+
}
83+
</style>

docs/public/css/index.css

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/* .alertify-notifier {
2+
position: fixed !important;
3+
bottom: 20px !important;
4+
right: 20px !important;
5+
z-index: 999999 !important;
6+
} */
7+
8+
9+
/* alertify的弹窗样式 开始*/
10+
.ajs-message {
11+
border: 1px solid white;
12+
color: white;
13+
}
14+
15+
.ajs-warning {
16+
border: 1px solid rgb(79, 125, 239);
17+
color: rgb(79, 125, 239);
18+
}
19+
/* alertify的弹窗样式 结束*/
411 KB
Loading

docs/public/js/alertify.min.js

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/public/js/copy.js

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
// .vitepress/theme/utils/copy.js
2+
const copy_text = (text = '') => {
3+
4+
try {
5+
return navigator.clipboard
6+
.writeText(text)
7+
.then(() => Promise.resolve())
8+
.catch((err) => {
9+
console.error('复制失败:', err)
10+
return Promise.reject(err)
11+
})
12+
} catch (e) {
13+
let input = document.createElement('input')
14+
input.style.position = 'fixed'
15+
input.style.top = '-10000px'
16+
input.style.zIndex = '-999'
17+
document.body.appendChild(input)
18+
input.value = text
19+
input.focus()
20+
input.select()
21+
try {
22+
let result = document.execCommand('copy')
23+
document.body.removeChild(input)
24+
if (!result || result === 'unsuccessful') {
25+
return Promise.reject('复制失败')
26+
} else {
27+
return Promise.resolve()
28+
}
29+
} catch (e) {
30+
document.body.removeChild(input)
31+
return Promise.reject('当前浏览器不支持复制功能')
32+
}
33+
}
34+
}

docs/utils/copy.js

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
// .vitepress/theme/utils/copy.js
2+
const copy_text = (text = '') => {
3+
try {
4+
return navigator.clipboard
5+
.writeText(text)
6+
.then(() => Promise.resolve())
7+
.catch((err) => {
8+
console.error('复制失败:', err)
9+
return Promise.reject(err)
10+
})
11+
} catch (e) {
12+
let input = document.createElement('input')
13+
input.style.position = 'fixed'
14+
input.style.top = '-10000px'
15+
input.style.zIndex = '-999'
16+
document.body.appendChild(input)
17+
input.value = text
18+
input.focus()
19+
input.select()
20+
try {
21+
let result = document.execCommand('copy')
22+
document.body.removeChild(input)
23+
if (!result || result === 'unsuccessful') {
24+
return Promise.reject('复制失败')
25+
} else {
26+
return Promise.resolve()
27+
}
28+
} catch (e) {
29+
document.body.removeChild(input)
30+
return Promise.reject('当前浏览器不支持复制功能')
31+
}
32+
}
33+
}
34+
export default copy_text

docs/web3/basics/crypto-scams.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# 币圈骗局合集鉴赏
2+
> 在币圈,不要相信任何人
3+
> 没有人会带你赚钱
4+
> 让你以为要带你赚钱的人都是想割你韭菜的人
5+
>
6+
## 带单骗局
7+
带你玩合约的人有什么套路?
8+
对方是币圈雷锋叔叔,没坏心思,不过是想骗你的本金而已。
9+
千万警惕U商,很多打着U商名义,骗人玩合约,杀猪的骗子。
10+
表面上看:只是随便交流,似乎很合理,也没人会怀疑,这是不是骗局。
11+
兄弟,真正的套路在后面.......
12+
具体的套路有两种:
13+
套路一:对方是皮条客,挣返佣的,带你做单,他挣手续费,无论你盈亏,他都挣钱。
14+
套路二:通过这种方式,骗过你本金。
15+
而U商大多数是第二种。
16+
详细聊聊套路二。。。
17+
我的交流群里,就有人被第二个套路骗过。
18+
他是在他原本以为,对方是分析师,带他挣钱,事实上,对方是用这种套路骗他本金。
19+
怎么骗?
20+
一开始,让你再大交易所交易,由于对方毛线行情不懂,他们分析行情的依据,只有一个字---猜,所以有时候不准,导致你亏钱。
21+
随后他就会编个理由,说大交易所不行,控盘严重之类的理由,让你注册他们自己弄的交易所。
22+
OK,当你注册,并充值后,真正的套路才开始。
23+
一开始会让你挣钱,而且挣不少,随后开始让你分钱,一切似乎很合理。
24+
慢慢的,他开始明里暗里,告诉你,其他人挣了天文数字,开始鼓动你充值更多钱,甚至让你卖车卖房抵押贷款。
25+
等他把你所有资金都骗进交易所后,他开始带单,随后你天天亏,直至本金归零。
26+
如果过程中,你发现这是个骗局,想提币。
27+
对不起,对方直接把你交易所账号封掉,微信拉黑。
28+
要记住铁律:混币圈,谁都别信
Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,19 @@
11
# 优质资源收录
2-
2+
## 基础知识
33

44

55
[比特币白皮书【官网 英文】](https://bitcoin.org/bitcoin.pdf)
66

77

88
[比特币白皮书 个人翻译+注解【知乎】](https://zhuanlan.zhihu.com/p/25039679)
99

10-
[囤比特币.pdf【九神】](/pdf/Hoarding-Bitcoin.pdf)
10+
[囤比特币.pdf【九神】](/pdf/Hoarding-Bitcoin.pdf)
11+
12+
## Web3开发
13+
### Solidity 学习
14+
[WTF Academy](https://www.wtf.academy/zh)
15+
> WTF Academy 是一个 Web3 开源大学,旨在培训 100,000 名开发者。我们提供高质量的课程和动手项目,帮助您学习、贡献并获得认证。无论您是初学者还是经验丰富的开发者,WTF Academy 为您提供 Web3 世界中必不可少的技能。
16+
17+
[登链社区](https://learnblockchain.cn/)
18+
19+
[加密资产追踪手册](https://github.com/slowmist/Crypto-Asset-Tracing-Handbook)

0 commit comments

Comments
 (0)