From 96be7c6e4ffd75a03decf8091e8e786dc1dee821 Mon Sep 17 00:00:00 2001 From: tim Date: Wed, 10 Jun 2015 14:46:05 +0200 Subject: [PATCH] css lightwheight --- CSS/-min.php | 993 ++++++++++++++++++ ...{SubMenuStyle.css.php => SubMenuStyle.css} | 31 +- ...eMobiel.css.php => SubMenuStyleMobiel.css} | 27 +- CSS/{cookie.css.php => cookie.css} | 15 +- CSS/libs/jquery-ui.css | 20 +- CSS/{markdown.css.php => markdown.css} | 57 +- CSS/{mobiel.css.php => mobiel.css} | 25 +- CSS/{socialMedia.css.php => socialMedia.css} | 9 +- CSS/{style.css.php => style.css} | 29 +- Classes/Header.php | 8 +- 10 files changed, 1077 insertions(+), 137 deletions(-) create mode 100644 CSS/-min.php rename CSS/{SubMenuStyle.css.php => SubMenuStyle.css} (65%) rename CSS/{SubMenuStyleMobiel.css.php => SubMenuStyleMobiel.css} (69%) rename CSS/{cookie.css.php => cookie.css} (61%) rename CSS/{markdown.css.php => markdown.css} (85%) rename CSS/{mobiel.css.php => mobiel.css} (72%) rename CSS/{socialMedia.css.php => socialMedia.css} (54%) rename CSS/{style.css.php => style.css} (74%) diff --git a/CSS/-min.php b/CSS/-min.php new file mode 100644 index 0000000..45cbfc5 --- /dev/null +++ b/CSS/-min.php @@ -0,0 +1,993 @@ + + + foo.bar +* - {'foo':'bar'} => {foo:'bar'} +* - Dead code removal (never used function) +* - Munge primitives: var WINDOW=window, etc. +*/ + +class JSqueeze +{ + const + + SPECIAL_VAR_RX = '(\$+[a-zA-Z_]|_[a-zA-Z0-9$])[a-zA-Z0-9_$]*'; + + public + + $charFreq; + + protected + + $strings, + $closures, + $str0, + $str1, + $argFreq, + $specialVarRx, + $keepImportantComments, + + $varRx = '(?:[a-zA-Z_$])[a-zA-Z0-9_$]*', + $reserved = array( + 'abstract','as','boolean','break','byte','case','catch','char','class', + 'const','continue','debugger','default','delete','do','double','else', + 'enum','export','extends','false','final','finally','float','for', + 'function','goto','if','implements','import','in','instanceof','int', + 'long','native','new','null','package','private','protected','public', + 'return','short','static','super','switch','synchronized','this', + 'throw','throws','transient','true','try','typeof','var','void', + 'while','with','yield','let','interface', + ); function __construct() + { + $this->reserved = array_flip($this->reserved); + $this->charFreq = array_fill(0, 256, 0); + } + + /** + * Squeezes a JavaScript source code. + * + * Set $singleLine to false if you want optional + * semi-colons to be replaced by line feeds. + * + * Set $keepImportantComments to false if you want /*! comments to be removed. + * + * $specialVarRx defines the regular expression of special variables names + * for global vars, methods, properties and in string substitution. + * Set it to false if you don't want any. + * + * If the analysed javascript source contains a single line comment like + * this one, then the directive will overwrite $specialVarRx: + * + * // jsqueeze.specialVarRx = your_special_var_regexp_here + * + * Only the first directive is parsed, others are ignored. It is not possible + * to redefine $specialVarRx in the middle of the javascript source. + * + * Example: + * $parser = new JSqueeze; + * $squeezed_js = $parser->squeeze($fat_js); + */ + + function squeeze($code, $singleLine = true, $keepImportantComments = true, $specialVarRx = self::SPECIAL_VAR_RX) + { + $code = trim($code); + if ('' === $code) return ''; + + $this->argFreq = array(-1 => 0); + $this->specialVarRx = $specialVarRx; + $this->keepImportantComments = !!$keepImportantComments; + + if (preg_match("#//[ \t]*jsqueeze\.specialVarRx[ \t]*=[ \t]*([\"']?)(.*)\1#i", $code, $key)) + { + if (!$key[1]) + { + $key[2] = trim($key[2]); + $key[1] = strtolower($key[2]); + $key[1] = $key[1] && $key[1] != 'false' && $key[1] != 'none' && $key[1] != 'off'; + } + + $this->specialVarRx = $key[1] ? $key[2] : false; + } + + // Remove capturing parentheses + $this->specialVarRx && $this->specialVarRx = preg_replace('/(?specialVarRx); + + false !== strpos($code, "\r" ) && $code = strtr(str_replace("\r\n", "\n", $code), "\r", "\n"); + false !== strpos($code, "\xC2\x85" ) && $code = str_replace("\xC2\x85" , "\n", $code); // Next Line + false !== strpos($code, "\xE2\x80\xA8") && $code = str_replace("\xE2\x80\xA8", "\n", $code); // Line Separator + false !== strpos($code, "\xE2\x80\xA9") && $code = str_replace("\xE2\x80\xA9", "\n", $code); // Paragraph Separator + + list($code, $this->strings ) = $this->extractStrings( $code); + list($code, $this->closures) = $this->extractClosures($code); + + $key = "//''\"\"#0'"; // This crap has a wonderful property: it can not happend in any valid javascript, even in strings + $this->closures[$key] =& $code; + + $tree = array($key => array('parent' => false)); + $this->makeVars($code, $tree[$key], $key); + $this->renameVars($tree[$key], true); + + $code = substr($tree[$key]['code'], 1); + $code = preg_replace("'\breturn !'", 'return!', $code); + $code = str_replace(array_keys($this->strings), array_values($this->strings), $code); + + if ($singleLine) $code = strtr($code, "\n", ';'); + else $code = str_replace("\n", ";\n", $code); + false !== strpos($code, "\r") && $code = strtr(trim($code), "\r", "\n"); + + // Cleanup memory + $this->charFreq = array_fill(0, 256, 0); + $this->strings = $this->closures = $this->argFreq = array(); + $this->str0 = $this->str1 = ''; + + return $code; + } protected function extractStrings($f) + { + if ($cc_on = false !== strpos($f, '@cc_on')) + { + // Protect conditional comments from being removed + $f = str_replace('#', '##', $f); + $f = str_replace('/*@', '1#@', $f); + $f = preg_replace("'//@([^\n]+)'", '2#@$1@#3', $f); + $f = str_replace('@*/', '@#1', $f); + } + + $len = strlen($f); + $code = str_repeat(' ', $len); + $j = 0; + + $strings = array(); + $K = 0; + + $instr = false; + + $q = array( + "'", '"', + "'" => 0, + '"' => 0, + ); + + // Extract strings, removes comments + for ($i = 0; $i < $len; ++$i) + { + if ($instr) + { + if ('//' == $instr) + { + if ("\n" == $f[$i]) + { + $f[$i--] = ' '; + $instr = false; + } + } + else if ($f[$i] == $instr || ('/' == $f[$i] && "/'" == $instr)) + { + if ('!' == $instr) ; + else if ('*' == $instr) + { + if ('/' == $f[$i+1]) + { + ++$i; + $instr = false; + } + } + else + { + if ("/'" == $instr) + { + while (false !== strpos('gmi', $f[$i+1])) $s[] = $f[$i++]; + $s[] = $f[$i]; + } + + $instr = false; + } + } + else if ('*' == $instr) ; + else if ('!' == $instr) + { + if ('*' == $f[$i] && '/' == $f[$i+1]) + { + $s[] = "*/\r"; + ++$i; + $instr = false; + } + else if ("\n" == $f[$i]) $s[] = "\r"; + else $s[] = $f[$i]; + } + else if ('\\' == $f[$i]) + { + ++$i; + + if ("\n" != $f[$i]) + { + isset($q[$f[$i]]) && ++$q[$f[$i]]; + $s[] = '\\' . $f[$i]; + } + } + else if ("'" == $f[$i] || '"' == $f[$i]) + { + ++$q[$f[$i]]; + $s[] = '\\' . $f[$i]; + } + else $s[] = $f[$i]; + } + else switch ($f[$i]) + { + case ';': + // Remove triple semi-colon + if ($i>0 && ';' == $f[$i-1] && $i+1 < $len && ';' == $f[$i+1]) $f[$i] = $f[$i+1] = '/'; + else + { + $code[++$j] = ';'; + break; + } + + case '/': + if ('*' == $f[$i+1]) + { + ++$i; + $instr = '*'; + + if ($this->keepImportantComments && '!' == $f[$i+1]) + { + ++$i; + // no break here + } + else break; + } + else if ('/' == $f[$i+1]) + { + ++$i; + $instr = '//'; + break; + } + else + { + $a = $j && ' ' == $code[$j] ? $code[$j-1] : $code[$j]; + if (false !== strpos('-!%&;<=>~:^+|,(*?[{ ', $a) + || (false !== strpos('oenfd', $a) + && preg_match( + "'(?restoreCc($s); + $strings[$key] = array('/'); + $s =& $strings[$key]; + } + else $code[++$j] = '/'; + + break; + } + + case "'": + case '"': + $instr = $f[$i]; + $key = "//''\"\"" . $K++ . ('!' == $instr ? '!' : "'"); + $a = $j; + $code .= $key; + while (isset($key[++$j-$a-1])) $code[$j] = $key[$j-$a-1]; --$j; + isset($s) && ($s = implode('', $s)) && $cc_on && $this->restoreCc($s); + $strings[$key] = array(); + $s =& $strings[$key]; + '!' == $instr && $s[] = "\r/*!"; + + break; + + case "\n": + if ($j > 5) + { + ' ' == $code[$j] && --$j; + + $code[++$j] = + false !== strpos('kend', $code[$j-1]) + && preg_match( + "'(?restoreCc($s); + unset($s); + + $code = substr($code, 0, $j+1); + $cc_on && $this->restoreCc($code, false); + + // Protect wanted spaces and remove unwanted ones + $code = str_replace('- -', "-\x7F-", $code); + $code = str_replace('+ +', "+\x7F+", $code); + $code = preg_replace("'(\d)\s+\.\s*([a-zA-Z\$_[(])'", "$1\x7F.$2", $code); + $code = preg_replace("# ([-!%&;<=>~:.^+|,()*?[\]{}/']+)#", '$1', $code); + $code = preg_replace( "#([-!%&;<=>~:.^+|,()*?[\]{}/]+) #", '$1', $code); + + // Replace new Array/Object by []/{} + false !== strpos($code, 'new Array' ) && $code = preg_replace( "'new Array(?:\(\)|([;\])},:]))'", '[]$1', $code); + false !== strpos($code, 'new Object') && $code = preg_replace("'new Object(?:\(\)|([;\])},:]))'", '{}$1', $code); + + // Add missing semi-colons after curly braces + // This adds more semi-colons than strictly needed, + // but it seems that later gzipping is favorable to the repetition of "};" + $code = preg_replace("'\}(?![:,;.()\[\]}]|(else|catch|finally|while)[^\$.a-zA-Z0-9_])'", '};', $code); + + // Tag possible empty instruction for easy detection + $code = preg_replace("'(?=0 && "\n" == $f[$j]) $f[$j] = ';'; + + ++$s; + + if ($i && '#' == $code[$i-1]) + { + $instrPool[$s - 1] = 1; + if ('2' == $code[$i-2]) $forPool[$s] = 1; + } + + $f[++$j] = '('; + break; + + case ']': + case ')': + if ($i+1 < $len && !isset($forPool[$s]) && !isset($instrPool[$s-1]) && preg_match("'[a-zA-Z0-9_\$]'", $code[$i+1])) + { + $f[$j] .= $code[$i]; + $f[++$j] = "\n"; + } + else $f[++$j] = $code[$i]; + + if (')' == $code[$i]) + { + unset($forPool[$s]); + --$s; + } + + continue 2; + + case '}': + if ("\n" == $f[$j]) $f[$j] = '}'; + else $f[++$j] = '}'; + break; + + case ';': + if (isset($forPool[$s]) || isset($instrPool[$s])) $f[++$j] = ';'; + else if ($j>=0 && "\n" != $f[$j] && ';' != $f[$j]) $f[++$j] = "\n"; + + break; + + case '#': + switch ($f[$j]) + { + case '1': $f[$j] = 'if'; break 2; + case '2': $f[$j] = 'for'; break 2; + case '3': $f[$j] = 'while'; break 2; + } + + case '['; + if ($j>=0 && "\n" == $f[$j]) $f[$j] = ';'; + + default: $f[++$j] = $code[$i]; + } + + unset($instrPool[$s]); + } + + $f = implode('', $f); + $cc_on && $f = str_replace('@#3', "\n", $f); + + // Fix "else ;" empty instructions + $f = preg_replace("'(? $q['"']) $q = array($q[1], $q[0]); + $f = preg_replace("#//''\"\"[0-9]+'#", $q[0] . '$0' . $q[0], $f); + strpos($f, $q[0] . '+' . $q[0]) && $f = str_replace($q[0] . '+' . $q[0], '', $f); + $len = count($strings); + foreach ($strings as $r1 => &$r2) + { + $r2 = "/'" == substr($r1, -2) + ? str_replace(array("\\'", '\\"'), array("'", '"'), $r2) + : str_replace('\\' . $q[1], $q[1], $r2); + } + + // Restore wanted spaces + $f = strtr($f, "\x7F", ' '); + + return array($f, $strings); + } + + protected function extractClosures($code) + { + $code = ';' . $code; + + $this->argFreq[-1] += substr_count($code, '}catch('); + + if ($this->argFreq[-1]) + { + // Special catch scope handling + + // FIXME: this implementation doesn't work with nested catch scopes who need + // access to their parent's caught variable (but who needs that?). + + $f = preg_split("@}catch\(({$this->varRx})@", $code, -1, PREG_SPLIT_DELIM_CAPTURE); + + $code = 'catch$scope$var' . mt_rand(); + $this->specialVarRx = $this->specialVarRx ? '(?:' . $this->specialVarRx . '|' . preg_quote($code) . ')' : preg_quote($code); + $i = count($f) - 1; + + while ($i) + { + $c = 1; + $j = 0; + $l = strlen($f[$i]); + + while ($c && $j < $l) + { + $s = $f[$i][$j++]; + $c += '(' == $s ? 1 : (')' == $s ? -1 : 0); + } + + if (!$c) do + { + $s = $f[$i][$j++]; + $c += '{' == $s ? 1 : ('}' == $s ? -1 : 0); + } + while ($c && $j < $l); + + $c = preg_quote($f[$i-1], '#'); + $f[$i-2] .= '}catch(' . preg_replace("#([.,{]?)(?argFreq[$j]) ? ++$this->argFreq[$j] : $this->argFreq[$j] = 1; + while ($j--); + } + + $i -= 2; + } + + return array($f[0], $closures); + } + + protected function makeVars($closure, &$tree, $key) + { + $tree['code'] =& $closure; + $tree['nfe'] = false; + $tree['used'] = array(); + $tree['local'] = array(); + + // Replace multiple "var" declarations by a single one + $closure = preg_replace_callback("'(?<=[\n\{\}])var [^\n\{\}]+(?:\nvar [^\n\{\}]+)+'", array(&$this, 'mergeVarDeclarations'), $closure); + + // Get all local vars (functions, arguments and "var" prefixed) + + $vars =& $tree['local']; + + if (preg_match("'^( [^(]*)?\((.*?)\)\{'", $closure, $v)) + { + if ($v[1]) + { + $vars[$tree['nfe'] = substr($v[1], 1)] = -1; + $tree['parent']['local'][';' . $key] =& $vars[$tree['nfe']]; + } + + if ($v[2]) + { + $i = 0; + $v = explode(',', $v[2]); + foreach ($v as $w) $vars[$w] = $this->argFreq[$i++] - 1; // Give a bonus to argument variables + } + } + + $v = preg_split("'(?varRx}'", $w, $v)) isset($vars[$v[0]]) || $vars[$v[0]] = 0; + } + + if (preg_match_all("@function ({$this->varRx})//''\"\"#@", $closure, $v)) + { + foreach ($v[1] as $w) isset($vars[$w]) || $vars[$w] = 0; + } + + if ($this->argFreq[-1] && preg_match_all("@}catch\(({$this->varRx})@", $closure, $v)) + { + $v[0] = array(); + foreach ($v[1] as $w) isset($v[0][$w]) ? ++$v[0][$w] : $v[0][$w] = 1; + foreach ($v[0] as $w => $v) $vars[$w] = $this->argFreq[-1] - $v; + } + + // Get all used vars, local and non-local + + $vars =& $tree['used']; + + if (preg_match_all("#([.,{]?)(?varRx})(:?)#", $closure, $w, PREG_SET_ORDER)) + { + foreach ($w as $k) + { + if (',' === $k[1] || '{' === $k[1]) + { + if (':' === substr($k[3], -1)) $k = '.' . $k[2]; + else $k = $k[2]; + } + else $k = $k[1] . $k[2]; + + isset($vars[$k]) ? ++$vars[$k] : $vars[$k] = 1; + } + } + + if (preg_match_all("#//''\"\"[0-9]+(?:['!]|/')#", $closure, $w)) foreach ($w[0] as $a) + { + $v = "'" === substr($a, -1) && "/'" !== substr($a, -2) && $this->specialVarRx + ? preg_split("#([.,{]?(?specialVarRx}:?)#", $this->strings[$a], -1, PREG_SPLIT_DELIM_CAPTURE) + : array($this->strings[$a]); + $a = count($v); + + for ($i = 0; $i < $a; ++$i) + { + $k = $v[$i]; + + if (1 === $i%2) + { + if (',' === $k[0] || '{' === $k[0]) + { + if (':' === substr($k, -1)) $k = '.' . substr($k, 1, -1); + else $k = substr($k, 1); + } + else if (':' === substr($k, -1)) $k = substr($k, 0, -1); + + $w =& $tree; + + while (isset($w['parent']) && !(isset($w['used'][$k]) || isset($w['local'][$k]))) $w =& $w['parent']; + + (isset($w['used'][$k]) || isset($w['local'][$k])) && (isset($vars[$k]) ? ++$vars[$k] : $vars[$k] = 1); + + unset($w); + } + + if (0 === $i%2 || !isset($vars[$k])) foreach (count_chars($v[$i], 1) as $k => $w) $this->charFreq[$k] += $w; + } + } + + // Propagate the usage number to parents + + foreach ($vars as $w => $a) + { + $k =& $tree; + $chain = array(); + do + { + $vars =& $k['local']; + $chain[] =& $k; + if (isset($vars[$w])) + { + unset($k['used'][$w]); + if (isset($vars[$w])) $vars[$w] += $a; + else $vars[$w] = $a; + $a = false; + break; + } + } + while ($k['parent'] && $k =& $k['parent']); + + if ($a && !$k['parent']) + { + if (isset($vars[$w])) $vars[$w] += $a; + else $vars[$w] = $a; + } + + if (isset($tree['used'][$w]) && isset($vars[$w])) foreach ($chain as &$b) + { + isset($b['local'][$w]) || $b['used'][$w] =& $vars[$w]; + } + } + + // Analyse childs + + $tree['childs'] = array(); + $vars =& $tree['childs']; + + if (preg_match_all("@//''\"\"#[0-9]+'@", $closure, $w)) + { + foreach ($w[0] as $a) + { + $vars[$a] = array('parent' => &$tree); + $this->makeVars($this->closures[$a], $vars[$a], $a); + } + } + } + + protected function mergeVarDeclarations($m) + { + return str_replace("\nvar ", ',', $m[0]); + } + + protected function renameVars(&$tree, $root) + { + if ($root) + { + $tree['local'] += $tree['used']; + $tree['used'] = array(); + + foreach ($tree['local'] as $k => $v) + { + if ('.' == $k[0]) $k = substr($k, 1); + + if ('true' === $k) $this->charFreq[48] += $v; + else if ('false' === $k) $this->charFreq[49] += $v; + else if (!$this->specialVarRx || !preg_match("#^{$this->specialVarRx}$#", $k)) + { + foreach (count_chars($k, 1) as $k => $w) $this->charFreq[$k] += $w * $v; + } + else if (2 == strlen($k)) $tree['used'][] = $k[1]; + } + + arsort($this->charFreq); + + $this->str0 = ''; + $this->str1 = ''; + + foreach ($this->charFreq as $k => $v) + { + if (!$v) break; + + $v = chr($k); + + if ((64 < $k && $k < 91) || (96 < $k && $k < 123)) // A-Z a-z + { + $this->str0 .= $v; + $this->str1 .= $v; + } + else if (47 < $k && $k < 58) // 0-9 + { + $this->str1 .= $v; + } + } + + if ('' === $this->str0) + { + $this->str0 = 'claspemitdbfrugnjvhowkxqyzCLASPEMITDBFRUGNJVHOWKXQYZ'; + $this->str1 = $this->str0 . '0123456789'; + } + + foreach ($tree['local'] as $var => $root) + { + if ('.' != substr($var, 0, 1) && isset($tree['local'][".{$var}"])) $tree['local'][$var] += $tree['local'][".{$var}"]; + } + + foreach ($tree['local'] as $var => $root) + { + if ('.' == substr($var, 0, 1) && isset($tree['local'][substr($var, 1)])) $tree['local'][$var] = $tree['local'][substr($var, 1)]; + } + + arsort($tree['local']); + + foreach ($tree['local'] as $var => $root) switch (substr($var, 0, 1)) + { + case '.': + if (!isset($tree['local'][substr($var, 1)])) + { + $tree['local'][$var] = '#' . ($this->specialVarRx && 3 < strlen($var) && preg_match("'^\.{$this->specialVarRx}$'", $var) ? $this->getNextName($tree) . '$' : substr($var, 1)); + } + break; + + case ';': $tree['local'][$var] = 0 === $root ? '' : $this->getNextName($tree); + case '#': break; + + default: + $root = $this->specialVarRx && 2 < strlen($var) && preg_match("'^{$this->specialVarRx}$'", $var) ? $this->getNextName($tree) . '$' : $var; + $tree['local'][$var] = $root; + if (isset($tree['local'][".{$var}"])) $tree['local'][".{$var}"] = '#' . $root; + } + + foreach ($tree['local'] as $var => $root) $tree['local'][$var] = preg_replace("'^#'", '.', $tree['local'][$var]); + + } + else + { + arsort($tree['local']); + + foreach ($tree['local'] as $var => $root) + if ($tree['nfe'] !== $var) + $tree['local'][$var] = 0 === $root ? '' : $this->getNextName($tree); + } + + $this->local_tree =& $tree['local']; + $this->used_tree =& $tree['used']; + + $tree['code'] = preg_replace_callback("#[.,{ ]?(?varRx}:?#", array(&$this, 'getNewName'), $tree['code']); + $this->specialVarRx && $tree['code'] = preg_replace_callback("#//''\"\"[0-9]+'#", array(&$this, 'renameInString'), $tree['code']); + + foreach ($tree['childs'] as $a => &$b) + { + $this->renameVars($b, false); + $tree['code'] = str_replace($a, $b['code'], $tree['code']); + unset($tree['childs'][$a]); + } + } + + protected function renameInString($a) + { + $b =& $this->strings[$a[0]]; + unset($this->strings[$a[0]]); + + return preg_replace_callback( + "#[.,{]?(?specialVarRx}:?#", + array(&$this, 'getNewName'), + $b + ); + } + + protected function getNewName($m) + { + $m = $m[0]; + + $pre = '.' === $m[0] ? '.' : ''; + $post = ''; + + if (',' === $m[0] || '{' === $m[0] || ' ' === $m[0]) + { + $pre = $m[0]; + + if (':' === substr($m, -1)) + { + $post = ':'; + $m = '.' . substr($m, 1, -1); + } + else $m = substr($m, 1); + } + else if (':' === substr($m, -1)) + { + $post = ':'; + $m = substr($m, 0, -1); + } + + $post = (isset($this->reserved[$m]) + ? ('true' === $m ? '!0' : ('false' === $m ? '!1': $m)) + : ( + isset($this->local_tree[$m]) + ? $this->local_tree[$m] + : ( + isset($this->used_tree[$m]) + ? $this->used_tree[$m] + : $m + ) + ) + ) . $post; + + return '' === $post ? '' : ($pre . ('.' === $post[0] ? substr($post, 1) : $post)); + } + + protected function getNextName(&$tree = array(), &$counter = false) + { + if (false === $counter) + { + $counter =& $tree['counter']; + isset($counter) || $counter = -1; + $exclude = array_flip($tree['used']); + } + else $exclude = $tree; + + ++$counter; + + $len0 = strlen($this->str0); + $len1 = strlen($this->str0); + + $name = $this->str0[$counter % $len0]; + + $i = intval($counter / $len0) - 1; + while ($i>=0) + { + $name .= $this->str1[ $i % $len1 ]; + $i = intval($i / $len1) - 1; + } + + return !(isset($this->reserved[$name]) || isset($exclude[$name])) ? $name : $this->getNextName($exclude, $counter); + } + + protected function restoreCc(&$s, $lf = true) + { + $lf && $s = str_replace('@#3', '', $s); + + $s = str_replace('@#1', '@*/', $s); + $s = str_replace('2#@', '//@', $s); + $s = str_replace('1#@', '/*@', $s); + $s = str_replace('##', '#', $s); + } +} +?> \ No newline at end of file diff --git a/CSS/SubMenuStyle.css.php b/CSS/SubMenuStyle.css similarity index 65% rename from CSS/SubMenuStyle.css.php rename to CSS/SubMenuStyle.css index 5aca56a..e783536 100644 --- a/CSS/SubMenuStyle.css.php +++ b/CSS/SubMenuStyle.css @@ -1,9 +1,4 @@ - - .Pagina .sidebar ul, .Pagina .sidebar ul li a, .Pagina .sidebar ul li { +.Pagina .sidebar ul, .Pagina .sidebar ul li a, .Pagina .sidebar ul li { margin: 0; padding: 0; border: 0; @@ -15,7 +10,7 @@ .Pagina .sidebar { width: 220px; - color: + color: $Sub_Text; float: left; margin-right: 15px; } @@ -37,13 +32,13 @@ cursor: pointer; z-index: 2; text-decoration: none; - color: - background: + color: $Sub_Text; + background: $Sub_Item; } .Pagina .sidebar > ul > li > a:hover { - color: - background-color: + color: $Sub_Text; + background-color: $Sub_Item_Hover; } .Pagina .sidebar ul > li.has-sub > a:after { @@ -54,7 +49,7 @@ display: block; height: 10px; width: 2px; - background: + background: $Sub_Text; content: ""; } @@ -65,7 +60,7 @@ display: block; width: 10px; height: 2px; - background: + background: $Sub_Text; content: ""; } @@ -82,8 +77,8 @@ cursor: pointer; z-index: 2; text-decoration: none; - color: - background: + color: $Sub_Text; + background: $Sub_Item_Sub; } .Pagina .sidebar ul ul ul li a { @@ -91,8 +86,8 @@ } .Pagina .sidebar ul ul li a:hover { - color: - background-color: + color: $Sub_Text; + background-color: $Sub_Item_Sub_Hover; } .Pagina .sidebar ul ul > li.has-sub > a:after { @@ -106,4 +101,4 @@ .Pagina .ulSidebar p { display: inline; -} +} \ No newline at end of file diff --git a/CSS/SubMenuStyleMobiel.css.php b/CSS/SubMenuStyleMobiel.css similarity index 69% rename from CSS/SubMenuStyleMobiel.css.php rename to CSS/SubMenuStyleMobiel.css index 52a8258..2686efb 100644 --- a/CSS/SubMenuStyleMobiel.css.php +++ b/CSS/SubMenuStyleMobiel.css @@ -1,15 +1,10 @@ - - .Mobiel .sidebar ul, .Mobiel .sidebar ul li a { +.Mobiel .sidebar ul, .Mobiel .sidebar ul li a { margin: 0; padding: 0; list-style: none; display: block; position: relative; - border-bottom: 1px solid + border-bottom: 1px solid $Sub_Item_Border; } .Mobiel .ulSidebar>li>ul>li:last-child>a { @@ -41,8 +36,8 @@ cursor: pointer; z-index: 2; text-decoration: none; - color: - background: + color: $Sub_Text; + background: $Sub_Item; } .Mobiel .sidebar ul > li.has-sub > a:after { @@ -53,7 +48,7 @@ display: block; height: 10px; width: 2px; - background: + background: $Sub_Text; content: ""; } @@ -64,7 +59,7 @@ display: block; width: 10px; height: 2px; - background: + background: $Sub_Text; content: ""; } @@ -81,8 +76,8 @@ cursor: pointer; z-index: 2; text-decoration: none; - color: - background: + color: $Sub_Text; + background: $Sub_Item_Sub; } .Mobiel .sidebar ul ul ul li a { @@ -101,7 +96,7 @@ .Mobiel .MenuButton { height: 50px; position: relative; - background: + background: $Sub_Item; text-align: center; } @@ -111,9 +106,9 @@ } .Mobiel .ulSidebar{ - background-color: + background-color: $Sub_Item; overflow-y: auto; - border-top: 1px solid + border-top: 1px solid $Lijntje; } .Mobiel .ulSidebar p{ diff --git a/CSS/cookie.css.php b/CSS/cookie.css similarity index 61% rename from CSS/cookie.css.php rename to CSS/cookie.css index 13d3903..e553d09 100644 --- a/CSS/cookie.css.php +++ b/CSS/cookie.css @@ -1,8 +1,3 @@ - - .CookiePopup { z-index: 999999; opacity: 0.9; @@ -10,13 +5,13 @@ padding: 15px; font-weight: normal; text-align: left; - color: + color: $Cookie_Text; -webkit-box-shadow: rgb(0, 0, 0) 0px 0px 8px; box-shadow: rgb(0, 0, 0) 0px 0px 8px; bottom: 20px; right: 20px; - background-color: - border-top: solid + background-color: $Cookie_Background; + border-top: $LijntjeDikte; solid $Lijntje; } .Mobiel .CookiePopup { @@ -33,7 +28,7 @@ text-align: center; font-weight: bold; margin: 0px; - background-color: + background-color: $Cookie_Background; } .CookiePopup .button { @@ -50,5 +45,5 @@ cursor: pointer; margin: 5px 10px; text-shadow: rgb(0, 0, 0) 0px 0px 2px; - background-color: + background-color: $Cookie_Button; } \ No newline at end of file diff --git a/CSS/libs/jquery-ui.css b/CSS/libs/jquery-ui.css index 36bf498..e538a17 100644 --- a/CSS/libs/jquery-ui.css +++ b/CSS/libs/jquery-ui.css @@ -53,17 +53,11 @@ .ui-front { z-index: 100; -} - - -/* Interaction Cues +}/* Interaction Cues ----------------------------------*/ .ui-state-disabled { cursor: default !important; -} - - -/* Icons +}/* Icons ----------------------------------*/ /* states and images */ @@ -72,10 +66,7 @@ text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; -} - - -/* Misc visuals +}/* Misc visuals ----------------------------------*/ /* Overlays */ @@ -1177,10 +1168,7 @@ body .ui-tooltip { .ui-icon-grip-solid-vertical { background-position: -32px -224px; } .ui-icon-grip-solid-horizontal { background-position: -48px -224px; } .ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } -.ui-icon-grip-diagonal-se { background-position: -80px -224px; } - - -/* Misc visuals +.ui-icon-grip-diagonal-se { background-position: -80px -224px; }/* Misc visuals ----------------------------------*/ /* Corner radius */ diff --git a/CSS/markdown.css.php b/CSS/markdown.css similarity index 85% rename from CSS/markdown.css.php rename to CSS/markdown.css index 2524c76..53c51a9 100644 --- a/CSS/markdown.css.php +++ b/CSS/markdown.css @@ -1,12 +1,7 @@ - - .markdown-body { +.markdown-body { -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; - color: + color: $Markdown_Text; overflow: hidden; font-family: 'Varela Round', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; line-height: 1.6; @@ -88,7 +83,7 @@ } .markdown-body a { - color: + color: $Markdown_Link; text-decoration: none; } @@ -101,7 +96,7 @@ height: 4px; padding: 0; margin: 16px 0; - background-color: + background-color: $Markdown_Balk; border: 0 none; } @@ -253,7 +248,7 @@ .markdown-body h5 .octicon-link, .markdown-body h6 .octicon-link { display: none; - color: + color: $Markdown_Text; vertical-align: middle; } @@ -281,7 +276,7 @@ padding-bottom: 0.3em; font-size: 2.25em; line-height: 1.2; - border-bottom: 1px solid + border-bottom: 1px solid $Markdown_HeaderLine; } .markdown-body h1 .anchor { @@ -292,7 +287,7 @@ padding-bottom: 0.3em; font-size: 1.75em; line-height: 1.225; - border-bottom: 1px solid + border-bottom: 1px solid $Markdown_HeaderLine; } .markdown-body h2 .anchor { @@ -326,7 +321,7 @@ .markdown-body h6 { font-size: 1em; - color: + color: $Markdown_Text; } .markdown-body h6 .anchor { @@ -380,8 +375,8 @@ .markdown-body blockquote { padding: 0 15px; - color: - border-left: 4px solid + color: $Markdown_Text; + border-left: 4px solid $Markdown_HeaderLine; } .markdown-body blockquote>:first-child { @@ -407,16 +402,16 @@ .markdown-body table th, .markdown-body table td { padding: 6px 13px; - border: 1px solid + border: 1px solid $Markdown_TableBorder; } .markdown-body table tr { - background-color: - border-top: 1px solid + background-color: $Markdown_TableBackground; + border-top: 1px solid $Markdown_HeaderLine; } .markdown-body table tr:nth-child(2n) { - background-color: + background-color: $Markdown_TableBackground2; } .markdown-body img { @@ -464,7 +459,7 @@ overflow: auto; font-size: 85%; line-height: 1.45; - background-color: + background-color: $Markdown_TableBackground; border-radius: 3px; } @@ -499,13 +494,13 @@ padding: 3px 5px; font-size: 11px; line-height: 10px; - color: + color: $Markdown_Text; vertical-align: middle; - background-color: - border: solid 1px - border-bottom-color: + background-color: $Markdown_Highlight; + border: solid 1px $Markdown_HeaderLine; + border-bottom-color: $Markdown_HeaderLine; border-radius: 3px; - box-shadow: inset 0 -1px 0 + box-shadow: inset 0 -1px 0 $Markdown_HeaderLine; } .markdown-body .pl-c { @@ -628,13 +623,13 @@ padding: 3px 5px; font: 11px Consolas, "Liberation Mono", Menlo, Courier, monospace; line-height: 10px; - color: + color: $Markdown_Text; vertical-align: middle; - background-color: - border: solid 1px ; - border-bottom-color: + background-color: $Markdown_TableBackground; + border: solid 1px $Markdown_TableBorder;; + border-bottom-color: $Markdown_TableBorder; border-radius: 3px; - box-shadow: inset 0 -1px 0 + box-shadow: inset 0 -1px 0 $Markdown_Text; } .markdown-body .task-list-item { @@ -653,5 +648,5 @@ .markdown-body :checked+.radio-label { z-index: 1; position: relative; - border-color: + border-color: $Markdown_Link; } \ No newline at end of file diff --git a/CSS/mobiel.css.php b/CSS/mobiel.css similarity index 72% rename from CSS/mobiel.css.php rename to CSS/mobiel.css index c564c99..a4b7ef8 100644 --- a/CSS/mobiel.css.php +++ b/CSS/mobiel.css @@ -1,9 +1,4 @@ - - .Mobiel{ +.Mobiel{ margin : 20px auto 0 auto; font-family: 'Varela Round', Helvetica, Arial, sans-serif; } @@ -21,7 +16,7 @@ .Mobiel .Menu{ float : left; - background-color: + background-color: $Menu_Background; margin-bottom: 10px; font-size: 125% !important; } @@ -32,12 +27,12 @@ .Mobiel .Menu ul li { padding: 15px; - border: 0px solid + border: 0px solid $Menu_Outline; margin-left: -40px; } .Mobiel .Menu ul li a{ - color: + color: $Menu_Text; text-decoration: none; margin:auto; text-align:center; @@ -45,7 +40,7 @@ } .Mobiel .Menu ul li a:active { - color: + color: $Menu_Text; text-decoration: none; } @@ -80,13 +75,13 @@ .Mobiel .Content{ float : left; - background-color: + background-color: $Markdown_Background; margin-top: 10px; } .Mobiel .Footer{ float : left; - background-color: + background-color: $Footer_Background; margin-top: 10px; margin-bottom: 5px; text-align:center; @@ -94,12 +89,12 @@ } .Mobiel .Footer a{ - color: + color: $Footer_Text; text-decoration: none; } .Mobiel .Footer a:active { - color: + color: $Footer_Text; text-decoration: none; } @@ -122,5 +117,5 @@ } .Mobiel .TopBorder{ - border-top: solid + border-top: $LijntjeDikte; solid $Lijntje; } \ No newline at end of file diff --git a/CSS/socialMedia.css.php b/CSS/socialMedia.css similarity index 54% rename from CSS/socialMedia.css.php rename to CSS/socialMedia.css index 13ed505..d30c672 100644 --- a/CSS/socialMedia.css.php +++ b/CSS/socialMedia.css @@ -1,9 +1,4 @@ - - .SocialMedia { +.SocialMedia { display: block; } @@ -18,7 +13,7 @@ .SocialMedia .sub{ display: inline; margin: 2px; - background: + background: $Media_Background; padding: 6px 6px 5px 6px; } diff --git a/CSS/style.css.php b/CSS/style.css similarity index 74% rename from CSS/style.css.php rename to CSS/style.css index e0e74bb..bfdf756 100644 --- a/CSS/style.css.php +++ b/CSS/style.css @@ -1,8 +1,3 @@ - body { overflow-x: hidden; word-wrap: break-word; @@ -30,7 +25,7 @@ } .bcColor { - background-color: + background-color: $Menu_Background; } .buddon { @@ -59,7 +54,7 @@ .Pagina .Menu{ float : left; - background-color: + background-color: $Menu_Background; margin-bottom: 20px; font-size: 125% !important; } @@ -73,16 +68,16 @@ margin: 0; padding: 15px; padding-top: 18px; - border: 0px solid + border: 0px solid $Menu_Outline; } .Pagina .Menu ul li a{ - color: + color: $Menu_Text; text-decoration: none; } .Pagina .Menu ul li a:active { - color: + color: $Menu_Text; text-decoration: none; } @@ -116,28 +111,28 @@ .Pagina .Content{ float : left; - background-color: + background-color: $Markdown_Background; } .Pagina .Footer{ float : left; - background-color: + background-color: $Footer_Background; margin-top: 10px; margin-bottom: 5px; text-align:center; word-wrap: break-word; } .Pagina .Footer p{ - color: + color: $Footer_Text; } .Pagina .Footer a{ - color: + color: $Footer_Link; text-decoration: none; } .Pagina .Footer a:active { - color: + color: $Footer_Link; text-decoration: none; } @@ -160,5 +155,5 @@ } .Pagina .TopBorder{ - border-top: solid -} + border-top: $LijntjeDikte; solid $Lijntje; +} \ No newline at end of file diff --git a/Classes/Header.php b/Classes/Header.php index 77d429a..f032040 100644 --- a/Classes/Header.php +++ b/Classes/Header.php @@ -9,13 +9,7 @@ class Header { '', '', '', - '', - '', - '', - '', - '', - '', - '', + '', '', '', );