huan-simple-html 1.1.1 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/src/html/index.html +45 -5
- package/src/style/index/index.css +9 -0
- package/webpack_config_dev.js +3 -3
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "huan-simple-html",
|
3
|
-
"version": "1.
|
3
|
+
"version": "1.2.0",
|
4
4
|
"description": "一个简单的HTML项目,通过Webpack进行打包。请尽量使用pnpm处理此包。更多细节请查看\"README.md\"",
|
5
5
|
"keywords": [
|
6
6
|
"html",
|
@@ -65,8 +65,8 @@
|
|
65
65
|
"build:prod:run": "npx pnpm build:prod && npx pnpm prod",
|
66
66
|
"github": "npx webpack server --config webpack_config_github.js",
|
67
67
|
"build:github": "npx webpack --config webpack_config_github.js && node github-page/cname.js",
|
68
|
-
"pack": "npx pnpm run init && npx pnpm run lint && npx pnpm pack",
|
69
68
|
"build:github:run": "npx pnpm build:github && npx pnpm github",
|
69
|
+
"pack": "npx pnpm run init && npx pnpm run lint && npx pnpm pack",
|
70
70
|
"login:npmjs": "npx pnpm login --registry=https://registry.npmjs.org",
|
71
71
|
"publish:npmjs": "npx pnpm publish --registry=https://registry.npmjs.org"
|
72
72
|
}
|
package/src/html/index.html
CHANGED
@@ -8,13 +8,52 @@
|
|
8
8
|
</head>
|
9
9
|
<body>
|
10
10
|
<h1>欢迎光临!</h1>
|
11
|
-
|
12
|
-
<p
|
13
|
-
|
11
|
+
|
12
|
+
<p>我是宋子桓(Song Zihuan),非常欢迎你访问这个站点,这个站点是关于MIT协议的站点。</p>
|
13
|
+
|
14
|
+
<p>
|
15
|
+
MIT开源协议(Massachusetts Institute of Technology License)是一种广泛使用的开源软件许可协议,以其极为宽松的条款著称。以下是MIT许可证的主要特点和内容概览:
|
16
|
+
</p>
|
17
|
+
<p>
|
18
|
+
特点:
|
19
|
+
</p>
|
20
|
+
<ol>
|
21
|
+
<li><span class="bold">简单明了:</span>MIT许可证只有寥寥数行,非常容易理解,没有复杂的法律术语。</li>
|
22
|
+
<li><span class="bold">宽松自由:</span>它赋予软件使用者非常广泛的自由度,允许个人和商业机构自由地使用、复制、修改、合并、发布、分发、再授权和销售软件的原件或修改版,几乎没有任何限制。</li>
|
23
|
+
<li><span class="bold">唯一要求:</span>使用MIT许可的软件时,使用者必须保留软件中包含的原始版权和许可声明。这意味着当你分发基于MIT许可代码的衍生作品时,需要在你的发行包中包含原作者的许可声明。 </li>
|
24
|
+
</ol>
|
25
|
+
|
26
|
+
<p>
|
27
|
+
适用场景:
|
28
|
+
</p>
|
29
|
+
<ul>
|
30
|
+
<li><span class="bold">鼓励广泛采用:</span>对于希望自己的代码被尽可能多的人使用和贡献的开发者来说,MIT是一个极好的选择。</li>
|
31
|
+
<li><span class="bold">商业友好:</span>由于其宽松的条款,很多商业项目倾向于使用或接纳MIT许可的组件,因为它不会给产品带来额外的使用负担。</li>
|
32
|
+
<li><span class="bold">简单协作:</span>:对于小型项目或者快速原型开发,选择MIT可以简化合作过程中的法律考量。</li>
|
33
|
+
</ul>
|
34
|
+
|
35
|
+
<p>
|
36
|
+
总之,MIT许可证因其简洁和开放性而广受欢迎,特别适合那些旨在促进技术创新和知识共享的项目。
|
37
|
+
</p>
|
38
|
+
|
39
|
+
<p> 以上就是我的全部介绍,如果你想查阅MIT协议,可以 <a href="./LICENSE_US.html" target="_blank">点击此处(MIT LICENSE)立即前往查看MIT协议 </a>。</p>
|
40
|
+
|
41
|
+
<p>如果你对我感兴趣,你还可以查看<a href="https://song-zh.com" target="_blank">点击此处,查看我的网站</a>。</p>
|
42
|
+
<p>同时,也欢迎您浏览我的GitHub仓库:<a href="https://github.com/SongZihuan" target="_blank"> 宋子桓(Song Zihuan)的 GitHub</a></p>
|
14
43
|
<p>希望您在这里能找到有趣的内容和灵感!祝您访问愉快!</p>
|
15
44
|
|
16
|
-
<p
|
17
|
-
|
45
|
+
<p id="copyright-container"></p>
|
46
|
+
|
47
|
+
<script>
|
48
|
+
const currentYear = new Date().getFullYear();
|
49
|
+
const copyrightTemplate = `<p>Copyright © ${currentYear} 宋子桓(Song Zihuan). All rights reserved.</p>`;
|
50
|
+
|
51
|
+
const containerElement = document.getElementById('copyright-container');
|
52
|
+
// 将生成的版权信息插入到页面指定位置
|
53
|
+
if (containerElement) {
|
54
|
+
containerElement.innerHTML = copyrightTemplate;
|
55
|
+
}
|
56
|
+
</script>
|
18
57
|
|
19
58
|
<script>
|
20
59
|
function extractNumbersFromString(str) {
|
@@ -61,6 +100,7 @@ fetch("/SH_CONFIG.json")
|
|
61
100
|
const img = document.createElement('img');
|
62
101
|
const a = document.createElement('a');
|
63
102
|
|
103
|
+
img.id = "WANGAN_LOGO"
|
64
104
|
img.alt = "网络安全图标"
|
65
105
|
img.src = window.WangAn;
|
66
106
|
img.style = "vertical-align: middle"
|
package/webpack_config_dev.js
CHANGED
@@ -150,7 +150,7 @@ const config = {
|
|
150
150
|
limit: 8192, // 8KB 以下的文件将被转换为 Data URL
|
151
151
|
fallback: 'file-loader',
|
152
152
|
outputPath: 'images', // 类似于 file-loader 的配置
|
153
|
-
name: '[name].[
|
153
|
+
name: '[name].[hash].[ext]'
|
154
154
|
}
|
155
155
|
}
|
156
156
|
]
|
@@ -164,7 +164,7 @@ const config = {
|
|
164
164
|
limit: 8192, // 8KB 以下的文件将被转换为 Data URL
|
165
165
|
fallback: 'file-loader',
|
166
166
|
outputPath: 'videos', // 类似于 file-loader 的配置
|
167
|
-
name: '[name].[
|
167
|
+
name: '[name].[hash].[ext]'
|
168
168
|
}
|
169
169
|
}
|
170
170
|
]
|
@@ -178,7 +178,7 @@ const config = {
|
|
178
178
|
limit: 8192, // 8KB 以下的文件将被转换为 Data URL
|
179
179
|
fallback: 'file-loader',
|
180
180
|
outputPath: 'fonts', // 类似于 file-loader 的配置
|
181
|
-
name: '[name].[
|
181
|
+
name: '[name].[hash].[ext]'
|
182
182
|
}
|
183
183
|
}
|
184
184
|
]
|