You are viewing a plain text version of this content. The canonical link for it is here.
Posted to docs-cvs@perl.apache.org by st...@apache.org on 2002/05/14 07:24:57 UTC
cvs commit: modperl-docs/lib/DocSet/DocSet HTML.pm
stas 02/05/13 22:24:57
Modified: src style.css
lib DocSet.pm
lib/DocSet DocSet.pm
lib/DocSet/Doc Common.pm
lib/DocSet/DocSet HTML.pm
Log:
sync DocSet:
- change the <pre> rule generator, to do all the formatting work in
the stylesheet. plus add a new line in front of <pre> so the text
browsers will present it nicely.
- if the <pre> section is too long ps2pdf fails to generate pdf, so
split it into 40 lines chunks.
- sitemap is now correctly highlighted in the menu when selected
adjust the stylesheet for the <pre> change in the code
Revision Changes Path
1.70 +9 -10 modperl-docs/src/style.css
Index: style.css
===================================================================
RCS file: /home/cvs/modperl-docs/src/style.css,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -r1.69 -r1.70
--- style.css 30 Apr 2002 04:43:56 -0000 1.69
+++ style.css 14 May 2002 05:24:57 -0000 1.70
@@ -16,17 +16,20 @@
font-family: courier new, courier, monospace;
}
-pre {
- font-family: courier new, courier, monospace;
- font-size: 1.0em;
-}
-
dl, ul, ol {
font-family: helvetica, arial, verdana, sans-serif;
font-size: 1.0em;
}
-
+.pre-section {
+ font-family: courier new, courier, monospace;
+ font-size: 1.0em;
+ border-style: solid;
+ border-width: 0px 0px 0px 1px;
+ white-space: pre;
+ border-color: #004080; /* same color as quotation */
+ /* width: 100%; might be needed for konqueror?*/
+}
@@ -368,10 +371,6 @@
/* light gray/white bg-color for ad-sec */
td.ad-bg {
background-color: #eeeeee;
-}
-
-td.pre-bar {
- background-color: #cccccc;
}
/* lines for camel */
1.6 +1 -1 modperl-docs/lib/DocSet.pm
Index: DocSet.pm
===================================================================
RCS file: /home/cvs/modperl-docs/lib/DocSet.pm,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- DocSet.pm 3 Apr 2002 07:26:24 -0000 1.5
+++ DocSet.pm 14 May 2002 05:24:57 -0000 1.6
@@ -1,6 +1,6 @@
package DocSet;
-$VERSION = '0.13';
+$VERSION = '0.14';
=head1 NAME
1.12 +3 -3 modperl-docs/lib/DocSet/DocSet.pm
Index: DocSet.pm
===================================================================
RCS file: /home/cvs/modperl-docs/lib/DocSet/DocSet.pm,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- DocSet.pm 29 Apr 2002 17:36:54 -0000 1.11
+++ DocSet.pm 14 May 2002 05:24:57 -0000 1.12
@@ -228,9 +228,9 @@
sub sitemap_cache {
my($self, $link, $hidden) = @_;
my %meta = %$link; # make a copy
- my $id = delete $meta{id};
- $meta{title} = $meta{stitle} unless exists $meta{title};
- $meta{stitle} = $meta{title} unless exists $meta{stitle};
+ my $id = $meta{id};
+ $meta{title} = $meta{stitle} unless exists $meta{title};
+ $meta{stitle} = $meta{title} unless exists $meta{stitle};
$self->cache->add($id);
$self->cache->set($id, 'meta', \%meta, $hidden);
1.9 +9 -11 modperl-docs/lib/DocSet/Doc/Common.pm
Index: Common.pm
===================================================================
RCS file: /home/cvs/modperl-docs/lib/DocSet/Doc/Common.pm,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- Common.pm 19 Apr 2002 06:06:53 -0000 1.8
+++ Common.pm 14 May 2002 05:24:57 -0000 1.9
@@ -145,9 +145,8 @@
return qq{<a name="$anchor" href="#toc_$anchor">$link</a>};
}
-# we want the pre sections look different from normal text. So we use
-# the vertical bar on the left. make sure to set the td.pre-bar class
-# style.css: td.pre-bar { background-color: #cccccc; }
+# the <pre> section uses class "pre-section", which allows to use a custom
+# look-n-feel via the CSS
sub pod_pom_html_view_verbatim {
my ($self, $text) = @_;
for ($text) {
@@ -156,15 +155,14 @@
s/>/>/g;
}
- return <<PRE_SECTION;
-<table border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td class="pre-bar" width="1"><br></td>
- <td><pre>$text</pre></td>
- </tr>
-</table>
-PRE_SECTION
+ # if the <pre> section is too long ps2pdf fails to generate pdf,
+ # so split it into 40 lines chunks.
+ my $result = '';
+ while ($text =~ /((?:[^\n]*\n){1,40})/sg) {
+ $result .= qq{<pre class="pre-section">$1</pre>\n};
+ }
+ return $result;
}
1.7 +1 -2 modperl-docs/lib/DocSet/DocSet/HTML.pm
Index: HTML.pm
===================================================================
RCS file: /home/cvs/modperl-docs/lib/DocSet/DocSet/HTML.pm,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- HTML.pm 29 Apr 2002 17:36:55 -0000 1.6
+++ HTML.pm 14 May 2002 05:24:57 -0000 1.7
@@ -57,8 +57,7 @@
my $meta = $self->sitemap;
my $file = exists $meta->{link} ? $meta->{link} : "sitemap.html";
-
- my $navigator = DocSet::NavigateCache->new($self->cache->path, $self->get('id'));
+ my $navigator = DocSet::NavigateCache->new($self->cache->path, $meta->{id});
my %args = (
nav => $navigator,
meta => $meta,
---------------------------------------------------------------------
To unsubscribe, e-mail: docs-cvs-unsubscribe@perl.apache.org
For additional commands, e-mail: docs-cvs-help@perl.apache.org