1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-06-25 23:03:15 +00:00

Rename more "tw-*" classes to "tc-*"

Part of #764
This commit is contained in:
Jermolene 2014-08-28 18:59:35 +01:00
parent 1814d502a4
commit 8b10994cfe
17 changed files with 79 additions and 79 deletions

View File

@ -37,7 +37,7 @@ KeyboardWidget.prototype.render = function(parent,nextSibling) {
var domNode = this.document.createElement("div");
// Assign classes
var classes = (this["class"] || "").split(" ");
classes.push("tw-keyboard");
classes.push("tc-keyboard");
domNode.className = classes.join(" ");
// Add a keyboard event handler
domNode.addEventListener("keydown",function (event) {

View File

@ -129,15 +129,15 @@ LinkWidget.prototype.handleDragStartEvent = function(event) {
$tw.utils.addClass(event.target,"tc-tiddlylink-dragging");
// Create the drag image elements
this.dragImage = this.document.createElement("div");
this.dragImage.className = "tw-tiddler-dragger";
this.dragImage.className = "tc-tiddler-dragger";
var inner = this.document.createElement("div");
inner.className = "tw-tiddler-dragger-inner";
inner.className = "tc-tiddler-dragger-inner";
inner.appendChild(this.document.createTextNode(this.to));
this.dragImage.appendChild(inner);
this.document.body.appendChild(this.dragImage);
// Astoundingly, we need to cover the dragger up: http://www.kryogenix.org/code/browser/custom-drag-image.html
var cover = this.document.createElement("div");
cover.className = "tw-tiddler-dragger-cover";
cover.className = "tc-tiddler-dragger-cover";
cover.style.left = (inner.offsetLeft - 16) + "px";
cover.style.top = (inner.offsetTop - 16) + "px";
cover.style.width = (inner.offsetWidth + 32) + "px";

View File

@ -101,7 +101,7 @@ RadioWidget.prototype.execute = function() {
if(this.radioClass !== "") {
this.radioClass += " ";
}
this.radioClass += "tw-radio";
this.radioClass += "tc-radio";
// Make the child widgets
this.makeChildWidgets();
};

View File

@ -32,7 +32,7 @@ RevealWidget.prototype.render = function(parent,nextSibling) {
this.execute();
var domNode = this.document.createElement(this.parseTreeNode.isBlock ? "div" : "span");
var classes = this["class"].split(" ") || [];
classes.push("tw-reveal");
classes.push("tc-reveal");
domNode.className = classes.join(" ");
parent.insertBefore(domNode,nextSibling);
this.renderChildren(domNode,null);

View File

@ -41,9 +41,9 @@ TiddlerWidget.prototype.execute = function() {
this.tiddlerTitle = this.getAttribute("tiddler",this.getVariable("currentTiddler"));
// Set context variables
this.setVariable("currentTiddler",this.tiddlerTitle);
this.setVariable("missingTiddlerClass",(this.wiki.tiddlerExists(this.tiddlerTitle) || this.wiki.isShadowTiddler(this.tiddlerTitle)) ? "tw-tiddler-exists" : "tw-tiddler-missing");
this.setVariable("shadowTiddlerClass",this.wiki.isShadowTiddler(this.tiddlerTitle) ? "tw-tiddler-shadow" : "");
this.setVariable("systemTiddlerClass",this.wiki.isSystemTiddler(this.tiddlerTitle) ? "tw-tiddler-system" : "");
this.setVariable("missingTiddlerClass",(this.wiki.tiddlerExists(this.tiddlerTitle) || this.wiki.isShadowTiddler(this.tiddlerTitle)) ? "tc-tiddler-exists" : "tc-tiddler-missing");
this.setVariable("shadowTiddlerClass",this.wiki.isShadowTiddler(this.tiddlerTitle) ? "tc-tiddler-shadow" : "");
this.setVariable("systemTiddlerClass",this.wiki.isSystemTiddler(this.tiddlerTitle) ? "tc-tiddler-system" : "");
this.setVariable("tiddlerTagClasses",this.getTagClasses())
// Construct the child widgets
this.makeChildWidgets();

View File

@ -1,7 +1,7 @@
title: $:/core/ui/EditTemplate
\define frame-classes()
tw-tiddler-frame tw-tiddler-edit-frame $(missingTiddlerClass)$ $(shadowTiddlerClass)$ $(systemTiddlerClass)$
tc-tiddler-frame tc-tiddler-edit-frame $(missingTiddlerClass)$ $(shadowTiddlerClass)$ $(systemTiddlerClass)$
\end
<div class=<<frame-classes>>>
<$set name="storyTiddler" value=<<currentTiddler>>>

View File

@ -22,14 +22,14 @@ tags: $:/tags/EditTemplate
<em class="tc-edit"><<lingo Hint>></em> <$button type="set" set="$:/state/showeditpreview" setTo="no"><<lingo Preview/Button/Hide>></$button>
<div class="tw-tiddler-preview">
<div class="tw-tiddler-preview-preview">
<div class="tc-tiddler-preview">
<div class="tc-tiddler-preview-preview">
<$transclude />
</div>
<div class="tw-tiddler-preview-edit">
<div class="tc-tiddler-preview-edit">
<$edit field="text" class="tc-edit-texteditor" placeholder={{$:/language/EditTemplate/Body/Placeholder}}/>
</div>

View File

@ -4,8 +4,8 @@ tags: $:/tags/EditTemplate
\define config-title()
$:/config/EditToolbarButtons/Visibility/$(listItem)$
\end
<div class="tw-tiddler-title">
<div class="tc-tiddler-title">
<$view field="title"/>
<span class="tw-tiddler-controls tc-titlebar"><$list filter="[all[shadows+tiddlers]tag[$:/tags/EditToolbar]!has[draft.of]]" variable="listItem"><$reveal type="nomatch" state=<<config-title>> text="hide"><$transclude tiddler=<<listItem>>/></$reveal></$list></span>
<span class="tc-tiddler-controls tc-titlebar"><$list filter="[all[shadows+tiddlers]tag[$:/tags/EditToolbar]!has[draft.of]]" variable="listItem"><$reveal type="nomatch" state=<<config-title>> text="hide"><$transclude tiddler=<<listItem>>/></$reveal></$list></span>
<div style="clear: both;"></div>
</div>

View File

@ -1,6 +1,6 @@
title: $:/core/ui/MissingTemplate
<div class="tw-tiddler-missing">
<div class="tc-tiddler-missing">
<$button popup=<<qualify "$:/state/popup/missing">> class="tc-btn-invisible tw-missing-tiddler-label">
<$view field="title" format="text" />
</$button>

View File

@ -1,7 +1,7 @@
title: $:/core/ui/ViewTemplate
\define frame-classes()
tw-tiddler-frame tw-tiddler-view-frame $(missingTiddlerClass)$ $(shadowTiddlerClass)$ $(systemTiddlerClass)$ $(tiddlerTagClasses)$
tc-tiddler-frame tc-tiddler-view-frame $(missingTiddlerClass)$ $(shadowTiddlerClass)$ $(systemTiddlerClass)$ $(tiddlerTagClasses)$
\end
<$set name="storyTiddler" value=<<currentTiddler>>><$set name="tiddlerInfoState" value=<<qualify "$:/state/popup/tiddler-info">>><$tiddler tiddler=<<currentTiddler>>><div class=<<frame-classes>>><$list filter="[all[shadows+tiddlers]tag[$:/tags/ViewTemplate]!has[draft.of]]" variable="listItem"><$transclude tiddler=<<listItem>>/></$list>
</div>

View File

@ -7,9 +7,9 @@ fill:$(foregroundColor)$;
\define config-title()
$:/config/ViewToolbarButtons/Visibility/$(listItem)$
\end
<div class="tw-tiddler-title">
<div class="tc-tiddler-title">
<h2 class="tc-titlebar">
<span class="tw-tiddler-controls">
<span class="tc-tiddler-controls">
<$list filter="[all[shadows+tiddlers]tag[$:/tags/ViewToolbar]!has[draft.of]]" variable="listItem"><$reveal type="nomatch" state=<<config-title>> text="hide"><$transclude tiddler=<<listItem>>/></$reveal></$list>
</span>
<$set name="foregroundColor" value={{!!color}}>
@ -29,7 +29,7 @@ $:/config/ViewToolbarButtons/Visibility/$(listItem)$
</$list>
</h2>
<$reveal type="nomatch" text="" default="" state=<<tiddlerInfoState>> class="tw-tiddler-info tc-popup" animate="yes" retain="yes">
<$reveal type="nomatch" text="" default="" state=<<tiddlerInfoState>> class="tc-tiddler-info tc-popup" animate="yes" retain="yes">
<$transclude tiddler="$:/core/ui/TiddlerInfo"/>

View File

@ -18,9 +18,9 @@ The TiddlerWidget sets the CurrentTiddler that applies for processing its conten
The tiddler widget assigns several useful CSS classes to variables that it creates:
* ''missingTiddlerClass'': ''"tw-tiddler-exists"'' or ''"tw-tiddler-missing"'' depending upon whether the target tiddler exists
* ''shadowTiddlerClass'': ''"tw-tiddler-shadow"'' if the tiddler is a shadow tiddler
* ''systemTiddlerClass'': ''"tw-tiddler-system"'' if the tiddler is a system tiddler
* ''missingTiddlerClass'': ''"tc-tiddler-exists"'' or ''"tc-tiddler-missing"'' depending upon whether the target tiddler exists
* ''shadowTiddlerClass'': ''"tc-tiddler-shadow"'' if the tiddler is a shadow tiddler
* ''systemTiddlerClass'': ''"tc-tiddler-system"'' if the tiddler is a system tiddler
* ''tiddlerTagClasses'': A space separated list of CSS classes named ''"tw-tagged-{tagname}"''. For example ''"tw-tagged-introduction"''. Note that tag names are UrlEncoded which means that the tag ''$:/tags/Macro'' appears as the CSS class ''"tw-tagged-%24%3A%2Ftags%2FMacro"''
You can use these variables like this:

View File

@ -22,7 +22,7 @@ Similar syntax is used to assign styles. For example:
Multiple styles and classes can be mixed. For example:
<<wikitext-example src:"@@.tw-tiddler-frame
<<wikitext-example src:"@@.tc-tiddler-frame
@@width:400px;
Some text
@@

View File

@ -8,11 +8,11 @@ list-after: $:/themes/tiddlywiki/vanilla/base
Rules copied from Snow White
*/
.tw-page-controls button svg, .tw-tiddler-controls button svg, .tw-topbar button svg {
.tw-page-controls button svg, .tc-tiddler-controls button svg, .tw-topbar button svg {
<<transition "fill 150ms ease-in-out">>
}
.tw-tiddler-controls button.tw-selected svg {
.tc-tiddler-controls button.tw-selected svg {
<<filter "drop-shadow(0px -1px 2px rgba(0,0,0,0.25))">>
}
@ -62,7 +62,7 @@ Seamless modifications
@media (min-width: {{$:/themes/tiddlywiki/vanilla/metrics/sidebarbreakpoint}}) {
/* Drop the tiddler frame padding */
body.tw-body .tw-tiddler-frame {
body.tw-body .tc-tiddler-frame {
padding: 0;
}
@ -72,7 +72,7 @@ Seamless modifications
}
/* Stop the tiddler info panel from bleeding into the tiddler frame padding */
body.tw-body .tw-tiddler-info {
body.tw-body .tc-tiddler-info {
margin: 0;
}

View File

@ -7,31 +7,31 @@ tags: [[$:/tags/stylesheet]]
text-shadow: 0 1px 0 <<colour sidebar-foreground-shadow>>;
}
.tw-tiddler-info {
.tc-tiddler-info {
<<box-shadow "inset 1px 2px 3px rgba(0,0,0,0.1)">>
}
@media screen {
.tw-tiddler-frame {
.tc-tiddler-frame {
<<box-shadow "5px 5px 5px rgba(0, 0, 0, 0.1)">>
}
}
@media (max-width: {{$:/themes/tiddlywiki/vanilla/metrics/sidebarbreakpoint}}) {
.tw-tiddler-frame {
.tc-tiddler-frame {
<<box-shadow none>>
}
}
.tw-page-controls button svg, .tw-tiddler-controls button svg, .tw-topbar button svg {
.tw-page-controls button svg, .tc-tiddler-controls button svg, .tw-topbar button svg {
<<transition "fill 150ms ease-in-out">>
}
.tw-tiddler-controls button.tw-selected svg {
.tc-tiddler-controls button.tw-selected svg {
<<filter "drop-shadow(0px -1px 2px rgba(0,0,0,0.25))">>
}
.tw-tiddler-frame input.tc-edit-texteditor {
.tc-tiddler-frame input.tc-edit-texteditor {
<<box-shadow "inset 0 1px 8px rgba(0, 0, 0, 0.15)">>
}
@ -39,7 +39,7 @@ tags: [[$:/tags/stylesheet]]
<<box-shadow "inset 0 1px 8px rgba(0, 0, 0, 0.15)">>
}
.tw-tiddler-frame .tc-edit-tags input.tc-edit-texteditor {
.tc-tiddler-frame .tc-edit-tags input.tc-edit-texteditor {
<<box-shadow "none">>
border: none;
outline: none;

View File

@ -3,7 +3,7 @@ tags: [[$:/tags/stylesheet]]
\rules only filteredtranscludeinline transcludeinline macrodef macrocallinline
.tw-tiddler-title {
.tc-tiddler-title {
position: -webkit-sticky;
position: -moz-sticky;
position: -o-sticky;

View File

@ -121,16 +121,16 @@ table tfoot tr td {
white-space: nowrap;
}
.tw-tiddler-frame img,
.tw-tiddler-frame svg,
.tw-tiddler-frame canvas,
.tw-tiddler-frame embed,
.tw-tiddler-frame iframe {
.tc-tiddler-frame img,
.tc-tiddler-frame svg,
.tc-tiddler-frame canvas,
.tc-tiddler-frame embed,
.tc-tiddler-frame iframe {
max-width: 100%;
}
.tw-tiddler-frame embed,
.tw-tiddler-frame iframe {
.tc-tiddler-frame embed,
.tc-tiddler-frame iframe {
width: 100%;
height: 600px;
}
@ -193,12 +193,12 @@ a.tc-tiddlylink-external:hover {
** Drag and drop styles
*/
.tw-tiddler-dragger {
.tc-tiddler-dragger {
position: relative;
z-index: -10000;
}
.tw-tiddler-dragger-inner {
.tc-tiddler-dragger-inner {
position: absolute;
display: inline-block;
padding: 8px 20px;
@ -213,7 +213,7 @@ a.tc-tiddlylink-external:hover {
border-radius: 20px;
}
.tw-tiddler-dragger-cover {
.tc-tiddler-dragger-cover {
position: absolute;
background-color: <<colour page-background>>;
}
@ -516,7 +516,7 @@ button.tw-tag-label, span.tw-tag-label {
padding: 0;
}
.tc-story-river .tw-tiddler-frame {
.tc-story-river .tc-tiddler-frame {
margin: 0;
border: none;
padding: 28px;
@ -527,25 +527,25 @@ button.tw-tag-label, span.tw-tag-label {
** Tiddler styles
*/
.tw-tiddler-frame {
.tc-tiddler-frame {
margin-bottom: 28px;
background-color: <<colour tiddler-background>>;
border: 1px solid <<colour tiddler-border>>;
}
.tw-tiddler-info {
.tc-tiddler-info {
padding: 14px 42px 14px 42px;
background-color: <<colour tiddler-info-background>>;
border-top: 1px solid <<colour tiddler-info-border>>;
border-bottom: 1px solid <<colour tiddler-info-border>>;
}
.tw-tiddler-info p {
.tc-tiddler-info p {
margin-top: 3px;
margin-bottom: 3px;
}
.tw-tiddler-info .tw-tab-buttons button.tw-tab-selected {
.tc-tiddler-info .tw-tab-buttons button.tw-tab-selected {
background-color: <<colour tiddler-info-tab-background>>;
border-bottom: 1px solid <<colour tiddler-info-tab-background>>;
}
@ -565,30 +565,30 @@ button.tw-tag-label, span.tw-tag-label {
}
@media (max-width: {{$:/themes/tiddlywiki/vanilla/metrics/sidebarbreakpoint}}) {
.tw-tiddler-frame {
.tc-tiddler-frame {
padding: 14px 14px 14px 14px;
}
.tw-tiddler-info {
.tc-tiddler-info {
margin: 0 -14px 0 -14px;
}
}
@media (min-width: {{$:/themes/tiddlywiki/vanilla/metrics/sidebarbreakpoint}}) {
.tw-tiddler-frame {
.tc-tiddler-frame {
padding: 28px 42px 42px 42px;
width: {{$:/themes/tiddlywiki/vanilla/metrics/tiddlerwidth}};
}
<<if-no-sidebar "
.tw-tiddler-frame {
.tc-tiddler-frame {
width: 100%;
}
">>
.tw-tiddler-info {
.tc-tiddler-info {
margin: 0 -42px 0 -42px;
}
}
@ -616,52 +616,52 @@ button.tw-tag-label, span.tw-tag-label {
font-weight: 300;
}
.tw-tiddler-missing .tc-title {
.tc-tiddler-missing .tc-title {
font-style: italic;
font-weight: normal;
}
.tw-tiddler-frame .tw-tiddler-controls {
.tc-tiddler-frame .tc-tiddler-controls {
float: right;
}
.tw-tiddler-controls .tc-drop-down {
.tc-tiddler-controls .tc-drop-down {
font-size: 0.6em;
}
.tw-tiddler-controls button {
.tc-tiddler-controls button {
vertical-align: baseline;
}
.tw-tiddler-controls button svg, .tw-tiddler-controls button img {
.tc-tiddler-controls button svg, .tc-tiddler-controls button img {
height: 0.75em;
fill: <<colour tiddler-controls-foreground>>;
}
.tw-tiddler-controls button.tw-selected svg {
.tc-tiddler-controls button.tw-selected svg {
fill: <<colour tiddler-controls-foreground-selected>>;
}
.tw-tiddler-controls button.tc-btn-invisible:hover svg {
.tc-tiddler-controls button.tc-btn-invisible:hover svg {
fill: <<colour tiddler-controls-foreground-hover>>;
}
@media print {
.tw-tiddler-controls {
.tc-tiddler-controls {
display: none;
}
}
.tw-tiddler-help { /* Help prompts within tiddler template */
.tc-tiddler-help { /* Help prompts within tiddler template */
color: <<colour muted-foreground>>;
margin-top: 14px;
}
.tw-tiddler-help a.tc-tiddlylink {
.tc-tiddler-help a.tc-tiddlylink {
color: <<colour very-muted-foreground>>;
}
.tw-tiddler-frame input.tc-edit-texteditor, .tw-tiddler-frame textarea.tc-edit-texteditor {
.tc-tiddler-frame input.tc-edit-texteditor, .tc-tiddler-frame textarea.tc-edit-texteditor {
width: 100%;
padding: 3px 3px 3px 3px;
border: 1px solid <<colour tiddler-editor-border>>;
@ -670,7 +670,7 @@ button.tw-tag-label, span.tw-tag-label {
margin: 4px 0 4px 0;
}
.tw-tiddler-frame .tw-binary-warning {
.tc-tiddler-frame .tw-binary-warning {
width: 100%;
height: 5em;
text-align: center;
@ -679,7 +679,7 @@ button.tw-tag-label, span.tw-tag-label {
border: 1px solid <<colour alert-border>>;
}
.tw-tiddler-frame input.tc-edit-texteditor {
.tc-tiddler-frame input.tc-edit-texteditor {
background-color: <<colour tiddler-editor-background>>;
}
@ -717,27 +717,27 @@ canvas.tc-edit-bitmapeditor {
fill: <<colour toolbar-save-button>>;
}
.tw-tiddler-controls button svg.tc-image-info-button {
.tc-tiddler-controls button svg.tc-image-info-button {
fill: <<colour toolbar-info-button>>;
}
.tw-tiddler-controls button svg.tc-image-edit-button {
.tc-tiddler-controls button svg.tc-image-edit-button {
fill: <<colour toolbar-edit-button>>;
}
.tw-tiddler-controls button svg.tc-image-close-button {
.tc-tiddler-controls button svg.tc-image-close-button {
fill: <<colour toolbar-close-button>>;
}
.tw-tiddler-controls button svg.tc-image-delete-button {
.tc-tiddler-controls button svg.tc-image-delete-button {
fill: <<colour toolbar-delete-button>>;
}
.tw-tiddler-controls button svg.tc-image-cancel-button {
.tc-tiddler-controls button svg.tc-image-cancel-button {
fill: <<colour toolbar-cancel-button>>;
}
.tw-tiddler-controls button svg.tc-image-done-button {
.tc-tiddler-controls button svg.tc-image-done-button {
fill: <<colour toolbar-done-button>>;
}
@ -745,7 +745,7 @@ canvas.tc-edit-bitmapeditor {
** Tiddler edit mode
*/
.tw-tiddler-edit-frame em.tc-edit {
.tc-tiddler-edit-frame em.tc-edit {
color: <<colour muted-foreground>>;
font-style: normal;
}
@ -784,11 +784,11 @@ canvas.tc-edit-bitmapeditor {
padding-left: 4px;
}
.tw-tiddler-preview {
.tc-tiddler-preview {
overflow: auto;
}
.tw-tiddler-preview-preview {
.tc-tiddler-preview-preview {
float: right;
width: 48%;
border: 1px solid <<colour tiddler-editor-border>>;
@ -796,7 +796,7 @@ canvas.tc-edit-bitmapeditor {
padding: 3px 3px 3px 3px;
}
.tw-tiddler-preview-edit {
.tc-tiddler-preview-edit {
width: 48%;
}