~hokiegeek/tw5-card-grid-links

0f6b9f41507c700806d3da7076cc3b774b75296b — HokieGeek 1 year, 9 months ago ddc9fab 1.1.1
Adds ability to define your own card
3 files changed, 32 insertions(+), 25 deletions(-)

A default-card-template.tid
M macro.tid
M plugin.info
A default-card-template.tid => default-card-template.tid +29 -0
@@ 0,0 1,29 @@
modified: 20221001154628000
created: 20221001154628000
creator: hokiegeek
title: $:/plugins/hokiegeek/card-grid-links/default-card-template
tags: 
type: text/vnd.tiddlywiki

\whitespace trim
<div class="card-grid-links card">
<$list filter="[is[current]get[image]]">
<div style="flex: 0 1 0; margin-right: .5rem;">
<$image source={{!!title}} />
</div>
</$list>
<div style="flex: 1 1 0;">
<div>
<$link to={{!!title}}>
<$transclude field="caption">
<$view field="title"/>
</$transclude>
</$link>
</div>
<$list filter="[is[current]get[blurb]]">
<div style="font-size: .8rem;">
{{!!title}}
</div>
</$list>
</div>
</div>

M macro.tid => macro.tid +2 -24
@@ 4,33 4,11 @@ creator: hokiegeek
tags: $:/tags/Macro
title: $:/plugins/hokiegeek/card-grid-links/macro

\define card-grid-links(filter)
\define card-grid-links(filter, template:"$:/plugins/hokiegeek/card-grid-links/default-card-template")
<style>
</style>
<div class="card-grid-links cards">
<$list filter=<<__filter__>>>
<div class="card-grid-links card">
<$list filter="[is[current]get[image]]">
<div style="flex: 0 1 0; margin-right: .5rem;">
<$image source={{!!title}} />
</div>
</$list>
<div style="flex: 1 1 0;">
<div>
<$link to={{!!title}}>
<$transclude field="caption">
<$view field="title"/>
</$transclude>
</$link>
</div>
<$list filter="[is[current]get[blurb]]">
<div style="font-size: .8rem;">
{{!!title}}
</div>
</$list>
</div>
</div>
</$list>
<$list filter=<<__filter__>> template=<<__template__>> />
</div>

\end

M plugin.info => plugin.info +1 -1
@@ 2,7 2,7 @@
    "title": "$:/plugins/hokiegeek/card-grid-links",
    "description": "Given a tiddler name, it creates a clickable image to it",
    "author": "hokiegeek",
    "version": "1.0.1",
    "version": "1.1.1",
    "core-version": ">=5.1.17",
    "source": "https://git.sr.ht/~hokiegeek/tw5-card-grid-links",
    "plugin-type": "plugin",