mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-24 10:37:20 +00:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
5adcf928e6
14
editions/tw5.com/tiddlers/community/resources/DullRoar.tid
Normal file
14
editions/tw5.com/tiddlers/community/resources/DullRoar.tid
Normal file
@ -0,0 +1,14 @@
|
||||
created: 20150102155658750
|
||||
modified: 20150102155658750
|
||||
tags: Resources
|
||||
title: "Dull Roar" by Jim Lehmer
|
||||
type: text/vnd.tiddlywiki
|
||||
url: http://dullroar.com/tiddlywiki5.html
|
||||
|
||||
A collection of hints and tips from Jim Lehmer, published as a static blog generated by TiddlyWiki.
|
||||
|
||||
{{!!url}}
|
||||
|
||||
<<<
|
||||
There is a decent write-up on generating static pages using Tiddlywiki on the main TW site. However, there are a few nuances not mentioned on that page, so here are a few of my notes on how I generate the pages for this site.
|
||||
<<<
|
@ -28,5 +28,3 @@ Palette tiddlers should have the following fields:
|
||||
|tags |`$:/tags/Palette` |
|
||||
|description |Displayed in the palette browser |
|
||||
|text |`name: value` colour definitions |
|
||||
|
||||
By convention, each [[theme|Themes]] provides a default colour palette in the tiddler [[$:/config/DefaultPalette]]. Thus, setting the tiddler [[$:/theme]] to the string `$:/config/DefaultPalette` will revert to the palette packaged with the current theme (as long as it hasn't been redefined, since it is a shadow tiddler).
|
||||
|
@ -1,5 +1,5 @@
|
||||
created: 20130824154300000
|
||||
modified: 20140802114152456
|
||||
modified: 20150102155658750
|
||||
tags: Widgets
|
||||
title: TiddlerWidget
|
||||
type: text/vnd.tiddlywiki
|
||||
@ -19,10 +19,15 @@ 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'': ''"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 ''"tc-tagged-{tagname}"''. For example ''"tc-tagged-introduction"''. Note that tag names are UrlEncoded which means that the tag ''$:/tags/Macro'' appears as the CSS class ''"tc-tagged-%24%3A%2Ftags%2FMacro"''
|
||||
; missingTiddlerClass
|
||||
: `tc-tiddler-exists` or...
|
||||
: `tc-tiddler-missing` depending on whether the 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 `tc-tagged-{tagname}`,<br>e.g. `tc-tagged-introduction`<br><br>''Note:'' tag names are URI encoded which means that the tag [[$:/tags/Macro]] appears as the CSS class `tc-tagged-%24%3A%2Ftags%2FMacro`. See [[How to apply custom styles by tag]] for more details
|
||||
|
||||
You can use these variables like this:
|
||||
|
||||
@ -30,6 +35,7 @@ You can use these variables like this:
|
||||
<$tiddler tiddler="MyOtherTiddler">
|
||||
<div class=<<missingTiddlerClass>>>
|
||||
<$transclude/>
|
||||
</div>
|
||||
</$tiddler>
|
||||
```
|
||||
|
||||
|
@ -95,7 +95,7 @@ FileSystemAdaptor.prototype.generateTiddlerFilename = function(title,extension,e
|
||||
var baseFilename = title.replace(/<|>|\:|\"|\/|\\|\||\?|\*|\^|\s/g,"_");
|
||||
// Truncate the filename if it is too long
|
||||
if(baseFilename.length > 200) {
|
||||
baseFilename = baseFilename.substr(0,200) + extension;
|
||||
baseFilename = baseFilename.substr(0,200);
|
||||
}
|
||||
// Start with the base filename plus the extension
|
||||
var filename = transliterate(baseFilename) + extension,
|
||||
|
Loading…
Reference in New Issue
Block a user