Skip to content
Snippets Groups Projects
Commit 822b214b authored by ands's avatar ands
Browse files

Diverse Stylesheets angepasst

parent 49dfb9cd
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
......@@ -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\">&nbsp;".$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>&nbsp;".$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;
}
}
......
......@@ -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",
......
......@@ -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');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment