]> git.wh0rd.org Git - tt-rss.git/commitdiff
mobile version work (3)
authorAndrew Dolgov <fox@madoka.spb.ru>
Mon, 27 Mar 2006 03:10:46 +0000 (04:10 +0100)
committerAndrew Dolgov <fox@madoka.spb.ru>
Mon, 27 Mar 2006 03:10:46 +0000 (04:10 +0100)
mobile/functions.php
mobile/mobile.css
mobile/tt-rss.php

index 0cfad979221af2431311fa6c46b8c0c9638a99c3..9abedb590286c704b6fbec7ad0f3f19e90c513ae 100644 (file)
@@ -26,7 +26,7 @@
 
                        if ($num_starred > 0) $class .= "Unread";
 
-                       printFeedEntry(-1, $class, "Starred articles", $num_starred, 
+                       printMobileFeedEntry(-1, $class, "Starred articles", $num_starred, 
                                "../images/mark_set.png", $link);
 
                        if (get_pref($link, 'ENABLE_FEED_CATS')) {
@@ -67,7 +67,7 @@
                                        
                                        error_reporting (DEFAULT_ERROR_LEVEL);
        
-                                       printFeedEntry(-$line["id"]-11, 
+                                       printMobileFeedEntry(-$line["id"]-11, 
                                                $class, $line["description"], $count, "../images/label.png", $link);
                
                                }
                                        
                                        print "<li class=\"feedCat\">
                                                <a href=\"FIXME\">$tmp_category</a>
-                                                       <a href=\"FIXME\">
+                                                       <a href=\"?go=vcat&id=$cat_id\">
                                                                <span class=\"$catctr_class\">($cat_unread unread)$ellipsis</span></a></li>";
 
                                        // !!! NO SPACE before <ul...feedCatList - breaks firstChild DOM function
                                        print "<li id=\"feedCatHolder\" class=\"$holder_class\"><ul class=\"feedCatList\" id=\"FCATLIST-$cat_id\">";
                                }
        
-                               printFeedEntry($feed_id, $class, $feed, $unread, 
-                                       "icons/$feed_id.ico", $link, $rtl_content);
+                               printMobileFeedEntry($feed_id, $class, $feed, $unread, 
+                                       "../icons/$feed_id.ico", $link, $rtl_content);
        
                                ++$lnum;
                        }
 
-
-       } else {
-               print "Function not implemented.";
+               } else {
+                       print "Tags: function not implemented.";
+               }       
        }
+
+       function printMobileFeedEntry($feed_id, $class, $feed_title, $unread, $icon_file, $link,
+               $rtl_content = false) {
+
+               if (file_exists($icon_file) && filesize($icon_file) > 0) {
+                               $feed_icon = "<img src=\"$icon_file\">";
+               } else {
+                       $feed_icon = "<img src=\"../images/blank_icon.gif\">";
+               }
+
+               if ($rtl_content) {
+                       $rtl_tag = "dir=\"rtl\"";
+               } else {
+                       $rtl_tag = "dir=\"ltr\"";
+               }
+
+               $feed = "<a href=\"?go=vf&id=$feed_id\">$feed_title</a>";
+
+               print "<li class=\"$class\">";
+               if (get_pref($link, 'ENABLE_FEED_ICONS')) {
+                       print "$feed_icon";
+               }
+
+               print "<span $rtl_tag>$feed</span> ";
+
+               if ($unread != 0) {
+                       $fctr_class = "";
+               } else {
+                       $fctr_class = "class=\"invisible\"";
+               }
+
+               print "<span $rtl_tag>($unread)</span>";
+               
+               print "</li>";
+
        }
 
 ?>
index 796bf2395207f74c2ddd5098869a57f1c5890c88..736518b9e5d7bc807247e6d8eeb75164f1eccd80 100644 (file)
@@ -1,6 +1,7 @@
 body {
        padding : 0px;
        margin : 0px;
+       width : 640px;
 }
 
 input {
@@ -22,11 +23,31 @@ input {
        color : black;
 }
 
-td.heading {
+#opsel {
+       float : right;
+       margin-top : 3px;
+}
+
+#content {
+
+}
+
+#footer {
+       border-width : 1px 0px 0px 0px;
+       border-style : solid;
+       border-color : #c0c0c0;
+       text-align : center;
+       font-size : x-small;
+       background-color : white;
+       color : gray;
+}
+
+/*
+table.main td.heading {
        font-weight : bold;
 }
 
-td.content {
+table.main td.content {
        background-image : url("../images/vgrad_light_rev.png");
        background-position : top left;
        background-repeat : repeat-x;
@@ -35,6 +56,19 @@ td.content {
        border-color : #c0c0c0;
 }
 
+table.main td.footer {
+       border-width : 1px 0px 0px 0px;
+       border-style : solid;
+       border-color : #c0c0c0;
+       text-align : center;
+       font-size : x-small;
+       background-image : url("images/vgrad_light_rev2.png");
+       background-position : top left;
+       background-repeat : repeat-x;
+       color : gray;
+}
+*/
+
 form {
        padding : 0px;
        margin : 0px;
@@ -77,3 +111,25 @@ ul.feedList li {
        margin : 0px;
 }
 
+hr {
+       border-width : 0px 0px 1px 0px;
+       border-style : dashed;
+       border-color : #e0e0e0;
+}
+
+a {
+       color : black;
+       text-decoration : none;
+}
+
+a:hover {
+       color : #5050aa;
+}
+
+ul.feedList img, img.tinyFeedIcon {
+       margin : 0px 3px 0px 0px;
+       width : 16px;
+       height : 16px;
+       border-width : 0px;
+}
+
index 9b1453e223c26e3a8d1e34a6618513ba45a13214..deaff97303bf7355a3772f4036452ddb87b919f3 100644 (file)
 </head>
 <body>
 
-<table width='640' height='100%'>
-<tr><td class="heading">
-       Your Feeds
-</td>
-<td align='right'>
+<div id="opsel">
        <form method="GET">
                <select name="go">
                        <option>Feeds</option>
                        <option>Preferences</option>
                        <option disabled>--------------</option>
+                       <option disabled>[user feed list]</option>
                        <option disabled>--------------</option>
                        <option>Logout</option>
                </select>
                <input type="submit" value="Go">
        </form>
-</td>
-</tr>
-<td class="content" height='100%' colspan='2' valign='top'>
+</div>
+
+<div id="content">
 <?
        $go = $_GET["go"];
 
        if (!$go || $go == "Feeds") {
                render_feeds_list($link);
+       } else {
+               print "Function not implemented";
        }
 
 ?>
-</td></tr>
-</table>
+</div>
+
+<div id="footer">
+       <a href="http://tt-rss.spb.ru/">Tiny-Tiny RSS</a> v<?= VERSION ?> &copy; 2005-2006 Andrew Dolgov
+</div>
 
 </body>
 </html>