created: 20231006115812787
modified: 20231010214115593
tags: $:/tags/ViewTemplate TW5CPL
title: $:/core/ui/ViewTemplate/subtitle
type: text/vnd.tiddlywiki

<!-- 图标 -->
\define icon(plugin-type)
<div style="position:absolute;z-index:-1;opacity:0.05;user-select:none;bottom:-100px;right:60px;scale:6;"><$list filter="[<currentTiddler>has[cpl.icon]]" emptyMessage="""<$transclude tiddler="$:/core/images/plugin-generic-$plugin-type$"/>"""><img src={{!!cpl.icon}}/></$list></div>
\end

\whitespace trim
<$list filter="[all[current]has[cpl.title]then[yes]else[no]]" variable="CPL" >
<$list filter="[<CPL>match[no]]" variable="CPL1">
<$reveal type="nomatch" stateTitle=<<folded-state>> text="hide" tag="div" retain="yes" animate="yes">
<div class="tc-subtitle">
<$list filter="[all[shadows+tiddlers]tag[$:/tags/ViewTemplate/Subtitle]!has[draft.of]]" variable="subtitleTiddler" counter="indexSubtitleTiddler">
<$list filter="[<indexSubtitleTiddler-first>match[no]]" variable="ignore">
&nbsp;
</$list>
<$transclude tiddler=<<subtitleTiddler>> mode="inline"/>
</$list>
</div>
</$reveal>
</$list>



<$list filter="[<CPL>match[yes]]" variable="CPL1">
<$list filter="[[$:/language]get[text]removeprefix[$:/languages/]else[en-GB]search[zh]then[yes]else[no]]" variable="chinese">
<$reveal type="nomatch" stateTitle=<<folded-state>> text="hide" tag="div" retain="yes" animate="yes">
<div class="tc-subtitle" style="position:relative;">

<!-- 插件名 -->
<$text text={{{ [{!!cpl.title}] }}} />
<!-- 最新版本 -->
&nbsp;&nbsp;&nbsp;<em style="font-weight: 800;"><$text text={{{ [<chinese>match[yes]then[最新版本: ]else[Latest version: ]] }}}/><$text text={{{ [{$:/temp/CPL/plugin-infos.json}jsonget{!!cpl.title}else{!!cpl.version}else[?]] }}}/></em>

<!-- 依赖插件 -->
<$list filter="[enlist{!!cpl.dependents}] [<currentTiddler>get[cpl.parent-plugin]] +[!is[tiddler]limit[1]]" variable="ignore">
<div style="background:#e91e3db0;color:white;padding:2px 6px;margin:3px 0;border-radius:2px;backdrop-filter:blur(4px);">{{$:/language/ControlPanel/Plugins/AlsoRequires}}&nbsp;<$list filter="[enlist{!!cpl.dependents}] [{!!cpl.parent-plugin}] +[sort[cpl.name]]" variable="dependency"><$text text=<<dependency>>/></$list></div>
</$list>

<!-- 插件图标 -->
<$macrocall $name="icon" plugin-type={{{ [{!!cpl.plugin-type}else[plugin]] }}}/>
</div>

</$reveal>
</$list>
</$list>
</$list>
