implement cache-busting for default theme.css
night theme: small fixes
This commit is contained in:
parent
7c04f8afeb
commit
e432b8fbe2
6 changed files with 21 additions and 7 deletions
|
@ -565,7 +565,7 @@ class Pref_Prefs extends Handler_Protected {
|
||||||
|
|
||||||
} else if ($pref_name == "USER_CSS_THEME") {
|
} else if ($pref_name == "USER_CSS_THEME") {
|
||||||
|
|
||||||
$themes = array_merge(glob("themes/*.css"), glob("themes.local/*.css"));
|
$themes = array_merge(glob("themes/*.php"), glob("themes/*.css"), glob("themes.local/*.css"));
|
||||||
$themes = array_map("basename", $themes);
|
$themes = array_map("basename", $themes);
|
||||||
$themes = array_filter($themes, "theme_valid");
|
$themes = array_filter($themes, "theme_valid");
|
||||||
asort($themes);
|
asort($themes);
|
||||||
|
|
|
@ -2428,7 +2428,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function theme_valid($theme) {
|
function theme_valid($theme) {
|
||||||
if ($theme == "default.css" || $theme == "night.css") return true; // needed for array_filter
|
if ($theme == "default.php" || $theme == "night.css") return true; // needed for array_filter
|
||||||
$file = "themes/" . basename($theme);
|
$file = "themes/" . basename($theme);
|
||||||
|
|
||||||
if (!file_exists($file)) $file = "themes.local/" . basename($theme);
|
if (!file_exists($file)) $file = "themes.local/" . basename($theme);
|
||||||
|
|
|
@ -68,7 +68,7 @@
|
||||||
if ($theme && theme_valid("$theme")) {
|
if ($theme && theme_valid("$theme")) {
|
||||||
echo stylesheet_tag(get_theme_path($theme));
|
echo stylesheet_tag(get_theme_path($theme));
|
||||||
} else {
|
} else {
|
||||||
echo stylesheet_tag("themes/default.css");
|
echo stylesheet_tag("themes/default.php");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
if ($theme && theme_valid("$theme")) {
|
if ($theme && theme_valid("$theme")) {
|
||||||
echo stylesheet_tag(get_theme_path($theme));
|
echo stylesheet_tag(get_theme_path($theme));
|
||||||
} else {
|
} else {
|
||||||
echo stylesheet_tag("themes/default.css");
|
echo stylesheet_tag("themes/default.php");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
14
themes/default.php
Normal file
14
themes/default.php
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
<?php
|
||||||
|
header("Content-type: text/css");
|
||||||
|
|
||||||
|
function import_tag($filename) {
|
||||||
|
return "@import \"$filename?".filemtime($filename)."\";";
|
||||||
|
}
|
||||||
|
|
||||||
|
$styles = [ "tt-rss.css", "dijit.css", "cdm.css", "prefs.css" ];
|
||||||
|
|
||||||
|
foreach ($styles as $style) {
|
||||||
|
print import_tag("../css/$style") . "\n";
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
@import "default.css";
|
@import "default.php";
|
||||||
|
|
||||||
body#ttrssMain #feeds-holder {
|
body#ttrssMain #feeds-holder {
|
||||||
background : #222;
|
background : #222;
|
||||||
|
@ -19,7 +19,7 @@ body#ttrssMain #content-insert {
|
||||||
}
|
}
|
||||||
|
|
||||||
body#ttrssMain #feedTree .dijitTreeRow {
|
body#ttrssMain #feedTree .dijitTreeRow {
|
||||||
color : #ccc;
|
color : #ccc ! important;
|
||||||
}
|
}
|
||||||
|
|
||||||
body#ttrssMain.claro .dijitTree .dijitTreeRowHover {
|
body#ttrssMain.claro .dijitTree .dijitTreeRowHover {
|
||||||
|
@ -29,7 +29,7 @@ body#ttrssMain.claro .dijitTree .dijitTreeRowHover {
|
||||||
|
|
||||||
body#ttrssMain.claro .dijitTree .dijitTreeRowSelected {
|
body#ttrssMain.claro .dijitTree .dijitTreeRowSelected {
|
||||||
background : #555;
|
background : #555;
|
||||||
border-color : #666;
|
border-color : #666 ! important;
|
||||||
}
|
}
|
||||||
|
|
||||||
body#ttrssMain.claro .dijitTreeRowSelected .dijitTreeLabel {
|
body#ttrssMain.claro .dijitTreeRowSelected .dijitTreeLabel {
|
||||||
|
|
Loading…
Reference in a new issue