Skip to content

Commit

Permalink
0.5.5 first release
Browse files Browse the repository at this point in the history
* safer default styles
* added widget-type to classes
* documented css classes
* documented button style
  • Loading branch information
tobibeer committed Dec 29, 2015
1 parent 9c7b28f commit 5ae096f
Show file tree
Hide file tree
Showing 10 changed files with 46 additions and 25 deletions.
21 changes: 11 additions & 10 deletions editions/appear/tiddlers/content/appear-Attributes.tid
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
created: 20151209181001150
creator: Tobias Beer
modified: 20151218155746917
modified: 20151229094011629
modifier: Tobias Beer
title: appear-Attributes
type: text/vnd.tiddlywiki

Some attributes of the ''appear'' widget directly specify its behavior while others map to the corresponding <<x ButtonWidget>> or <<x RevealWidget>> it creates:

|!Name |!Description |!Default |
|>|>|!Globals |
| !Name | !Description | !Default |
|>|>| !Globals |
|''show''|the label for the button|<code>&raquo;</code><br/>see [[defaults|appear-Defaults]]|
|''hide''|the label for the hide-button|same as ''show''|
|''type''|to output a popup, set this attribute to `popup`<br>&raquo; if unspecified, the inner reveal will be rendered as either an inline- or block-level element, e.g. a slider||
Expand All @@ -18,11 +18,12 @@ Some attributes of the ''appear'' widget directly specify its behavior while oth
|''handle''|specifies a handler type for an appear widget used in a placeholder template tagged ''$:/tags/PageTemplate'' to remotely output the contents of all appear widgets whose ''handler'' attribute matches the same type<br>&raquo; by default handled via the state `$:/temp/appear-handlers/<handle>`||
|''handler''|specifies the handler type of the remote appear widget that is configured to ''handle'' this appear widget's inner reveal||
|''variables''|should you have specified a remote ''handler'', specify context variables you wish preserved for the inner reveal as it is rendered in a different context|`currentTiddler`|
|>|>|!Button Attributes|
|''button-tag''|maps to the ''tag'' attribute of the button||
|>|>| ![[Button Attributes|http://tiddlywiki.com/#ButtonWidget]] |
|''button-class''|maps to the ''class'' attribute of the button|see [[Defaults|appear-Defaults]]|
|''tooltip''|a tooltip applied to the button||
|''style''|css applied to the button||
|''selectedClass''|css class applied to the button when the slider / popup is open||
|>|>|!Reveal Attributes|
|''class'',<br>''position'',<br>''retain'',<br>''state'',<br>''style'',<br>''tag''|see <<x RevealWidget>><br>&raquo; note that the type attribute of the reveal is explicitly handled by the appear widget||
|''button-style''|maps to the ''style'' attribute of the button|~|
|''button-tag''|maps to the ''tag'' attribute of the button|~|
|''tooltip''|a tooltip applied to the button|~|
|''style''|css applied to the button|~|
|''selectedClass''|css class applied to the button when the slider / popup is open|~|
|>|>| ![[Reveal Attributes|http://tiddlywiki.com/#RevealWidget]] |
|''class'',<br>''position'',<br>''retain'',<br>''state'',<br>''style'',<br>''tag''|see <<x RevealWidget>><br>&raquo; note that the type attribute of the reveal is explicitly handled by the appear widget|see [[Defaults|appear-Defaults]]|
6 changes: 4 additions & 2 deletions editions/appear/tiddlers/content/appear-Info.tid
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
created: 20151209180941139
creator: Tobias Beer
modified: 20151218035422612
modified: 20151229094127992
modifier: Tobias Beer
title: appear-Info
type: text/vnd.tiddlywiki
Expand All @@ -12,4 +12,6 @@ The ''appear'' widget displays a button which when clicked reveals hidden conten
* accordion ''menus''
* interactive ''stories''

Under the hood, there is at least one <<x ButtonWidget>> and one <<x RevealWidget>> it creates which may be wrapped in further elements, e.g. more reveal widgets, as needed, so as to achieve the desired output.
Under the hood, there is at least one <<x ButtonWidget>> and one <<x RevealWidget>> created by the appear widget which may be further wrapped in more reveal widgets, as needed, so as to achieve the desired output.

<<plugin-docs-cp appear>>
23 changes: 21 additions & 2 deletions editions/appear/tiddlers/content/appear-Styles.tid
Original file line number Diff line number Diff line change
@@ -1,9 +1,28 @@
created: 20151216094336360
creator: Tobias Beer
modified: 20151216094449945
modified: 20151229093643685
modifier: Tobias Beer
tags:
title: appear-Styles
type: text/vnd.tiddlywiki

The default styles for the appear-widget are defined in <<source "$:/plugins/tobibeer/appear/styles">>
The default styles for the appear-widget are defined in <<source "$:/plugins/tobibeer/appear/styles">>

!! CSS Classes

The following css classes are automatically set by the appear widget:

; appear
: set at all buttons or reveals created by the appear widget
; appear-button
: set at each button widget to trigger an appear popup or slider
; appear-reveal
: set at each reveal widget being the popup or slider
; appear-inline, appear-block
: set at both button and reveal depending on the specified mode
; appear-show
: set at the button widget that opens the slider
; appear-hide
: set at the button widget that closes the slider
; appear-once
: set at both button and reveal when an appear widget is specified to only show the button once
6 changes: 2 additions & 4 deletions editions/appear/tiddlers/content/appear.tid
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
created: 20151209180857097
creator: Tobias Beer
modified: 20151216114439777
modified: 20151229092638950
modifier: Tobias Beer
tabs: Info Attributes Examples Defaults Modes States Styles Install
tags: Plugins Widgets
title: appear
type: text/vnd.tiddlywiki

<<plugin-docs appear>>

<<plugin-docs-cp appear>>
<<plugin-docs appear>>
2 changes: 1 addition & 1 deletion plugins/tobibeer/appear/appear.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion plugins/tobibeer/appear/plugin.info
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"title": "$:/plugins/tobibeer/appear",
"description": "Create popups, sliders or accordion menus with the appear widget.",
"author": "Tobias Beer",
"version": "0.5.4",
"version": "0.5.5",
"core-version": ">=5.1.9",
"source": "https://github.com/tobibeer/tw5-appear",
"documentation": "https://tobibeer.github.io/tw5-appear",
Expand Down
4 changes: 2 additions & 2 deletions plugins/tobibeer/appear/styles.tid
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ tags: $:/tags/Stylesheet
padding: 0 1em;
background: <<colour background>>;
}
.tc-reveal.appear-inline{
.appear-reveal.appear-inline{
margin-left:5px;
}
.tc-reveal.appear-inline.appear-once{
.appear-reveal.appear-inline.appear-once{
margin-left:0;
}</pre>
1 change: 1 addition & 0 deletions src/appear.js
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,7 @@ AppearWidget.prototype.setAttributes = function(node,element) {
// Construct classes
val = [
"appear",
"appear-" + element,
(self.mode ? "appear-" + self.mode : ""),
(self.once ? "appear-once" : ""),
(val || "")
Expand Down
2 changes: 1 addition & 1 deletion src/plugin.info
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"title": "$:/plugins/tobibeer/appear",
"description": "Create popups, sliders or accordion menus with the appear widget.",
"author": "Tobias Beer",
"version": "0.5.4",
"version": "0.5.5",
"core-version": ">=5.1.9",
"source": "https://github.com/tobibeer/tw5-appear",
"documentation": "https://tobibeer.github.io/tw5-appear",
Expand Down
4 changes: 2 additions & 2 deletions src/styles.tid
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ tags: $:/tags/Stylesheet
padding: 0 1em;
background: <<colour background>>;
}
.tc-reveal.appear-inline{
.appear-reveal.appear-inline{
margin-left:5px;
}
.tc-reveal.appear-inline.appear-once{
.appear-reveal.appear-inline.appear-once{
margin-left:0;
}</pre>

0 comments on commit 5ae096f

Please sign in to comment.