make icon tiles grid clickable
This commit is contained in:
parent
bb8a7b7eb6
commit
26523c990f
@ -32,6 +32,7 @@
|
||||
gap: 32px;
|
||||
min-height: 320px;
|
||||
max-width: 400px;
|
||||
text-decoration: none; /* in case it's an a href */
|
||||
|
||||
&,
|
||||
* {
|
||||
@ -55,5 +56,11 @@
|
||||
font-size: 18px;
|
||||
}
|
||||
}
|
||||
|
||||
a[href].icon-tiles-grid__tile {
|
||||
&:hover {
|
||||
transform: scale(1.05);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -18,6 +18,7 @@ const component_arguments = {
|
||||
),
|
||||
name: new Args.ShortText(),
|
||||
description: new Args.ShortText(),
|
||||
url: new Args.ShortText(),
|
||||
})
|
||||
),
|
||||
} as const;
|
||||
@ -44,16 +45,17 @@ export class IconTilesGrid extends Component<typeof component_arguments> {
|
||||
<div>{render_markdown(language, description)}</div>
|
||||
<section class="icon-tiles-grid__grid">
|
||||
{tiles.map((tile) => (
|
||||
<div
|
||||
<a
|
||||
class="icon-tiles-grid__tile"
|
||||
style={`--tile-bg-color: var(${tile.color}); --tile-fg-color: var(${getFgColorVariable(tile.color, 4.2)})`}
|
||||
href={tile.url ? tile.url : false}
|
||||
>
|
||||
<div class="icon">
|
||||
{tile.icon == "none" ? "" : icon(tile.icon)}
|
||||
</div>
|
||||
<div class="name">{insert_nbsp(tile.name)}</div>
|
||||
<div class="description">{insert_nbsp(tile.name)}</div>
|
||||
</div>
|
||||
</a>
|
||||
))}
|
||||
</section>
|
||||
</div>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user