Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitfb9a73e

Browse files
f0sselclaude
andcommitted
refactor: change templates registry link to header action
Replace template card with "Browse the Coder Registry" link in page header.The link appears in the top right aligned with the page title and includesan external link icon to indicate it opens in a new tab.🤖 Generated with [Claude Code](https://claude.ai/code)Co-Authored-By: Claude <noreply@anthropic.com>
1 parent81eb7fd commitfb9a73e

File tree

1 file changed

+29
-34
lines changed

1 file changed

+29
-34
lines changed

‎site/src/pages/CreateTemplateGalleryPage/CreateTemplateGalleryPageView.tsx‎

Lines changed: 29 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { ExternalImage } from "components/ExternalImage/ExternalImage";
88
import{Loader}from"components/Loader/Loader";
99
import{Margins}from"components/Margins/Margins";
1010
import{PageHeader,PageHeaderTitle}from"components/PageHeader/PageHeader";
11+
import{ExternalLinkIcon}from"lucide-react";
1112
importtype{FC}from"react";
1213
import{LinkasRouterLink}from"react-router-dom";
1314
importtype{StarterTemplatesByTag}from"utils/starterTemplates";
@@ -23,7 +24,19 @@ export const CreateTemplateGalleryPageView: FC<
2324
>=({ starterTemplatesByTag, error})=>{
2425
return(
2526
<Margins>
26-
<PageHeader>
27+
<PageHeader
28+
actions={
29+
<a
30+
href="https://registry.coder.com"
31+
target="_blank"
32+
rel="noopener noreferrer"
33+
css={styles.registryLink}
34+
>
35+
Browse the Coder Registry
36+
<ExternalLinkIconclassName="size-4"/>
37+
</a>
38+
}
39+
>
2740
<PageHeaderTitle>Create a Template</PageHeaderTitle>
2841
</PageHeader>
2942
<Stackspacing={8}>
@@ -72,39 +85,6 @@ export const CreateTemplateGalleryPageView: FC<
7285
</CardContent>
7386
</CardActionArea>
7487
</Card>
75-
<Cardvariant="outlined"css={{width:320,borderRadius:6}}>
76-
<CardActionArea
77-
component="a"
78-
href="https://registry.coder.com"
79-
target="_blank"
80-
rel="noopener noreferrer"
81-
sx={{height:115,padding:1}}
82-
>
83-
<CardContent>
84-
<Stack
85-
direction="row"
86-
spacing={3}
87-
css={{alignItems:"center"}}
88-
>
89-
<divcss={styles.icon}>
90-
<ExternalImage
91-
src="/emojis/1f4da.png"
92-
css={{
93-
width:"100%",
94-
height:"100%",
95-
}}
96-
/>
97-
</div>
98-
<div>
99-
<h4css={styles.cardTitle}>Browse Templates</h4>
100-
<spancss={styles.cardDescription}>
101-
Discover community templates on the Coder registry
102-
</span>
103-
</div>
104-
</Stack>
105-
</CardContent>
106-
</CardActionArea>
107-
</Card>
10888
</div>
10989
</Stack>
11090

@@ -152,4 +132,19 @@ const styles = {
152132
width:20,
153133
height:20,
154134
}),
135+
136+
registryLink:(theme)=>({
137+
display:"flex",
138+
alignItems:"center",
139+
gap:8,
140+
color:theme.palette.text.secondary,
141+
textDecoration:"none",
142+
fontSize:14,
143+
fontWeight:500,
144+
145+
"&:hover":{
146+
color:theme.palette.text.primary,
147+
textDecoration:"underline",
148+
},
149+
}),
155150
}satisfiesRecord<string,Interpolation<Theme>>;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp