Presenting: Columns - for in-tid columns

261 views
Skip to first unread message

Mat

unread,
Jun 7, 2019, 8:06:41 AM6/7/19
to TiddlyWiki
The TWaddler presents...
...nothing big but still useful for the occasions that you need it:


...is just a small one tiddler tiddler stylesheet that makes it easy to
show tiddler content in multiple columns, like newspaper articles.
It is designed primarily to help split up the typically long lists of tiddler titles
that we get in TW. The layout is responsive, adapting to tiddler width.

<:-)

Ste Wilson

unread,
Jun 7, 2019, 12:51:43 PM6/7/19
to TiddlyWiki
Excellent!

Applied to a long list already!

http://stephenteacher.tiddlyspot.com/#Equations

Is it possible to use it with @@columns or does it have to be <div..?

Scott Kingery

unread,
Jun 7, 2019, 2:47:19 PM6/7/19
to TiddlyWiki
Thanks for this. Really cool and I'm sure to find lots of uses. Causes and interesting effect if you wrap it around a long TOC.like

<div class="columns">
<div class="tc-table-of-contents">
<
<toc-expandable "Contents">>
</div>
</div>

@TiddlyTweeter

unread,
Jun 8, 2019, 3:25:28 AM6/8/19
to TiddlyWiki
Ste & Mat

Neat example! Thanks!

IMO CSS columns are a lot easier to use than grid and flex-box methods (which normally require "HTML hierarchy" to function). Its good to see it used so well, quickly, in TW.

They have issues on readability for long texts (a web page is not a newspaper) but for lists like Ste's example are easy and efficient.

Josiah

@TiddlyTweeter

unread,
Jun 8, 2019, 3:50:12 AM6/8/19
to TiddlyWiki
Ste

FYI, my  Modulus Of Rigidity is related to my Number Of Moles.

J. 


On Friday, 7 June 2019 18:51:43 UTC+2, Ste Wilson wrote:

Ste Wilson

unread,
Jun 8, 2019, 4:14:53 AM6/8/19
to TiddlyWiki
I think you can get some cream for that... :)

Mat

unread,
Jun 8, 2019, 7:03:45 AM6/8/19
to TiddlyWiki
Ste Wilson wrote:
Excellent!

Applied to a long list already!

http://stephenteacher.tiddlyspot.com/#Equations


Great use case. It is such a long list that I'd consider categorizing the items, and then display them via nested lists. This is also supported in the columns stylesheet. BTW, I'm also a science teacher :-)
 

Is it possible to use it with @@columns or does it have to be <div..?


Sure.

 <:-)

Ste Wilson

unread,
Jun 8, 2019, 9:59:03 AM6/8/19
to TiddlyWiki
It's grown slowly.. Didn't really realise how long it was!

Nested lists you say! Well most should already be tagged with subject...

So how would I do that then?

If any of its any good for your physics class feel free ;)

Mat

unread,
Jun 8, 2019, 10:30:58 AM6/8/19
to TiddlyWiki
Ste Wilson wrote:

So how would I do that then?

If any of its any good for your physics class feel free ;)


Appreciated but my pupils are younger :-)

OK, since I'm dabbling with this just now - here, you could probably use something like this:

\define column-item(filter, subfilter)
<$list filter="$filter$" variable=subject>
<span class="column-item">
   
<div class="column-item-heading"><<subject>></div>
   
<$list filter="""$subfilter$ +[tag<subject>]""">
     
<div class="column-item-item">
         
{{!!title}}
     
</div>
   </
$list>
</span>
</
$list>
\end

Then you call it all for example like so

@@.columns
<<column-item "[tag[subject]]" "[tag[Equation]]">>
@@


If you put the code in a separate macro, you could reuse it also for each subject, i.e each subject could be it's own tiddler and then put these in every one of them:

@@.columns
<$macrocall $name=column-item filter=<<currentTiddler>> subfilter="[tag[Equation]]" />
@@

...or, if these equations are a big part of your whole site then you could make a conditional viewtemplate stating that any tiddler tagged subject should show that code just above this row. This way you would not manually have to put that code into every subject tiddler and if you add a new subject tiddler, it will automatically show content.

<:-)

Ste Wilson

unread,
Jun 8, 2019, 11:43:02 AM6/8/19
to TiddlyWiki
Thanks! I'll have a play with that after the weekend and I have a PC for easy editing :)

TonyM

unread,
Jun 8, 2019, 8:21:05 PM6/8/19
to TiddlyWiki
Mat,

Lovely easy to use solution. I suggest it get added to the default stylesheets because it is a "bread and butter" type of requirement in tiddlywiki.

Thanks for sharing soooo much
Tony

David Gifford

unread,
Jun 9, 2019, 9:53:59 AM6/9/19
to TiddlyWiki
Great Mat! Just added this to the toolmap.

Dave

Stephen Wilson

unread,
Jun 11, 2019, 11:24:38 AM6/11/19
to TiddlyWiki
Hi Mat,

went with: 

<div class="columns">
<<column-item "[tag[Table of Contents]]" "[tag[Equation]]">>
</div>

(@@. didn't do anything)


A couple of problems due to my tagging system in that an equation isn't always tagged with the top level subject, so stress is tagged under 'stress and strain' but not the top level 'Statics'.
The linkability seems to have gone too!

Stephen

Mat

unread,
Jun 11, 2019, 1:38:48 PM6/11/19
to TiddlyWiki
Stephen Wilson wrote:
A couple of problems due to my tagging system in that an equation isn't always tagged with the top level subject, so stress is tagged under 'stress and strain' but not the top level 'Statics'.
The linkability seems to have gone too!

Yeah, I guess you must stick to a pretty rigid tagging structure when automating. But you can add items manually first or last to the list as long as it is within the columns style and styled with column-item.

Below is the code using @@.columns and with links instead of titles. I was kind of assuming you'd experiment a bit yourself ;-)
Apropos that long code-harangue below to get the link, this will be much simplified in the next release so you'll just write <$link/> instead!

<:-)

\define column-item(filter, subfilter)
<$list filter="$filter$" variable=subject>
<span class="column-item">
   <div class="column-item-heading"><<subject>></div>
   <$list filter="""$subfilter$ +[tag<subject>]""">
      <div class="column-item-item">
         <$link to=<<currentTiddler>>><$view field="title"/></$link>
      </div>
   </$list>
</span>
</$list>
\end

@@.columns
<<column-item "[tag[Table of Contents]]" "[tag[Equation]]">>
@@


Reply all
Reply to author
Forward
0 new messages