code-body: yes
created: 20231006080749205
modified: 20231010213737515
list-before: $:/plugins/Gk0Wk/CPL-Repo/views/plugins/comments
tags: $:/tags/ViewTemplate
title: CPL PluginWiki View Template
type: text/vnd.tiddlywiki

\import $:/plugins/Gk0Wk/CPL-Repo/templates/cpl/plugin-gallery-item
\import $:/plugins/Gk0Wk/notionpage-covericon/body
\import CPL Tag Picker

<$list filter="[all[current]tag[$:/tags/PluginWiki]!is[draft]]" variable="pluginTiddler">

<$list filter="[[IfEditorMode]get[text]match[yes]]" variable="edit">
<$macrocall $name="cpl-tag-picker" title=<<currentTiddler>> tagField="cpl.tags"/>
</$list>

<$list filter="[[$:/language]get[text]removeprefix[$:/languages/]else[en-GB]search[zh]then[yes]else[no]]" variable="chinese">

<<<
@@line-height:2rem;
<$text text={{{ [<chinese>match[yes]then[作者]else[Author]] }}} />: <$text text={{!!cpl.author}}/><br/>
<$text text={{{ [<chinese>match[yes]] :then[all[current]get[cpl.category]else[Unknown]addprefix[$:/plugins/Gk0Wk/CPL-Repo/config/plugin-categories/]get[text]addprefix[类别: ]] :else[all[current]get[cpl.category]else[Unknown]addprefix[Category: ]] }}}/><br/>
<$list filter="[<currentTiddler>get[cpl.documentation]!match[]]" variable="url"><$button class="tc-btn-invisible" message="tm-open-external-window" param=<<url>>>{{$:/core/images/home-button}} <$text text={{{ [<chinese>match[yes]then[文档]else[Documentation]] }}} />:&nbsp;<$text text=<<url>>/></$button><br/></$list>
<$list filter="[<currentTiddler>get[cpl.source]!match[]]" variable="url"><$button class="tc-btn-invisible" message="tm-open-external-window" param=<<url>>>{{$:/core/images/github}} <$text text={{{ [<chinese>match[yes]then[源码]else[Source Code]] }}} />:&nbsp;<$text text=<<url>>/></$button><br/></$list>
@@
<<<

<!-- 鸣谢：创建与修改 -->
<$transclude tiddler=<<currentTiddler>> field="cpl.readme" mode="block"/>

<div
    class="cpl-plugin-thanks">
    <h2 class="cpl-plugin-thanks-title">
        <$text text={{{ [<chinese>match[yes]then[特别鸣谢]else[Specially thanks to]] }}}/>
    </h2>
    <div>
        <$text text={{{ [<chinese>match[yes]then[登记人]else[Registrant]] }}}/>:
            <$text text={{!!creator}} />&nbsp;&nbsp;<span style="opacity: 0.5">
                <$view field="created" format="date" template={{$:/language/Tiddler/DateFormat}} />
            </span>
    </div>
    <div>
        <$text text={{{ [<chinese>match[yes]then[最后编辑]else[Last modified]] }}}/>:
            <$text text={{!!modifier}} />&nbsp;&nbsp;<span style="opacity: 0.5">
                <$view field="modified" format="date" template={{$:/language/Tiddler/DateFormat}} />
            </span>
    </div>
</div>

<!-- 作者的其他插件 -->
<$list filter="[{!!cpl.author}!is[blank]]" variable="t">
<details open>
    <summary>
        <$text text={{{ [<chinese>match[yes]then[作者的其他插件]else[Author's other plugins]] }}} />
    </summary>
    <div style="padding:6px;display:flex;flex-direction:row;overflow-x:auto;">
        <$let authorPattern={{{ [{!!cpl.title}removeprefix[$:/]split[/]first[2]last[]addprefix[/]addsuffix[/]] }}}>
            <$list
                filter="[search:cpl.title<authorPattern>] [field:cpl.author{!!cpl.author}] +[!field:title<currentTiddler>unique[]sortbycount[]]"
                variable="plugin">
                <$macrocall $name="plugin-item" title=<<plugin>> class="row-scroll-plugin-item" />
            </$list>
        </$let>
    </div>
</details>
</$list>

<$list filter="[all[current]has[cpl.category]then{!!cpl.category}else[Unknown]]" variable="category">
<$list filter="[<category>!match[Unknown]!is[blank]]" variable="t">
<details open>
    <summary>
        <$text text={{{ [<chinese>match[yes]then[同类插件]else[Similar plugins]] }}} />
    </summary>
    <div style="padding:6px;display:flex;flex-direction:row;overflow-x:auto;">
        <$list filter="[field:cpl.category<category>] +[!field:title<currentTiddler>unique[]sortbycount[]]" variable="plugin">
            <$macrocall $name="plugin-item" title=<<plugin>> class="row-scroll-plugin-item" />
        </$list>
    </div>
</details>
</$list>
</$list>

</$list>

</$list>
