POV-Ray : Newsgroups : povray.beta-test : minor HTML fix for portfolio pages Server Time
29 Jul 2024 10:23:14 EDT (-0400)
  minor HTML fix for portfolio pages (Message 1 to 2 of 2)  
From: Raphael Quinet
Subject: minor HTML fix for portfolio pages
Date: 21 Jun 2002 10:29:15
Message: <pan.2002.06.21.14.29.11.221512.14831@gamers.org>
In the directory ./scenes/portfolio/, the HTML files are generated by
the include file "html_gen.inc".  There is a minor bug when rendering
the sample scene with the sky pigments: all images fit on a single
page, but an incorrect link to the "previous" page is inserted at the
top and bottom of the HTML page.  This happens because the code in
"html_gen.inc" has a special case for the first page (no "previous"
link) and for the last page (no "next" link) but does not handle the
case first==last.

Included below is a simple patch that should fix this problem (the
patch was generated with "diff -u" and can be applied with any recent
version of "patch").  I also added the page number in the title of the
page.  You may leave that out if you don't like it.

Note: the usage of singular or plural for the "Keyword" in the various
*.pov files is not very consistent.  For example, one file uses
"objects" (plural) while some others use "texture" (singular).  This
could also be corrected.



------------------------------------------------------------------------
--- html_gen.inc~	Tue Jun 18 00:49:47 2002
+++ html_gen.inc	Fri Jun 21 08:15:34 2002
@@ -47,7 +47,8 @@
       #local htmlName=concat(OutName,str(Page+1,0,0),".html")
       #local htmlNext=concat(OutName,str(Page+2,0,0),".html")
 
-      #local Title=concat ("    <h3>",FileName,", ",Keyword,"</h3>\n")
+      #local Title=concat ("    <h3>",FileName,", ",Keyword," (page
",str(Page+1,0,0),"/",str(Nr_Pages,0,0),")</h3>\n")
+      #local NavSingle=concat("    <p>\n    [ <font color=#4F4F4F>previous</font> ] [
<a href=\"index.html\">index</a> ] [ <font color=#4F4F4F>next</font> ]\n    </p>\n")
       #local NavFirst=concat("    <p>\n    [ <font color=#4F4F4F>previous</font> ] [
<a href=\"index.html\">index</a> ] [ <a href=\"",htmlNext,"\">next</a> ]\n    </p>\n")
       #local NavLast=concat("    <p>\n    [ <a href=\"",htmlPrevious,"\">previous</a>
] [ <a href=\"index.html\">index</a> ] [ <font color=#4F4F4F>next</font> ]\n   
</p>\n")
       #local Nav=concat("    <p>\n    [ <a href=\"",htmlPrevious,"\">previous</a> ] [
<a href=\"index.html\">index</a> ] [ <a href=\"",htmlNext,"\">next</a> ]\n    </p>\n")
@@ -57,6 +58,9 @@
       #end
       #if (Page=Nr_Pages-1)
          #local Nav=NavLast
+      #end
+      #if (Nr_Pages=1)
+         #local Nav=NavSingle
       #end
       
       #fopen HTMLFile htmlName write


Post a reply to this message

From: ingo
Subject: Re: minor HTML fix for portfolio pages
Date: 22 Jun 2002 02:44:37
Message: <Xns92355984484C0seed7@povray.org>
in news:pan### [at] gamersorg Raphael Quinet 
wrote:

> Included below is a simple patch that should fix this problem (the
> patch was generated with "diff -u" and can be applied with any recent
> version of "patch").

Thanks, I'll have a look.

Ingo


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.