Here’s a quick POC implementation of a “card/note”, using Cascades:
First, create a tiddler (e.g., “$:/config/ViewTemplateBodyFilters/note”)
- Tag it with
$:/tags/ViewTemplateBodyFilter
- Set text field content to:
[has[note]then[$:/custom/ui/ViewTemplate/body/note]]
- Add a field named
list-before
with a BLANK value
Next, create a tiddler (e.g., “$:/custom/ui/ViewTemplate/body/note”) containing text:
<div class="post-it"><$transclude field="note" mode="block"/></div>
<$transclude mode="block"/>
Next, create a tiddler (e.g., “$:/custom/ui/ViewTemplate/body/note/styles”) tagged with $:/tags/Stylesheet
, containing:
.post-it { float:right; display:inline-block; }
.post-it { border:1px solid; border-radius:0.5em; padding:0.25em; }
.post-it p { margin:0; }
Note: you can adjust the 2nd “.post-it
” style definition to apply whatever CSS you want to surround the post-it note.
Then, in any tiddler you want to display a post-it note, add a field named “note” containing whatever content you want (i.e, “a bit of info and a link to another tiddler”).
enjoy,
-e