Skip to content

Commit 0ccd70f

Browse files
committed
fix(blog): Add articles more button
1 parent 8769f4d commit 0ccd70f

File tree

5 files changed

+21
-0
lines changed

5 files changed

+21
-0
lines changed

src/components/templates/articles/index.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ import { ArticleInfo } from "../../layouts/article-info";
1111
import { Pagination } from "../../ui/pagination";
1212
import { Renderer } from "../../docs";
1313
import { t } from "../../../locales";
14+
import { LinkButton } from "../../ui/button";
15+
import { Iconify } from "../../ui/iconify";
1416
import * as styles from "./styles.css";
1517

1618
export interface HeadingProps {
@@ -69,6 +71,11 @@ export const TemplateArticles: React.FC<TemplateArticlesProps> = (props) => {
6971
<section>
7072
<Heading>{t("articles.heading")}</Heading>
7173
{props.articles.map(item => <ArticleInfo key={`article-${item.link}`} data={item} />)}
74+
<LinkButton className={styles.more} aria-label={t("articles.more")} href="/page/1" tooltip={false}>
75+
<Iconify icon="ri:arrow-right-double-line" />
76+
{t("articles.more")}
77+
<Iconify icon="ri:arrow-left-double-line" />
78+
</LinkButton>
7279
</section>
7380
</div>
7481
</Main>

src/components/templates/articles/styles.css.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,14 @@ export const document = styled.css`
4747
display: block;
4848
}
4949
`;
50+
51+
export const more = styled.css`
52+
width: 100% !important;
53+
font-size: ${theme.fontSize.calc(1)} !important;
54+
line-height: ${theme.lineHeight.calc(1)} !important;
55+
56+
> .iconify {
57+
width: ${theme.fontSize.calc(1.2)};
58+
height: ${theme.fontSize.calc(1.2)};
59+
}
60+
`;

src/locales/en.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ export default {
2020
"articles.name": "Article",
2121
"articles.desc": "Article:{0}",
2222
"articles.heading": "Recent Articles",
23+
"articles.more": "And more",
2324

2425
"links.name": "Friends",
2526
"links.desc": "{0} Friends × {1} Lost Friends",

src/locales/zh-hans.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ export default {
2020
"articles.name": "文章",
2121
"articles.desc": "文章:{0}",
2222
"articles.heading": "最近创作",
23+
"articles.more": "还有更多",
2324

2425
"links.name": "友邻",
2526
"links.desc": "{0} 友邻 × {1} 已失联友邻",

src/locales/zh-hant.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ export default {
2020
"articles.name": "文章",
2121
"articles.desc": "文章:{0}",
2222
"articles.heading": "最近創作",
23+
"articles.more": "還有更多",
2324

2425
"links.name": "友鄰",
2526
"links.desc": "{0} 友鄰 × {1} 已失聯友鄰",

0 commit comments

Comments
 (0)