Skip to content

Commit 6307151

Browse files
authored
Merge pull request #41 from webdevhome:add-links
Add links, fix style issues
2 parents a14513c + 64a83c6 commit 6307151

File tree

4 files changed

+51
-13
lines changed

4 files changed

+51
-13
lines changed

src/components/Header/AppAction.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ export const AppAction: FC<Props> = ({
2020
className={classNames(
2121
'flex items-center',
2222
'p-2',
23-
'hover:bg-gray-200 active:bg-gray-300',
24-
'dark:hover:bg-gray-600 dark:active:bg-gray-500',
2523
'rounded-md',
2624
'select-none',
2725
{
26+
'hover:bg-gray-200 active:bg-gray-300': !active,
2827
'bg-brand-500 hover:bg-brand-600 active:bg-brand-700': active,
28+
'dark:hover:bg-gray-600 dark:active:bg-gray-500': !active,
2929
'dark:hover:bg-brand-600 dark:active:bg-brand-700': active,
3030
'text-white': active,
3131
'text-gray-800 dark:text-gray-100': !active,

src/components/Search/Search.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { Link } from '../Links/Link'
55
import { SearchDivider } from './SearchDivider'
66
import { SearchHint } from './SearchHint'
77
import { SearchHints } from './SearchHints'
8-
import { SearchTargetLabel } from './SearchTargetItem'
8+
import { SearchTargetLabel } from './SearchTargetLabel'
99
import { useSearch } from './useSearch'
1010

1111
export const Search: FC = () => {

src/components/Search/SearchTargetItem.tsx renamed to src/components/Search/SearchTargetLabel.tsx

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export const SearchTargetLabel: FC<Props> = ({ title, icon, color }) => {
3030

3131
return (
3232
<span
33-
className="mx-2 p-1 w-[31px] h-[31px] bg-white rounded"
33+
className="mr-2 p-1 w-[31px] h-[31px] bg-white rounded shrink-0"
3434
style={{ color }}
3535
>
3636
<ReactSVG src={iconUrl} className="search-target-item__icon" />
@@ -49,30 +49,38 @@ export const SearchTargetLabel: FC<Props> = ({ title, icon, color }) => {
4949
return (
5050
<div
5151
className={classNames(
52-
'col-start-2 flex items-center',
53-
'px-8',
52+
'flex flex-col gap-y-4 items-start sm:flex-row sm:items-center',
53+
'sm:px-8',
5454
'text-xl',
5555
'text-gray-700 dark:text-gray-100',
5656
)}
5757
>
58-
<span
58+
<div
5959
onClick={handleBackClick}
6060
className={classNames(
6161
'flex items-center',
6262
'mr-4 px-2 py-1',
63-
'hover:bg-gray-100 dark:hover:bg-gray-500',
64-
'active:bg-gray-200 dark:hover:bg-gray-400',
63+
'bg-gray-100 hover:bg-gray-200 active:bg-gray-300',
64+
'dark:bg-gray-600 dark:hover:bg-gray-500 dark:active:bg-gray-400',
6565
'rounded',
66-
'cursor-default',
66+
'cursor-default select-none',
6767
)}
6868
>
6969
<span className="mr-1">
7070
<MdiIcon path={mdiArrowLeft} />
7171
</span>
7272
Back
73-
</span>
74-
Search on {searchTargetIcon}
75-
<span className="text-brand-600 dark:text-brand-300">{title}</span>:
73+
</div>
74+
75+
<div className="flex items-center flex-wrap gap-y-2">
76+
<span className="mr-2">Search on</span>
77+
<span className="flex items-center">
78+
{searchTargetIcon}
79+
<span>
80+
<span className="text-brand-600 dark:text-brand-300">{title}</span>:
81+
</span>
82+
</span>
83+
</div>
7684
</div>
7785
)
7886
}

src/links.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -412,6 +412,13 @@
412412
"url": "https://docs.emmet.io/cheat-sheet",
413413
"description": "The official cheat sheet for Emmet - the editor shortcuts to quickly write HTML."
414414
},
415+
{
416+
"title": "BEM",
417+
"url": "https://getbem.com/introduction",
418+
"description": "A CSS naming convention that groups classes using namespaces.",
419+
"icon": "bem",
420+
"color": "#000000"
421+
},
415422
{
416423
"title": "this vs that",
417424
"url": "https://thisthat.dev",
@@ -561,6 +568,13 @@
561568
"icon": "windicss",
562569
"color": "#48B0F1"
563570
},
571+
{
572+
"title": "MUI",
573+
"url": "https://mui.com",
574+
"description": "React component library with different design languages, including Material UI, and an unstyled version of every component.",
575+
"icon": "mui",
576+
"color": "#007FFF"
577+
},
564578
{
565579
"title": "Bootstrap",
566580
"url": "https://getbootstrap.com",
@@ -1638,6 +1652,16 @@
16381652
"icon": "html5",
16391653
"color": "#e34f26"
16401654
},
1655+
{
1656+
"title": "Web Weekly",
1657+
"url": "https://webweekly.email"
1658+
},
1659+
{
1660+
"title": "JAMstacked",
1661+
"url": "https://jamstack.email",
1662+
"icon": "jamstack",
1663+
"color": "#F0047F"
1664+
},
16411665
{
16421666
"title": "CSS Weekly",
16431667
"url": "https://css-weekly.com",
@@ -1714,6 +1738,12 @@
17141738
"icon": "python",
17151739
"color": "#3776AB"
17161740
},
1741+
{
1742+
"title": "Ruby Weekly",
1743+
"url": "https://rubyweekly.com",
1744+
"icon": "ruby",
1745+
"color": "#CC342D"
1746+
},
17171747
{
17181748
"title": "Postgres Weekly",
17191749
"url": "https://postgresweekly.com",

0 commit comments

Comments
 (0)