From 3d903e63e9e5eb7d06e01d674e8e9dc6b6f5a77a Mon Sep 17 00:00:00 2001 From: takezoe Date: Sat, 27 Aug 2011 13:02:30 +0000 Subject: [PATCH] =?utf8?q?note=E3=83=97=E3=83=A9=E3=82=B0=E3=82=A4?= =?utf8?q?=E3=83=B3=E3=82=92=E8=BF=BD=E5=8A=A0=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- takezoe/plugin/book/Install.pm | 21 +++++++++++++++++++++ takezoe/plugin/book/Note.pm | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 takezoe/plugin/book/Note.pm diff --git a/takezoe/plugin/book/Install.pm b/takezoe/plugin/book/Install.pm index b10b9fc..978a5e1 100644 --- a/takezoe/plugin/book/Install.pm +++ b/takezoe/plugin/book/Install.pm @@ -21,6 +21,7 @@ sub install { $wiki->add_inline_plugin("code" ,"plugin::book::Code" ,"HTML"); $wiki->add_block_plugin("column" ,"plugin::book::Column" ,"HTML"); + $wiki->add_block_plugin("note" ,"plugin::book::Note" ,"HTML"); $wiki->add_inline_plugin("memo", "plugin::book::Memo", "HTML"); $wiki->add_paragraph_plugin("memolist", "plugin::book::Memolist", "HTML"); @@ -120,6 +121,26 @@ div.column-body { margin-right: 20px; margin-bottom: 20px; } + +div.note-title { + border-top: 1px solid gray; + border-left: 1px solid gray; + border-right: 1px solid gray; + padding: 4px; + background-color: silver; + font-weight: bold; + margin-left: 20px; + margin-right: 20px; +} + +div.note-body { + border-bottom: 1px solid gray; + border-left: 1px solid gray; + border-right: 1px solid gray; + padding: 4px; + margin-left: 20px; + margin-right: 20px; +} END_OF_HEAD diff --git a/takezoe/plugin/book/Note.pm b/takezoe/plugin/book/Note.pm new file mode 100644 index 0000000..0720a23 --- /dev/null +++ b/takezoe/plugin/book/Note.pm @@ -0,0 +1,34 @@ +############################################################################### +# +#

¥Î¡¼¥È¤òµ­½Ò¤¹¤ë¤¿¤á¤Î¥Ö¥í¥Ã¥¯¥×¥é¥°¥¤¥ó¤Ç¤¹¡£

+#
+# {{note
+# ¥Î¡¼¥ÈËÜʸ
+# }}
+# 
+#

¥³¥é¥àËÜʸ¤ÏWiki·Á¼°¤Çµ­½Ò¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£

+# +############################################################################### +package plugin::book::Note; +#============================================================================== +# ¥³¥ó¥¹¥È¥é¥¯¥¿ +#============================================================================== +sub new { + my $class = shift; + my $self = {}; + return bless $self,$class; +} + +#============================================================================== +# ¥Ö¥í¥Ã¥¯¥á¥½¥Ã¥É +#============================================================================== +sub block { + my $self = shift; + my $wiki = shift; + my $content = shift; + + return '
Note
'. + '
'.$wiki->process_wiki($content).'
'; +} + +1; -- 2.11.0