summaryrefslogtreecommitdiff
path: root/lib/VNDB/Util/LayoutHTML.pm
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2019-09-12 17:07:46 +0200
committerYorhel <git@yorhel.nl>2019-09-12 17:54:50 +0200
commitadc906096f4644788b970e5ed936ca3e70bde2e8 (patch)
tree8d2aacf12b008820a5a331e648f915a67987cdfb /lib/VNDB/Util/LayoutHTML.pm
parent752bc1724968a1f15b17ba9e607f2163997b4efa (diff)
Add VNDB::Config module and unified conf.pl config file
This gets rid of global.pl, config.pl and config3.pl and uses the cleaner config3.pl format for the config file. The config is easily accessible from anywhere by importing the new VNDB::Config module; The global $VNDB::S,O,M,ROOT variables have been removed. Sorry for all the churn...
Diffstat (limited to 'lib/VNDB/Util/LayoutHTML.pm')
-rw-r--r--lib/VNDB/Util/LayoutHTML.pm9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/VNDB/Util/LayoutHTML.pm b/lib/VNDB/Util/LayoutHTML.pm
index 5cb266f4..c04fa7dd 100644
--- a/lib/VNDB/Util/LayoutHTML.pm
+++ b/lib/VNDB/Util/LayoutHTML.pm
@@ -14,7 +14,7 @@ our @EXPORT = qw|htmlHeader htmlFooter|;
sub htmlHeader { # %options->{ title, noindex, search, feeds, svg, metadata }
my($self, %o) = @_;
my $skin = $self->reqGet('skin') || $self->authPref('skin') || $self->{skin_default};
- $skin = $self->{skin_default} if !$self->{skins}{$skin} || !-d "$VNDB::ROOT/static/s/$skin";
+ $skin = $self->{skin_default} if !$self->{skins}{$skin} || !-d "$self->{root}/static/s/$skin";
# heading
lit '<!DOCTYPE HTML>';
@@ -28,8 +28,11 @@ sub htmlHeader { # %options->{ title, noindex, search, feeds, svg, metadata }
(my $css = $self->authPref('customcss')) =~ s/\n/ /g;
style type => 'text/css', $css;
}
- Link rel => 'alternate', type => 'application/atom+xml', href => "/feeds/$_.atom", title => $self->{atom_feeds}{$_}[1]
- for ($o{feeds} ? @{$o{feeds}} : ());
+ if($o{feeds}) {
+ Link rel => 'alternate', type => 'application/atom+xml', href => "/feeds/announcements.atom", title => 'Site Announcements';
+ Link rel => 'alternate', type => 'application/atom+xml', href => "/feeds/changes.atom", title => 'Recent Changes';
+ Link rel => 'alternate', type => 'application/atom+xml', href => "/feeds/posts.atom", title => 'Recent Posts';
+ }
if(exists $o{metadata}) {
# Required fields as per http://op.me/#metadata: og:title, og:type, og:image, og:url