Author: ArthurClemens
Date: 2005-04-30 12:53:34 -0700 (Sat, 30 Apr 2005)
New Revision: 4186
Modified:
twiki/branches/DEVELOP/templates/twiki.pattern.tmpl
Log:
UsingTopicToDefineCSS: added fallback if javascript is off: then the styles of TWIKILAYOUTURL and TWIKISTYLEURL are added (whether they exist or not), and USERLAYOUTURL and USERSTYLEURL are not supported.
Modified: twiki/branches/DEVELOP/templates/twiki.pattern.tmpl
===================================================================
--- twiki/branches/DEVELOP/templates/twiki.pattern.tmpl 2005-04-30 18:03:35 UTC (rev 4185)
+++ twiki/branches/DEVELOP/templates/twiki.pattern.tmpl 2005-04-30 19:53:34 UTC (rev 4186)
@@ -21,8 +21,22 @@
%TMPL:DEF{"twikistyle"}%
+<!-- START fallback in case javascript is off -->
+<!-- no check on TWIKILAYOUTURL and TWIKISTYLEURL; these are added regardlessly -->
+<!-- USERLAYOUTURL and USERSTYLEURL are not supported with javascript off -->
<script type="text/javascript">
-<!--
+<!-- document.write("<!--"); //-->
+</script>
+<style type='text/css'>
+ @import url("%TWIKILAYOUTURL%");
+ @import url("%TWIKISTYLEURL%");
+</style>
+<script type="text/javascript">
+<!-- document.write("-->"); //-->
+</script>
+<!-- END fallback in case javascript is off -->
+<script type="text/javascript">
+<!--
document.write("<style type='text/css'>");
/* Default TWiki layout */
if ("%TWIKILAYOUTURL%".split("?")[0].length) {
@@ -40,7 +54,7 @@
if ("%USERSTYLEURL%".split("?")[0].length) {
document.write("@import url(%USERSTYLEURL%);");
}
-document.write("<\/style>");
+document.write("<\/style>");
//-->
</script>
<style type="text/css" media="all">
@@ -90,11 +104,8 @@
-%TMPL:DEF{"leftbar"}%<div class="twikiLeftBar"><div class="twikiWebIndicator">
- * <a href="%SCRIPTURLPATH%/view%SCRIPTSUFFIX%/%WEB%/%HOMETOPIC%">%WEB%</a>
-</div>
-<div class="twikiLeftBarContents">
-%INCLUDE{"WebLeftBar"}%</div></div>%TMPL:END%
+%TMPL:DEF{"leftbar"}%<div class="twikiLeftBar"><div class="twikiWebIndicator"><a href="%SCRIPTURLPATH%/view%SCRIPTSUFFIX%/%WEB%/%HOMETOPIC%">%WEB%</a></div>
+<div class="twikiLeftBarContents">%INCLUDE{"%TWIKIWEB%.WebLeftBar"}%</div></div>%TMPL:END%
|