/usr/share/perl5/Kwiki/Theme.pm is in libkwiki-perl 0.39-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 | package Kwiki::Theme;
use Kwiki::Plugin -Base;
use mixin 'Kwiki::Installer';
const class_id => 'theme';
sub register {
my $register = shift;
$register->add(preload => 'theme',
priority => 1,
);
$register->add(prerequisite => 'toolbar');
$register->add(prerequisite => 'widgets');
$register->add(prerequisite => 'status');
}
const default_template_path => "theme/%s/template/tt2";
const default_css_path => "theme/%s/css";
const default_javascript_path => "theme/%s/javascript";
const default_css_file => 'kwiki.css';
const default_javascript_file => '';
sub init {
super;
my $theme_id = $self->theme_id;
my $template_path =
sprintf $self->default_template_path, $theme_id;
$self->template->add_path($template_path)
if -e $template_path;
my $css_path =
sprintf $self->default_css_path, $theme_id;
$self->hub->css->add_path($css_path)
if -e $css_path;
$self->hub->css->add_file
(ref $self->default_css_file
? @{$self->default_css_file}
: $self->default_css_file);
my $javascript_path =
sprintf $self->default_javascript_path, $theme_id;
$self->hub->javascript->add_path($javascript_path)
if -e $javascript_path;
$self->hub->javascript->add_file
(ref $self->default_javascript_file
? @{$self->default_javascript_file}
: $self->default_javascript_file);
$self->hub->cookie;
}
sub resolve_install_path {
sprintf shift, $self->theme_id;
}
__DATA__
=head1 NAME
Kwiki::Theme - Kwiki Theme Plugin
=head1 SYNOPSIS
=head1 DESCRIPTION
=head1 AUTHOR
Brian Ingerson <INGY@cpan.org>
=head1 COPYRIGHT
Copyright (c) 2004. Brian Ingerson. All rights reserved.
This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
See http://www.perl.com/perl/misc/Artistic.html
=cut
__css/icons.css__
div.toolbar img {
margin: 0;
padding: 0;
border: 0;
vertical-align: middle;
}
__template/tt2/kwiki_doctype.html__
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml11.dtd">
__template/tt2/kwiki_begin.html__
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>
[% IF hub.action == 'display' ||
hub.action == 'edit' ||
hub.action == 'revisions'
%]
[% hub.cgi.page_name %] -
[% END %]
[% IF hub.action != 'display' %]
[% self.class_title %] -
[% END %]
[% site_title %]</title>
[%# FOR link = hub.links.all -%]
<!-- XXX Kwiki::Atom might need this, but it breaks Hub::AUTOLOAD
<link rel="[% link.rel %]" type="[% link.type %]" href="[% link.href %]" />
-->
[%# END %]
[% FOR css_file = hub.css.files -%]
[% IF css_file -%]
<link rel="stylesheet" type="text/css" href="[% css_file %]" />
[% END -%]
[% END -%]
[% FOR javascript_file = hub.javascript.files -%]
[% IF javascript_file -%]
<script type="text/javascript" src="[% javascript_file %]"></script>
[% END -%]
[% END -%]
<link rel="shortcut icon" href="" />
<link rel="start" href="[% script_name %]" title="Home" />
</head>
<body>
__template/tt2/kwiki_end.html__
</body>
</html>
__theme/%s/template/tt2/theme_screen.html__
[%- INCLUDE kwiki_screen.html -%]
__theme/%s/template/tt2/theme_html_doctype.html__
[%- INCLUDE kwiki_doctype.html %]
__theme/%s/template/tt2/theme_html_begin.html__
[%- INCLUDE kwiki_begin.html %]
__theme/%s/template/tt2/theme_html_end.html__
[% INCLUDE kwiki_end.html -%]
__theme/%s/template/tt2/theme_logo_pane.html__
<div id="logo_pane">
<img src="[% logo_image %]" align="center" alt="Kwiki Logo" title="[% site_title %]" />
</div>
__theme/%s/template/tt2/theme_title_pane.html__
<div id="title_pane">
<h1>
[% screen_title || self.class_title %]
</h1>
</div>
__theme/%s/template/tt2/theme_toolbar_pane.html__
<div id="toolbar_pane">
[% hub.toolbar.html %]
[% INCLUDE theme_login_pane.html %]
</div>
__theme/%s/template/tt2/theme_login_pane.html__
[% IF hub.have_plugin('user_name') %]
[% INCLUDE user_name_title.html %]
[% END %]
__theme/%s/template/tt2/theme_status_pane.html__
<div id="status_pane">
[% hub.status.html %]
</div>
__theme/%s/template/tt2/theme_widgets_pane.html__
<div id="widgets_pane">
[% hub.widgets.html %]
</div>
__theme/%s/template/tt2/theme_content_pane.html__
<div id="content_pane">
[% INCLUDE $content_pane %]
</div>
__theme/%s/template/tt2/theme_toolbar2_pane.html__
<div id="toolbar2_pane">
[% hub.toolbar.html %]
</div>
|