X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/blobdiff_plain/3a1c8c2b463b8a4f6b3b2c866c5e1b1500f95193..7aa10a2952a0d0ee8543f575966f7e4a780c993c:/IkiWiki/Plugin/pagestats.pm diff --git a/IkiWiki/Plugin/pagestats.pm b/IkiWiki/Plugin/pagestats.pm index 4313aa271..17b26f7ba 100644 --- a/IkiWiki/Plugin/pagestats.pm +++ b/IkiWiki/Plugin/pagestats.pm @@ -27,6 +27,7 @@ sub getsetup () { plugin => { safe => 1, rebuild => undef, + section => "widget", }, } @@ -74,7 +75,7 @@ sub preprocess (@) { } if ($style eq 'table') { - return "\n". + return "
\n". join("\n", map { "
". htmllink($params{page}, $params{destpage}, $_, noimageinline => 1). @@ -86,16 +87,31 @@ sub preprocess (@) { else { # In case of misspelling, default to a page cloud - my $res = "
\n"; + my $res; + if ($style eq 'list') { + $res = "
    \n"; + } + else { + $res = "
    \n"; + } foreach my $page (sort keys %counts) { next unless $counts{$page} > 0; my $class = $classes[$counts{$page} * scalar(@classes) / ($max + 1)]; + + $res.="
  • " if $style eq 'list'; $res .= "". htmllink($params{page}, $params{destpage}, $page). "\n"; + $res.="
  • " if $style eq 'list'; + + } + if ($style eq 'list') { + $res .= "
\n"; + } + else { + $res .= "
\n"; } - $res .= "\n"; return $res; }