dufu1991 1 ano atrás
pai
commit
18fe0ed516
2 arquivos alterados com 13 adições e 13 exclusões
  1. 3 3
      docs/site/scripts/env.js
  2. 10 10
      docs/site/src/pages/guide/Changelog.svelte

+ 3 - 3
docs/site/scripts/env.js

@@ -1,7 +1,7 @@
 import fs from 'node:fs';
 
 //得到标准时区的时间的函数
-const getLocalTime = i => {
+const getLocalTime = (i) => {
 	//参数i为时区值数字,比如北京为东八区则输进8,纽约为西5区输入-5
 	if (typeof i !== 'number') return;
 	var d = new Date();
@@ -19,8 +19,8 @@ let now_en = getLocalTime(-4).toLocaleString('en-US', { hour12: false });
 let now_zh = getLocalTime(+8).toLocaleString('zh-CN', { hour12: false });
 
 // 去掉秒,即去除最后的 ':xx'
-now_en = now_en.slice(0, -3) + '(UTC-04:00)';
-now_zh = now_zh.slice(0, -3) + '(UTC+08:00)';
+now_en = now_en.slice(0, -3) + ' GMT-4';
+now_zh = now_zh.slice(0, -3) + ' GMT+8';
 
 console.log('now_en', now_en);
 console.log('now_zh', now_zh);

+ 10 - 10
docs/site/src/pages/guide/Changelog.svelte

@@ -9,16 +9,16 @@
 
 	const isZh = localStorage.getItem('lang') === 'zh_CN';
 	//提取字符中以‘[!tag’开头且以‘]’结尾的所有字符串,组成数组,并返回数组
-	const getTags = str => {
+	const getTags = (str) => {
 		return str.match(/\[!tag[^\]]+\]/g);
 	};
 
 	//提取字符中以‘[!issue‘开头且以‘]’结尾的所有字符串,组成数组,并返回数组
-	const getIssues = str => {
+	const getIssues = (str) => {
 		return str.match(/\[!issue[^\]]+\]/g);
 	};
 	//提取字符中以‘[!contribute‘开头且以‘]’结尾的所有字符串,组成数组,并返回数组
-	const getContributes = str => {
+	const getContributes = (str) => {
 		return str.match(/\[!contribute[^\]]+\]/g);
 	};
 	const spanTextFun = (type, index) => {
@@ -40,11 +40,11 @@
 		}
 	};
 	//替换Markdown中的标签
-	const mdTextToHljsFun = string => {
+	const mdTextToHljsFun = (string) => {
 		//替换tag
 		const tagList = getTags(string);
 		if (tagList) {
-			tagList.forEach(item => {
+			tagList.forEach((item) => {
 				const arr = item.split('|');
 				// const span = `<span class="w-2 h-2 text-xs inline-block rounded-full mr-1 ${bgClassFun(arr[1], arr[2])}"></span>`;
 				const span = `<span class="mr-1">${spanTextFun(arr[1], arr[2])}</span>`;
@@ -54,7 +54,7 @@
 		//替换issue
 		const issueList = getIssues(string);
 		if (issueList) {
-			issueList.forEach(item => {
+			issueList.forEach((item) => {
 				const arr = item.split('|');
 				const span = `<span><a href="https://github.com/${
 					arr[1]
@@ -67,7 +67,7 @@
 		//替换contribute
 		const contributeList = getContributes(string);
 		if (contributeList) {
-			contributeList.forEach(item => {
+			contributeList.forEach((item) => {
 				const arr = item.split('|');
 				const span = `<span><a href="https://github.com/${
 					arr[1]
@@ -87,10 +87,10 @@
 		? 'max-w-full'
 		: 'max-w-5xl'}"
 >
-	<p class="text-xs mb-4 text-black/40 dark:text-white/30">
+	<p class="mb-4 text-xs text-black/40 dark:text-white/30">
 		{isZh
-			? '注:此处仅展示站点更新说明或总体概述,具体组件更新内容请查看组件内部更新日志。描述后面的头像表示此项的提出者或贡献者,感谢他们。发布时间格式均为 UTC+08:00。'
-			: 'Note: Only the site update instructions or general overview are displayed here. For the specific component update content, please refer to the update log inside the component. The avatars after the description represent the submitter or contributor, thank them for their contribution. The release time format is UTC+08:00.'}
+			? '注:此处仅展示站点更新说明或总体概述,具体组件更新内容请查看组件内部更新日志。描述后面的头像表示此项的提出者或贡献者,感谢他们。发布时间格式均为 GMT+8。'
+			: 'Note: Only the site update instructions or general overview are displayed here. For the specific component update content, please refer to the update log inside the component. The avatars after the description represent the submitter or contributor, thank them for their contribution. The release time format is GMT+8.'}
 	</p>
 	{@html mdTextToHljsFun(hljsText)}
 </article>