[Xfce4-commits] <www:nick/gettext> Add some contents to the homepage.
Jérôme Guelfucci
noreply at xfce.org
Fri Dec 10 12:22:03 CET 2010
Updating branch refs/heads/nick/gettext
to ad412dc4173f3907d81c9258a559f7a8807e6e9b (commit)
from 7f8e03bdcb585413494ad0c731cd514ac30a61e9 (commit)
commit ad412dc4173f3907d81c9258a559f7a8807e6e9b
Author: Jérôme Guelfucci <jeromeg at xfce.org>
Date: Fri Dec 10 12:20:24 2010 +0100
Add some contents to the homepage.
Read the blog.xfce.org to get the 4 latest posts, add an introduction to
Xfce and start the download stuff.
lib/blog.php | 49 +++++++++++++++++++++++++++++
pages/frontpage.php | 50 +++++++++++++++++++++++++++++-
style/home.css | 86 +++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 184 insertions(+), 1 deletions(-)
diff --git a/lib/blog.php b/lib/blog.php
new file mode 100644
index 0000000..e45b467
--- /dev/null
+++ b/lib/blog.php
@@ -0,0 +1,49 @@
+<?php
+ function parseRSS($url) {
+
+ $feedeed = implode('', file($url));
+ $parser = xml_parser_create();
+ xml_parse_into_struct($parser, $feedeed, $valueals, $index);
+ xml_parser_free($parser);
+
+ foreach($valueals as $keyey => $valueal)
+ {
+ if($valueal['type'] != 'cdata')
+ {
+ $item[$keyey] = $valueal;
+ }
+ }
+
+ $i = 0;
+
+ foreach($item as $key => $value)
+ {
+ if($value['type'] == 'open')
+ {
+ $i++;
+ $itemame[$i] = $value['tag'];
+ }
+ elseif($value['type'] == 'close')
+ {
+ $feed = $values[$i];
+ $item = $itemame[$i];
+ $i--;
+
+ if(count($values[$i])>1)
+ {
+ $values[$i][$item][] = $feed;
+ }
+ else
+ {
+ $values[$i][$item] = $feed;
+ }
+ }
+ else
+ {
+ $values[$i][$value['tag']] = $value['value'];
+ }
+ }
+ return $values[0];
+ }
+
+?>
diff --git a/pages/frontpage.php b/pages/frontpage.php
index 7b79028..14de8ab 100644
--- a/pages/frontpage.php
+++ b/pages/frontpage.php
@@ -1,5 +1,53 @@
-<?php
+<?php
$head['description'] = 'Xfce Desktop Environment';
$head['keywords'] = 'desktop environment, window manager, desktop, speed, lightweight, gtk+, open source, xforms common environment';
+ $head['stylesheet'] = array ('/style/home.css');
?>
+<?php include("lib/blog.php") ?>
+
+<div id="download">
+
+ <div id="button">
+ <a href="/download/"><?php E_("Download Xfce") ?></a>
+ </div>
+
+ <p><a href="">Changelogs</a> | <a href="">Tour</a></p>
+
+</div>
+
+<div id="quote">
+
+ <h2><?php E_("What is Xfce?") ?></h2>
+
+ <blockquote><?php E_("Xfce is a lightweight desktop environment for various *NIX systems. Designed for productivity, it loads and executes applications fast, while conserving system resources.") ?></blockquote>
+ <span><?php E_("Olivier Fourdan, creator of Xfce") ?></span>
+
+ <p>
+ <?php E_("Xfce embodies the traditional UNIX philosophy of modularity and re-usability. It consists of a number of components that together provide the full functionality of the desktop environment. They are packaged separately and you can pick and choose from the available packages to create the best personal working environment.") ?>
+ </p>
+
+</div>
+
+<div id="blog">
+
+ <h2><?php E_("Developers blog") ?></h2>
+
+ <?php
+
+ $xml = parseRSS("http://blog.xfce.org/feed/");
+ $i = 0;
+
+ foreach($xml['RSS']['CHANNEL']['ITEM'] as $item) {
+ if ($i > 3)
+ break;
+
+ echo ("<p class=\"info\">" . $item['DC:CREATOR'] . " @ " . substr ($item['PUBDATE'], 5, 11) . "</p>\n");
+ echo ("<p class=\"title\"><a href=\"{$item['LINK']}\" class=\"external\">{$item['TITLE']}{$link}</a></p>\n");
+
+ $i++;
+ }
+
+ ?>
+
+</div>
diff --git a/style/home.css b/style/home.css
new file mode 100644
index 0000000..8e2477c
--- /dev/null
+++ b/style/home.css
@@ -0,0 +1,86 @@
+/* Fourdan quote style */
+
+#quote {
+ width: 500px;
+ margin-right: 30px;
+}
+
+#quote blockquote {
+ font: 1.5em Georgia,"Trebuchet MS",Verdana,"Lucida Grande",Tahoma,Helvetica,Sans-Serif;
+ margin: 10px 0 0 44px;
+ padding: 5px 0 0;
+ text-align: justify;
+ color: #ADADAD
+}
+
+#quote span {
+ color:#333;
+ font-size:0.9em;
+ font-weight: bold;
+ margin-left:3em;
+ white-space:nowrap;
+}
+
+/* Download style */
+
+#download {
+ width: 300px;
+ float: right;
+ margin-top: 100px;
+}
+
+#download #button {
+ color: white;
+ height: 188px;
+ font-weight: bold;
+ font-size: 2em;
+ background: black no-repeat;
+}
+
+#download #button:hover {
+ background: black no-repeat;
+}
+
+#download #button a {
+ display: block;
+ width: 300px;
+ height: 188px;
+ color: white;
+ padding: 120px 0 0 60px;
+}
+
+#download #button a:hover {
+ color: white;
+}
+
+#download p {
+ text-align: right;
+ margin: 2px;
+}
+
+/* Blog post style */
+
+#blog {
+ -webkit-border-radius: 10px;
+ -moz-border-radius: 10px;
+ border-radius: 10px;
+ width: 30%;
+ clear: both;
+}
+
+#blog .info {
+ color: grey;
+ font-variant: italic;
+ font-size: 80%;
+ margin: 10px 0 0 0;
+ line-height: 1em;
+}
+
+#blog .title {
+ margin: 3px 0 0 0;
+ line-height: 1em;
+}
+
+#blog h2 {
+ margin-bottom: 5px;
+}
More information about the Xfce4-commits
mailing list