mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-08-08 23:03:50 +00:00
More improvements to control panel plugin formatting
This commit is contained in:
parent
5e06ef871a
commit
2ff2092615
@ -56,7 +56,11 @@ LinkWidget.prototype.renderLink = function(parent,nextSibling) {
|
|||||||
// Create our element
|
// Create our element
|
||||||
var domNode = this.document.createElement("a");
|
var domNode = this.document.createElement("a");
|
||||||
// Assign classes
|
// Assign classes
|
||||||
var classes = ["tw-tiddlylink"];
|
var classes = [];
|
||||||
|
if(this.linkClasses) {
|
||||||
|
classes.push(this.linkClasses);
|
||||||
|
}
|
||||||
|
classes.push("tw-tiddlylink");
|
||||||
if(this.isShadow) {
|
if(this.isShadow) {
|
||||||
classes.push("tw-tiddlylink-shadow");
|
classes.push("tw-tiddlylink-shadow");
|
||||||
}
|
}
|
||||||
@ -182,6 +186,8 @@ LinkWidget.prototype.execute = function() {
|
|||||||
// Get the link title and aria label
|
// Get the link title and aria label
|
||||||
this.tooltip = this.getAttribute("tooltip");
|
this.tooltip = this.getAttribute("tooltip");
|
||||||
this["aria-label"] = this.getAttribute("aria-label");
|
this["aria-label"] = this.getAttribute("aria-label");
|
||||||
|
// Get the link classes
|
||||||
|
this.linkClasses = this.getAttribute("class");
|
||||||
// Determine the link characteristics
|
// Determine the link characteristics
|
||||||
this.isMissing = !this.wiki.tiddlerExists(this.to);
|
this.isMissing = !this.wiki.tiddlerExists(this.to);
|
||||||
this.isShadow = this.wiki.isShadowTiddler(this.to);
|
this.isShadow = this.wiki.isShadowTiddler(this.to);
|
||||||
|
@ -16,8 +16,8 @@ $(currentTiddler)$/icon
|
|||||||
<$set name="qualified-state" value=<<qualify "$:/state/plugin-info">>>
|
<$set name="qualified-state" value=<<qualify "$:/state/plugin-info">>>
|
||||||
<$list filter="[!has[draft.of]plugin-type[$type$]sort[description]]">
|
<$list filter="[!has[draft.of]plugin-type[$type$]sort[description]]">
|
||||||
<$set name="popup-state" value=<<popup-state-macro>>>
|
<$set name="popup-state" value=<<popup-state-macro>>>
|
||||||
<div class="tw-plugin-info">
|
<$link to={{!!title}} class="tw-plugin-info">
|
||||||
<div class="tw-plugin-info-dropdown-button">
|
<div class="tw-plugin-info-chunk">
|
||||||
<$reveal type="nomatch" state=<<popup-state>> text="yes">
|
<$reveal type="nomatch" state=<<popup-state>> text="yes">
|
||||||
<$button class="btn-invisible btn-dropdown" set=<<popup-state>> setTo="yes">
|
<$button class="btn-invisible btn-dropdown" set=<<popup-state>> setTo="yes">
|
||||||
{{$:/core/images/right-arrow}}
|
{{$:/core/images/right-arrow}}
|
||||||
@ -29,14 +29,12 @@ $(currentTiddler)$/icon
|
|||||||
</$button>
|
</$button>
|
||||||
</$reveal>
|
</$reveal>
|
||||||
</div>
|
</div>
|
||||||
<$link to={{!!title}} class="tw-plugin-info-link">
|
<div class="tw-plugin-info-chunk">
|
||||||
<div>
|
|
||||||
<div style="display:inline-block;vertical-align:middle;">
|
|
||||||
<$transclude tiddler=<<currentTiddler>> subtiddler=<<plugin-icon-title>>>
|
<$transclude tiddler=<<currentTiddler>> subtiddler=<<plugin-icon-title>>>
|
||||||
<$transclude tiddler="$:/core/images/plugin-generic-$type$"/>
|
<$transclude tiddler="$:/core/images/plugin-generic-$type$"/>
|
||||||
</$transclude>
|
</$transclude>
|
||||||
</div>
|
</div>
|
||||||
<div style="display:inline-block;vertical-align:middle;">
|
<div class="tw-plugin-info-chunk">
|
||||||
<div>
|
<div>
|
||||||
''<$view field="description"><$view field="title"/></$view>''
|
''<$view field="description"><$view field="title"/></$view>''
|
||||||
</div>
|
</div>
|
||||||
@ -47,7 +45,6 @@ $(currentTiddler)$/icon
|
|||||||
<$view field="version"/>
|
<$view field="version"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</$link>
|
</$link>
|
||||||
<$reveal type="match" text="yes" state=<<popup-state>>>
|
<$reveal type="match" text="yes" state=<<popup-state>>>
|
||||||
<$reveal type="nomatch" text="" state="!!list">
|
<$reveal type="nomatch" text="" state="!!list">
|
||||||
@ -61,7 +58,6 @@ No information provided
|
|||||||
</div>
|
</div>
|
||||||
</$reveal>
|
</$reveal>
|
||||||
</$reveal>
|
</$reveal>
|
||||||
</div>
|
|
||||||
</$set>
|
</$set>
|
||||||
</$list>
|
</$list>
|
||||||
</$set>
|
</$set>
|
||||||
|
@ -1239,20 +1239,20 @@ canvas.tw-edit-bitmapeditor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.tw-plugin-info {
|
.tw-plugin-info {
|
||||||
|
display: block;
|
||||||
border: 1px solid <<colour muted-foreground>>;
|
border: 1px solid <<colour muted-foreground>>;
|
||||||
margin: 1em 0 1em 0;
|
margin: 1em 0 1em 0;
|
||||||
padding: 8px;
|
padding: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.tw-plugin-info-chunk {
|
||||||
|
display: inline-block;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
|
||||||
.tw-plugin-info img, .tw-plugin-info svg {
|
.tw-plugin-info img, .tw-plugin-info svg {
|
||||||
width: 3em;
|
width: 3em;
|
||||||
height: 3em;
|
height: 3em;
|
||||||
}
|
|
||||||
|
|
||||||
.tw-plugin-info .tw-plugin-info-dropdown-button,
|
|
||||||
.tw-plugin-info .tw-tiddlylink {
|
|
||||||
display: inline-block;
|
|
||||||
vertical-align: middle;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user