aboutsummaryrefslogtreecommitdiff
path: root/doc/html.init
diff options
context:
space:
mode:
Diffstat (limited to 'doc/html.init')
-rw-r--r--doc/html.init164
1 files changed, 164 insertions, 0 deletions
diff --git a/doc/html.init b/doc/html.init
new file mode 100644
index 0000000..7613faa
--- /dev/null
+++ b/doc/html.init
@@ -0,0 +1,164 @@
1# Texi2any configuration for cfpeek documentation. -*- perl -*-
2# Copyright (C) 2011, 2015 Sergey Poznyakoff
3#
4# Cfpeek is free software; you can redistribute it and/or modify
5# it under the terms of the GNU General Public License as published by
6# the Free Software Foundation; either version 3, or (at your option)
7# any later version.
8#
9# Cfpeek 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.
13#
14# You should have received a copy of the GNU General Public License
15# along with Cfpeek. If not, see <http://www.gnu.org/licenses/>.
16use strict;
17
18my $top_html_dir="/software/cfpeek";
19my $graphics_dir="$top_html_dir/graphics";
20
21# Show TOC in place of the @contents directive.
22set_from_init_file('INLINE_CONTENTS', 1);
23# Do not show Texinfo menus.
24set_from_init_file('SHOW_MENU', 0);
25# Inhibit output of CSS lines in page headers.
26set_from_init_file('CSS_LINES', '');
27
28set_from_init_file('BODYTEXT', "");
29
30set_from_init_file('EXTRA_HEAD', "\
31 <link rev=\"made\" href=\"mailto:gray\@gnu.org.ua\">\
32 <link rel=\"stylesheet\" type=\"text/css\" href=\"${top_html_dir}/gray.css\">\
33 <link rel=\"stylesheet\" type=\"text/css\" href=\"${top_html_dir}/texi.css\">\
34 <link rel=\"icon\" type=\"image/png\" href=\"/graphics/gnu-head-icon.png\">");
35
36set_from_init_file('AFTER_BODY_OPEN', qq{
37<!--#include virtual=\"${top_html_dir}/inc/header.html\" -->
38<ul class='tabs'>
39 <li><a href="${top_html_dir}/cfpeek.html">Main</a></li>
40 <li><a href="${top_html_dir}/download.html">Downloads</a></li>
41 <li><a class="active" href="${top_html_dir}/manual.html">Documentation</a></li>
42</ul>
43});
44
45sub gray_end_file($)
46{
47 my $self = shift;
48 my $program_text = '';
49 if ($self->get_conf('PROGRAM_NAME_IN_FOOTER')) {
50 my $program_string = &{$self->{'format_program_string'}}($self);
51 $program_text = "<p>
52 $program_string
53</p>";
54 }
55 my $pre_body_close = $self->get_conf('PRE_BODY_CLOSE');
56 $pre_body_close = '' if (!defined($pre_body_close));
57 return "</div>
58<div class=\"copyright\">
59$program_text
60
61$pre_body_close
62</div>
63</div>
64</body>
65</html>
66";
67}
68
69texinfo_register_formatting_function('end_file', \&gray_end_file);
70
71set_from_init_file('PRE_BODY_CLOSE',
72 'Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.');
73
74# Print generating program name at the bottom of a page.
75set_from_init_file('PROGRAM_NAME_IN_FOOTER',1);
76
77# Disable horizontal bars
78set_from_init_file('DEFAULT_RULE', '');
79set_from_init_file('BIG_RULE', '');
80
81# Turn off navigation bars at the bottom of each section in chapter split mode,
82# or subsection in section split mode.
83set_from_init_file('HEADERS', undef)
84 if ((get_conf('SPLIT') eq 'chapter') or (get_conf('SPLIT') eq 'section'));
85# Use navigation icons
86
87set_from_init_file('ICONS', 1);
88
89set_from_init_file('ACTIVE_ICONS',
90 {
91 'Top' => "$graphics_dir/top.png",
92 'Contents' => "$graphics_dir/ctx.png",
93 'Overview' => '',
94 'Index' => "$graphics_dir/idx.png",
95 'This' => '',
96 'Back' => "$graphics_dir/left.png",
97 'FastBack' => "$graphics_dir/bwd.png",
98 'Prev' => "",
99 'Up' => "$graphics_dir/up.png",
100 'Next' => "$graphics_dir/right.png",
101 'NodeUp' => "$graphics_dir/left.png",
102 'NodeNext' => "$graphics_dir/up.png",
103 'NodePrev' => "$graphics_dir/right.png",
104 'Following' => "$graphics_dir/right.png",
105 'Forward' => "$graphics_dir/right.png",
106 'FastForward' => "$graphics_dir/fwd.png",
107 'About' => '',
108 'First' => '',
109 'Last' => '',
110 ' ' => ''
111 });
112
113sub gray_split_status()
114{
115 my $split = get_conf('SPLIT');
116 if ($split eq '') {
117 return '';
118 } elsif ($split eq 'node') {
119 return ' <span class="splitstatus">(split by node)</span>';
120 } elsif ($split eq 'section') {
121 return ' <span class="splitstatus">(split by section)</span>';
122 } elsif ($split eq 'chapter') {
123 return ' <span class="splitstatus">(split by chapter)</span>';
124 }
125}
126
127sub gray_document_title($$)
128{
129 my $self = shift;
130 my $direction = shift;
131 my $status = gray_split_status();
132
133 return q{<span class="title">} . $self->{title_string} . '</span>' .$status . q{<span class="title">:</span>};
134}
135
136sub gray_sec_ref($$)
137{
138 return q{<span class="navtext">Section:</span>};
139}
140
141sub gray_chap_ref($$)
142{
143 return q{<span class="navtext">Chapter:</span>};
144}
145
146
147my @gray_buttons = (\&gray_document_title, ' ',
148 \&gray_sec_ref, 'Back', 'Forward', ' ',
149 \&gray_chap_ref,
150 'FastBack', ' ', 'Up', ' ', 'FastForward', ' ',
151 'Contents', 'Index' );
152
153set_from_init_file('TOP_BUTTONS', undef);
154set_from_init_file('SECTION_BUTTONS', \@gray_buttons);
155set_from_init_file('CHAPTER_BUTTONS', \@gray_buttons);
156set_from_init_file('NODE_FOOTER_BUTTONS', \@gray_buttons);
157set_from_init_file('SECTION_FOOTER_BUTTONS', \@gray_buttons);
158set_from_init_file('MISC_BUTTONS',
159 [\&gray_document_title,
160 'Contents',
161 'Index',
162 ' ',
163 'About'
164 ]);

Return to:

Send suggestions and report system problems to the System administrator.