bdelacretaz    2003/09/27 11:46:34

  Modified:    src/blocks/slop/samples/yapt sitemap.xmap
               src/blocks/slop/samples/yapt/css yapt-style.css
               src/blocks/slop/samples/yapt/presentations yapt-demo.txt
               src/blocks/slop/samples/yapt/stylesheets html-slides.xsl
  Added:       src/blocks/slop/samples/yapt/presentations
                        page-breaks-test.txt
  Log:
  Improved "all slides" view, including correct page
  breaks (page breaks supported by Opera only).
  
  Revision  Changes    Path
  1.2       +1 -1      cocoon-2.1/src/blocks/slop/samples/yapt/sitemap.xmap
  
  Index: sitemap.xmap
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/slop/samples/yapt/sitemap.xmap,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- sitemap.xmap      26 Sep 2003 14:42:36 -0000      1.1
  +++ sitemap.xmap      27 Sep 2003 18:46:34 -0000      1.2
  @@ -54,7 +54,7 @@
   
               <!-- XML data of a complete presentation -->
               <map:match pattern="presentations/**/xml/presentation">
  -                <map:generate type="slop" src="presentations/{1}.txt">
  +                <map:generate label="raw-content" type="slop" 
src="presentations/{1}.txt">
                       <map:parameter name="encoding" value="iso-8859-1"/>
                   </map:generate>
                   <map:transform src="stylesheets/filter-slop-output.xsl"/>
  
  
  
  1.2       +20 -22    
cocoon-2.1/src/blocks/slop/samples/yapt/css/yapt-style.css
  
  Index: yapt-style.css
  ===================================================================
  RCS file: 
/home/cvs/cocoon-2.1/src/blocks/slop/samples/yapt/css/yapt-style.css,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- yapt-style.css    26 Sep 2003 14:42:36 -0000      1.1
  +++ yapt-style.css    27 Sep 2003 18:46:34 -0000      1.2
  @@ -91,6 +91,7 @@
   #navigation {
       position:fixed;
       bottom: 0;
  +    clear: both;
   }
   
   #navigation div {
  @@ -110,25 +111,22 @@
       font-size: 120%;
   }
   
  -/** printing */
  [EMAIL PROTECTED] print {
  -    #multipleSlides div.slide {
  -        page-break-after: avoid; page-break-inside: avoid;
  -    }
  -
  -    img {
  -        page-break-inside: avoid;
  -    }
  -
  -    h1, h2, h3, h4, h5, h6 {
  -        page-break-after: avoid; page-break-inside: avoid;
  -    }
  -
  -    blockquote, pre {
  -        page-break-inside: avoid;
  -    }
  -
  -    ul, ol, dl {
  -        page-break-before: avoid;
  -    }
  -}
  \ No newline at end of file
  +/**
  +    Multiple slides on a single page:
  +    make sure each slide gets its own block, and prevent page breaks
  +    in slides when printing (does not work with all browser, Opera works)
  +*/
  +
  +#multipleSlides div.singleSlide {
  +    clear: both;
  +    margin-top: 2.5em;
  +    page-break-inside: avoid;
  +}
  +
  +#multipleSlides h1 {
  +    page-break-after: avoid;
  +}
  +
  +#multipleSlides img {
  +    page-break-inside: avoid;
  +}
  
  
  
  1.2       +13 -1     
cocoon-2.1/src/blocks/slop/samples/yapt/presentations/yapt-demo.txt
  
  Index: yapt-demo.txt
  ===================================================================
  RCS file: 
/home/cvs/cocoon-2.1/src/blocks/slop/samples/yapt/presentations/yapt-demo.txt,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- yapt-demo.txt     26 Sep 2003 14:42:36 -0000      1.1
  +++ yapt-demo.txt     27 Sep 2003 18:46:34 -0000      1.2
  @@ -39,6 +39,18 @@
   
   note: This page uses a hint-style line to indicate that it contains little 
text and can use a larger font
   
  +
  +slide: Test results
  +
  +CSS styles have been tested with the latest version of Firebird, Opera and 
IE on Mac OSX, they might not
  +work properly with other browsers.
  +
  +When printing, only Opera honors the "page-breaks" CSS properties, current 
versions of other browsers
  +will break images and slides in two when laying out pages.
  +
  +When an image on the left goes below flowed text, Opera does not correctly 
position the navigation bar at
  +the bottom of the page.
  +
   slide: Image examples: half-left image
   
   img_leftHalf: screenshot.jpg
  
  
  
  1.1                  
cocoon-2.1/src/blocks/slop/samples/yapt/presentations/page-breaks-test.txt
  
  Index: page-breaks-test.txt
  ===================================================================
  presentation: YAPT demo
  image-directory: yapt-demo-images
  Testing page breaks in image when printing
  
  slide: The test
  
  This presentation contains one slide with (too) many small images, and then 
many
  small slides, to test the
  
  note:page-breaks-inside:avoid
  
  CSS property.
  
  When printing, each image and each slide (except if too high) should stay on 
a single page.
  
  Tested on Mac OSX, this only with Opera (V6.03), but not with Firebird,
  Internet Explorer or Safari (they don't currently support this property).
  
  
  slide: Many images
  
  img_leftThird: screenshot.jpg
  img_rightThird: tree.gif
  img_leftThird: screenshot.jpg
  img_rightThird: tree.gif
  img_leftThird: screenshot.jpg
  img_rightThird: tree.gif
  img_leftThird: screenshot.jpg
  img_rightThird: tree.gif
  img_leftThird: screenshot.jpg
  img_rightThird: tree.gif
  img_leftThird: screenshot.jpg
  
  This slide contains many images, they shouldn't be broken between two pages 
when printing.
  
  Here's some more text to test the flow
  
  Here's some more text to test the flow
  
  Here's some more text to test the flow
  
  img_leftThird: screenshot.jpg
  img_rightThird: tree.gif
  Here's some more text to test the flow
  
  Here's some more text to test the flow
  
  Here's some more text to test the flow
  
  Here's some more text to test the flow
  
  Here's some more text to test the flow
  
  Here's some more text to test the flow
  
  Here's some more text to test the flow
  
  img_leftThird: screenshot.jpg
  img_rightThird: tree.gif
  Here's some more text to test the flow
  
  Here's some more text to test the flow
  
  Here's some more text to test the flow
  
  Here's some more text to test the flow
  
  Here's some more text to test the flow
  
  img_leftThird: screenshot.jpg
  img_rightThird: tree.gif
  Here's some more text to test the flow
  
  Here's some more text to test the flow
  
  Here's some more text to test the flow
  
  Here's some more text to test the flow
  
  slide: Text slide
  
  note: there are several such slides in this test
  
  Just some text, to check that slides are also kept intact on a single page 
when printing.
  
  This is some text, just to take some space.
  
  This is some text, just to take some space.
  
  This is some text, just to take some space.
  
  This is some text, just to take some space.
  
  This is some text, just to take some space.
  
  Don't forget that quick brown foxes love lazy dogs.
  
  slide: Text slide
  
  note: there are several such slides in this test
  
  Just some text, to check that slides are also kept intact on a single page 
when printing.
  
  This is some text, just to take some space.
  
  This is some text, just to take some space.
  
  This is some text, just to take some space.
  
  This is some text, just to take some space.
  
  This is some text, just to take some space.
  
  Don't forget that quick brown foxes love lazy dogs.
  
  slide: Text slide
  
  note: there are several such slides in this test
  
  Just some text, to check that slides are also kept intact on a single page 
when printing.
  
  This is some text, just to take some space.
  
  This is some text, just to take some space.
  
  This is some text, just to take some space.
  
  This is some text, just to take some space.
  
  This is some text, just to take some space.
  
  Don't forget that quick brown foxes love lazy dogs.
  
  slide: Text slide
  
  note: there are several such slides in this test
  
  Just some text, to check that slides are also kept intact on a single page 
when printing.
  
  This is some text, just to take some space.
  
  This is some text, just to take some space.
  
  This is some text, just to take some space.
  
  This is some text, just to take some space.
  
  This is some text, just to take some space.
  
  Don't forget that quick brown foxes love lazy dogs.
  
  slide: Text slide
  
  note: there are several such slides in this test
  
  Just some text, to check that slides are also kept intact on a single page 
when printing.
  
  This is some text, just to take some space.
  
  This is some text, just to take some space.
  
  This is some text, just to take some space.
  
  This is some text, just to take some space.
  
  This is some text, just to take some space.
  
  Don't forget that quick brown foxes love lazy dogs.
  
  slide: Text slide
  
  note: there are several such slides in this test
  
  Just some text, to check that slides are also kept intact on a single page 
when printing.
  
  This is some text, just to take some space.
  
  This is some text, just to take some space.
  
  This is some text, just to take some space.
  
  This is some text, just to take some space.
  
  This is some text, just to take some space.
  
  Don't forget that quick brown foxes love lazy dogs.
  
  slide: Text slide
  
  note: there are several such slides in this test
  
  Just some text, to check that slides are also kept intact on a single page 
when printing.
  
  This is some text, just to take some space.
  
  This is some text, just to take some space.
  
  This is some text, just to take some space.
  
  This is some text, just to take some space.
  
  This is some text, just to take some space.
  
  Don't forget that quick brown foxes love lazy dogs.
  
  slide: Text slide
  
  note: there are several such slides in this test
  
  Just some text, to check that slides are also kept intact on a single page 
when printing.
  
  This is some text, just to take some space.
  
  This is some text, just to take some space.
  
  This is some text, just to take some space.
  
  This is some text, just to take some space.
  
  This is some text, just to take some space.
  
  Don't forget that quick brown foxes love lazy dogs.
  
  slide: Text slide
  
  note: there are several such slides in this test
  
  Just some text, to check that slides are also kept intact on a single page 
when printing.
  
  This is some text, just to take some space.
  
  This is some text, just to take some space.
  
  This is some text, just to take some space.
  
  This is some text, just to take some space.
  
  This is some text, just to take some space.
  
  Don't forget that quick brown foxes love lazy dogs.
  
  slide: Text slide
  
  note: there are several such slides in this test
  
  Just some text, to check that slides are also kept intact on a single page 
when printing.
  
  This is some text, just to take some space.
  
  This is some text, just to take some space.
  
  This is some text, just to take some space.
  
  This is some text, just to take some space.
  
  This is some text, just to take some space.
  
  Don't forget that quick brown foxes love lazy dogs.
  
  slide: Text slide
  
  note: there are several such slides in this test
  
  Just some text, to check that slides are also kept intact on a single page 
when printing.
  
  This is some text, just to take some space.
  
  This is some text, just to take some space.
  
  This is some text, just to take some space.
  
  This is some text, just to take some space.
  
  This is some text, just to take some space.
  
  Don't forget that quick brown foxes love lazy dogs.
  
  slide: Text slide
  
  note: there are several such slides in this test
  
  Just some text, to check that slides are also kept intact on a single page 
when printing.
  
  This is some text, just to take some space.
  
  This is some text, just to take some space.
  
  This is some text, just to take some space.
  
  This is some text, just to take some space.
  
  This is some text, just to take some space.
  
  Don't forget that quick brown foxes love lazy dogs.
  
  slide: Text slide
  
  note: there are several such slides in this test
  
  Just some text, to check that slides are also kept intact on a single page 
when printing.
  
  This is some text, just to take some space.
  
  This is some text, just to take some space.
  
  This is some text, just to take some space.
  
  This is some text, just to take some space.
  
  This is some text, just to take some space.
  
  Don't forget that quick brown foxes love lazy dogs.
  
  slide: Text slide
  
  note: there are several such slides in this test
  
  Just some text, to check that slides are also kept intact on a single page 
when printing.
  
  This is some text, just to take some space.
  
  This is some text, just to take some space.
  
  This is some text, just to take some space.
  
  This is some text, just to take some space.
  
  This is some text, just to take some space.
  
  Don't forget that quick brown foxes love lazy dogs.
  
  slide: Text slide
  
  note: there are several such slides in this test
  
  Just some text, to check that slides are also kept intact on a single page 
when printing.
  
  This is some text, just to take some space.
  
  This is some text, just to take some space.
  
  This is some text, just to take some space.
  
  This is some text, just to take some space.
  
  This is some text, just to take some space.
  
  Don't forget that quick brown foxes love lazy dogs.
  
  slide: Text slide
  
  note: there are several such slides in this test
  
  Just some text, to check that slides are also kept intact on a single page 
when printing.
  
  This is some text, just to take some space.
  
  This is some text, just to take some space.
  
  This is some text, just to take some space.
  
  This is some text, just to take some space.
  
  This is some text, just to take some space.
  
  Don't forget that quick brown foxes love lazy dogs.
  
  
  slide: Last slide
  
  That's all, folks!
  
  
  1.3       +10 -2     
cocoon-2.1/src/blocks/slop/samples/yapt/stylesheets/html-slides.xsl
  
  Index: html-slides.xsl
  ===================================================================
  RCS file: 
/home/cvs/cocoon-2.1/src/blocks/slop/samples/yapt/stylesheets/html-slides.xsl,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- html-slides.xsl   26 Sep 2003 15:02:41 -0000      1.2
  +++ html-slides.xsl   27 Sep 2003 18:46:34 -0000      1.3
  @@ -33,8 +33,16 @@
                       </xsl:if>
                   </xsl:if>
   
  +                <!-- indicate if multiple or single slides (boy is XSLT 
painful for this) -->
  +                <xsl:variable name="typeId">
  +                    <xsl:choose>
  +                        <xsl:when test="$slideCount &gt; 
1">multipleSlides</xsl:when>
  +                        <xsl:otherwise>singleSlide</xsl:otherwise>
  +                    </xsl:choose>
  +                </xsl:variable>
  +
                   <div id="content">
  -                    <div id="slides-page">
  +                    <div id="{$typeId}">
                           <xsl:apply-templates select="yapt-presentation"/>
                       </div>
                   </div>
  
  
  

Reply via email to