feat: update descriptions
This commit is contained in:
@@ -16,6 +16,7 @@ import { useQueryClient } from "@tanstack/react-query"
|
||||
import PostCover from "~/components/home/PostCover"
|
||||
import { Image } from "~/components/ui/Image"
|
||||
import { useDate } from "~/hooks/useDate"
|
||||
import { getSiteLink } from "~/lib/helpers"
|
||||
import { Trans, useTranslation } from "~/lib/i18n/client"
|
||||
import { getPageVisibility } from "~/lib/page-helpers"
|
||||
import { readFiles } from "~/lib/read-files"
|
||||
@@ -145,16 +146,26 @@ export const PagesManager = ({ type }: { type: NoteType }) => {
|
||||
switch (type) {
|
||||
case "post":
|
||||
description = (
|
||||
<p>
|
||||
<Trans i18n={i18n} i18nKey="posts description" ns="dashboard">
|
||||
Posts are entries listed in reverse chronological order on your
|
||||
site. Think of them as articles or updates that you share to offer
|
||||
up new content to your readers.{" "}
|
||||
<UniLink className="underline" href={t("link post-vs-page") || ""}>
|
||||
Post vs. Page
|
||||
</UniLink>
|
||||
</Trans>
|
||||
</p>
|
||||
<>
|
||||
<p>
|
||||
<Trans i18n={i18n} i18nKey="posts description" ns="dashboard">
|
||||
Posts are entries listed in reverse chronological order on your
|
||||
site. Think of them as articles or updates that you share to offer
|
||||
up new content to your readers.{" "}
|
||||
<UniLink
|
||||
className="underline"
|
||||
href={t("link post-vs-page") || ""}
|
||||
>
|
||||
Post vs. Page
|
||||
</UniLink>
|
||||
</Trans>
|
||||
</p>
|
||||
<p>
|
||||
<Trans i18n={i18n} i18nKey="posts add" ns="dashboard">
|
||||
Visitors can view the posts you have posted at homepage.
|
||||
</Trans>
|
||||
</p>
|
||||
</>
|
||||
)
|
||||
break
|
||||
case "page":
|
||||
@@ -175,12 +186,12 @@ export const PagesManager = ({ type }: { type: NoteType }) => {
|
||||
</p>
|
||||
<p>
|
||||
<Trans i18n={i18n} i18nKey="pages add" ns="dashboard">
|
||||
After you create a page, you can{" "}
|
||||
Visitors can only access your page through its link, you can{" "}
|
||||
<UniLink
|
||||
className="underline"
|
||||
href={`/dashboard/${subdomain}/settings/navigation`}
|
||||
>
|
||||
add it to your site's navigation menu
|
||||
add it to navigation menu
|
||||
</UniLink>{" "}
|
||||
so your visitors can find it.
|
||||
</Trans>
|
||||
@@ -188,7 +199,7 @@ export const PagesManager = ({ type }: { type: NoteType }) => {
|
||||
</>
|
||||
)
|
||||
break
|
||||
case "portfolio": // TODO
|
||||
case "portfolio":
|
||||
description = (
|
||||
<>
|
||||
<p>
|
||||
@@ -199,8 +210,74 @@ export const PagesManager = ({ type }: { type: NoteType }) => {
|
||||
portfolio directly links to external URLs.
|
||||
</Trans>
|
||||
</p>
|
||||
<p>
|
||||
<Trans i18n={i18n} i18nKey="portfolios add" ns="dashboard">
|
||||
Visitors can view the portfolios you have posted at homepage and{" "}
|
||||
<UniLink
|
||||
className="underline"
|
||||
href={`${getSiteLink({
|
||||
subdomain,
|
||||
})}/portfolios`}
|
||||
>
|
||||
/portfolios
|
||||
</UniLink>
|
||||
, you can{" "}
|
||||
<UniLink
|
||||
className="underline"
|
||||
href={`/dashboard/${subdomain}/settings/navigation`}
|
||||
>
|
||||
add it to navigation menu
|
||||
</UniLink>{" "}
|
||||
so your visitors can find it.
|
||||
</Trans>
|
||||
</p>
|
||||
</>
|
||||
)
|
||||
break
|
||||
case "short":
|
||||
description = (
|
||||
<>
|
||||
<p>
|
||||
<Trans i18n={i18n} i18nKey="shots description" ns="dashboard">
|
||||
Shorts is a dedicated section for displaying pictures and short
|
||||
texts. The content primarily consists of pictures, with the
|
||||
accompanying text limited to 1000 characters or less. They will
|
||||
not be displayed on the homepage, but on a separate page{" "}
|
||||
<UniLink
|
||||
className="underline"
|
||||
href={`${getSiteLink({
|
||||
subdomain,
|
||||
})}/shorts`}
|
||||
>
|
||||
/shorts
|
||||
</UniLink>
|
||||
.
|
||||
</Trans>
|
||||
</p>
|
||||
<p>
|
||||
<Trans i18n={i18n} i18nKey="shots add" ns="dashboard">
|
||||
Visitors can view the shots you have posted at{" "}
|
||||
<UniLink
|
||||
className="underline"
|
||||
href={`${getSiteLink({
|
||||
subdomain,
|
||||
})}/shorts`}
|
||||
>
|
||||
/shorts
|
||||
</UniLink>
|
||||
, you can{" "}
|
||||
<UniLink
|
||||
className="underline"
|
||||
href={`/dashboard/${subdomain}/settings/navigation`}
|
||||
>
|
||||
add it to navigation menu
|
||||
</UniLink>{" "}
|
||||
so your visitors can find it.
|
||||
</Trans>
|
||||
</p>
|
||||
</>
|
||||
)
|
||||
break
|
||||
}
|
||||
|
||||
let currentLength = 0
|
||||
@@ -239,7 +316,7 @@ export const PagesManager = ({ type }: { type: NoteType }) => {
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
<div className="text-sm text-zinc-500 leading-relaxed">
|
||||
<div className="text-sm text-zinc-500 leading-relaxed space-y-1">
|
||||
{description}
|
||||
</div>
|
||||
</header>
|
||||
|
||||
@@ -18,4 +18,4 @@ export const COLOR_SCHEME_LIGHT = "light"
|
||||
export const DEFAULT_COLOR_SCHEME: ColorScheme = "light"
|
||||
export const DARK_MODE_STORAGE_KEY = "darkMode"
|
||||
|
||||
export const RESERVED_TAGS = ["page", "post", "portfolio", "comment"]
|
||||
export const RESERVED_TAGS = ["page", "post", "portfolio", "comment", "short"]
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
"Posts": "文章",
|
||||
"Pages": "页面",
|
||||
"Portfolios": "作品集",
|
||||
"Shorts": "图文",
|
||||
"Notifications": "通知",
|
||||
"Unread notifications": "未读通知",
|
||||
"Settings": "设置",
|
||||
@@ -23,6 +24,7 @@
|
||||
"All Posts": "所有文章",
|
||||
"All Pages": "所有页面",
|
||||
"All Portfolios": "所有作品集",
|
||||
"All Shorts": "所有图文",
|
||||
"Published": "已发布",
|
||||
"published": "已发布",
|
||||
"Draft": "草稿",
|
||||
@@ -34,10 +36,15 @@
|
||||
"posts description": "文章是按时间倒序在你的网站上列出的条目。可以将它们看作是更新,以提供新内容给读者。<2>文章与页面</2>。",
|
||||
"pages description": "页面是静态的,不受日期影响。它们更像是你网站上的永久元素,比如“关于我们”、“联系我们”等。<2>文章与页面</2>。",
|
||||
"portfolios description": "作品集是 xLog 之外的作品,比如你的 YouTube 视频、GitHub 项目,它们将像文章一样显示在主页的列表中。不同之处在于作品集直接跳转到外部网址。",
|
||||
"pages add": "创建页面后,你可以将其<2>添加到你网站的导航菜单中</2>,以便访问者可以找到它。",
|
||||
"shots description": "图文是一个专门用于展示图片和简短文本的部分。内容主要由图片组成,附带的文本限制在1000个字符以内。",
|
||||
"posts add": "访问者可以在首页查看你发布的文章。",
|
||||
"shots add": "访问者可以在 <2>/shorts</2> 查看你发布的图文,你可以将其<5>添加到导航菜单中</5>,以便访问者可以找到它。",
|
||||
"pages add": "访问者只能通过链接访问你的页面,你可以将其<2>添加到导航菜单中</2>,以便访问者可以找到它。",
|
||||
"portfolios add": "访问者可以在首页和 <2>/portfolios</2> 查看你发布的作品,你可以将其<5>添加到导航菜单中</5>,以便访问者可以找到它。",
|
||||
"New Post": "新建文章",
|
||||
"New Page": "新建页面",
|
||||
"New Portfolio": "新建作品",
|
||||
"New Short": "新建图文",
|
||||
"Import": "导入",
|
||||
"Import markdown file with front matter supported": "导入 Markdown 文件(支持 Front Matter)",
|
||||
"View Site": "查看站点",
|
||||
@@ -75,6 +82,7 @@
|
||||
"This post will be accessible from this time. Leave blank to use the current time.": "此文章将从此时间开始可访问。留空则使用当前时间。",
|
||||
"This page will be accessible from this time. Leave blank to use the current time.": "此页面将从此时间开始可访问。留空则使用当前时间。",
|
||||
"This portfolio will be accessible from this time. Leave blank to use the current time.": "此作品将从此时间开始可访问。留空则使用当前时间。",
|
||||
"This short will be accessible from this time. Leave blank to use the current time.": "此图文将从此时间开始可访问。留空则使用当前时间。",
|
||||
"The post is currently not public as its publication date has been scheduled for a future time.": "此文章当前没有公开,因为它的发布日期已被定为将来的某个时间。",
|
||||
"Slug": "短链接",
|
||||
"This post will be accessible at": "此文章将可通过以下链接访问",
|
||||
@@ -221,5 +229,8 @@
|
||||
"External Url": "外部链接",
|
||||
"Autofill": "自动填充",
|
||||
"Title": "标题",
|
||||
"Edit portfolio": "编辑作品"
|
||||
"Edit portfolio": "编辑作品",
|
||||
"Edit short": "编辑图文",
|
||||
"Images": "图片",
|
||||
"Content": "内容"
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@ const slugReservedWords = [
|
||||
"atom.xml",
|
||||
"search",
|
||||
"portfolios",
|
||||
"shorts",
|
||||
]
|
||||
|
||||
export const checkSlugReservedWords = (word: string) => {
|
||||
|
||||
Reference in New Issue
Block a user