diff --git a/core/page.class.php b/core/page.class.php
index 3ec8b1d6..ac6a127f 100644
--- a/core/page.class.php
+++ b/core/page.class.php
@@ -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("");
@@ -252,6 +255,12 @@ class Page {
$this->add_html_header('');
}
}
+ $css_files = glob("themes/$theme_name/style.css");
+ if($css_files) {
+ foreach($css_files as $css_file) {
+ $this->add_html_header('');
+ }
+ }
foreach(glob("lib/*.js") as $js) {
$this->add_html_header('');
diff --git a/themes/danbooru/layout.class.php b/themes/danbooru/layout.class.php
index 534ea285..e24a5233 100644
--- a/themes/danbooru/layout.class.php
+++ b/themes/danbooru/layout.class.php
@@ -197,7 +197,6 @@ class Layout {
{$page->title}
-
$header_html
diff --git a/themes/default/layout.class.php b/themes/default/layout.class.php
index 08584b62..87f0bcac 100644
--- a/themes/default/layout.class.php
+++ b/themes/default/layout.class.php
@@ -55,7 +55,6 @@ class Layout {
{$page->title}
-
$header_html
diff --git a/themes/flat/layout.class.php b/themes/flat/layout.class.php
index c7b2ac64..8031b9aa 100644
--- a/themes/flat/layout.class.php
+++ b/themes/flat/layout.class.php
@@ -56,7 +56,6 @@ class Layout {
{$page->title}
-
$header_html
diff --git a/themes/futaba/layout.class.php b/themes/futaba/layout.class.php
index d434de74..a113ed77 100644
--- a/themes/futaba/layout.class.php
+++ b/themes/futaba/layout.class.php
@@ -61,7 +61,6 @@ class Layout {
{$page->title}
-
$header_html
diff --git a/themes/lite/layout.class.php b/themes/lite/layout.class.php
index 227a3cad..dd34bfb9 100644
--- a/themes/lite/layout.class.php
+++ b/themes/lite/layout.class.php
@@ -165,7 +165,6 @@ class Layout {
{$page->title}
-
$header_html
diff --git a/themes/old_default/layout.class.php b/themes/old_default/layout.class.php
index 2660709d..6c251336 100644
--- a/themes/old_default/layout.class.php
+++ b/themes/old_default/layout.class.php
@@ -51,7 +51,6 @@ class Layout {
{$page->title}
-
$header_html
diff --git a/themes/warm/layout.class.php b/themes/warm/layout.class.php
index 264d5984..55f2fe4c 100644
--- a/themes/warm/layout.class.php
+++ b/themes/warm/layout.class.php
@@ -61,7 +61,6 @@ class Layout {
{$page->title}
-
$header_html