summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Bien <[email protected]>2010-09-05 03:22:00 +0200
committerMichael Bien <[email protected]>2010-09-05 03:22:00 +0200
commit315ef0788ece29f35e4f69279e571b33dd94776f (patch)
treef89f3c6d1d6c40999aec71de294ca96cabb125b1
parent710cefdd380882fcf73d87f580650826274fbd99 (diff)
pagination for streams and planet.
-rw-r--r--planet2/config/pager-template.html17
-rw-r--r--planet2/config/planet-config.xml4
-rw-r--r--planet2/config/planet-template.html6
-rw-r--r--planet2/config/stream-config.xml19
-rw-r--r--planet2/config/stream-template.html8
-rw-r--r--planet2/update-planet.sh1
-rw-r--r--planet2/update-stream.sh1
-rwxr-xr-xstyle.css1
8 files changed, 37 insertions, 20 deletions
diff --git a/planet2/config/pager-template.html b/planet2/config/pager-template.html
new file mode 100644
index 0000000..301a7ff
--- /dev/null
+++ b/planet2/config/pager-template.html
@@ -0,0 +1,17 @@
+<table class="centered">
+ <tr>
+ <td>
+ <#if prev??>
+ &laquo; <a href="${prev}">Previous Page</a> |
+ </#if>
+ </td>
+ <td>
+ <a href="${filename}">Page (${page} of ${pages})</a>
+ </td>
+ <td>
+ <#if next??>
+ | <a href="${next}">Next Page</a> &raquo;
+ </#if>
+ </td>
+ </tr>
+</table> \ No newline at end of file
diff --git a/planet2/config/planet-config.xml b/planet2/config/planet-config.xml
index fddb1ba..ce473fe 100644
--- a/planet2/config/planet-config.xml
+++ b/planet2/config/planet-config.xml
@@ -4,7 +4,9 @@
<planet title="Planet JogAmp"
description="JogAmp Aggregated Feeds"
author="Hungry Harry"
- maxEntries="30"
+ maxEntries="80"
+ maxEntriesPerPage="15"
+ name="index"
link="http://jogamp.org/planet">
<feed>rss_2.0</feed>
<template>/srv/www/jogamp.org/planet2/config/planet-template.html</template>
diff --git a/planet2/config/planet-template.html b/planet2/config/planet-template.html
index 9af9d2b..1bbe69a 100644
--- a/planet2/config/planet-template.html
+++ b/planet2/config/planet-template.html
@@ -103,6 +103,12 @@
${entry.content}<br/>
<br/>
</#list>
+
+ <br/>
+ <div class="centered">
+ <#include "pager-template.html">
+ </div>
+
</div>
</div>
diff --git a/planet2/config/stream-config.xml b/planet2/config/stream-config.xml
index 22822c8..f2305ce 100644
--- a/planet2/config/stream-config.xml
+++ b/planet2/config/stream-config.xml
@@ -3,30 +3,17 @@
<planet title="JogAmp Streams"
description="JogAmp Aggregated Feeds"
author="Hungry Harry"
- maxEntries="50"
+ maxEntries="100"
+ maxEntriesPerPage="20"
+ name="index"
link="http://jogamp.org/stream/">
<feed>rss_2.0</feed>
<template>/srv/www/jogamp.org/planet2/config/stream-template.html</template>
<output>/srv/www/jogamp.org/stream</output>
</planet>
-<!--
- <feed name="vimeo" url="http://vimeo.com/tag:jogl/rss"/>
- -->
<feed name="demoscenepassivist" url="http://gdata.youtube.com/feeds/base/users/DemoscenePassivist/uploads?alt=rss&amp;v=2&amp;orderby=published&amp;client=ytapi-youtube-profile"/>
<feed name="demoscenepassivist-favorites" url="http://gdata.youtube.com/feeds/api/users/DemoscenePassivist/favorites?orderby=updated"/>
- <template keyword="vimeo" idpattern="http://vimeo.com/([0-9]+)">
-<![CDATA[
- <object width="400" height="320">
- <param name="allowfullscreen" value="true" />
- <param name="allowscriptaccess" value="always" />
- <param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=#id#&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" />
- <embed src="http://vimeo.com/moogaloop.swf?clip_id=#id#&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1"
- type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="320">
- </embed>
- </object>
-]]>
- </template>
<template keyword="youtube" idpattern="http://www.youtube.com/watch\?v=([^&amp;]+)" descriptionfilter="&lt;span&gt;(.*)&lt;/span&gt;">
<![CDATA[
<a href="http://www.youtube.com/watch?v=#id#"><img src="http://img.youtube.com/vi/#id#/1.jpg" alt="Youtube Video Thumbnail 1"/></a>
diff --git a/planet2/config/stream-template.html b/planet2/config/stream-template.html
index 7c42af2..7c316e7 100644
--- a/planet2/config/stream-template.html
+++ b/planet2/config/stream-template.html
@@ -82,7 +82,7 @@
<td class="streams_thumbs">
${entry.player}
</td>
- <td class="stream_stext">
+ <td class="streams_text">
<b>${entry.title}</b><br>
${entry.filteredDescription}
</td>
@@ -90,6 +90,12 @@
</table>
</div>
</#list>
+
+<br/>
+<div class="centered">
+<#include "pager-template.html">
+</div>
+
</div>
</div>
<div id="footer">
diff --git a/planet2/update-planet.sh b/planet2/update-planet.sh
index 9b10163..6cf31f6 100644
--- a/planet2/update-planet.sh
+++ b/planet2/update-planet.sh
@@ -1,3 +1,2 @@
java -jar HungryHarry-SNAPSHOT-jar-with-dependencies.jar /srv/www/jogamp.org/planet2/config/planet-config.xml
-mv ../planet/planet.html ../planet/index.html
diff --git a/planet2/update-stream.sh b/planet2/update-stream.sh
index 9e26d92..375fa86 100644
--- a/planet2/update-stream.sh
+++ b/planet2/update-stream.sh
@@ -1,3 +1,2 @@
java -jar HungryHarry-SNAPSHOT-jar-with-dependencies.jar /srv/www/jogamp.org/planet2/config/stream-config.xml
-mv ../stream/planet.html ../stream/index.html
diff --git a/style.css b/style.css
index 1b308d9..27591e7 100755
--- a/style.css
+++ b/style.css
@@ -28,6 +28,7 @@ body {padding:15px 20px; margin:0; background: #f5f5f5; font-family: "Trebuchet
.rss {background:url(images/feed-icon-10x10.png) no-repeat scroll 2px 50% !important; padding:0px 0px 0px 15px;}
.fill {margin-right:0 !important;}
+.centered {margin-left: auto; margin-right: auto;}
#sidebar {width:160px; height: auto; float: right; padding:0 30px 30px 30px; }
#sidebar h3 {font-size:17px; font-weight:normal; margin:20px 0 5px 0;}