Skip to content

Commit d59c22e

Browse files
authored
re-organized buttons and add colors (#6)
1 parent f4ba4d8 commit d59c22e

File tree

2 files changed

+28
-4
lines changed

2 files changed

+28
-4
lines changed

web/src/components/IconLinkCard.astro

+6-4
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,19 @@ interface Props extends Omit<HTMLAttributes<'a'>, 'title'> {
1111
title: string;
1212
description?: string;
1313
icon?: StarlightIcon;
14+
iconColor?: string;
15+
titleColor?: string;
1416
}
1517
16-
const { title, description, icon, target = Astro.props.target || '_blank', ...attributes } = Astro.props;
18+
const { title, description, icon, iconColor, titleColor, target = Astro.props.target || '_blank', ...attributes } = Astro.props;
1719
---
1820

1921
<div class="sl-link-card">
2022
<span class="sl-flex stack">
2123
<div class="inline-flex">
22-
{icon && <Icon name={icon} size="1.333em" class="icon" />}
24+
{icon && <Icon name={icon} size="1.333em" color={iconColor || "#FFFFFF"}/>}
2325
<a {...attributes}>
24-
<span class="title" set:html={title} />
26+
<span class="title" set:html={title} style=`color: ${titleColor || "var(--sl-color-white)"}` />
2527
</a>
2628
</div>
2729
{description && <span class="description" set:html={description} />}
@@ -64,7 +66,7 @@ const { title, description, icon, target = Astro.props.target || '_blank', ...at
6466
}
6567

6668
.title {
67-
color: var(--sl-color-white);
69+
/* color: var(--sl-color-white); */
6870
font-weight: 600;
6971
font-size: var(--sl-text-lg);
7072
}

web/src/overrides/Pagination.astro

+22
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,28 @@ import IconLinkCard from '@src/components/IconLinkCard.astro';
44
---
55

66
<CardGrid>
7+
<IconLinkCard
8+
icon="seti:powershell"
9+
iconColor="var(--sl-color-red)"
10+
title="Functions"
11+
titleColor="var(--sl-color-red)"
12+
description="List of all client-side, server-side and shared functions"
13+
href="/Scripting_Functions" />
14+
15+
<IconLinkCard
16+
icon="seti:purescript"
17+
iconColor="var(--sl-color-blue)"
18+
title="Events"
19+
titleColor="var(--sl-color-blue)"
20+
description="List of all client-side, server-side and shared events"
21+
href="/Scripting_Events" />
22+
23+
<IconLinkCard
24+
icon="seti:plan"
25+
title="Elements"
26+
description="List of MTA:SA elements"
27+
href="/Element_tree" />
28+
729
<IconLinkCard
830
icon="discord"
931
title="Discord"

0 commit comments

Comments
 (0)