From bf37522808c82f8128903e3433b120213c912503 Mon Sep 17 00:00:00 2001 From: Xavier Cazin Date: Fri, 12 Dec 2014 10:12:34 +0100 Subject: [PATCH] Remove dependency on overriding the core toc macro Thanks to 5b38c21a417d2e5e2b85aed8010c88af32420e24 and a subsequent suggestion from @BramChen --- .../fr-FR/tiddlers/$__core_macros_toc.tid | 181 ------------------ .../$__editions_fr-FR_Macros_toc-caption.tid | 16 ++ 2 files changed, 16 insertions(+), 181 deletions(-) delete mode 100644 editions/fr-FR/tiddlers/$__core_macros_toc.tid create mode 100644 editions/fr-FR/tiddlers/$__editions_fr-FR_Macros_toc-caption.tid diff --git a/editions/fr-FR/tiddlers/$__core_macros_toc.tid b/editions/fr-FR/tiddlers/$__core_macros_toc.tid deleted file mode 100644 index 1404177a7..000000000 --- a/editions/fr-FR/tiddlers/$__core_macros_toc.tid +++ /dev/null @@ -1,181 +0,0 @@ -created: 20141127152047697 -modified: 20141203174852815 -tags: $:/tags/Macro -title: $:/core/macros/toc -type: text/vnd.tiddlywiki - -\define title-unless-caption() -<$transclude field='caption'> -<$view field='fr-title'> -<$view field='title'/> - - -\end -\define toc-body(rootTag,tag,sort:"",itemClassFilter) -
    -<$list filter="""[tag[$tag$]!has[draft.of]$sort$]"""> -<$set name="toc-item-class" filter="""$itemClassFilter$""" value="toc-item-selected" emptyValue="toc-item"> -
  1. >> -<$list filter="[is[current]toc-link[no]]" emptyMessage="<$link><>"> -<> - -<$list filter="""[all[current]] -[[$rootTag$]]"""> -<$macrocall $name="toc-body" rootTag="""$rootTag$""" tag=<> sort="""$sort$""" itemClassFilter="""$itemClassFilter$"""/> - -
  2. - - -
-\end - -\define toc(tag,sort:"",itemClassFilter) -<> -\end - -\define toc-linked-expandable-body(tag,sort:"",itemClassFilter) -<$set name="toc-state" value=<>> -<$set name="toc-item-class" filter="""$itemClassFilter$""" value="toc-item-selected" emptyValue="toc-item"> -
  • >> -<$link> -<$reveal type="nomatch" state=<> text="open"> -<$button set=<> setTo="open" class="tc-btn-invisible"> -{{$:/core/images/right-arrow}} - - -<$reveal type="match" state=<> text="open"> -<$button set=<> setTo="close" class="tc-btn-invisible"> -{{$:/core/images/down-arrow}} - - -<> - -<$reveal type="match" state=<> text="open"> -<$macrocall $name="toc-expandable" tag=<> sort="""$sort$""" itemClassFilter="""$itemClassFilter$"""/> - -
  • - - -\end - -\define toc-unlinked-expandable-body(tag,sort:"",itemClassFilter) -<$set name="toc-state" value=<>> -<$set name="toc-item-class" filter="""$itemClassFilter$""" value="toc-item-selected" emptyValue="toc-item"> -
  • >> -<$reveal type="nomatch" state=<> text="open"> -<$button set=<> setTo="open" class="tc-btn-invisible"> -{{$:/core/images/right-arrow}} -<> - - -<$reveal type="match" state=<> text="open"> -<$button set=<> setTo="close" class="tc-btn-invisible"> -{{$:/core/images/down-arrow}} -<> - - -<$reveal type="match" state=<> text="open"> -<$macrocall $name="toc-expandable" tag=<> sort="""$sort$""" itemClassFilter="""$itemClassFilter$"""/> - -
  • - - -\end - -\define toc-expandable(tag,sort:"",itemClassFilter) -
      -<$list filter="[tag[$tag$]!has[draft.of]$sort$]"> -<$list filter="[is[current]toc-link[no]]" emptyMessage="<>"> -<> - - -
    -\end - -\define toc-linked-selective-expandable-body(tag,sort:"",itemClassFilter) -<$set name="toc-state" value=<>> -<$set name="toc-item-class" filter="""$itemClassFilter$""" value="toc-item-selected" emptyValue="toc-item"> -
  • >> -<$link> -<$list filter="[all[current]tagging[]limit[1]]" variable="ignore" emptyMessage="<$button class='tc-btn-invisible'>{{$:/core/images/blank}}"> -<$reveal type="nomatch" state=<> text="open"> -<$button set=<> setTo="open" class="tc-btn-invisible"> -{{$:/core/images/right-arrow}} - - -<$reveal type="match" state=<> text="open"> -<$button set=<> setTo="close" class="tc-btn-invisible"> -{{$:/core/images/down-arrow}} - - - -<> - -<$reveal type="match" state=<> text="open"> -<$macrocall $name="toc-selective-expandable" tag=<> sort="""$sort$""" itemClassFilter="""$itemClassFilter$"""/> - -
  • - - -\end - -\define toc-unlinked-selective-expandable-body(tag,sort:"",itemClassFilter) -<$set name="toc-state" value=<>> -<$set name="toc-item-class" filter="""$itemClassFilter$""" value="toc-item-selected" emptyValue="toc-item"> -
  • >> -<$list filter="[all[current]tagging[]limit[1]]" variable="ignore" emptyMessage="<$button class='tc-btn-invisible'>{{$:/core/images/blank}} <>"> -<$reveal type="nomatch" state=<> text="open"> -<$button set=<> setTo="open" class="tc-btn-invisible"> -{{$:/core/images/right-arrow}} -<> - - -<$reveal type="match" state=<> text="open"> -<$button set=<> setTo="close" class="tc-btn-invisible"> -{{$:/core/images/down-arrow}} -<> - - - -<$reveal type="match" state=<> text="open"> -<$macrocall $name="""toc-selective-expandable""" tag=<> sort="""$sort$""" itemClassFilter="""$itemClassFilter$"""/> - -
  • - - -\end - -\define toc-selective-expandable(tag,sort:"",itemClassFilter) -
      -<$list filter="[tag[$tag$]!has[draft.of]$sort$]"> -<$list filter="[is[current]toc-link[no]]" variable="ignore" emptyMessage="<>"> -<> - - -
    -\end - -\define toc-tabbed-selected-item-filter(selectedTiddler) -[all[current]field:title{$selectedTiddler$}] -\end - -\define toc-tabbed-external-nav(tag,sort:"",selectedTiddler:"$:/temp/toc/selectedTiddler",unselectedText) -<$tiddler tiddler={{$selectedTiddler$}}> -
    -<$linkcatcher to="$selectedTiddler$"> -
    -<$macrocall $name="toc-selective-expandable" tag="""$tag$""" sort="""$sort$""" itemClassFilter=<>/> -
    - -
    -

    <>

    -<$transclude mode="block">$unselectedText$ -
    -
    - -\end - -\define toc-tabbed-internal-nav(tag,sort:"",selectedTiddler:"$:/temp/toc/selectedTiddler",unselectedText) -<$linkcatcher to="""$selectedTiddler$"""> -<$macrocall $name="toc-tabbed-external-nav" tag="""$tag$""" sort="""$sort$""" selectedTiddler="""$selectedTiddler$""" unselectedText="""$unselectedText$"""/> - -\end diff --git a/editions/fr-FR/tiddlers/$__editions_fr-FR_Macros_toc-caption.tid b/editions/fr-FR/tiddlers/$__editions_fr-FR_Macros_toc-caption.tid new file mode 100644 index 000000000..62d3f0d69 --- /dev/null +++ b/editions/fr-FR/tiddlers/$__editions_fr-FR_Macros_toc-caption.tid @@ -0,0 +1,16 @@ +created: 20141212090228728 +modified: 20141212090606825 +tags: $:/tags/Macro +title: $:/editions/fr-FR/Macros/toc-caption +type: text/vnd.tiddlywiki + +\define toc-caption() +<$set name="tv-wikilinks" value="no"> +<$transclude field="caption"> +<$view field="fr-title"> +<$view field="title"/> + + + +\end +