2 package IkiWiki
::Plugin
::mirrorlist
;
9 hook
(type
=> "getsetup", id
=> "mirrorlist", call
=> \
&getsetup
);
10 hook
(type
=> "pagetemplate", id
=> "mirrorlist", call
=> \
&pagetemplate
);
23 description
=> "list of mirrors",
29 sub pagetemplate
(@
) {
31 my $template=$params{template
};
33 if ($template->query(name
=> "extrafooter") &&
34 keys %{$config{mirrorlist
}} > 0) {
35 my $value=$template->param("extrafooter");
36 $value.=mirrorlist
($params{page
});
37 $template->param(extrafooter
=> $value);
43 return ($config{html5
} ?
'<nav id="mirrorlist">' : '<div>').
44 (keys %{$config{mirrorlist
}} > 1 ? gettext
("Mirrors") : gettext
("Mirror")).
49 $config{mirrorlist}->{$_}."/".urlto($page, "").
51 } keys %{$config{mirrorlist
}}
53 ($config{html5
} ?
'</nav>' : '</div>');