]> git.wh0rd.org - tt-rss.git/commitdiff
move Zoom stylesheet to a separate file
authorAndrew Dolgov <noreply@fakecake.org>
Mon, 27 Jan 2014 21:39:24 +0000 (01:39 +0400)
committerAndrew Dolgov <noreply@fakecake.org>
Mon, 27 Jan 2014 21:39:24 +0000 (01:39 +0400)
update stylesheet/javascript tag helpers to return output instead of
printing it

classes/handler/public.php
css/tt-rss.css
include/functions.php
index.php
plugins/auth_internal/init.php
prefs.php

index 31376ff60333e967cbc77ceb7eb33f0f445f9cc8..27b33b4a5c12062c73a5bdcf110d906cdb6d3ae7 100644 (file)
@@ -427,9 +427,9 @@ class Handler_Public extends Handler {
                <link rel=\"shortcut icon\" type=\"image/png\" href=\"images/favicon.png\">
                <link rel=\"icon\" type=\"image/png\" sizes=\"72x72\" href=\"images/favicon-72px.png\">";
 
-               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 "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/>
                        </head><body id='sharepopup'>";
 
@@ -788,8 +788,8 @@ class Handler_Public extends Handler {
                <link rel=\"shortcut icon\" type=\"image/png\" href=\"images/favicon.png\">
                <link rel=\"icon\" type=\"image/png\" sizes=\"72x72\" href=\"images/favicon-72px.png\">";
 
-               stylesheet_tag("css/utility.css");
-               javascript_tag("lib/prototype.js");
+               echo stylesheet_tag("css/utility.css");
+               echo javascript_tag("lib/prototype.js");
 
                print "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/>
                        </head><body id='forgotpass'>";
index 5cb9d81011563c6d4821bee8e9f2f511aa34a59f..98ff382905fdb25ecbb144884dc9e89069458a48 100644 (file)
@@ -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;
index 7cdeae3b64f0724f3c3834291c1a74bcef5df5b2..6c6bf2661c8e97f8637d04d2651b9df6aa2733b7 100644 (file)
                                header("Content-Type: text/html");
                                $rv['content'] .= "<html><head>
                                                <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/>
-                                               <title>Tiny Tiny RSS - ".$line["title"]."</title>
-                                               <link rel=\"stylesheet\" type=\"text/css\" href=\"css/tt-rss.css\">
+                                               <title>Tiny Tiny RSS - ".$line["title"]."</title>".
+                                               stylesheet_tag("css/tt-rss.css").
+                                               stylesheet_tag("css/zoom.css")."
+
                                                <link rel=\"shortcut icon\" type=\"image/png\" href=\"images/favicon.png\">
                                                <link rel=\"icon\" type=\"image/png\" sizes=\"72x72\" href=\"images/favicon-72px.png\">
 
        function stylesheet_tag($filename) {
                $timestamp = filemtime($filename);
 
-               echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"$filename?$timestamp\"/>\n";
+               return "<link rel=\"stylesheet\" type=\"text/css\" href=\"$filename?$timestamp\"/>\n";
        }
 
        function javascript_tag($filename) {
 
                if ($query) $timestamp .= "&$query";
 
-               echo "<script type=\"text/javascript\" charset=\"utf-8\" src=\"$filename?$timestamp\"></script>\n";
+               return "<script type=\"text/javascript\" charset=\"utf-8\" src=\"$filename?$timestamp\"></script>\n";
        }
 
        function calculate_dep_timestamp() {
index 303eacda0a454de3b6504555edafcbfe10734046..132fd115447ad43db4104c01b4556fb751893856 100644 (file)
--- a/index.php
+++ b/index.php
 <head>
        <title>Tiny Tiny RSS</title>
 
-       <?php stylesheet_tag("lib/dijit/themes/claro/claro.css"); ?>
-       <?php stylesheet_tag("css/layout.css"); ?>
+       <?php echo stylesheet_tag("lib/dijit/themes/claro/claro.css"); ?>
+       <?php echo stylesheet_tag("css/layout.css"); ?>
 
        <?php if ($_SESSION["uid"]) {
                $theme = get_pref( "USER_CSS_THEME", $_SESSION["uid"], false);
                if ($theme && file_exists("themes/$theme")) {
-                       stylesheet_tag("themes/$theme");
+                       echo stylesheet_tag("themes/$theme");
                } else {
-                       stylesheet_tag("themes/default.css");
+                       echo stylesheet_tag("themes/default.css");
                }
        }
        ?>
@@ -91,7 +91,7 @@
                                "lib/dojo/tt-rss-layer.js",
                                "errors.php?mode=js") as $jsfile) {
 
-               javascript_tag($jsfile);
+               echo javascript_tag($jsfile);
 
        } ?>
 
index 3c38ab8bf8e754e9251cb99e9a2b8ef088574460..32ec276a731fb6bd80f5da54749f779ae8b052fb 100644 (file)
@@ -51,7 +51,7 @@ class Auth_Internal extends Plugin implements IAuthModule {
                                                        $return = urlencode($_REQUEST["return"]);
                                                        ?><html>
                                                                <head><title>Tiny Tiny RSS</title></head>
-                                                               <?php stylesheet_tag("css/utility.css") ?>
+                                                               <?php echo stylesheet_tag("css/utility.css") ?>
                                                        <body class="otp"><div class="content">
                                                        <form action="public.php?return=<?php echo $return ?>"
                                                                        method="POST" class="otpform">
index 6c203bd2ae693a79768ea0170159f67af26aaff2..75b8c116d61a800bbf6fe1ce05982a1205fb2feb 100644 (file)
--- a/prefs.php
+++ b/prefs.php
 <head>
        <title>Tiny Tiny RSS : <?php echo __("Preferences") ?></title>
 
-       <?php stylesheet_tag("lib/dijit/themes/claro/claro.css"); ?>
-       <?php stylesheet_tag("css/layout.css"); ?>
+       <?php echo stylesheet_tag("lib/dijit/themes/claro/claro.css"); ?>
+       <?php echo stylesheet_tag("css/layout.css"); ?>
 
        <?php if ($_SESSION["uid"]) {
                $theme = get_pref( "USER_CSS_THEME", $_SESSION["uid"], false);
                if ($theme && file_exists("themes/$theme")) {
-                       stylesheet_tag("themes/$theme");
+                       echo stylesheet_tag("themes/$theme");
                } else {
-                       stylesheet_tag("themes/default.css");
+                       echo stylesheet_tag("themes/default.css");
                }
        }
        ?>
@@ -57,7 +57,7 @@
                                "lib/dojo/tt-rss-layer.js",
                                "errors.php?mode=js") as $jsfile) {
 
-               javascript_tag($jsfile);
+               echo javascript_tag($jsfile);
 
        } ?>