emoji: mark yahoo additions in version 6
[sheet.git] / emoji.plp
1 <(common.inc.plp)><:
2
3 Html({
4         title => 'emoji cheat sheet',
5         version => 'v1.0',
6         description => [
7                 "Emoticons overview and Unicode equivalents"
8                 . " of MSN, Y!M, and Gmail icons.",
9         ],
10         keywords => [qw'
11                 sheet cheat emoticon smiley emoji unicode
12                 chat im messenger msn yahoo ym gmail google
13         '],
14         stylesheet => [qw'light'],
15 });
16
17 :>
18 <h1>IM emoticons</h1>
19
20 <:
21 my %ICONURL = (
22         msn   => 'http://messenger.msn.com/Resource/emoticons/%s.gif',
23 #       yahoo => 'http://l.yimg.com/us.yimg.com/i/mesg/emoticons6/%s.gif',
24         yahoo => 'http://l.yimg.com/us.yimg.com/i/mesg/emoticons7/%s.gif',
25 #       yahoo-web => 'http://l.yimg.com/a/i/us/msg/emoticons/%s.gif',
26         gmail => 'http://mail.google.com/mail/help/images/screenshots/chat/%s.gif',
27 );
28
29 print "<ul>\n";
30
31 for my $system (qw'gmail msn yahoo') {
32         my @info = do "emoji-$system.inc.pl";
33         printf '<div class="section"><h3>%s</h3>'."\n\n", $system;
34         print '<table><tbody>'."\n";
35         for (my $i = 0; $i <= $#info; $i++) {
36                 my $name = $info[$i];
37                 unless (ref $info[$i+1] eq 'ARRAY') {
38                         printf '</table><table><tbody>'."\n", $name;
39                         next;
40                 }
41                 my ($input, $attr, $char, $desc) = @{ $info[++$i] };
42                 printf('<tr><th><img src="'.$ICONURL{$system}.'"><td><kbd>%s</kbd><td>%s%s'."\n",
43                         $name, EscapeHTML($input), $desc // $name, $char ? '<td>'.chr($char) : '',
44                 );
45         }
46         print "</table></div>\n\n";
47 }
48
49 print "</ul><hr>\n\n";
50