Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
gqcn committed Nov 17, 2024
1 parent 58c7183 commit b8b6290
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 13 deletions.
23 changes: 22 additions & 1 deletion src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
--ifm-color-primary-light: #33925d;
--ifm-color-primary-lighter: #359962;
--ifm-color-primary-lightest: #3cad6e;
--ifm-color-secondary-dark: #d4d5d8;
--ifm-button-border-color: #d4d5d8;
--ifm-code-font-size: 95%;
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1);
--ifm-font-size-base: 16px;
Expand Down Expand Up @@ -154,4 +156,23 @@ table th, table td {

.markdown li > p {
margin: 0 0 6px 0;
}
}

.screen-reader-only {
border: 0;
clip: rect(0 0 0 0);
clip-path: polygon(0 0, 0 0, 0 0);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute;
width: 1px;
white-space: nowrap;
}

.showcase-reset {
padding: 8px 20px 8px 20px !important;
font-size: 14px !important;
}

8 changes: 6 additions & 2 deletions src/pages/showcase/_components/ClearAllButton/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,21 @@
*/

import React, {type ReactNode} from 'react';
import {translate} from '@docusaurus/Translate';
import {useClearQueryString} from '@docusaurus/theme-common';

export default function ClearAllButton(): ReactNode {
const clearQueryString = useClearQueryString();
// TODO translate
return (
<button
className="button button--outline button--primary"
className="button showcase-reset button--primary"
type="button"
onClick={() => clearQueryString()}>
Clear All
{translate({
message: '重置条件',
id: 'showcase.resetbutton',
})}
</button>
);
}
2 changes: 1 addition & 1 deletion src/pages/showcase/_components/ShowcaseCard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ function ShowcaseCard({user}: {user: User}) {
</Link>
</Heading>
{user.tags.includes('favorite') && (
<FavoriteIcon size="medium" style={{marginRight: '0.25rem'}} />
<FavoriteIcon size="medium"/>
)}
{user.source && (
<Link
Expand Down
13 changes: 9 additions & 4 deletions src/pages/showcase/_components/ShowcaseCard/styles.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,15 @@
}

.showcaseCardSrcBtn {
margin-left: 6px;
padding-left: 12px;
padding-right: 12px;
border: none;
margin-left: 5px;
border: none !important;
padding: 5px 10px 5px 10px !important;
background-color: #e4e6eb !important;
font-size: 12px !important;
}

.showcaseCardSrcBtn:hover {
background-color: #d4d5d8 !important;
}

.showcaseCardSrcBtn:focus-visible {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/showcase/_components/ShowcaseSearchBar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default function ShowcaseSearchBar(): ReactNode {
<div className={styles.searchBar}>
<input
placeholder={translate({
message: 'Search for site name...',
message: '搜索名称...',
id: 'showcase.searchBar.placeholder',
})}
value={searchName}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

.searchBar input {
height: 30px;
border-radius: 15px;
border-radius: 5px;
padding: 10px;
border: 1px solid gray;
}
6 changes: 3 additions & 3 deletions src/pages/showcase/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ import ShowcaseSearchBar from '@site/src/pages/showcase/_components/ShowcaseSear
import ShowcaseCards from './_components/ShowcaseCards';
import ShowcaseFilters from './_components/ShowcaseFilters';

const TITLE = translate({message: 'Docusaurus Site Showcase'});
const TITLE = translate({message: 'GoFrame框架使用案例展示'});
const DESCRIPTION = translate({
message: 'List of websites people are building with Docusaurus',
message: '使用GoFrame构建的站点和组件列表',
});
const SUBMIT_URL = 'https://github.com/facebook/docusaurus/discussions/7826';

Expand All @@ -28,7 +28,7 @@ function ShowcaseHeader() {
<p>{DESCRIPTION}</p>
<Link className="button button--primary" to={SUBMIT_URL}>
<Translate id="showcase.header.button">
🙏 Please add your site
🙏 添加您的使用案例 🙏
</Translate>
</Link>
</section>
Expand Down

0 comments on commit b8b6290

Please sign in to comment.