Show
Ignore:
Timestamp:
10/31/06 18:08:03 (2 years ago)
Author:
mbonetti
Message:

tiny revamp of the default mobile theme

Location:
trunk/gregarius/themes/default/mobile
Files:
1 added
9 modified

Legend:

Unmodified
Added
Removed
  • trunk/gregarius/themes/default/mobile/footer.php

    r1302 r1615  
    1 <span><a href="#top">TOP</a></span> 
    2 <span><a href="http://gregarius.net/">Gregarius</a> <?php echo _VERSION_; ?><?php echo rss_svn_rev('.'); ?></span> 
    3 <span><a href="http://validator.w3.org/check/referer">XHTML1.0-MP</a></span> 
    4 <span>Last update: <?php echo rss_footer_last_modif(); ?></span> 
     1<div id="footer"> 
     2<p><a href="#top">TOP</a></p> 
     3<?php echo rss_nav() ?> 
     4</div> 
  • trunk/gregarius/themes/default/mobile/index.php

    r1309 r1615  
    2020</div> 
    2121<?php } ?> 
    22 <?php echo rss_nav() ?> 
    23 <div id="ftr"> 
    24     <?php rss_main_footer(); ?> 
    25 </div> 
     22<?php rss_main_footer(); ?> 
    2623</body> 
    2724</html> 
  • trunk/gregarius/themes/default/mobile/item.php

    r1561 r1615  
    1 <br /><br /><h4><a href="<?php 
     1<?php 
     2if (!isset($GLOBALS['__item__idx__'])) { 
     3    $GLOBALS['__item__idx__']=0; 
     4} 
     5$cls = $GLOBALS['__item__idx__']++ % 2 ? 'e':'o'; 
     6?> 
     7<div class="item <?php echo $cls; ?>"> 
     8<h4><a href="<?php 
    29  $url = rss_item_url(); 
    310  if (substr($url,0,4) == 'http') { 
     
    815?>"><?php echo rss_item_title();  
    916?></a></h4> 
    10 <h5><?php echo rss_item_date(); ?><?php echo rss_item_author(); ?></h5> 
     17<h5><?php echo rss_item_date(); ?> <?php echo rss_item_author(); ?></h5> 
    1118<?php if (rss_item_has_enclosure()) { ?> 
    1219<h5><?php echo __('Enclosure:'); ?>&nbsp;[<a href="<?php echo rss_item_enclosure(); ?>"><?php echo __('download'); ?></a>]</h5> 
     
    2027 
    2128<?php if(!hidePrivate()) { ?> 
    22     <br /> 
    23     <div class="mobileform"> 
    24     <input type="radio" value="mobile_read" name="<?= rss_item_id(); ?>" <?php 
    25       if( !$GLOBALS['rss'] -> currentItem -> isUnread && !$GLOBALS['rss'] -> currentItem -> isSticky ) { 
    26         echo "checked"; 
    27       } 
    28     ?> >read 
    29     <input type="radio" name="<?= rss_item_id(); ?>" <?php 
    30       if( $GLOBALS['rss'] -> currentItem -> isUnread ) { 
    31         echo "checked";  
    32       } 
    33     ?> >unread 
    34     <input type="radio" value="mobile_sticky" name="<?= rss_item_id(); ?>" <?php 
    35       if( $GLOBALS['rss'] -> currentItem -> isSticky ) { 
    36         echo "checked"; 
    37       } 
    38     ?> >sticky 
    39     </div> 
     29<div class="mobileform"> 
     30<label for="">State:</label> 
     31<select name="<?= rss_item_id(); ?>"> 
     32    <option value="mobile_read" <?php  
     33        if( !$GLOBALS['rss'] -> currentItem -> isUnread && !$GLOBALS['rss'] -> currentItem -> isSticky ) {  
     34            echo "selected=\"selected\"";  
     35        } ?>>Read</option> 
     36    <option value="mobile_unread"   <?php 
     37          if( $GLOBALS['rss'] -> currentItem -> isUnread ) { 
     38            echo "selected=\"selected\"";  
     39          } 
     40        ?>>Unread</option> 
     41    <option value="mobile_sticky"   <?php 
     42          if( $GLOBALS['rss'] -> currentItem -> isSticky ) { 
     43            echo "selected=\"selected\"";  
     44          } 
     45        ?>>Sticky</option> 
     46</select> 
     47</div> 
    4048<?php } ?> 
    41  
    4249</div> 
     50</div> 
  • trunk/gregarius/themes/default/mobile/itemlist.php

    r1356 r1615  
    1 <?php if(hidePrivate()) { ?> 
    2     <p>(<a href="<?php echo getPath(); ?>?mobilelogin&media=mobile">Login</a> to mark items read)</p> 
    3 <?php } ?> 
    41<?php if ($title = rss_itemlist_title()) { ?> 
    52<h2><?php echo $title; ?></h2> 
     3<?php if(hidePrivate()) { ?> 
     4    <p>(<a href="<?php echo getPath(); ?>?mobilelogin&amp;media=mobile">Login</a> to mark items read)</p> 
     5<?php } ?> 
    66<form method="POST" style="display: inline;"> 
    77<?php } rss_itemlist_feeds(); ?> 
    88<?php if( !isMobileDevice() ) { ?> 
    9 <input type='hidden' name='mobile'> 
     9<input type='hidden' name='mobile' /> 
    1010<?php } ?> 
    11 <input type='submit' value='next'> 
     11<input type='submit' value='next' /> 
    1212</form> 
  • trunk/gregarius/themes/default/mobile/mobileconstants.php

    r1355 r1615  
    44//default override value for the number of items on a channel page 
    55define('DEFAULT_MOBILE_FRONTPAGE_ITEMSINCHANNELVIEW',10); 
    6 define('DEFAULT_MOBILE_OUTPUT_MAXLENGTH',0); 
     6define('DEFAULT_MOBILE_OUTPUT_MAXLENGTH',200); 
    77define('DEFAULT_MOBILE_CONTENT_STRIP_IMAGES','false'); 
    88?> 
  • trunk/gregarius/themes/default/mobile/nav.php

    r1561 r1615  
    1 <div class="navlist"> 
    21<?php  
    32$GLOBALS['rss']->nav->appendNavItem(getPath()."?feeds",__('Feeds')); 
    43$GLOBALS['rss']->nav->appendNavItem(getPath()."?cats",__('Categories')); 
    5 $GLOBALS['rss']->nav->appendNavItem(getPath()."update.php?mobile", __('<span>R</span>efresh')); 
     4$GLOBALS['rss']->nav->appendNavItem(getPath()."update.php?mobile", __('Refresh')); 
    65 
    76foreach ($GLOBALS['rss']->nav->items as $item) { 
     
    1211 
    1312?> 
    14 </div> 
  • trunk/gregarius/themes/default/mobile/navitem.php

    r1302 r1615  
    1 <span<?php echo rss_nav_item_class(); ?>><a href="<?php echo rss_nav_item_href(); ?>"><?php echo rss_nav_item_label(); ?></a></span> 
     1<?php  
     2if (!isset($GLOBALS['__ak__'])) { 
     3    $GLOBALS['__ak__']=0; 
     4} 
     5$ak = ++$GLOBALS['__ak__']; 
     6?> 
     7<p><span>[<?= $ak; ?>] </span><a accesskey="<?= $ak; ?>" href="<?php echo rss_nav_item_href(); ?>"><?php echo rss_nav_item_label(); ?></a></p> 
  • trunk/gregarius/themes/default/mobile/plugins.php

    r1442 r1615  
    55 
    66function __mobile_strip_images($i) { 
    7     static $allowed; 
     7    static $allowed; 
    88    if (!$allowed) { 
    99            $allowed = getConfig('rss.input.allowed'); 
     
    1313    } 
    1414    $i -> description = kses($i -> description ,$allowed); 
    15     return $i; 
     15     
     16    return $i; 
    1617} 
     18 
     19 
     20 
    1721 
    1822function __mobile_truncate_content($i) { 
    1923    $ml = rss_theme_config_override_option('rss.output.maxlength',DEFAULT_MOBILE_OUTPUT_MAXLENGTH); 
    20     $i -> description =  html_substr($i -> description, $ml) ; 
     24    if ($ml) { 
     25        $i -> description =  html_substr($i -> description, $ml) ; 
     26    } 
    2127    return $i; 
    2228} 
     
    3036} 
    3137 
    32  
    33 /*else { 
    34 setProperty('rss.prop.theme.default.mobile','rss.content.strip.images','theme',true) ; 
    35 }*/ 
    3638 
    3739function mobileLoginForm() { 
  • trunk/gregarius/themes/default/mobile/style.css

    r1357 r1615  
    1 img {  border: 0px; } 
    2 h4,h5 { display:block;margin:0;padding:0 } 
    3 div.mobileform { 
    4   border: 1px dashed black;  
    5   margin: 0 13px 13px 0; 
    6   display:block; 
     1body { 
     2background-color:white; 
     3padding: 0 2px; 
     4margin:0; 
     5font: normal xx-small Verdana, Arial, "MS Trebuchet", sans-serif; 
    76} 
     7input,select,option{font-size:xx-small;} 
     8div,p,h4,h5,ul {margin:0;padding:0;} 
     9div.item { border: 1px solid #ccc; margin: 1em 0; padding: 0 ;} 
     10div.item.e { background-color: #efefef;} 
     11div.item.o { background-color: #f6f6f6;} 
     12div.item .content { padding: 1em 4px; } 
     13a {color:#c16; text-decoration:none;} 
     14img {border: 0px;} 
     15h1,h2 { 
     16    background-color: #eee; 
     17    padding: 5px 0 2px 0; 
     18    margin:0; 
     19} 
     20h4 { background-color: #ddd; font-weight:bold; display:block; padding: 3px 0;} 
     21h5 { font-weight:normal;} 
     22div.mobileform { display:block; border-top: 1px solid #eee; padding:0; margin:0;} 
     23div.mobileform p { margin:0; padding:0;} 
     24#footer { 
     25    margin-top:1em; 
     26    background-color: #eee; 
     27} 
     28#footer span {font-weight:bold;}