~hokiegeek/tw5-card-grid-links

f66dc47771c11e5be25da2533af2be5dceda9e20 — HokieGeek 1 year, 2 months ago 1.0.0
Initial commit
5 files changed, 120 insertions(+), 0 deletions(-)

A license.tid
A macro.tid
A plugin.info
A readme.tid
A styles.tid
A  => license.tid +23 -0
@@ 1,23 @@
title: $:/plugins/hokiegeek/card-grid-links/license

MIT License

Copyright (c) 2022 HokieGeek

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

A  => macro.tid +36 -0
@@ 1,36 @@
modified: 20220917051220000
created: 20220917051220000
creator: hokiegeek
tags: $:/tags/Macro
title: $:/plugins/hokiegeek/card-grid-links/macro

\define card-grid-links(filter)
<style>
</style>
<div class="card-grid-links cards">
<$list filter="[tag[rpg]!has[draft.of]tag[game]sort[title]]">
<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>
</div>

\end

A  => plugin.info +10 -0
@@ 1,10 @@
{
    "title": "$:/plugins/hokiegeek/card-grid-links",
    "description": "Given a tiddler name, it creates a clickable image to it",
    "author": "hokiegeek",
    "version": "1.0.0",
    "core-version": ">=5.1.17",
    "source": "https://git.sr.ht/~hokiegeek/tw5-card-grid-links",
    "plugin-type": "plugin",
    "list": "readme"
}

A  => readme.tid +7 -0
@@ 1,7 @@
title: $:/plugins/hokiegeek/card-grid-links/readme

The plugin $:/plugins/hokiegeek/card-grid-links provides:

```
<<card-grid-links filter:"">>
```

A  => styles.tid +44 -0
@@ 1,44 @@
modified: 20220917051220000
created: 20220917051220000
creator: hokiegeek
tags: $:/tags/Stylesheet
title: $:/plugins/hokiegeek/card-grid-links/styles

\rules only filteredtranscludeinline transcludeinline macrodef macrocallinline

.card-grid-links.cards {
    display: grid;
    column-gap: .25rem;
    row-gap: .25rem;
    grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
    /* grid-template-columns: repeat(auto-fit, minmax(max-content, 1fr)); */
}
.card-grid-links.card {
    display: flex;
    padding: .5rem;
    border: 1px solid black;
    border-radius: 3px;
    margin-right: .5rem;
    background-color: rgba(169, 169, 169, 0.1);

}
.card-grid-links.card img {
    max-width: 100px !important;
}
@media (max-width: 320px) {
    .card-grid-links.cards {
        grid-template-columns: repeat(auto-fit, minmax(95vw, 1fr));
    }
    /*
    .card-grid-links.card {
        border: 3px solid blue;
    }
    */
}
/*
@media (min-width: 321px) {
    .card-grid-links.card {
        border: 3px solid red;
    }
}
*/