[Xfce4-commits] <www:nick/gettext> Add frontpage.

Nick Schermer noreply at xfce.org
Sun Jan 16 15:26:01 CET 2011


Updating branch refs/heads/nick/gettext
         to 00b4b8f5c1642dcebe6dca4f2a0d8bb9bf27c144 (commit)
       from 224cc4ad5fa52503e2bc62fcc59dcc78116b8e53 (commit)

commit 00b4b8f5c1642dcebe6dca4f2a0d8bb9bf27c144
Author: Nick Schermer <nick at xfce.org>
Date:   Sun Jan 16 15:23:50 2011 +0100

    Add frontpage.

 images/frontpage/intro-1-small.png |  Bin 0 -> 64844 bytes
 images/frontpage/intro-1.png       |  Bin 0 -> 128342 bytes
 images/frontpage/intro-2-small.png |  Bin 0 -> 43187 bytes
 images/frontpage/intro-2.png       |  Bin 0 -> 93292 bytes
 images/frontpage/intro-3-small.png |  Bin 0 -> 45353 bytes
 images/frontpage/intro-3.png       |  Bin 0 -> 92169 bytes
 images/frontpage/intro-4-small.png |  Bin 0 -> 50660 bytes
 images/frontpage/intro-4.png       |  Bin 0 -> 98666 bytes
 index.php                          |    2 +-
 pages/footer.php                   |    2 +-
 pages/frontpage.php                |   74 ++++++++++++++++++++++++++++++++++++
 pages/getinvolved/index.php        |    4 +-
 pages/versions.php                 |   10 ++--
 style/base.css                     |   11 +++++-
 style/home.css                     |   57 +++++++++++++++++++++++++++-
 style/img/logointro.png            |  Bin 0 -> 5992 bytes
 style/tinybox.packed.js            |    1 +
 style/tinyfader.packed.js          |    1 +
 18 files changed, 151 insertions(+), 11 deletions(-)

diff --git a/images/frontpage/intro-1-small.png b/images/frontpage/intro-1-small.png
new file mode 100644
index 0000000..4f040c2
Binary files /dev/null and b/images/frontpage/intro-1-small.png differ
diff --git a/images/frontpage/intro-1.png b/images/frontpage/intro-1.png
new file mode 100644
index 0000000..f2bea68
Binary files /dev/null and b/images/frontpage/intro-1.png differ
diff --git a/images/frontpage/intro-2-small.png b/images/frontpage/intro-2-small.png
new file mode 100644
index 0000000..5f7f1e7
Binary files /dev/null and b/images/frontpage/intro-2-small.png differ
diff --git a/images/frontpage/intro-2.png b/images/frontpage/intro-2.png
new file mode 100644
index 0000000..e8dacca
Binary files /dev/null and b/images/frontpage/intro-2.png differ
diff --git a/images/frontpage/intro-3-small.png b/images/frontpage/intro-3-small.png
new file mode 100644
index 0000000..3ea18f0
Binary files /dev/null and b/images/frontpage/intro-3-small.png differ
diff --git a/images/frontpage/intro-3.png b/images/frontpage/intro-3.png
new file mode 100644
index 0000000..cb30fa0
Binary files /dev/null and b/images/frontpage/intro-3.png differ
diff --git a/images/frontpage/intro-4-small.png b/images/frontpage/intro-4-small.png
new file mode 100644
index 0000000..f035b85
Binary files /dev/null and b/images/frontpage/intro-4-small.png differ
diff --git a/images/frontpage/intro-4.png b/images/frontpage/intro-4.png
new file mode 100644
index 0000000..6dc8e88
Binary files /dev/null and b/images/frontpage/intro-4.png differ
diff --git a/index.php b/index.php
index 8e8b274..53e45aa 100644
--- a/index.php
+++ b/index.php
@@ -52,7 +52,7 @@ if (str_has_prefix ($uri, 'download/changelogs/'))
 echo $contents;
 
 /* end with the footer */
-$footer['mtime'] = date ('Y/m/d G:i', filemtime ($content_file));
+$footer['mtime'] = date ('Y/m/d', filemtime ($content_file));
 include ('pages/footer.php');
 
 $timer_end = microtime_float ();
diff --git a/pages/footer.php b/pages/footer.php
index 875e5a9..05c2d2b 100644
--- a/pages/footer.php
+++ b/pages/footer.php
@@ -2,7 +2,7 @@
         <div id="footer">
           <hr />
           <p>
-            <?php printf (R_('Copyright %s Xfce Development Team. This page was last modified on %s.'), '2003-'.date ('Y'), $footer['mtime']) ?>
+            <?php printf (R_('Copyright %s <a href="/about/credits">Xfce Development Team</a>. This page was last modified on %s.'), '2003-'.date ('Y'), $footer['mtime']) ?>
           </p>
         </div>
 </div> <!-- page-wrap -->
diff --git a/pages/frontpage.php b/pages/frontpage.php
index 064e66e..ead95f6 100644
--- a/pages/frontpage.php
+++ b/pages/frontpage.php
@@ -1,8 +1,82 @@
 <?php
 
+include ('pages/news-array.php');
+include ('pages/versions.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');
 $head['feed'] = 'http://www.xfce.org/feed?lang='.$lang;
 
 ?>
+
+<script type="text/javascript" src="/style/tinyfader.packed.js"></script>
+<script type="text/javascript" src="/style/tinybox.packed.js"></script>
+
+<div id="intro">
+
+<div id="intro-wrap">
+<div id="intro-logo"><h1 class="hidden">Xfce Desktop Environment 4.8</h1></div>
+
+<p>
+  <?php E_('Xfce is a lightweight desktop environment for UNIX-like operating systems. It aims to be fast and low on system resources, while still being visually appealing and user friendly.') ?>
+</p>
+
+<ul>
+  <li><a href="/download"><?php printf (R_('Download the lastest %s release'), $stable_version) ?></a></li>
+  <li><a href="/about/tour"><?php E_('Visual tour of Xfce 4.8') ?></a></li>
+  <li><a href="/about/screenshots"><?php E_('Screenshots') ?></a></li>
+</ul>
+
+</div>
+<div id="slideshow">
+  <ul id="slides">
+    <li><img src="/images/frontpage/intro-1-small.png" id="intro1" /></li>
+    <li><img src="/images/frontpage/intro-2-small.png" id="intro2" /></li>
+    <li><img src="/images/frontpage/intro-3-small.png" id="intro3" /></li>
+    <li><img src="/images/frontpage/intro-4-small.png" id="intro4" /></li>
+  </ul>
+</div>
+<div class="clearboth"></div>
+</div>
+
+<script type="text/javascript">
+var slideshow=new TINY.fader.fade('slideshow',
+{
+  id:'slides',
+  auto:5,
+  visible:true,
+  position:0,
+  resume:true
+});
+
+T$('intro1').onclick = function(){TINY.box.show(
+  "<img src=\"images/frontpage/intro-1.png\" width=\"900\" height=\"600\" alt=\"\" />",0,900,600,0)}
+T$('intro2').onclick = function(){TINY.box.show(
+  "<img src=\"images/frontpage/intro-2.png\" width=\"900\" height=\"600\" alt=\"\" />",0,900,600,0)}
+T$('intro3').onclick = function(){TINY.box.show(
+  "<img src=\"images/frontpage/intro-3.png\" width=\"900\" height=\"600\" alt=\"\" />",0,900,600,0)}
+T$('intro4').onclick = function(){TINY.box.show(
+  "<img src=\"images/frontpage/intro-4.png\" width=\"900\" height=\"600\" alt=\"\" />",0,900,600,0)}
+
+
+</script>
+
+<h2>Latest News</h2>
+<?php
+  $count = 3;
+  foreach ($news as $item)
+  {
+    if (isset ($item['version']) && !empty ($item['version']))
+      $title = sprintf (R_('Xfce %s released'), $item['version']);
+    else
+      $title = $item['title'];
+
+    echo '<h3><a href="/about/news/?post='.strtotime ($item['date']).'">'.$title.'</a></h3>';
+
+    echo '<p>'.$item['paragraphs'][0].'</p>';
+
+    if (--$count <= 0)
+      break;
+  }
+?>
diff --git a/pages/getinvolved/index.php b/pages/getinvolved/index.php
index b292751..12bd9f6 100644
--- a/pages/getinvolved/index.php
+++ b/pages/getinvolved/index.php
@@ -9,7 +9,7 @@
   <?php E_('Possible tasks include testing, bug reporting; writing code, developing artwork, documentation or translations; or spreading the word and helping out with promotion and marketing both on line and at tradeshows and conferences.') ?>
 </p>
 
-<h2><a href="/getinvolved/documention"><?php E_('Documentation') ?></a></h2>
+<h2><?php E_('Documentation') ?></h2>
 <p>
   <?php E_('There\'s lots of people using and testing Xfce. By providing useful and up-to-date documentation, you will make a big impact on helping people understand how to make the most of the Xfce Desktop Environement.') ?>
 </p>
@@ -19,7 +19,7 @@
   <?php E_('Are you fluent in multiple languages? By contributing your translations of text to the Xfce Desktop Environement, you will help Xfce be a better part of the global market and more accessible to the millions of potential users out there.') ?>
 </p>
 
-<h2><a href="/getinvolved/development"><?php E_('Development') ?></a></h2>
+<h2><?php E_('Development') ?></h2>
 <p>
   <?php E_('By becoming a developer, you can make a big difference while enjoying a challenging and fun experience. You\'ll learn to be a better coder, you will get to implement new features and defeat daunting bugs, creating a stunning product, all the while collaborating with people from all around the world.') ?>
 </p>
diff --git a/pages/versions.php b/pages/versions.php
index 295671c..dc29b81 100644
--- a/pages/versions.php
+++ b/pages/versions.php
@@ -1,15 +1,15 @@
 <?php
   /**
-   * Always check the version number in the download page, all the mirror
-   * links should open a folder in the archive
+   * Always check the version number in the download page! It should open
+   * a working link on archive.xfce.org!
    **/
 
   /* latest stable release version */
-  $stable_version = '4.6.2';
-  $stable_date = '2010-05-23';
+  $stable_version = '4.8.0';
+  $stable_date = '2011-01-16';
 
   /* latest development version */
   $preview_version = '4.8pre3';
   $preview_date = '2010-11-05';
-  $preview_visible = TRUE /* set to true if preview is *newer* then stable */
+  $preview_visible = FALSE /* set to true if preview is *newer* then stable */
 ?>
diff --git a/style/base.css b/style/base.css
index b95bd79..1e91379 100644
--- a/style/base.css
+++ b/style/base.css
@@ -12,7 +12,7 @@ body {
 	padding: 1em;
 	text-align: left;
 
-	min-width: 600px;
+	min-width: 850px;
 	max-width: 1100px;
 }
 
@@ -103,6 +103,15 @@ body {
 	padding: 0;
 }
 
+#footer a {
+	color: #999;
+	text-decoration: underline;
+}
+
+#footer a:hover {
+	color: #f00;
+}
+
 table th {
         text-align: left;
 }
diff --git a/style/home.css b/style/home.css
index 465a3f5..7688067 100644
--- a/style/home.css
+++ b/style/home.css
@@ -1,4 +1,59 @@
 
-#footer {
+#page-contents, #footer {
 	margin-right: 0;
 }
+
+#intro {
+	background: #eee;
+	border: 1px solid #ccc;
+	margin: 2em auto;
+	width: 850px;
+}
+
+#intro-wrap {
+	float: right;
+	width: 380px;
+	margin: 10px;
+	background: #eee;
+}
+
+#intro-logo {
+	background: url('img/logointro.png') no-repeat;
+	width: 380px;
+	height: 65px;
+}
+
+#slideshow {
+	height: 300px;
+	margin-right: 400px;
+	width: 450px;
+}
+
+#slides {
+	list-style:none;
+	margin: 0;
+	padding: 0;
+}
+
+#tinybox {
+	position: absolute;
+	display: none;
+	padding: 0;
+	border: 10px solid #000;
+	z-index: 2000;
+}
+
+#tinymask {
+	position: absolute;
+	display: none;
+	top: 0;
+	left: 0;
+	height:100%;
+	width: 100%;
+	background: #000;
+	z-index: 1500;
+}
+
+#tinycontent {
+	background: #fff;
+}
diff --git a/style/img/logointro.png b/style/img/logointro.png
new file mode 100644
index 0000000..59a945c
Binary files /dev/null and b/style/img/logointro.png differ
diff --git a/style/tinybox.packed.js b/style/tinybox.packed.js
new file mode 100644
index 0000000..1e09ddf
--- /dev/null
+++ b/style/tinybox.packed.js
@@ -0,0 +1 @@
+function T$(i){return document.getElementById(i)}TINY.box=function(){var p,m,b,fn,ic,iu,iw,ih,ia,f=0;return{show:function(c,u,w,h,a,t){if(!f){p=document.createElement('div');p.id='tinybox';m=document.createElement('div');m.id='tinymask';b=document.createElement('div');b.id='tinycontent';document.body.appendChild(m);document.body.appendChild(p);p.appendChild(b);m.onclick=TINY.box.hide;window.onresize=TINY.box.resize;f=1}if(!a&&!u){p.style.width=w?w+'px':'auto';p.style.height=h?h+'px':'auto';p.style.backgroundImage='none';b.innerHTML=c}else{b.style.display='none';p.style.width=p.style.height='100px'}this.mask();ic=c;iu=u;iw=w;ih=h;ia=a;this.alpha(m,1,80,3);if(t){setTimeout(function(){TINY.box.hide()},1000*t)}},fill:function(c,u,w,h,a){if(u){p.style.backgroundImage='';var x=window.XMLHttpRequest?new XMLHttpRequest():new ActiveXObject('Microsoft.XMLHTTP');x.onreadystatechange=function(){if(x.readyState==4&&x.status==200){TINY.box.psh(x.responseText,w,h,a)}};x.open('GET',c,1);x.s
 end(null)}else{this.psh(c,w,h,a)}},psh:function(c,w,h,a){if(a){if(!w||!h){var x=p.style.width,y=p.style.height;b.innerHTML=c;p.style.width=w?w+'px':'';p.style.height=h?h+'px':'';b.style.display='';w=parseInt(b.offsetWidth);h=parseInt(b.offsetHeight);b.style.display='none';p.style.width=x;p.style.height=y}else{b.innerHTML=c}this.size(p,w,h)}else{p.style.backgroundImage='none'}},hide:function(){TINY.box.alpha(p,-1,0,3)},resize:function(){TINY.box.pos();TINY.box.mask()},mask:function(){m.style.height=TINY.page.total(1)+'px';m.style.width='';m.style.width=TINY.page.total(0)+'px'},pos:function(){var t=(TINY.page.height()/2)-(p.offsetHeight/2);t=t<10?10:t;p.style.top=(t+TINY.page.top())+'px';p.style.left=(TINY.page.width()/2)-(p.offsetWidth/2)+'px'},alpha:function(e,d,a){clearInterval(e.ai);if(d==1){e.style.opacity=0;e.style.filter='alpha(opacity=0)';e.style.display='block';this.pos()}e.ai=setInterval(function(){TINY.box.ta(e,a,d)},20)},ta:function(e,a,d){var o=Math.round(e.style.
 opacity*100);if(o==a){clearInterval(e.ai);if(d==-1){e.style.display='none';e==p?TINY.box.alpha(m,-1,0,2):b.innerHTML=p.style.backgroundImage=''}else{e==m?this.alpha(p,1,100):TINY.box.fill(ic,iu,iw,ih,ia)}}else{var n=Math.ceil((o+((a-o)*.5)));n=n==1?0:n;e.style.opacity=n/100;e.style.filter='alpha(opacity='+n+')'}},size:function(e,w,h){e=typeof e=='object'?e:T$(e);clearInterval(e.si);var ow=e.offsetWidth,oh=e.offsetHeight,wo=ow-parseInt(e.style.width),ho=oh-parseInt(e.style.height);var wd=ow-wo>w?0:1,hd=(oh-ho>h)?0:1;e.si=setInterval(function(){TINY.box.ts(e,w,wo,wd,h,ho,hd)},20)},ts:function(e,w,wo,wd,h,ho,hd){var ow=e.offsetWidth-wo,oh=e.offsetHeight-ho;if(ow==w&&oh==h){clearInterval(e.si);p.style.backgroundImage='none';b.style.display='block'}else{if(ow!=w){var n=ow+((w-ow)*.5);e.style.width=wd?Math.ceil(n)+'px':Math.floor(n)+'px'}if(oh!=h){var n=oh+((h-oh)*.5);e.style.height=hd?Math.ceil(n)+'px':Math.floor(n)+'px'}this.pos()}}}}();TINY.page=function(){return{top:function()
 {return document.documentElement.scrollTop||document.body.scrollTop},width:function(){return self.innerWidth||document.documentElement.clientWidth||document.body.clientWidth},height:function(){return self.innerHeight||document.documentElement.clientHeight||document.body.clientHeight},total:function(d){var b=document.body,e=document.documentElement;return d?Math.max(Math.max(b.scrollHeight,e.scrollHeight),Math.max(b.clientHeight,e.clientHeight)):Math.max(Math.max(b.scrollWidth,e.scrollWidth),Math.max(b.clientWidth,e.clientWidth))}}}();
diff --git a/style/tinyfader.packed.js b/style/tinyfader.packed.js
new file mode 100644
index 0000000..899eba3
--- /dev/null
+++ b/style/tinyfader.packed.js
@@ -0,0 +1 @@
+var TINY={};function T$(i){return document.getElementById(i)}function T$$(e,p){return p.getElementsByTagName(e)}TINY.fader=function(){function fade(n,p){this.n=n;this.init(p)}fade.prototype.init=function(p){var s=T$(p.id),u=this.u=T$$('li',s),l=u.length,i=this.l=this.c=this.z=0;if(p.navid&&p.activeclass){this.g=T$$('li',T$(p.navid));this.s=p.activeclass}s.style.overflow='hidden';this.a=p.auto||0;this.p=p.resume||0;for(i;i<l;i++){if(u[i].parentNode==s){u[i].style.position='absolute';this.l++;u[i].o=p.visible?100:0;u[i].style.opacity=u[i].o/100;u[i].style.filter='alpha(opacity='+u[i].o+')'}}this.pos(p.position||0,this.a?1:0,p.visible)},fade.prototype.auto=function(){this.u.ai=setInterval(new Function(this.n+'.move(1,1)'),this.a*1000)},fade.prototype.move=function(d,a){var n=this.c+d,i=d==1?n==this.l?0:n:n<0?this.l-1:n;this.pos(i,a)},fade.prototype.pos=function(i,a,v){var p=this.u[i];this.z++;p.style.zIndex=this.z;clearInterval(p.si);clearInterval(this.u.ai);this.u.ai=0;this.c=
 i;if(p.o>=100&&!v){p.o=0;p.style.opacity=0;p.style.filter='alpha(opacity=0)'}if(this.g){for(var x=0;x<this.l;x++){this.g[x].className=x==i?this.s:''}}p.si=setInterval(new Function(this.n+'.fade('+i+','+a+')'),20)},fade.prototype.fade=function(i,a){var p=this.u[i];if(p.o>=100){clearInterval(p.si);if((a||(this.a&&this.p))&&!this.u.ai){this.auto()}}else{p.o+=5;p.style.opacity=p.o/100;p.style.filter='alpha(opacity='+p.o+')'}};return{fade:fade}}();
\ No newline at end of file



More information about the Xfce4-commits mailing list