changeset 406:d17d73264ec5

action.SlideShow: Layout changed to show the moin logo on top right of each slide and on bottom date, author and count of slides.
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Fri, 04 Sep 2009 17:13:00 +0200
parents 43ee86f48825
children e473e8bcef62
files data/plugin/action/SlideShow.py htdocs/SlideShow/css/SlideShow.css
diffstat 2 files changed, 65 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/data/plugin/action/SlideShow.py	Mon Aug 31 00:42:43 2009 +0200
+++ b/data/plugin/action/SlideShow.py	Fri Sep 04 17:13:00 2009 +0200
@@ -6,6 +6,8 @@
 time, along with a navigation aid.
 
 A slide show page uses headings level 1 to define slides::
+#pragma date Sept 04 2009
+#pragma Your Name
 
     General introduction or comments
 
@@ -26,11 +28,12 @@
 
 @copyright: 2005 Jim Clark,
             2005 Nir Soffer,
-            2008 MoinMoin:ThomasWaldmann
+            2008 MoinMoin:ThomasWaldmann,
+            2009 MoinMoin:ReimarBauer
 @license: GNU GPL, see COPYING for details.
 """
 
-import re
+import re, time
 
 from MoinMoin import wikiutil, i18n, error
 from MoinMoin.Page import Page
@@ -101,6 +104,7 @@
     def __init__(self, request, name, **keywords):
         Page.__init__(self, request, name, **keywords)
         self._slideIndex = None
+        self.counter = ''
 
     def __len__(self):
         """ Return the slide count """
@@ -368,6 +372,15 @@
     item_first_slide = first_slide
     item_last_slide = last_slide
 
+    def item_date(self):
+        return wikiutil.escape(self.request.getPragma('date', defval=self.request.user.getFormattedDate(time.time())))
+
+    def item_author(self):
+        return wikiutil.escape(self.request.getPragma('author', defval=self.request.user.name))
+
+    def item_counter(self):
+        return "%d|%d" % (self.slideNumber, len(self.slideLinksRange()))
+
 # This is quite stupid template, but it cleans most of the code from
 # html. With smarter templates, there will be no html in the action code.
 template = """
@@ -439,6 +452,11 @@
             <li>%(navigation_end)s</li>
         </ul>
     </div>
+    <div id="footer">
+    <ul id="date">%(date)s</ul>
+    <ul id="author">%(author)s</ul>
+    <ul id="counter">%(counter)s</ul>
+    </div>
 <!--
     <p><a href="http://validator.w3.org/check?uri=referer">
         Valid HTML 4.01</a>
--- a/htdocs/SlideShow/css/SlideShow.css	Mon Aug 31 00:42:43 2009 +0200
+++ b/htdocs/SlideShow/css/SlideShow.css	Fri Sep 04 17:13:00 2009 +0200
@@ -1,5 +1,5 @@
 /*
- * Single page slide show styles 
+ * Single page slide show styles
  *
  * Copy SlideShow.css to your theme's css/ directory.
  *
@@ -10,6 +10,9 @@
 li p {margin: 0;} /* Workaround for moin's bad list html */
 
 html {
+    background-image:url(/moin_static184/common/moinmoin.png);
+    background-position: top right;
+    background-repeat:no-repeat;
     background-color: white;
     color: black;
     font-family: Arial, Lucida Grande, sans-serif;
@@ -17,7 +20,7 @@
 }
 
 body {
-    margin: 0; 
+    margin: 1em;
     padding: 20px;
 }
 
@@ -93,6 +96,46 @@
     color: #888;
 }
 
+#date {
+    position: absolute;
+    bottom: 0em;
+    left: 2em;
+    right: 0;
+    font-size: 12pt;
+    clear: both;
+    display: inline;
+    margin: 0;
+    padding: 0;
+    color: #6C7680;
+}
+
+#author {
+    position: absolute;
+    bottom: 0em;
+    left: 2em;
+    right: 0;
+    text-align: center;
+    font-size: 12pt;
+    clear: both;
+    display: inline;
+    margin: 0;
+    padding: 0;
+    color: #6C7680;
+}
+
+#counter {
+    position: absolute;
+    bottom: 0em;
+    left: 2em;
+    right: 0;
+    text-align: right;
+    font-size: 12pt;
+    clear: both;
+    display: inline;
+    margin: 0;
+    padding: 0;
+    color: #6C7680;
+}
 
 /* CSS for ParserBase */