1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-04-22 10:43:11 +00:00

update some ecampel test-cases

This commit is contained in:
pmario 2024-07-30 11:14:54 +02:00
parent 9c32e53772
commit f8954965ec
5 changed files with 69 additions and 55 deletions

View File

@ -1,18 +0,0 @@
created: 20170127140027445
modified: 20240618144740558
tags:
title: $:/wikilabs/images/new-child-alone
type: text/vnd.tiddlywiki
<svg class="tc-image-edit-button tc-image-button" viewBox="0 0 128 128" width="22pt" height="22pt">
<path d="M6.9 27.9a6.72 6.96 0 1 0 0 13.9h41a6.72 6.96 0 1 0 0-13.9z"
style="text-decoration-line:none;text-indent:0;text-transform:none"
transform="translate(13.6 62.5)" />
<path d="M27.3 4.57a6.72 6.96 0 0 0-6.64 7.05v46.5a6.72 6.96 0 1 0 13.4 0v-46.5a6.72 6.96 0 0 0-6.81-7.05z"
style="text-decoration-line:none;text-indent:0;text-transform:none"
transform="translate(13.6 62.5)" />
<path
d="M60.5 58.1c-3.75-.055-6.82 3.08-6.82 6.96s3.07 7.01 6.82 6.96h46.1c3.75.055 6.82-3.08 6.82-6.96s-3.07-7.01-6.82-6.96zM20.5 28.4c-3.75-.055-6.82 3.08-6.82 6.96s3.07 7.01 6.82 6.96h86.1c3.75.055 6.82-3.08 6.82-6.96s-3.07-7.01-6.82-6.96z"
style="text-decoration-line:none;text-indent:0;text-transform:none" />
</svg>

View File

@ -1,18 +0,0 @@
title: Description
text: Simple TOC - captionField parameter
+
title: Narrative-extended
* The "Fifth" tiddler has an alternative "caption-field"
+
title: Fifth
tags: Fourth
alt: alt-caption
text: 5th
+
title: Output
<div class="tc-table-of-contents">
<<toc tag:"root" captionField:"alt">>
</div>

View File

@ -1,7 +0,0 @@
created: 20240724104351802
description: asdf
import-compound: Examples/TOC/SimpleToc
modified: 20240724112711726
tags: $:/tags/wiki-test-spec
title: Examples/TOC/SimpleToc/captionField 1
type: text/vnd.tiddlywiki-multiple

View File

@ -1,20 +1,25 @@
created: 20240724082221230
modified: 20240724100646572
tags:
import-compound: Examples/TOC/SimpleToc
modified: 20240730081240127
tags: $:/tags/wiki-test-spec
title: Examples/TOC/SimpleToc/captionField
type: text/vnd.tiddlywiki
type: text/vnd.tiddlywiki-multiple
<$testcase testOutput="Output">
title: Description
text: Simple TOC - captionField parameter
+
title: Narrative-extended
<$data title="Description" text="Simple TOC - captionField parameter"/>
* The "Fifth" tiddler has an alternative "caption-field"
<$data title="Narrative-extended" text="""* The "Fifth" tiddler has an alternative "caption-field" """/>
+
title: Fifth
tags: Fourth
alt: alt-caption
text: 5th
+
title: Output
<$data $compound-tiddler="Examples/TOC/SimpleToc"/>
<$data title="Fifth" tags="Fourth" text="5th" alt="alt-caption"/>
<$data title="Output" text="""<div class="tc-table-of-contents">
<div class="tc-table-of-contents">
<<toc tag:"root" captionField:"alt">>
</div>
"""/>

View File

@ -0,0 +1,52 @@
created: 20240730081443212
description: Simple TOC - parentField parameter
modified: 20240730090835300
tags: $:/tags/wiki-test-spec
title: Examples/TOC/SimpleToc/parentField
type: text/vnd.tiddlywiki-multiple
title: Narrative
* The "Output" code defines a "Simple Table of Contents" using the ''parent'' field in child-tiddlers to connect to a parent-tiddler
* Click through all the tabs to get additional info
<$transclude $tiddler="Narrative-extended" $mode="block"/>
+
title: root
The parent-field in the ''child''-tiddlers are used to define the relation to the parent tiddler
+
title: Child-1
parent: root
1st 1st 1st 1st 1st
+
title: Child-2
parent: root
2nd 2nd 2nd 2nd 2nd
+
title: Child-3
parent: root
3rd 3rd 3rd 3rd 3rd
+
title: Child-2-1
caption: 2-1 caption
parent: Child-2
This tiddler contains a caption, which will be shown in the TOC instead of the tiddler title
+
title: Output
<!--
This variable set to yes allows you to show a New-Child button.
This button will create a "real" tiddler, which will _not_ be listed here
-->
\define tv-toc-show-new-child() no
<div class="tc-table-of-contents">
<<toc tag:"root" parentField:"parent">>
</div>