2 # Captive project doc macros.
3 # Copyright (C) 2003-2005 Jan Kratochvil <project-www.jankratochvil.net@jankratochvil.net>
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; exactly version 2 of June 1991 is required
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 package project::captive::doc::Macros;
20 require 5.6.0; # at least 'use warnings;' but we need some 5.6.0+ modules anyway
21 our $VERSION=do { my @r=(q$Revision$=~/\d+/g); sprintf "%d.".("%03d"x$#r),@r; };
28 &doc_img &productname &captive_srcfile
29 $freespeech $freebeer $Wine $ReactOS $LinuxNTFS $GnomeVFS $GnomeVFSmodule $gnulinux
31 our @ISA=qw(Exporter);
34 Wrequire 'project::Lib';
43 print '<table border="0" width="100%">'."\n";
44 # FIXME: print '<col width="'.$_.'%" />'."\n" for (qw(10 20 40 20 10));
45 # causes whole invisible icons in: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.10) Gecko/20050719 Galeon/1.3.21
47 print '<td></td>'."\n";
48 print '<td align="left">';
49 print img "/My/arrow-left" ,"Previous document","a_href"=>$My::Web::W->{"rel_prev"}
50 if $My::Web::W->{"rel_prev"};
52 print '<td align="center">';
53 print img "/My/arrow-up" ,"Parent","a_href"=>$My::Web::W->{"rel_up"}
54 if $My::Web::W->{"rel_up"} && !($where && $where eq "footer");
56 print '<td align="right">';
57 print img "/My/arrow-right","Next document","a_href"=>$My::Web::W->{"rel_next"}
58 if $My::Web::W->{"rel_next"};
60 print '<td></td>'."\n";
62 print '</table>'."\n";
67 my($img_base,$caption)=@_;
70 $r.='<table border="0" width="100%">'."\n";
71 $r.="\t<caption>$caption</caption>\n";
72 $r.="\t".'<tr><td align="center">'.img($img_base,$caption)."</td></tr>\n";
78 sub captive_srcfile ($;$)
80 my($filename,$text)=@_;
82 a_href 'http://cvs.jankratochvil.net/viewcvs/*checkout*/captive/'.$filename.'?rev=HEAD&content-type=text/plain',
90 return '<span class="productname">'.a_href($url,escapeHTML($name)).'</span>';
92 our($Wine,$ReactOS,$LinuxNTFS,$GnomeVFS,$GnomeVFSmodule,$gnulinux,$freespeech,$freebeer);
97 project::captive::doc::Macros->navigate("footer");
105 "css_push"=>"./Macros.css",
106 "heading_novskip"=>1,
107 "rel_start"=>"..", # possibly overridable
108 "rel_up"=>".", # possibly overridable
109 "footing_delimit_sub_push"=>\&_footer,
110 "__PACKAGE__"=>caller(), # possibly overridable
114 $Wine=productname 'http://www.winehq.com/','Wine';
115 $ReactOS=productname 'http://www.reactos.com/','ReactOS';
116 $LinuxNTFS=productname 'http://linux-ntfs.sourceforge.net/','Linux NTFS';
117 $GnomeVFS=productname 'http://developer.gnome.org/doc/API/gnome-vfs/','Gnome-VFS';
118 $GnomeVFSmodule=productname 'http://developer.gnome.org/doc/API/gnome-vfs/modules.html','Gnome-VFS-module';
119 $gnulinux='GNU/Linux';
120 $freespeech=a_href 'http://www.gnu.org/philosophy/free-sw.html','Free';
121 $freebeer=a_href 'http://www.gnu.org/philosophy/free-sw.html','free (as in beer)';
124 print(project::Lib->section("captive"));