1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-07-05 03:33:27 +00:00
TiddlyWiki5/core/ui/ControlPanel/Plugins.tid
Jermolene bd92dc3692 Improve plugin tab layout
It’s still a bit of a mess, and the vertical alignment isn’t working
properly
2014-08-08 10:01:21 +01:00

81 lines
2.1 KiB
Plaintext

title: $:/core/ui/ControlPanel/Plugins
tags: $:/tags/ControlPanel
caption: {{$:/language/ControlPanel/Plugins/Caption}}
\define lingo-base() $:/language/ControlPanel/Plugins/
\define popup-state-macro()
$(qualified-state)$-$(currentTiddler)$
\end
\define tabs-state-macro()
$(popup-state)$-$(pluginInfoType)$
\end
\define plugin-icon-title()
$(currentTiddler)$/icon
\end
\define plugin-table(type)
<$set name="qualified-state" value=<<qualify "$:/state/plugin-info">>>
<$list filter="[!has[draft.of]plugin-type[$type$]sort[description]]">
<$set name="popup-state" value=<<popup-state-macro>>>
<div class="tw-plugin-info">
<div class="tw-plugin-info-dropdown-button">
<$reveal type="nomatch" state=<<popup-state>> text="yes">
<$button class="btn-invisible btn-dropdown" set=<<popup-state>> setTo="yes">
{{$:/core/images/right-arrow}}
</$button>
</$reveal>
<$reveal type="match" state=<<popup-state>> text="yes">
<$button class="btn-invisible btn-dropdown" set=<<popup-state>> setTo="no">
{{$:/core/images/down-arrow}}
</$button>
</$reveal>
</div>
<$link to={{!!title}} class="tw-plugin-info-link">
<div>
<div style="display:inline-block;">
<$transclude tiddler=<<currentTiddler>> subtiddler=<<plugin-icon-title>>>
<$transclude tiddler="$:/core/images/plugin-generic-$type$"/>
</$transclude>
</div>
<div style="display:inline-block;">
<div>
''<$view field="description"><$view field="title"/></$view>''
</div>
<div>
<$view field="title"/><br>
</div>
<div>
<$view field="version"/>
</div>
</div>
</div>
</$link>
<$reveal type="match" text="yes" state=<<popup-state>>>
<$reveal type="nomatch" text="" state="!!list">
<div class="tw-plugin-info-dropdown">
<$macrocall $name="tabs" state=<<tabs-state-macro>> tabsList={{!!list}} default="readme" template="$:/core/ui/PluginInfo"/>
</div>
</$reveal>
<$reveal type="match" text="" state="!!list">
<div class="tw-plugin-info-dropdown">
No information provided
</div>
</$reveal>
</$reveal>
</div>
</$set>
</$list>
</$set>
\end
! <<lingo Plugin/Prompt>>
<<plugin-table plugin>>
! <<lingo Theme/Prompt>>
<<plugin-table theme>>
! <<lingo Language/Prompt>>
<<plugin-table language>>