Update macro for styled table; add a javascript macro to simplify syntax
This commit is contained in:
parent
63acafea94
commit
1543c0a54a
95
index.html
95
index.html
|
@ -157,6 +157,8 @@ Error message and password prompt
|
|||
|
||||
<li>$:/core</li>
|
||||
|
||||
<li>$:/core/macros/ulaulaman/TagTable</li>
|
||||
|
||||
<li>$:/custom-svg-style</li>
|
||||
|
||||
<li>$:/custom-tag-styles</li>
|
||||
|
@ -169,6 +171,8 @@ Error message and password prompt
|
|||
|
||||
<li>$:/isEncrypted</li>
|
||||
|
||||
<li>$:/macros/ulaulaman/TagTable.js</li>
|
||||
|
||||
<li>$:/plugins/tiddlywiki/katex</li>
|
||||
|
||||
<li>$:/plugins/tiddlywiki/markdown</li>
|
||||
|
@ -221,8 +225,6 @@ Error message and password prompt
|
|||
|
||||
<li>$:/StoryList</li>
|
||||
|
||||
<li>$:/TagTable</li>
|
||||
|
||||
<li>$:/temp/info-plugin</li>
|
||||
|
||||
<li>$:/temp/NewTagName</li>
|
||||
|
@ -265,6 +267,8 @@ Error message and password prompt
|
|||
|
||||
<li>Table-of-Contents Macros</li>
|
||||
|
||||
<li>TagTable</li>
|
||||
|
||||
<li>TikzDraw</li>
|
||||
|
||||
<li>twitter.svg</li>
|
||||
|
@ -300,8 +304,8 @@ Error message and password prompt
|
|||
<div created="20200815145323767" creator="ulaulaman" modified="20200815145442943" modifier="ulaulaman" title="$:/config/SideBar/Visibility/$:/core/ui/SideBar/Open">
|
||||
<pre>hide</pre>
|
||||
</div>
|
||||
<div created="20200815145444032" creator="ulaulaman" modified="20200815172636493" modifier="ulaulaman" title="$:/config/SideBar/Visibility/$:/core/ui/SideBar/Recent">
|
||||
<pre>hide</pre>
|
||||
<div created="20200815145444032" creator="ulaulaman" modified="20200816133240608" modifier="ulaulaman" title="$:/config/SideBar/Visibility/$:/core/ui/SideBar/Recent">
|
||||
<pre>show</pre>
|
||||
</div>
|
||||
<div created="20200815145446088" creator="ulaulaman" modified="20200815163823669" modifier="ulaulaman" title="$:/config/SideBar/Visibility/$:/core/ui/SideBar/Tools">
|
||||
<pre>hide</pre>
|
||||
|
@ -9685,6 +9689,13 @@ Error message and password prompt
|
|||
}
|
||||
}</pre>
|
||||
</div>
|
||||
<div created="20200816130933001" creator="ulaulaman" modified="20200816131448184" modifier="ulaulaman" tags="Macros" title="$:/core/macros/ulaulaman/TagTable">
|
||||
<pre>\define TagTable(tag)
|
||||
<table><tr><$list filter="[tag[$tag$]sort[title]]"><td style="background-color:lightblue; border-style: solid; border-width: 1px;border-color:green;"> <<currentTiddler>> </td></$list></tr></table>
|
||||
\end
|
||||
|
||||
<$macrocall $name="TagTable" tag={{!!title}}/></pre>
|
||||
</div>
|
||||
<div created="20200815170308495" creator="ulaulaman" modified="20200815172437025" modifier="ulaulaman" tags="template $:/tags/Stylesheet data-tags-styles" title="$:/custom-svg-style" type="text/vnd.tiddlywiki">
|
||||
<pre>[data-tags*="svg"] .svg-icon {
|
||||
width: 100%;
|
||||
|
@ -9717,10 +9728,14 @@ Error message and password prompt
|
|||
font-family: Monaco, Consolas, "Lucida Console", "DejaVu Sans Mono", monospace;
|
||||
}</pre>
|
||||
</div>
|
||||
<div created="20200815171528811" creator="ulaulaman" modified="20200815172459198" modifier="ulaulaman" tags="template $:/tags/Stylesheet data-tags-styles" title="$:/custom-tag-styles" type="text/vnd.tiddlywiki">
|
||||
<div created="20200815171528811" creator="ulaulaman" modified="20200816133329208" modifier="ulaulaman" tags="template $:/tags/Stylesheet data-tags-styles" title="$:/custom-tag-styles" type="text/vnd.tiddlywiki">
|
||||
<pre>[data-tags*="Macros"] {
|
||||
border: 1px solid red;
|
||||
}
|
||||
|
||||
[data-tags*="javascript"] {
|
||||
border: 1px solid black;
|
||||
}
|
||||
</pre>
|
||||
</div>
|
||||
<div created="20200728100500119" creator="ulaulaman" modified="20200731225746817" modifier="ulaulaman" title="$:/DefaultTiddlers">
|
||||
|
@ -9732,11 +9747,52 @@ Error message and password prompt
|
|||
<div status="complete" title="$:/Import">
|
||||
<pre>The following tiddlers were imported:
|
||||
|
||||
# [[code]]</pre>
|
||||
# [[TagTable]]</pre>
|
||||
</div>
|
||||
<div title="$:/isEncrypted">
|
||||
<pre>no</pre>
|
||||
</div>
|
||||
<div created="20200816102454592" creator="ulaulaman" modified="20200816133351372" modifier="ulaulaman" module-type="macro" tags="javascript" title="$:/macros/ulaulaman/TagTable.js" type="application/javascript">
|
||||
<pre>/*\
|
||||
title: $:/macros/ulaulaman/TagTable.js
|
||||
type: application/javascript
|
||||
module-type: macro
|
||||
|
||||
<<TagTable tag>>
|
||||
|
||||
Example:
|
||||
<<TagTable>>
|
||||
<<TagTable "tag">>
|
||||
|
||||
\*/
|
||||
(function(){
|
||||
|
||||
/*jslint node: true, browser: true */
|
||||
/*global $tw: false */
|
||||
"use strict";
|
||||
|
||||
/*
|
||||
Information about this macro
|
||||
Create a styled table in order to show tiddlers from a specific tag as a menu.
|
||||
*/
|
||||
|
||||
exports.name = "TagTable";
|
||||
|
||||
exports.params = [
|
||||
{ name: "tag" }
|
||||
];
|
||||
|
||||
/*
|
||||
Run the macro
|
||||
*/
|
||||
exports.run = function(tag) {
|
||||
if( !tag) tag = "menu";
|
||||
var output = "{{" + tag + "||$:/core/macros/ulaulaman/TagTable}}";
|
||||
return output;
|
||||
};
|
||||
|
||||
})();</pre>
|
||||
</div>
|
||||
<div dependents="" description="KaTeX library for mathematical typography" library-version="v0.10.2" list="readme usage" name="KaTeX" plugin-type="plugin" title="$:/plugins/tiddlywiki/katex" type="application/json" version="5.1.22">
|
||||
<pre>{
|
||||
"tiddlers": {
|
||||
|
@ -10182,16 +10238,9 @@ Error message and password prompt
|
|||
<div created="20200728124256197" creator="u" modified="20200728124300028" modifier="ulaulama" title="$:/status/UserName">
|
||||
<pre>ulaulaman</pre>
|
||||
</div>
|
||||
<div created="20200815170220746" creator="ulaulaman" list="$:/custom-tag-styles $:/custom-svg-style twitterFollowButton Macros twitter.svg svgStylesheet ulaulaman" modified="20200815170857662" modifier="ulaulaman" title="$:/StoryList">
|
||||
<div created="20200816133628346" creator="ulaulaman" list="TagTable $:/core/macros/ulaulaman/TagTable $:/macros/ulaulaman/TagTable.js ulaulaman" modified="20200816133844358" modifier="ulaulaman" title="$:/StoryList">
|
||||
<pre></pre>
|
||||
</div>
|
||||
<div created="20200815144105695" creator="ulaulaman" modified="20200815144845173" modifier="ulaulaman" tags="Macros" title="$:/TagTable">
|
||||
<pre>\define TagTable(tag)
|
||||
<table><tr><$list filter="[tag[$tag$]sort[title]]"><td style="background-color:lightblue; border-style: solid; border-width: 1px;border-color:green;"> <<currentTiddler>> </td></$list></tr></table>
|
||||
\end
|
||||
|
||||
<$macrocall $name="TagTable" tag={{!!title}}/></pre>
|
||||
</div>
|
||||
<div plugin-type="info" title="$:/temp/info-plugin" type="application/json">
|
||||
<pre>{
|
||||
"tiddlers": {
|
||||
|
@ -10250,7 +10299,7 @@ Error message and password prompt
|
|||
}
|
||||
}</pre>
|
||||
</div>
|
||||
<div created="20200728100359161" creator="ulaulaman" modified="20200815171346394" modifier="ulaulaman" title="$:/temp/NewTagName">
|
||||
<div created="20200728100359161" creator="ulaulaman" modified="20200816133347037" modifier="ulaulaman" title="$:/temp/NewTagName">
|
||||
<pre></pre>
|
||||
</div>
|
||||
<div created="20180826061648522" creator="jd" modified="20180826061648522" modifier="jd" title="$:/theme">
|
||||
|
@ -10698,6 +10747,18 @@ These two parameters are combined into a single [[filter expression|Filter Expre
|
|||
[[Examples|Table-of-Contents Macros (Examples)]]
|
||||
</pre>
|
||||
</div>
|
||||
<div created="20200816122927690" creator="ulaulaman" modified="20200816133930078" modifier="ulaulaman" tags="Macros" title="TagTable">
|
||||
<pre>Following the tricks pubblished by [[Stephan Hradek on TW5 Magick|http://tw5magick.tiddlyspot.com/]] I create a macro that shows tiddlers from a specific tag in a styled table: $:/core/macros/ulaulaman/TagTable
|
||||
|
||||
Whit the previous title, the syntax must be a bit difficult (`{{menu||$:/core/macros/ulaulaman/TagTable}}`), so I create a javascript in order to simplify the syntax in this way: `<<TagTable "Menu">>`:
|
||||
|
||||
<<TagTable "Menu">>
|
||||
|
||||
In you want use the macro, drag the following link in your TiddlyWiki, and don't forget to save and refresh:
|
||||
|
||||
* $:/core/macros/ulaulaman/TagTable
|
||||
* $:/macros/ulaulaman/TagTable.js</pre>
|
||||
</div>
|
||||
<div created="20200803183532401" creator="ulaulaman" modified="20200812150428278" modifier="ulaulaman" tags="latex Menu github" title="TikzDraw">
|
||||
<pre>Un //repository// di grafiche e infografiche realizzate con il pacchetto tikzdraw di LaTeX.
|
||||
|
||||
|
@ -10718,7 +10779,7 @@ These two parameters are combined into a single [[filter expression|Filter Expre
|
|||
<div created="20200815123143434" creator="ulaulaman" modified="20200815171002483" modifier="ulaulaman" tags="example" title="twitterFollowButtonExample">
|
||||
<pre><tr><td width="50%;">{{ulaulaman||twitterFollowButton}}</td><td width="50%;">{{edu_inaf||twitterFollowButton}}</td></tr></pre>
|
||||
</div>
|
||||
<div created="20200728124602616" creator="ulaulaman" modified="20200815144909949" modifier="ulaulaman" tags="about" title="ulaulaman">
|
||||
<div created="20200728124602616" creator="ulaulaman" modified="20200816133141815" modifier="ulaulaman" tags="about" title="ulaulaman">
|
||||
<pre>''Gianluigi Filippelli'', wikipediano, divulgatore e blogger scientifico.
|
||||
|
||||
!! Lavoro
|
||||
|
@ -10735,7 +10796,7 @@ In inglese: [[Doc Madhattan|http://docmadhattan.fieldofscience.com/]] | [[for Ma
|
|||
|
||||
!! Repository e progetti su github
|
||||
|
||||
{{github||$:/TagTable}}
|
||||
<<TagTable "github">>
|
||||
|
||||
!! Social
|
||||
|
||||
|
|
Loading…
Reference in New Issue