html5 theme

This commit is contained in:
Shish
2010-04-16 13:11:16 +01:00
parent 38c3038ecb
commit 4b4fd150c4
6 changed files with 739 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
<?php
/**
* A customised version of the Setup theme
*/
class CustomSetupTheme extends SetupTheme {
protected function sb_to_html(SetupBlock $block) {
$h = $block->header;
$b = $block->body;
$i = preg_replace('/[^a-zA-Z0-9]/', '_', $h) . "-setup";
$html = "
<script><!--
$(document).ready(function() {
$(\"#$i-toggle\").click(function() {
$(\"#$i\").slideToggle(\"slow\", function() {
if($(\"#$i\").is(\":hidden\")) {
$.cookie(\"$i-hidden\", 'true', {path: '/'});
}
else {
$.cookie(\"$i-hidden\", 'false', {path: '/'});
}
});
});
if($.cookie(\"$i-hidden\") == 'true') {
$(\"#$i\").hide();
}
});
//--></script>
<div class='setupblock brr'>
<b id='$i-toggle'>$h</b>
<br><div id='$i'>$b</div>
</div>
<!-- cancel border -->
";
return $html;
}
}
?>