summaryrefslogtreecommitdiffstats
path: root/Doc/perl
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2000-10-25 16:18:10 (GMT)
committerFred Drake <fdrake@acm.org>2000-10-25 16:18:10 (GMT)
commit7497bd3e3dd0b68c3a215cfa7d8df4de8f55c6bd (patch)
treef42bc44ec5afde742113505695f3717a15ac6523 /Doc/perl
parentd04592a46bc2fae49299ef6cf996cc553cbbad2c (diff)
downloadcpython-7497bd3e3dd0b68c3a215cfa7d8df4de8f55c6bd.zip
cpython-7497bd3e3dd0b68c3a215cfa7d8df4de8f55c6bd.tar.gz
cpython-7497bd3e3dd0b68c3a215cfa7d8df4de8f55c6bd.tar.bz2
Rename $PYTHON_VERSION to $PACKAGE_VERSION; this is the version number for
whatever is being documented, not necessarily Python. (These tools are also used for the How-To documents, etc.) get_version_text(): New function. Returns HTML fragment describing the software version and documentation date. bot_navigation_panel(): Include the result of get_version_text() at the end, so the information is available on every page.
Diffstat (limited to 'Doc/perl')
-rw-r--r--Doc/perl/l2hinit.perl34
1 files changed, 27 insertions, 7 deletions
diff --git a/Doc/perl/l2hinit.perl b/Doc/perl/l2hinit.perl
index 4274a6c..74b65e3 100644
--- a/Doc/perl/l2hinit.perl
+++ b/Doc/perl/l2hinit.perl
@@ -25,7 +25,6 @@ $TOP_NAVIGATION = 1;
$BOTTOM_NAVIGATION = 1;
$AUTO_NAVIGATION = 0;
-# these exactly match the python.org colors
$BODYTEXT = '';
$CHILDLINE = "\n<p><hr>\n";
$VERBOSITY = 0;
@@ -172,15 +171,36 @@ sub make_nav_panel {
return $s;
}
+sub get_version_text {
+ if ($PACKAGE_VERSION ne '' && $t_date) {
+ return ("<span class=\"release-info\">"
+ . "Release $PACKAGE_VERSION,"
+ . " documentation updated on $t_date.</span>");
+ }
+ if ($PACKAGE_VERSION ne '') {
+ return ("<span class=\"release-info\">"
+ . "Release $PACKAGE_VERSION.</span>");
+ }
+ if ($t_date) {
+ return ("<span class=\"release-info\">Documentation released on "
+ . "$t_date.</span>");
+ }
+ return '';
+}
+
sub top_navigation_panel {
- return make_nav_panel()
- . '<br><hr>';
+ return "\n"
+ . make_nav_panel()
+ . "<br><hr>\n";
}
sub bot_navigation_panel {
- return "<p><hr>"
- . make_nav_panel();
+ return "\n<p><hr>\n"
+ . make_nav_panel()
+ . "<hr>\n"
+ . get_version_text()
+ . "\n";
}
sub add_link {
@@ -372,8 +392,8 @@ sub do_cmd_textohtmlinfopage {
my $the_version = ''; # and the rest is
if ($t_date) { # mostly ours
$the_version = ",\n$t_date";
- if ($PYTHON_VERSION) {
- $the_version .= ", Release $PYTHON_VERSION";
+ if ($PACKAGE_VERSION) {
+ $the_version .= ", Release $PACKAGE_VERSION";
}
}
$_ = (($INFO == 1)