mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-19 17:11:29 +00:00
enable triple-pane theme; fix theme system not working
This commit is contained in:
@@ -2044,9 +2044,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($theme_path) {
|
if ($theme_path) {
|
||||||
if (is_file("$t/theme.ini")) {
|
if (is_file("$theme_path/theme.ini")) {
|
||||||
$ini = parse_ini_file("$t/theme.ini", true);
|
$ini = parse_ini_file("$theme_path/theme.ini", true);
|
||||||
if ($ini['theme']['version'] > THEME_VERSION_REQUIRED) {
|
if ($ini['theme']['version'] >= THEME_VERSION_REQUIRED) {
|
||||||
return $theme_path;
|
return $theme_path;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2068,6 +2068,20 @@
|
|||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function print_theme_includes($link) {
|
||||||
|
|
||||||
|
$t = get_user_theme_path($link);
|
||||||
|
$time = time();
|
||||||
|
|
||||||
|
if ($t) {
|
||||||
|
print "<link rel=\"stylesheet\" type=\"text/css\"
|
||||||
|
href=\"$t/theme.css?$time \">";
|
||||||
|
if (file_exists("$t/theme.js")) {
|
||||||
|
print "<script type=\"text/javascript\" src=\"$t/theme.js?$time\">
|
||||||
|
</script>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function get_all_themes() {
|
function get_all_themes() {
|
||||||
$themes = glob("themes/*");
|
$themes = glob("themes/*");
|
||||||
@@ -2079,7 +2093,7 @@
|
|||||||
foreach ($themes as $t) {
|
foreach ($themes as $t) {
|
||||||
if (is_file("$t/theme.ini")) {
|
if (is_file("$t/theme.ini")) {
|
||||||
$ini = parse_ini_file("$t/theme.ini", true);
|
$ini = parse_ini_file("$t/theme.ini", true);
|
||||||
if ($ini['theme']['version'] > THEME_VERSION_REQUIRED &&
|
if ($ini['theme']['version'] >= THEME_VERSION_REQUIRED &&
|
||||||
!$ini['theme']['disabled']) {
|
!$ini['theme']['disabled']) {
|
||||||
$entry = array();
|
$entry = array();
|
||||||
$entry["path"] = $t;
|
$entry["path"] = $t;
|
||||||
|
|||||||
@@ -27,10 +27,7 @@
|
|||||||
<link rel="stylesheet" type="text/css" href="tt-rss.css?<?php echo $dt_add ?>"/>
|
<link rel="stylesheet" type="text/css" href="tt-rss.css?<?php echo $dt_add ?>"/>
|
||||||
<link rel="stylesheet" type="text/css" href="lib/dijit/themes/claro/claro.css"/>
|
<link rel="stylesheet" type="text/css" href="lib/dijit/themes/claro/claro.css"/>
|
||||||
|
|
||||||
<?php $user_theme = get_user_theme_path($link);
|
<?php print_theme_includes($link) ?>
|
||||||
if ($user_theme) { ?>
|
|
||||||
<link rel="stylesheet" type="text/css" href="<?php echo $user_theme ?>/theme.css"/>
|
|
||||||
<?php } ?>
|
|
||||||
|
|
||||||
<?php $user_css_url = get_pref($link, 'USER_STYLESHEET_URL'); ?>
|
<?php $user_css_url = get_pref($link, 'USER_STYLESHEET_URL'); ?>
|
||||||
<?php if ($user_css_url) { ?>
|
<?php if ($user_css_url) { ?>
|
||||||
|
|||||||
@@ -1,4 +1,13 @@
|
|||||||
div.headlines_normal {
|
#content-insert {
|
||||||
|
border-left-width : 1px;
|
||||||
|
border-bottom-width : 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#headlines-frame {
|
||||||
|
border-right-width : 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* div.headlines_normal {
|
||||||
position : absolute;
|
position : absolute;
|
||||||
border-width : 1px 1px 0px 0px;
|
border-width : 1px 1px 0px 0px;
|
||||||
right : 400px;
|
right : 400px;
|
||||||
@@ -66,7 +75,7 @@ span.headlineInnerTitle {
|
|||||||
bottom : 0px;
|
bottom : 0px;
|
||||||
top : 0px;
|
top : 0px;
|
||||||
|
|
||||||
}
|
} */
|
||||||
|
|
||||||
|
|
||||||
/*#footer, #prefFooter {
|
/*#footer, #prefFooter {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
[theme]
|
[theme]
|
||||||
name=Triple-Pane
|
name=Triple-Pane
|
||||||
author=seeker
|
author=seeker
|
||||||
version=1.0
|
version=1.1
|
||||||
options=horiz_resize,hide_footer
|
options=
|
||||||
|
|||||||
14
themes/triple-pane/theme.js
Normal file
14
themes/triple-pane/theme.js
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
function themeBeforeLayout() {
|
||||||
|
$("headlines-wrap-inner").setAttribute("design", 'sidebar');
|
||||||
|
$("content-insert").setAttribute("region", "trailing");
|
||||||
|
$("content-insert").setStyle({
|
||||||
|
width: '50%',
|
||||||
|
height: 'auto'});
|
||||||
|
}
|
||||||
|
|
||||||
|
function themeAfterLayout() {
|
||||||
|
$("headlines-toolbar").setStyle({
|
||||||
|
'border-right-width': '1px',
|
||||||
|
'border-color': '#88b0f0',
|
||||||
|
});
|
||||||
|
}
|
||||||
@@ -282,9 +282,18 @@ function init() {
|
|||||||
dojo.require("dijit.form.Select");
|
dojo.require("dijit.form.Select");
|
||||||
dojo.require("dojo.parser");
|
dojo.require("dojo.parser");
|
||||||
|
|
||||||
|
if (typeof themeBeforeLayout == 'function') {
|
||||||
|
themeBeforeLayout();
|
||||||
|
}
|
||||||
|
|
||||||
dojo.addOnLoad(function() {
|
dojo.addOnLoad(function() {
|
||||||
updateFeedList();
|
updateFeedList();
|
||||||
closeArticlePanel();
|
closeArticlePanel();
|
||||||
|
|
||||||
|
if (typeof themeAfterLayout == 'function') {
|
||||||
|
themeAfterLayout();
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!genericSanityCheck())
|
if (!genericSanityCheck())
|
||||||
|
|||||||
@@ -30,10 +30,7 @@
|
|||||||
|
|
||||||
<link rel="stylesheet" type="text/css" href="lib/dijit/themes/claro/claro.css"/>
|
<link rel="stylesheet" type="text/css" href="lib/dijit/themes/claro/claro.css"/>
|
||||||
|
|
||||||
<?php $user_theme = get_user_theme_path($link);
|
<?php print_theme_includes($link) ?>
|
||||||
if ($user_theme) { ?>
|
|
||||||
<link rel="stylesheet" type="text/css" href="<?php echo $user_theme ?>/theme.css?<?php echo $dt_add ?>">
|
|
||||||
<?php } ?>
|
|
||||||
|
|
||||||
<?php $user_css_url = get_pref($link, 'USER_STYLESHEET_URL'); ?>
|
<?php $user_css_url = get_pref($link, 'USER_STYLESHEET_URL'); ?>
|
||||||
<?php if ($user_css_url) { ?>
|
<?php if ($user_css_url) { ?>
|
||||||
|
|||||||
Reference in New Issue
Block a user