have themes/x/style.css auto-loaded, and put it after the ext/*/style.css so it can override them
This commit is contained in:
parent
6c29ccee40
commit
5eab692a97
8 changed files with 9 additions and 7 deletions
|
@ -235,7 +235,10 @@ class Page {
|
|||
}
|
||||
|
||||
protected function add_auto_html_headers() {
|
||||
global $config;
|
||||
|
||||
$data_href = get_base_href();
|
||||
$theme_name = $config->get_string('theme', 'default');
|
||||
|
||||
$this->add_html_header("<script type='text/javascript'>base_href = '$data_href';</script>");
|
||||
|
||||
|
@ -252,6 +255,12 @@ class Page {
|
|||
$this->add_html_header('<link rel="stylesheet" href="'.$data_href.'/'.$css_file.'" type="text/css">');
|
||||
}
|
||||
}
|
||||
$css_files = glob("themes/$theme_name/style.css");
|
||||
if($css_files) {
|
||||
foreach($css_files as $css_file) {
|
||||
$this->add_html_header('<link rel="stylesheet" href="'.$data_href.'/'.$css_file.'" type="text/css">');
|
||||
}
|
||||
}
|
||||
|
||||
foreach(glob("lib/*.js") as $js) {
|
||||
$this->add_html_header('<script src="'.$data_href.'/'.$js.'" type="text/javascript"></script>');
|
||||
|
|
|
@ -197,7 +197,6 @@ class Layout {
|
|||
<head>
|
||||
<title>{$page->title}</title>
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
|
||||
<link rel="stylesheet" href="$data_href/themes/$theme_name/style.css" type="text/css">
|
||||
$header_html
|
||||
<script src='$data_href/themes/$theme_name/sidebar.js' type='text/javascript'></script>
|
||||
<script src='$data_href/themes/$theme_name/script.js' type='text/javascript'></script>
|
||||
|
|
|
@ -55,7 +55,6 @@ class Layout {
|
|||
<head>
|
||||
<title>{$page->title}</title>
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
|
||||
<link rel="stylesheet" href="$data_href/themes/$theme_name/style.css" type="text/css">
|
||||
<script src='$data_href/themes/$theme_name/sidebar.js' type='text/javascript'></script>
|
||||
$header_html
|
||||
</head>
|
||||
|
|
|
@ -56,7 +56,6 @@ class Layout {
|
|||
<head>
|
||||
<title>{$page->title}</title>
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
|
||||
<link rel="stylesheet" href="$data_href/themes/$theme_name/style.css" type="text/css">
|
||||
$header_html
|
||||
</head>
|
||||
|
||||
|
|
|
@ -61,7 +61,6 @@ class Layout {
|
|||
<head>
|
||||
<title>{$page->title}</title>
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
|
||||
<link rel="stylesheet" href="$data_href/themes/$theme_name/style.css" type="text/css">
|
||||
$header_html
|
||||
<script src='$data_href/themes/$theme_name/sidebar.js' type='text/javascript'></script>
|
||||
<script src='$data_href/themes/$theme_name/script.js' type='text/javascript'></script>
|
||||
|
|
|
@ -165,7 +165,6 @@ class Layout {
|
|||
<head>
|
||||
<title>{$page->title}</title>
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
|
||||
<link rel="stylesheet" href="$data_href/themes/$theme_name/style.css" type="text/css">
|
||||
|
||||
$header_html
|
||||
</head>
|
||||
|
|
|
@ -51,7 +51,6 @@ class Layout {
|
|||
<head>
|
||||
<title>{$page->title}</title>
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
|
||||
<link rel="stylesheet" href="$data_href/themes/$theme_name/style.css" type="text/css">
|
||||
$header_html
|
||||
<script src='$data_href/themes/$theme_name/sidebar.js' type='text/javascript'></script>
|
||||
<script src='$data_href/themes/$theme_name/script.js' type='text/javascript'></script>
|
||||
|
|
|
@ -61,7 +61,6 @@ class Layout {
|
|||
<head>
|
||||
<title>{$page->title}</title>
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
|
||||
<link rel="stylesheet" href="$data_href/themes/$theme_name/style.css" type="text/css">
|
||||
$header_html
|
||||
</head>
|
||||
|
||||
|
|
Reference in a new issue