1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-27 03:57:21 +00:00

Added version widget

This commit is contained in:
Jeremy Ruston 2013-01-03 22:55:23 +00:00
parent b7b1b0a693
commit 698f8dd602
3 changed files with 38 additions and 1 deletions

View File

@ -0,0 +1,34 @@
/*\
title: $:/core/modules/widget/version.js
type: application/javascript
module-type: widget
Implements the version widget.
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
var VersionWidget = function(renderer) {
// Save state
this.renderer = renderer;
// Generate child nodes
this.generate();
};
VersionWidget.prototype.generate = function() {
// Set the element
this.tag = "span";
this.attributes = {};
this.children = this.renderer.renderTree.createRenderers(this.renderer.renderContext,[{
type: "text",
text: $tw.version
}]);
};
exports.version = VersionWidget;
})();

View File

@ -6,7 +6,7 @@ title: $:/core/templates/tiddlywiki5.template.html
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="application-name" content="TiddlyWiki" />
<meta name="generator" content="TiddlyWiki" />
<meta name="tiddlywiki-version" content="{{version}}" />
<meta name="tiddlywiki-version" content="{{$:/core/templates/version}}" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />

View File

@ -0,0 +1,3 @@
title: $:/core/templates/version
<$version/>