Просмотр исходного кода

[doc] 更新文档,修正多个链接至主分支,移除不必要的注释,确保文档内容准确且一致性提升。

dufu1991 1 год назад
Родитель
Сommit
be512565a4

+ 2 - 7
docs/site/src/app.css

@@ -1,9 +1,6 @@
-@import 'tailwindcss';
-
+@import "tailwindcss";
 @custom-variant dark (&:where(.dark, .dark *));
 @custom-variant dark (&:where(.dark, .dark *));
-
 @plugin "@tailwindcss/typography";
 @plugin "@tailwindcss/typography";
-
 @theme {
 @theme {
 	--color-primary-50: oklch(0.979 0.01 267.36);
 	--color-primary-50: oklch(0.979 0.01 267.36);
 	--color-primary-100: oklch(0.95 0.024 270.343);
 	--color-primary-100: oklch(0.95 0.024 270.343);
@@ -155,7 +152,7 @@
 		}
 		}
 	}
 	}
 
 
-	--animate-dynamicsBg:dynamicsBg 8s linear infinite;
+	--animate-dynamicsBg: dynamicsBg 8s linear infinite;
 	@keyframes dynamicsBg {
 	@keyframes dynamicsBg {
 		0% {
 		0% {
 			transform: rotate(360deg);
 			transform: rotate(360deg);
@@ -208,9 +205,7 @@
 		}
 		}
 	}
 	}
 }
 }
-
 @source "../../../packages/stdf/dist/**/*.svelte";
 @source "../../../packages/stdf/dist/**/*.svelte";
-
 pre {
 pre {
 	background-color: transparent;
 	background-color: transparent;
 	padding: 0;
 	padding: 0;

+ 1 - 3
docs/site/src/lib/header/Header.svelte

@@ -75,7 +75,7 @@
 			{/if}
 			{/if}
 		</button>
 		</button>
 	{/if}
 	{/if}
-	<!-- main -> next -->
+
 	<div class="flex items-end">
 	<div class="flex items-end">
 		<a href="/" class="flex items-center justify-between py-2 pl-6" aria-label={isZh ? '首页' : 'Home'}>
 		<a href="/" class="flex items-center justify-between py-2 pl-6" aria-label={isZh ? '首页' : 'Home'}>
 			<div class="fill-primary flex h-8 w-16 flex-col items-center justify-center" title={isZh ? '首页' : 'Home'}>
 			<div class="fill-primary flex h-8 w-16 flex-col items-center justify-center" title={isZh ? '首页' : 'Home'}>
@@ -164,7 +164,6 @@
 						</svg>
 						</svg>
 					</button>
 					</button>
 					<!-- GitHub -->
 					<!-- GitHub -->
-					<!-- main -> next -->
 					<a
 					<a
 						href="https://github.com/any-tdf/stdf"
 						href="https://github.com/any-tdf/stdf"
 						class="rounded-sm px-4 py-1 text-center hover:bg-gray-100 dark:hover:bg-gray-700"
 						class="rounded-sm px-4 py-1 text-center hover:bg-gray-100 dark:hover:bg-gray-700"
@@ -261,7 +260,6 @@
 				</svg>
 				</svg>
 			</button>
 			</button>
 			<!-- GitHub -->
 			<!-- GitHub -->
-			<!-- main -> next -->
 			<a
 			<a
 				href="https://github.com/any-tdf/stdf"
 				href="https://github.com/any-tdf/stdf"
 				class="inline-block rounded-sm px-4 py-1 transition-all hover:bg-black/5 dark:hover:bg-white/5"
 				class="inline-block rounded-sm px-4 py-1 transition-all hover:bg-black/5 dark:hover:bg-white/5"

+ 3 - 6
docs/site/src/lib/tab/Tab.svelte

@@ -26,8 +26,7 @@
 	const mouseenterFun = () => {
 	const mouseenterFun = () => {
 		const params = new URLSearchParams('?' + $page.url.searchParams);
 		const params = new URLSearchParams('?' + $page.url.searchParams);
 		QRValue =
 		QRValue =
-			// main -> next
-			(import.meta.env.DEV ? location.protocol + '//' + location.hostname + ':8888/' : 'https://next-demo.stdf.design/') +
+			(import.meta.env.DEV ? location.protocol + '//' + location.hostname + ':8888/' : 'https://demo.stdf.design/') +
 			params.get('nav') +
 			params.get('nav') +
 			(isZh ? '/zh_CN' : '/en_US');
 			(isZh ? '/zh_CN' : '/en_US');
 		showQr = true;
 		showQr = true;
@@ -58,8 +57,7 @@
 	let stackblitzValue = $state('');
 	let stackblitzValue = $state('');
 	const showStackblitzFunc = () => {
 	const showStackblitzFunc = () => {
 		const nav = $page.url.searchParams.get('nav');
 		const nav = $page.url.searchParams.get('nav');
-		// main -> next
-		stackblitzValue = `https://stackblitz.com/github/any-tdf/next-demo-stdf?file=src%2Froutes%2F${
+		stackblitzValue = `https://stackblitz.com/github/any-tdf/demo-stdf?file=src%2Froutes%2F${
 			isZh ? 'zh_CN' : 'en_US'
 			isZh ? 'zh_CN' : 'en_US'
 		}%2F${nav}%2F%2Bpage.svelte&startScript=${nav}${isZh ? '' : '_en'}`;
 		}%2F${nav}%2F%2Bpage.svelte&startScript=${nav}${isZh ? '' : '_en'}`;
 		showStackblitz = true;
 		showStackblitz = true;
@@ -71,8 +69,7 @@
 		const nav = $page.url.searchParams.get('nav');
 		const nav = $page.url.searchParams.get('nav');
 		// 将 nav 首字母大写
 		// 将 nav 首字母大写
 		const navFirst = nav ? nav.slice(0, 1).toUpperCase() + nav.slice(1) : '';
 		const navFirst = nav ? nav.slice(0, 1).toUpperCase() + nav.slice(1) : '';
-		// main -> next
-		codeValue = `https://github.com/any-tdf/stdf/blob/next/packages/stdf/src/lib/components/${nav}/${navFirst}.svelte`;
+		codeValue = `https://github.com/any-tdf/stdf/blob/main/packages/stdf/src/lib/components/${nav}/${navFirst}.svelte`;
 		showCode = true;
 		showCode = true;
 	};
 	};
 </script>
 </script>

+ 0 - 1
docs/site/src/routes/+layout.svelte

@@ -85,7 +85,6 @@
 </svelte:head>
 </svelte:head>
 
 
 <main class="bg-primaryWhite dark:bg-darkBlack relative min-h-screen text-justify text-black antialiased dark:text-white">
 <main class="bg-primaryWhite dark:bg-darkBlack relative min-h-screen text-justify text-black antialiased dark:text-white">
-	<!-- main -> next -->
 	{#if $page.url.pathname === '' || $page.url.pathname === '/'}
 	{#if $page.url.pathname === '' || $page.url.pathname === '/'}
 		<div class="bg-primary dark:bg-dark px-2 py-1 text-center text-xs text-white dark:text-black">
 		<div class="bg-primary dark:bg-dark px-2 py-1 text-center text-xs text-white dark:text-black">
 			{#if isZh}
 			{#if isZh}

+ 1 - 3
docs/site/src/routes/+page.svelte

@@ -250,8 +250,7 @@
 		 * @param {String} [options.posColor] 定位点颜色
 		 * @param {String} [options.posColor] 定位点颜色
 		 */
 		 */
 		const qrcode = encodeData({
 		const qrcode = encodeData({
-			// main -> next
-			text: 'https://next-demo.stdf.design?lang=' + (isZh ? 'zh_CN' : 'en_US'),
+			text: 'https://demo.stdf.design?lang=' + (isZh ? 'zh_CN' : 'en_US'),
 			isSpace: false
 			isSpace: false
 		});
 		});
 		const color = $currentThemeStore === 'dark' ? 'var(--color-dark)' : 'var(--color-primary)';
 		const color = $currentThemeStore === 'dark' ? 'var(--color-dark)' : 'var(--color-primary)';
@@ -441,7 +440,6 @@
 						</div>
 						</div>
 					{/if}
 					{/if}
 				</a>
 				</a>
-				<!-- main -> next -->
 				<a
 				<a
 					href={'https://demo.stdf.design?lang=' + (isZh ? 'zh_CN' : 'en_US')}
 					href={'https://demo.stdf.design?lang=' + (isZh ? 'zh_CN' : 'en_US')}
 					target="_blank"
 					target="_blank"

+ 1 - 3
docs/site/src/routes/components/+page.svelte

@@ -182,9 +182,8 @@
 		params.set('tab', currentTab.toString());
 		params.set('tab', currentTab.toString());
 		goto(`/components?nav=${params.get('nav') ? params.get('nav') : 'button'}&tab=${currentTab}`);
 		goto(`/components?nav=${params.get('nav') ? params.get('nav') : 'button'}&tab=${currentTab}`);
 	};
 	};
-	// main -> next
 	let QRValue = $derived(
 	let QRValue = $derived(
-		(import.meta.env.DEV ? location.protocol + '//' + location.hostname + ':8888/' : 'https://next-demo.stdf.design/') +
+		(import.meta.env.DEV ? location.protocol + '//' + location.hostname + ':8888/' : 'https://demo.stdf.design/') +
 			currentNav?.nav +
 			currentNav?.nav +
 			(isZh ? '/zh_CN' : '/en_US')
 			(isZh ? '/zh_CN' : '/en_US')
 	);
 	);
@@ -251,7 +250,6 @@
 						>
 						>
 							{#if currentNav?.nav}
 							{#if currentNav?.nav}
 								{#if isShowIframe}
 								{#if isShowIframe}
-									<!-- main -> next -->
 									<iframe
 									<iframe
 										title="Demo"
 										title="Demo"
 										id="iframe-id"
 										id="iframe-id"

+ 0 - 1
docs/site/src/routes/components/Api.svelte

@@ -33,7 +33,6 @@
 	{/if}
 	{/if}
 </article>
 </article>
 <div class="flex gap-2 pb-8 text-xs">
 <div class="flex gap-2 pb-8 text-xs">
-	<!-- main -> next -->
 	<a
 	<a
 		href={'https://github.com/any-tdf/stdf/edit/main/docs/mds/components/' + api + '/api' + (isZh ? '' : '_en') + '.md'}
 		href={'https://github.com/any-tdf/stdf/edit/main/docs/mds/components/' + api + '/api' + (isZh ? '' : '_en') + '.md'}
 		target="_blank"
 		target="_blank"

+ 0 - 1
docs/site/src/routes/components/FAQ.svelte

@@ -39,7 +39,6 @@
 	{/if}
 	{/if}
 </article>
 </article>
 <div class="flex gap-2 pb-8 text-xs">
 <div class="flex gap-2 pb-8 text-xs">
-	<!-- main -> next -->
 	<a
 	<a
 		href={'https://github.com/any-tdf/stdf/edit/main/docs/mds/components/' + guide + '/FAQ' + (isZh ? '' : '_en') + '.md'}
 		href={'https://github.com/any-tdf/stdf/edit/main/docs/mds/components/' + guide + '/FAQ' + (isZh ? '' : '_en') + '.md'}
 		target="_blank"
 		target="_blank"

+ 0 - 1
docs/site/src/routes/components/Guide.svelte

@@ -53,7 +53,6 @@
 </article>
 </article>
 
 
 <div class="flex gap-2 pb-8 text-xs">
 <div class="flex gap-2 pb-8 text-xs">
-	<!-- main -> next -->
 	<a
 	<a
 		href={'https://github.com/any-tdf/stdf/edit/main/docs/mds/components/' + guide + '/guide' + (isZh ? '' : '_en') + '.md'}
 		href={'https://github.com/any-tdf/stdf/edit/main/docs/mds/components/' + guide + '/guide' + (isZh ? '' : '_en') + '.md'}
 		target="_blank"
 		target="_blank"

+ 0 - 1
docs/site/src/routes/components/Version.svelte

@@ -115,7 +115,6 @@
 	{/if}
 	{/if}
 </article>
 </article>
 <div class="flex gap-2 pb-8 text-xs">
 <div class="flex gap-2 pb-8 text-xs">
-	<!-- main -> next -->
 	<a
 	<a
 		href={'https://github.com/any-tdf/stdf/edit/main/docs/mds/components/' + guide + '/version' + (isZh ? '' : '_en') + '.md'}
 		href={'https://github.com/any-tdf/stdf/edit/main/docs/mds/components/' + guide + '/version' + (isZh ? '' : '_en') + '.md'}
 		class="text-primary dark:text-dark flex"
 		class="text-primary dark:text-dark flex"

+ 1 - 2
docs/site/src/routes/guide/+layout.svelte

@@ -111,8 +111,7 @@
 	};
 	};
 	// 编辑地址处理
 	// 编辑地址处理
 	const editUrlFn = (nav: string) => {
 	const editUrlFn = (nav: string) => {
-		// main -> next
-		const baseUrl = 'https://github.com/any-tdf/stdf/edit/next/';
+		const baseUrl = 'https://github.com/any-tdf/stdf/edit/main/';
 		if (nav === 'create') {
 		if (nav === 'create') {
 			return baseUrl + 'packages/create-stdf/README' + (isZh ? '_CN' : '') + '.md';
 			return baseUrl + 'packages/create-stdf/README' + (isZh ? '_CN' : '') + '.md';
 		}
 		}

+ 2 - 2
docs/site/src/routes/guide/color/Color.svelte

@@ -296,8 +296,8 @@
 	<h3>{isZh ? '主题黑白色' : 'Theme Black and White'}</h3>
 	<h3>{isZh ? '主题黑白色' : 'Theme Black and White'}</h3>
 	<p>
 	<p>
 		{isZh
 		{isZh
-			? '通常情况下,设计中应避免大面积使用纯黑色【#000000】,使用接近纯黑的颜色。同时 STDF 会根据算法计算出两个接近纯黑但是带有主题色的黑色,方便设计搭配。同样也会计算出两个接近纯白但是带有主题色的白色。一般可用于多套主题搭配时的文字颜色,亮暗背景颜色等场景。'
-			: 'In most cases, designers should avoid using pure black [000000] on a large scale, and use a color close to pure black. At the same time, STDF will calculate two black colors close to pure black but with a theme color for design搭配。Similarly, it will calculate two white colors close to pure white but with a theme color. Generally, it can be used in the text color of multiple theme combinations, the light and dark background color, etc.'}
+			? '通常情况下,设计中应避免大面积使用纯黑色 oklch(0 0 0),使用接近纯黑的颜色。同时 STDF 会根据算法计算出两个接近纯黑但是带有主题色的黑色,方便设计搭配。同样也会计算出两个接近纯白但是带有主题色的白色。一般可用于多套主题搭配时的文字颜色,亮暗背景颜色等场景。'
+			: 'In most cases, designers should avoid using pure black oklch(0 0 0) on a large scale, and use a color close to pure black. At the same time, STDF will calculate two black colors close to pure black but with a theme color for design. Similarly, it will calculate two white colors close to pure white but with a theme color. Generally, it can be used in the text color of multiple theme combinations, the light and dark background color, etc.'}
 	</p>
 	</p>
 	<div class="flex-wrap justify-around space-y-4 md:flex md:space-x-4 md:space-y-0">
 	<div class="flex-wrap justify-around space-y-4 md:flex md:space-x-4 md:space-y-0">
 		{#each [themeBlack?.primary, themeBlack?.dark, themeWhite?.primary, themeWhite?.dark] as item, i}
 		{#each [themeBlack?.primary, themeBlack?.dark, themeWhite?.primary, themeWhite?.dark] as item, i}