html5iness
This commit is contained in:
parent
dfd38b1b84
commit
c6c4f06de8
7 changed files with 25 additions and 56 deletions
|
@ -54,11 +54,11 @@ $(document).ready(function() {
|
||||||
|
|
||||||
var sidebar_hidden = ($.cookie("sidebar-hidden") || "").split("|");
|
var sidebar_hidden = ($.cookie("sidebar-hidden") || "").split("|");
|
||||||
for(var i in sidebar_hidden) {
|
for(var i in sidebar_hidden) {
|
||||||
$("#"+sidebar_hidden[i]).hide();
|
$("#"+sidebar_hidden[i]+" .blockbody").hide();
|
||||||
};
|
};
|
||||||
$(".shm-toggler").each(function(idx, elm) {
|
$(".shm-toggler").each(function(idx, elm) {
|
||||||
var tid = $(elm).data("toggle-id");
|
var tid = $(elm).data("toggle-id");
|
||||||
var tob = $("#"+tid);
|
var tob = $("#"+tid+" .blockbody");
|
||||||
$(elm).click(function(e) {
|
$(elm).click(function(e) {
|
||||||
tob.slideToggle("slow");
|
tob.slideToggle("slow");
|
||||||
if(sidebar_hidden.indexOf(tid) == -1) {
|
if(sidebar_hidden.indexOf(tid) == -1) {
|
||||||
|
|
|
@ -238,19 +238,19 @@ EOD;
|
||||||
$h = $block->header;
|
$h = $block->header;
|
||||||
$s = $block->section;
|
$s = $block->section;
|
||||||
$b = $block->body;
|
$b = $block->body;
|
||||||
$html = "";
|
$i = str_replace(' ', '_', $h.$s);
|
||||||
|
$html = "<section id='$i'>";
|
||||||
if($hidable) {
|
if($hidable) {
|
||||||
$i = str_replace(' ', '_', $h.$s);
|
|
||||||
if(!is_null($h)) $html .= "\n<h3 class='shm-toggler' data-toggle-id='$i'>$h</h3>\n";
|
if(!is_null($h)) $html .= "\n<h3 class='shm-toggler' data-toggle-id='$i'>$h</h3>\n";
|
||||||
if(!is_null($b)) $html .= "<div id='$i'>$b</div>\n";
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$i = str_replace(' ', '_', $h.$s);
|
|
||||||
if(!is_null($h)) $html .= "\n<h3>$h</h3>\n";
|
if(!is_null($h)) $html .= "\n<h3>$h</h3>\n";
|
||||||
if(!is_null($b)) $html .= "<div>$b</div>\n";
|
|
||||||
}
|
}
|
||||||
|
if(!is_null($b)) $html .= "<div class='blockbody'>$b</div>\n";
|
||||||
|
$html .= "</section>";
|
||||||
return $html;
|
return $html;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function navlinks($link, $desc, $pages_matched) {
|
private function navlinks($link, $desc, $pages_matched) {
|
||||||
/**
|
/**
|
||||||
* Woo! We can actually SEE THE CURRENT PAGE!! (well... see it highlighted in the menu.)
|
* Woo! We can actually SEE THE CURRENT PAGE!! (well... see it highlighted in the menu.)
|
||||||
|
|
|
@ -92,21 +92,12 @@ EOD;
|
||||||
private function block_to_html($block, $hidable=false, $salt="") {
|
private function block_to_html($block, $hidable=false, $salt="") {
|
||||||
$h = $block->header;
|
$h = $block->header;
|
||||||
$b = $block->body;
|
$b = $block->body;
|
||||||
$html = "";
|
|
||||||
$i = str_replace(' ', '_', $h) . $salt;
|
$i = str_replace(' ', '_', $h) . $salt;
|
||||||
|
$html = "<section id='$i'>";
|
||||||
$h_toggler = $hidable ? " shm-toggler" : "";
|
$h_toggler = $hidable ? " shm-toggler" : "";
|
||||||
if(!is_null($h)) $html .= "
|
if(!is_null($h)) $html .= "<h3 data-toggle-id='$i' class='$h_toggler'>$h</h3>";
|
||||||
<h3 data-toggle-id='$i' class='hrr$h_toggler'>$h</h3>
|
if(!is_null($b)) $html .= "<div class='blockbody'>$b</div>";
|
||||||
";
|
$html .= "</section>";
|
||||||
if(!is_null($b)) {
|
|
||||||
if(strpos($b, "<!-- cancel border -->") === FALSE) {
|
|
||||||
$html .= "<div class='blockbody brr' id='$i'>$b</div>";
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$html .= "<div class='blockbody' id='$i'>$b</div>";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $html;
|
return $html;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,15 +21,15 @@ H3 {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
}
|
}
|
||||||
.hrr {
|
SECTION>H3 {
|
||||||
background: #CCC;
|
background: #CCC;
|
||||||
border: 1px solid #BBB;
|
border: 1px solid #BBB;
|
||||||
}
|
}
|
||||||
.brr, .thumb {
|
SECTION>.blockbody, .thumb {
|
||||||
background: #DDD;
|
background: #DDD;
|
||||||
border: 1px solid #CCC;
|
border: 1px solid #CCC;
|
||||||
}
|
}
|
||||||
.brr, .hrr, H1, FOOTER, .thumb {
|
SECTION>.blockbody, SECTION>H3, H1, FOOTER, .thumb {
|
||||||
margin: 8px;
|
margin: 8px;
|
||||||
padding: 8px;
|
padding: 8px;
|
||||||
border-radius: 12px; /* standard, webkit, opera */
|
border-radius: 12px; /* standard, webkit, opera */
|
||||||
|
@ -103,9 +103,6 @@ NAV .blockbody {
|
||||||
NAV TABLE {
|
NAV TABLE {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
NAV TD {
|
|
||||||
vertical-align: middle;
|
|
||||||
}
|
|
||||||
NAV INPUT {
|
NAV INPUT {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
|
|
|
@ -97,10 +97,11 @@ EOD;
|
||||||
function block_to_html($block, $hidable=false, $salt="") {
|
function block_to_html($block, $hidable=false, $salt="") {
|
||||||
$h = $block->header;
|
$h = $block->header;
|
||||||
$b = $block->body;
|
$b = $block->body;
|
||||||
$html = "";
|
|
||||||
$i = str_replace(' ', '_', $h) . $salt;
|
$i = str_replace(' ', '_', $h) . $salt;
|
||||||
|
$html = "<section id='$i'>";
|
||||||
if(!is_null($h)) $html .= "\n<h3 data-toggle-id='$i' class='shm-toggler'>$h</h3>\n";
|
if(!is_null($h)) $html .= "\n<h3 data-toggle-id='$i' class='shm-toggler'>$h</h3>\n";
|
||||||
if(!is_null($b)) $html .= "<div id='$i'>$b</div>\n";
|
if(!is_null($b)) $html .= "<div class='blockbody'>$b</div>\n";
|
||||||
|
$html .= "</section>";
|
||||||
return $html;
|
return $html;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -200,8 +200,8 @@ EOD;
|
||||||
private function block_to_html($block, $hidable=false, $salt="") {
|
private function block_to_html($block, $hidable=false, $salt="") {
|
||||||
$h = $block->header;
|
$h = $block->header;
|
||||||
$b = $block->body;
|
$b = $block->body;
|
||||||
$html = "";
|
|
||||||
$i = str_replace(' ', '_', $h) . $salt;
|
$i = str_replace(' ', '_', $h) . $salt;
|
||||||
|
$html = "<section id='$i'>";
|
||||||
if(!is_null($h)) {
|
if(!is_null($h)) {
|
||||||
if($salt == "main") {
|
if($salt == "main") {
|
||||||
$html .= "<div class='maintop navside tab shm-toggler' data-toggle-id='$i'>$h</div>";
|
$html .= "<div class='maintop navside tab shm-toggler' data-toggle-id='$i'>$h</div>";
|
||||||
|
@ -210,17 +210,16 @@ EOD;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(!is_null($b)) {
|
if(!is_null($b)) {
|
||||||
//if(strpos($b, "<!-- cancel border -->")) {
|
|
||||||
if($salt =="main") {
|
if($salt =="main") {
|
||||||
$html .= "<div class='blockbody' id='$i'>$b</div>";
|
$html .= "<div class='blockbody'>$b</div>";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$html .= "
|
$html .= "
|
||||||
<div class='navside tab' id='$i'>$b</div>
|
<div class='navside tab'>$b</div>
|
||||||
";
|
";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$html .= "</section>";
|
||||||
return $html;
|
return $html;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -106,30 +106,11 @@ EOD;
|
||||||
private function block_to_html($block, $hidable=false, $salt="") {
|
private function block_to_html($block, $hidable=false, $salt="") {
|
||||||
$h = $block->header;
|
$h = $block->header;
|
||||||
$b = $block->body;
|
$b = $block->body;
|
||||||
$html = "";
|
|
||||||
$i = str_replace(' ', '_', $h) . $salt;
|
$i = str_replace(' ', '_', $h) . $salt;
|
||||||
if(!is_null($h)) $html .= "
|
$html = "<section id='$i'>";
|
||||||
<div class='hrr' data-toggle-id='$i' class='shm-toggler'>
|
if(!is_null($h)) $html .= "<h3 data-toggle-id='$i' class='shm-toggler'>$h</h3>";
|
||||||
<div class='hrrtop'><div></div></div>
|
if(!is_null($b)) $html .= "<div class='blockbody'>$b</div>";
|
||||||
<div class='hrrcontent'><h3>$h</h3></div>
|
$html .= "</section>";
|
||||||
<div class='hrrbot'><div></div></div>
|
|
||||||
</div>
|
|
||||||
";
|
|
||||||
if(!is_null($b)) {
|
|
||||||
if(strpos($b, "<!-- cancel border -->")) {
|
|
||||||
$html .= "<div class='blockbody' id='$i'>$b</div>";
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$html .= "
|
|
||||||
<div class='rr' id='$i'>
|
|
||||||
<div class='rrtop'><div></div></div>
|
|
||||||
<div class='rrcontent'><div class='blockbody'>$b</div></div>
|
|
||||||
<div class='rrbot'><div></div></div>
|
|
||||||
</div>
|
|
||||||
";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $html;
|
return $html;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue