OSDN Git Service

noteプラグインを追加。
authortakezoe <takezoe@871d6764-1e22-0410-b313-a55050885396>
Sat, 27 Aug 2011 13:02:30 +0000 (13:02 +0000)
committertakezoe <takezoe@871d6764-1e22-0410-b313-a55050885396>
Sat, 27 Aug 2011 13:02:30 +0000 (13:02 +0000)
takezoe/plugin/book/Install.pm
takezoe/plugin/book/Note.pm [new file with mode: 0644]

index b10b9fc..978a5e1 100644 (file)
@@ -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;
+}
 </style>
 END_OF_HEAD
        
diff --git a/takezoe/plugin/book/Note.pm b/takezoe/plugin/book/Note.pm
new file mode 100644 (file)
index 0000000..0720a23
--- /dev/null
@@ -0,0 +1,34 @@
+###############################################################################
+#
+# <p>¥Î¡¼¥È¤òµ­½Ò¤¹¤ë¤¿¤á¤Î¥Ö¥í¥Ã¥¯¥×¥é¥°¥¤¥ó¤Ç¤¹¡£</p>
+# <pre>
+# {{note
+# ¥Î¡¼¥ÈËÜʸ
+# }}
+# </pre>
+# <p>¥³¥é¥àËÜʸ¤ÏWiki·Á¼°¤Çµ­½Ò¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£</p>
+#
+###############################################################################
+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 '<div class="note-title">Note</div>'.
+               '<div class="note-body">'.$wiki->process_wiki($content).'</div>';
+}
+
+1;