From 822b214b0f28c56a9e7d46b3b68b441b5fc39d70 Mon Sep 17 00:00:00 2001 From: ands <ands@andspad.(none)> Date: Wed, 8 Dec 2010 21:47:08 +0100 Subject: [PATCH] Diverse Stylesheets angepasst --- webroot/config.php | 4 ++-- webroot/widgets/RSSFeed/RSSFeed.php | 17 +++++++++-------- webroot/widgets/TwitterWall/TwitterWall.php | 2 +- webroot/widgets/TwitterWall/jquery.tweet.js | 4 ++-- 4 files changed, 14 insertions(+), 13 deletions(-) diff --git a/webroot/config.php b/webroot/config.php index 9da41b8..4fc3198 100644 --- a/webroot/config.php +++ b/webroot/config.php @@ -9,10 +9,10 @@ //array("widget_name", "style_name", position_x, position_y, size_x, size_y); array("Logo", "widget", 0,0, 2,1), array("ZoneOffen", "widget_dark", 4,0, 2,1), - array("Dummy", "widget_light", 0,1, 3,2), + array("RSSFeed", "widget_light", 0,1, 3,2), array("Wettervorhersage", "widget_light", 3,1, 1,2), array("TwitterWall", "widget_light", 4,1, 2,4), - array("RSSFeed", "widget_light", 0,3, 2,2), + array("Dummy", "widget_light", 0,3, 2,2), array("Dummy", "widget_dark", 2,3, 2,2), array("Dummy", "widget_light", 0,5, 4,1), array("Marvin", "widget_light", 4,5, 2,1) diff --git a/webroot/widgets/RSSFeed/RSSFeed.php b/webroot/widgets/RSSFeed/RSSFeed.php index 644259a..a4eac8f 100644 --- a/webroot/widgets/RSSFeed/RSSFeed.php +++ b/webroot/widgets/RSSFeed/RSSFeed.php @@ -8,7 +8,7 @@ class RSSFeed implements iWidget private $zeilen; public function __construct($width, $height){ - $this->zeilen = $height / 64; + $this->zeilen = $height / 42; //var_dump($this->zeilen); die(); } @@ -25,7 +25,7 @@ class RSSFeed implements iWidget } private function getRssFeed($url){ - $output = '<div class="box">'; + $output = '<div style="position:absolute;padding:10px">'; $counter = 0; define('MAGPIE_CACHE_DIR', 'cache'); define('MAGPIE_CACHE_AGE', '60'); @@ -34,21 +34,22 @@ class RSSFeed implements iWidget $num_items = 10; $rss = fetch_rss( $url ); $items = array_slice($rss->items, 0,$num_items); - $output .= "<img style=\"vertical-align: middle; width: 40px; height: 40px;\" src=\"widgets/RSSFeed/png/01_12.png\"> ".$rss->channel['title']."</h1><br /><br />"; + $output .= "<img style=\"width: 40px; height: 40px;\" src=\"widgets/RSSFeed/png/01_12.png\">"; + $output .= "<div height=\"40\" valign=\"middle\"><h1> ".$rss->channel['title']."</h1></div>"; } - $output .= "<ul id='feed'>"; + $output .= "<div class=\"box\"><ul id='feed'>"; foreach ($items as $item){ $href = $item['link']; $title = $item['title']; // Fix fuer die Warpzone $title = str_replace('?n','\'n', $title); $title = str_replace('n?','n\'', $title); - $output .= "<li><img align=\"bottom\" style=\"width: 20px; height: 20px;\" src=\"widgets/RSSFeed/png/".$this->getImage()."\" /><div><h2>$title</h2></div></li>"; - if($counter > $this->zeilen) break; - $counter++; + $output .= "<li><img style=\"width:20px;height:20px;\" src=\"widgets/RSSFeed/png/".$this->getImage()."\" /><div style=\"padding:4px\"><h2>$title</h2></div></li>"; + if($counter > $this->zeilen) break; + $counter++; } - $output .= "</ul></div>"; + $output .= "</ul></div></div>"; return $output; } } diff --git a/webroot/widgets/TwitterWall/TwitterWall.php b/webroot/widgets/TwitterWall/TwitterWall.php index 775041f..01fdf2f 100644 --- a/webroot/widgets/TwitterWall/TwitterWall.php +++ b/webroot/widgets/TwitterWall/TwitterWall.php @@ -18,7 +18,7 @@ class TwitterWall implements iWidget <script type="text/javascript"> $(document).ready(function(){ $(".tweet").tweet({ - avatar_size: 48, + avatar_size: 55, count: 6, loading_text: "loading tweets...", query: "#warpzone", diff --git a/webroot/widgets/TwitterWall/jquery.tweet.js b/webroot/widgets/TwitterWall/jquery.tweet.js index 7efe4cf..05819cc 100644 --- a/webroot/widgets/TwitterWall/jquery.tweet.js +++ b/webroot/widgets/TwitterWall/jquery.tweet.js @@ -112,13 +112,13 @@ var profile_image_url = item.profile_image_url || item.user.profile_image_url; var join_template = '<span class="tweet_join"> '+join_text+' </span>'; var join = ((s.join_text) ? join_template : ' '); - var avatar_template = '<img src="'+profile_image_url+'" height="'+s.avatar_size+'" width="'+s.avatar_size+'" alt="'+from_user+'\'s avatar" title="'+from_user+'\'s avatar" border="0"/>'; + var avatar_template = '<img src="'+profile_image_url+'" height="'+s.avatar_size+'" width="'+s.avatar_size+'" style="padding-top:0;padding-left:0;" border="0"/>'; var avatar = (s.avatar_size ? avatar_template : ''); var date = '<h3 class="tweet_time">'+relative_time(item.created_at)+'</h3>'; var text = '<span class="tweet_text">'+$([item.text]).makeHeart()[0]+ '</span>'; // until we create a template option, arrange the items below to alter a tweet's display. - list.append('<li>' + avatar + from_user + date + join + text + '</li>'); + list.append('<li><div style="padding:4px;">' + avatar + from_user + date + join + text + '</div></li>'); list.children('li:first').addClass('tweet_first'); list.children('li:odd').addClass('tweet_even'); -- GitLab