~hokiegeek/tw5-card-grid-links

b983a5fdbf2487d3c887f768f4799332aace3918 — HokieGeek 1 year, 9 months ago 0f6b9f4 1.2.0
Correctly assigns a unique min width to the cards in each instance
3 files changed, 14 insertions(+), 10 deletions(-)

M macro.tid
M plugin.info
M styles.tid
M macro.tid => macro.tid +10 -6
@@ 1,14 1,18 @@
modified: 20220917051220000
modified: 20221005124322000
created: 20220917051220000
creator: hokiegeek
tags: $:/tags/Macro
title: $:/plugins/hokiegeek/card-grid-links/macro

\define card-grid-links(filter, template:"$:/plugins/hokiegeek/card-grid-links/default-card-template")
<style>
</style>
<div class="card-grid-links cards">
\whitespace trim
\define card-grid-links-style()
 grid-template-columns: repeat(auto-fit, minmax($(min-card-width)$, 1fr));
\end

\define card-grid-links(filter, template:"$:/plugins/hokiegeek/card-grid-links/default-card-template", min-card-width:330px)
<$let min-card-width=$min-card-width$>
<div class="card-grid-links cards" style=<<card-grid-links-style>>>
<$list filter=<<__filter__>> template=<<__template__>> />
</div>

</$let>
\end

M plugin.info => plugin.info +2 -2
@@ 1,8 1,8 @@
{
    "title": "$:/plugins/hokiegeek/card-grid-links",
    "description": "Given a tiddler name, it creates a clickable image to it",
    "description": "Create a CSS grid of cards based on the given filter",
    "author": "hokiegeek",
    "version": "1.1.1",
    "version": "1.2.0",
    "core-version": ">=5.1.17",
    "source": "https://git.sr.ht/~hokiegeek/tw5-card-grid-links",
    "plugin-type": "plugin",

M styles.tid => styles.tid +2 -2
@@ 1,4 1,4 @@
modified: 20220917051220000
modified: 20221005044400000
created: 20220917051220000
creator: hokiegeek
tags: $:/tags/Stylesheet


@@ 10,7 10,7 @@ title: $:/plugins/hokiegeek/card-grid-links/styles
    display: grid;
    column-gap: .25rem;
    row-gap: .25rem;
    grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
    /*grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));*/
    /* grid-template-columns: repeat(auto-fit, minmax(max-content, 1fr)); */
}
.card-grid-links.card {