From a3cf925e56743d086b1b5ac10a1f618b7f3ca218 Mon Sep 17 00:00:00 2001 From: Jermolene Date: Fri, 11 Apr 2014 21:37:58 +0100 Subject: [PATCH] Add classes for the current theme and language Add the classes to the tw-page-container DIV --- core/modules/startup.js | 2 +- core/ui/PageTemplate.tid | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/core/modules/startup.js b/core/modules/startup.js index bf4f1be2b..694435514 100755 --- a/core/modules/startup.js +++ b/core/modules/startup.js @@ -215,7 +215,7 @@ exports.startup = function() { $tw.perf.report("mainRender",function() { $tw.pageWidgetNode = $tw.wiki.makeWidget(parser,{document: document, parentWidget: $tw.rootWidget}); $tw.pageContainer = document.createElement("div"); - $tw.utils.addClass($tw.pageContainer,"tw-page-container"); + $tw.utils.addClass($tw.pageContainer,"tw-page-container-wrapper"); document.body.insertBefore($tw.pageContainer,document.body.firstChild); $tw.pageWidgetNode.render($tw.pageContainer,null); })(); diff --git a/core/ui/PageTemplate.tid b/core/ui/PageTemplate.tid index ad5833cdd..7f2cce5b1 100644 --- a/core/ui/PageTemplate.tid +++ b/core/ui/PageTemplate.tid @@ -1,5 +1,17 @@ title: $:/core/ui/PageTemplate +\define containerClasses() +tw-page-container tw-page-view-$(themeTitle)$ tw-language-$(languageTitle)$ +\end + +<$set name="themeTitle" value={{$:/view}}> + +<$set name="currentTiddler" value={{$:/language}}> + +<$set name="languageTitle" value={{!!name}}> + +
>> + <$navigator story="$:/StoryList" history="$:/HistoryList"> <$dropzone> @@ -14,3 +26,10 @@ title: $:/core/ui/PageTemplate +
+ + + + + +