-
Notifications
You must be signed in to change notification settings - Fork 1
/
list_title_at_month
72 lines (50 loc) · 1.46 KB
/
list_title_at_month
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
# Blosxom Plugin: list_title_at_month
# Author(s): Kyo Nagashima <[email protected]>
# Version: 2004-04-08
# Blosxom Home/Docs/Licensing: http://www.blosxom.com/
package list_title_at_month;
use strict;
use vars qw($story_title);
# --- Configurable variables -----------
# --- Plug-in package variables --------
# --------------------------------------
sub start {
if (!$blosxom::path_info_mo or $blosxom::path_info_da or ($blosxom::flavour ne 'html')) {
return 0;
}
return 1;
}
sub head {
my ($pkg, $currentdir, $head_ref) = @_;
$$head_ref .= qq!<div class="story">\n!;
$$head_ref .= qq!<h3>$blosxom::path_info_yr年$blosxom::path_info_mo_num月のエントリ一覧</h3>\n!;
$$head_ref .= qq!<dl>\n!;
return 1;
}
sub sort {
return sub {
my ($files_ref) = @_;
return sort {
$files_ref->{$a} <=> $files_ref->{$b}
} keys %$files_ref;
};
}
sub date {
my ($pkg, $path, $date_ref, $mtime, $dw, $mo, $mo_num, $da, $ti, $yr) = @_;
$$date_ref = qq!<dt>$yr/$mo_num/$da</dt>\n!;
return 1;
}
sub story {
my ($pkg, $path, $fn, $story_ref, $title_ref, $body_ref) = @_;
my $url = qq!$blosxom::url$path/$fn.$blosxom::default_flavour!;
$$story_ref = q!$list_title_at_month::story_title!;
$story_title = qq!<dd>$blosxom::ti :: <a href="$url" title="$$title_ref">$$title_ref</a></dd>\n!;
return 1;
}
sub foot {
my ($pkg, $currentdir, $foot_ref) = @_;
$$foot_ref = qq!</dl>\n</div>\n$$foot_ref!;
return 1;
}
1;
# vim:ft=perl