Template: Integrate compression on included .js and .css files, fix custom_css template variable.

This commit is contained in:
Nate
2020-03-19 21:11:53 -06:00
parent 8b2b284041
commit 92719e0399
15 changed files with 148 additions and 21 deletions
+14 -1
View File
@@ -3,7 +3,10 @@
require_once "root.php";
require_once "resources/require.php";
header("Content-type: text/css; charset: UTF-8");
ob_start('ob_gzhandler');
header('Content-type: text/css; charset: UTF-8');
header('Cache-Control: must-revalidate');
header('Expires: '.gmdate('D, d M Y H:i:s',time()+3600).' GMT');
//parse fonts (add surrounding single quotes to each font name)
if (is_array($_SESSION['theme']) && sizeof($_SESSION['theme']) > 0) {
@@ -2667,3 +2670,13 @@ header("Content-type: text/css; charset: UTF-8");
text-align: left;
margin-bottom: 20px;
}
<?php
//output custom css
if ($_SESSION['theme']['custom_css_code']['text'] != '') {
echo $_SESSION['theme']['custom_css_code']['text'];
}
?>