Skip to content

Commit

Permalink
Merge pull request #148 from Encaik/feat-seo优化
Browse files Browse the repository at this point in the history
fix: 修复按钮可访问性,优化用户交互
  • Loading branch information
521xueweihan authored Sep 8, 2024
2 parents 94a98d8 + ba7dd68 commit 32e10e9
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/components/dropdown/Dropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ function Dropdown(props: DropdownProps, ref: any) {
{props.options?.map((opt: option) => (
<a
key={opt.key}
href={`${opt.key}`}
className='block cursor-pointer truncate rounded-lg px-1 py-2 text-left text-sm text-gray-500 hover:bg-gray-50 hover:text-gray-700 dark:text-gray-300 dark:hover:bg-gray-700 dark:hover:text-gray-300'
onClick={() => onChange(opt)}
>
Expand Down
4 changes: 2 additions & 2 deletions src/components/navbar/IndexBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ const IndexBar: NextPage<Props> = ({ t, i18n_lang, tid, sort_by }) => {
<div className='shrink grow'></div>
<div className='md:hidden'>
<RepoModal>
<a className='flex h-8 items-center rounded-lg bg-blue-500 px-3 text-xs text-white active:bg-blue-600 dark:bg-gray-700 dark:text-gray-300 dark:active:bg-gray-900 sm:px-4'>
<button className='flex h-8 items-center rounded-lg bg-blue-500 px-3 text-xs text-white active:bg-blue-600 dark:bg-gray-700 dark:text-gray-300 dark:active:bg-gray-900 sm:px-4'>
{t('nav.submit')}
</a>
</button>
</RepoModal>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/components/navbar/RepoNavbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ const RepoDetailNavbar = ({ avatar, uid, t }: Props) => {
<NoPrefetchLink href={`/user/${uid}`}>
<div className='flex cursor-pointer items-center justify-end text-xs text-gray-500 hover:text-blue-400 dark:text-gray-400'>
{t('nav.desc')}
<a className='m-1 flex items-center'>
<div className='m-1 flex items-center'>
<img
className='rounded-full hover:animate-spin'
src={avatar}
width='18'
height='18'
alt='navbar_avatar'
/>
</a>
</div>
{t('nav.desc2')}
</div>
</NoPrefetchLink>
Expand Down
1 change: 1 addition & 0 deletions src/pages/onefile/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ const OneFilePage: NextPage<OneItemsResp> = ({ data }) => {
<img
className='w-max-full'
src='https://img.hellogithub.com/article/tK30nYW8bMiPOdB_1647991896.png'
alt='onefile'
></img>
<p className='my-4 px-2'>
<Trans ns='onefile' i18nKey='p_text' />
Expand Down
5 changes: 4 additions & 1 deletion src/pages/periodical/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,10 @@ const PeriodicalIndexPage: NextPage = () => {
<Navbar middleText={t('nav')} />
<div className='my-2 bg-white px-4 pt-2 dark:bg-gray-800 md:rounded-lg'>
<div className='flex flex-col items-center'>
<img src='https://img.hellogithub.com/logo/readme.gif'></img>
<img
src='https://img.hellogithub.com/logo/readme.gif'
alt='HelloGithub'
></img>
<p className='px-1 py-3 leading-7'>
<Trans ns='periodical' i18nKey='p_text' />
</p>
Expand Down

0 comments on commit 32e10e9

Please sign in to comment.