From cdbcb2778a8aef8ad4677056c42cb3caad18cd0c Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 28 Jan 2014 01:39:24 +0400 Subject: [PATCH] move Zoom stylesheet to a separate file update stylesheet/javascript tag helpers to return output instead of printing it --- classes/handler/public.php | 10 ++--- css/tt-rss.css | 69 ---------------------------------- include/functions.php | 10 +++-- index.php | 10 ++--- plugins/auth_internal/init.php | 2 +- prefs.php | 10 ++--- 6 files changed, 22 insertions(+), 89 deletions(-) diff --git a/classes/handler/public.php b/classes/handler/public.php index 31376ff6..27b33b4a 100644 --- a/classes/handler/public.php +++ b/classes/handler/public.php @@ -427,9 +427,9 @@ class Handler_Public extends Handler { "; - stylesheet_tag("css/utility.css"); - javascript_tag("lib/prototype.js"); - javascript_tag("lib/scriptaculous/scriptaculous.js?load=effects,dragdrop,controls"); + echo stylesheet_tag("css/utility.css"); + echo javascript_tag("lib/prototype.js"); + echo javascript_tag("lib/scriptaculous/scriptaculous.js?load=effects,dragdrop,controls"); print " "; @@ -788,8 +788,8 @@ class Handler_Public extends Handler { "; - stylesheet_tag("css/utility.css"); - javascript_tag("lib/prototype.js"); + echo stylesheet_tag("css/utility.css"); + echo javascript_tag("lib/prototype.js"); print " "; diff --git a/css/tt-rss.css b/css/tt-rss.css index 5cb9d810..98ff3829 100644 --- a/css/tt-rss.css +++ b/css/tt-rss.css @@ -978,75 +978,6 @@ div.postHeader span.author { font-weight : normal; } -body#ttrssZoom { - margin-left : auto; - margin-right : auto; - padding : 20px; - max-width : 670px; - background : #f9fbff; -} - -body#ttrssZoom div.postHeader div.postFeedTitle { - float : left; - text-align : right; - padding-left : 0px; - font-size : 10px; -} - -body#ttrssZoom div.postHeader a.postComments { - text-align : right; - padding-left : 0px; - font-size : 10px; -} - -body#ttrssZoom div.postHeader div.postDate { - float : none; - text-align : right; - padding-left : 0px; - color : #777; - font-size : 10px; -} - -body#ttrssZoom div.postHeader div.postTags { - color : #777; - font-size : 10px; -} - -body#ttrssZoom div.postHeader div.postTitle { - white-space : normal; -} - -body#ttrssZoom div.postContent p { - max-width : 650px; - -webkit-hyphens: auto; - -moz-hyphens: auto; - hyphens: auto; -} - -body#ttrssZoom div.postHeader { - margin : 10px; - border : 1px solid #ccc; -} - -body#ttrssZoom div.postReply { - border : 1px solid #ccc; - background : white; -} - -body#ttrssZoom div.postContent { - -} - -body#ttrssZoom div.footer { - margin-top : 1em; - text-align : center; -} - -body#ttrssZoom div.postContent img { - max-width : 650px; - height : auto; -} - select.attachments { display : block; margin-top : 10px; diff --git a/include/functions.php b/include/functions.php index 7cdeae3b..6c6bf266 100644 --- a/include/functions.php +++ b/include/functions.php @@ -3260,8 +3260,10 @@ header("Content-Type: text/html"); $rv['content'] .= " - Tiny Tiny RSS - ".$line["title"]." - + Tiny Tiny RSS - ".$line["title"]."". + stylesheet_tag("css/tt-rss.css"). + stylesheet_tag("css/zoom.css")." + @@ -4306,7 +4308,7 @@ function stylesheet_tag($filename) { $timestamp = filemtime($filename); - echo "\n"; + return "\n"; } function javascript_tag($filename) { @@ -4321,7 +4323,7 @@ if ($query) $timestamp .= "&$query"; - echo "\n"; + return "\n"; } function calculate_dep_timestamp() { diff --git a/index.php b/index.php index 303eacda..132fd115 100644 --- a/index.php +++ b/index.php @@ -56,15 +56,15 @@ Tiny Tiny RSS - - + + @@ -91,7 +91,7 @@ "lib/dojo/tt-rss-layer.js", "errors.php?mode=js") as $jsfile) { - javascript_tag($jsfile); + echo javascript_tag($jsfile); } ?> diff --git a/plugins/auth_internal/init.php b/plugins/auth_internal/init.php index 3c38ab8b..32ec276a 100644 --- a/plugins/auth_internal/init.php +++ b/plugins/auth_internal/init.php @@ -51,7 +51,7 @@ class Auth_Internal extends Plugin implements IAuthModule { $return = urlencode($_REQUEST["return"]); ?> Tiny Tiny RSS - +
diff --git a/prefs.php b/prefs.php index 6c203bd2..75b8c116 100644 --- a/prefs.php +++ b/prefs.php @@ -32,15 +32,15 @@ Tiny Tiny RSS : <?php echo __("Preferences") ?> - - + + @@ -57,7 +57,7 @@ "lib/dojo/tt-rss-layer.js", "errors.php?mode=js") as $jsfile) { - javascript_tag($jsfile); + echo javascript_tag($jsfile); } ?> -- 2.39.2