Skip to content

Commit

Permalink
minor fix on merge
Browse files Browse the repository at this point in the history
  • Loading branch information
hemarina committed Sep 21, 2023
1 parent c609c0c commit a23b23d
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 38 deletions.
108 changes: 73 additions & 35 deletions website/src/components/gallery/ShowcaseCard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,18 +114,36 @@ function ShowcaseCardTag({
<>
{tagObjectsSorted.map((tagObject, index) => {
const id = `showcase_card_tag_${tagObject.tag}`;

return <TagComp key={index} id={id} {...tagObject} />;
if (
tagObject.tag == "msft" ||
tagObject.tag == "community" ||
tagObject.tag == "new" ||
tagObject.tag == "popular"
) {
return;
}
return (
<div key={id}>
<TagComp id={id} {...tagObject} />
</div>
);
})}
</>
);
}
} else {
return (
<>
{tagObjectsSorted.map((tagObject, index) => {
{tagObjectsSorted.map((tagObject,index) => {
const id = `showcase_card_tag_${tagObject.tag}`;

if (
tagObject.tag == "msft" ||
tagObject.tag == "community" ||
tagObject.tag == "new" ||
tagObject.tag == "popular"
) {
return;
}
return (
<div
key={index}
Expand Down Expand Up @@ -386,33 +404,41 @@ function ShowcaseCard({ user }: { user: User }) {
>
{headerText}
</div>
<img src={star} alt="Star" height={16} />
<div
className={styles.text}
style={{
color: "#11910D",
fontWeight: "600",
}}
>
NEW
</div>
<img
src={fire}
alt="Fire"
height={16}
style={{
paddingLeft: "6px",
}}
/>
<div
className={styles.text}
style={{
color: "#F7630C",
fontWeight: "600",
}}
>
POPULAR
</div>
{tags.includes("new") ? (
<>
<img src={star} alt="Star" height={16} />
<div
className={styles.text}
style={{
color: "#11910D",
fontWeight: "600",
}}
>
NEW
</div>
</>
) : null}
{tags.includes("popular") ? (
<>
<img
src={fire}
alt="Fire"
height={16}
style={{
paddingLeft: "6px",
}}
/>
<div
className={styles.text}
style={{
color: "#F7630C",
fontWeight: "600",
}}
>
POPULAR
</div>
</>
) : null}
</div>
}
/>
Expand Down Expand Up @@ -443,7 +469,7 @@ function ShowcaseCard({ user }: { user: User }) {
>
<div className={styles.cardTextBy}>by</div>
<div style={{ fontSize: "12px" }}>
<ShowcaseMultipleAuthors user={user} />
<ShowcaseMultipleAuthors key={user.title} user={user} />
</div>
</div>
<div
Expand Down Expand Up @@ -483,7 +509,7 @@ function ShowcaseCard({ user }: { user: User }) {
}}
onClick={openPanel}
>
<ShowcaseCardTag tags={user.tags} moreTag={true} />
<ShowcaseCardTag key={user.title} tags={user.tags} moreTag={true} />
</div>
</div>
</div>
Expand Down Expand Up @@ -615,6 +641,12 @@ export function ShowcaseContributionCard(): React.ReactElement {
fontWeight: "550",
fontSize: "12px",
}}
onClick={() => {
window.open(
"https://github.com/Azure/awesome-azd/compare",
"_blank"
);
}}
>
Submit a template
</Button>
Expand All @@ -629,6 +661,12 @@ export function ShowcaseContributionCard(): React.ReactElement {
paddingLeft: "10px",
fontSize: "12px",
}}
onClick={() => {
window.open(
"https://github.com/Azure/awesome-azd/issues/new?assignees=nigkulintya%2C+savannahostrowski&labels=requested-contribution&template=%F0%9F%A4%94-submit-a-template-request.md&title=%5BIdea%5D+%3Cyour-template-name%3E",
"_blank"
);
}}
>
Request a template
</Button>
Expand Down Expand Up @@ -684,7 +722,7 @@ function ShowcaseCardPanel({ user }: { user: User }) {
>
<div className={styles.cardTextBy}>by</div>
<div style={{ fontSize: "14px", fontWeight: "400" }}>
<ShowcaseMultipleAuthors user={user} />
<ShowcaseMultipleAuthors key={user.title} user={user} />
</div>
<FluentUILink
href={user.website}
Expand Down Expand Up @@ -795,7 +833,7 @@ function ShowcaseCardPanel({ user }: { user: User }) {
padding: "10px 0",
}}
>
If you already have the Azure Dev CLI installed on your
If you already have the Azure Developer CLI installed on your
machine, using this template is as simple as running this
command in a new directory.
</div>
Expand Down
5 changes: 2 additions & 3 deletions website/src/data/tags.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,9 @@ export const Tags: { [type in TagType]: Tag } = {
"This tag is used for admin-curated templates that represent high-quality (community) or official (Microsoft) azd templates.",
},

//============ FOR REGULAR USE
//============ FOR REGULAR USE

// Language Tags
// Language Tags

javascript: {
label: "JavaScript",
Expand Down Expand Up @@ -520,4 +520,3 @@ export const Tags: { [type in TagType]: Tag } = {
type: "Topic",
},
};

0 comments on commit a23b23d

Please sign in to comment.