OSDN Git Service

boxプラグインを追加。
authortakezoe <takezoe@871d6764-1e22-0410-b313-a55050885396>
Sun, 28 Aug 2011 02:21:49 +0000 (02:21 +0000)
committertakezoe <takezoe@871d6764-1e22-0410-b313-a55050885396>
Sun, 28 Aug 2011 02:21:49 +0000 (02:21 +0000)
takezoe/plugin/book/Box.pm [new file with mode: 0644]
takezoe/plugin/book/Install.pm

diff --git a/takezoe/plugin/book/Box.pm b/takezoe/plugin/book/Box.pm
new file mode 100644 (file)
index 0000000..1ac3b04
--- /dev/null
@@ -0,0 +1,38 @@
+###############################################################################
+#
+# <p>´ØÏ¢¡¢ÍøÍÑÎã¤òµ­½Ò¤¹¤ë¤¿¤á¤Î¥×¥é¥°¥¤¥ó¤Ç¤¹¡£</p>
+# <p>ÆâÍƤÏWiki·Á¼°¤Îʸ»úÎó¤Çµ­½Ò¤Ç¤­¤Þ¤¹¤¬¡¢°Ê²¼¤Î¤è¤¦¤Ë²Õ¾ò½ñ¤­¤ò»ÈÍѤ·¤Æ¤¯¤À¤µ¤¤¡£</p>
+# <pre>
+# {{box ´ØÏ¢
+# *{{link SETUP_ECLIPSE}}
+# }}
+# {{box ÍøÍÑÎã
+# *¥³¥Þ¥ó¥É¥é¥¤¥ó¤ÇScala¥×¥í¥°¥é¥à¤ò¼Â¹Ô¤·¤¿¾ì¹ç
+# }}
+# </pre>
+#
+###############################################################################
+package plugin::book::Box;
+#==============================================================================
+# ¥³¥ó¥¹¥È¥é¥¯¥¿
+#==============================================================================
+sub new {
+       my $class = shift;
+       my $self = {};
+       return bless $self,$class;
+}
+
+#==============================================================================
+# ¥Ö¥í¥Ã¥¯¥á¥½¥Ã¥É
+#==============================================================================
+sub block {
+       my $self    = shift;
+       my $wiki    = shift;
+       my $content = shift;
+       my $title   = shift;
+       
+       return '<table class="box"><tr><th>'.Util::escapeHTML($title).'</th>'.
+               '<td>'.$wiki->process_wiki($content).'</td></tr></table>';
+}
+
+1;
index 4f38b8b..3e3a346 100644 (file)
@@ -22,6 +22,7 @@ sub install {
        
        $wiki->add_block_plugin("column" ,"plugin::book::Column" ,"HTML");
        $wiki->add_block_plugin("note" ,"plugin::book::Note" ,"HTML");
+       $wiki->add_block_plugin("box" ,"plugin::book::Box" ,"HTML");
        
        $wiki->add_inline_plugin("memo", "plugin::book::Memo", "HTML");
        $wiki->add_paragraph_plugin("memolist", "plugin::book::Memolist", "HTML");
@@ -158,6 +159,49 @@ div.keyword {
   padding-right: 4px;
   padding-bottom: 8px;
 }
+
+table.box {
+  width: 100%;
+  border-top: none;\r
+  border-left: none;
+  border-right: none;\r
+  border-bottom: none;\r
+  border-collapse:collapse;\r
+  border-spacing:0;\r
+  empty-cells:show;
+  margin: 2px;
+}
+
+table.box th {
+  width: 100px;
+  border-top: 1px solid #88AAFF;
+  border-left: 1px solid #88AAFF;
+  border-right:1px solid #88AAFF;\r
+  border-bottom:1px solid #88AAFF;\r
+  background-position:left top;\r
+  padding:0.3em 1em;\r
+  text-align:center;
+}
+
+table.box td {
+  border-top: 1px solid #88AAFF;
+  border-left: none;
+  border-right:1px solid #88AAFF;\r
+  border-bottom:1px solid #88AAFF;\r
+  padding:0.3em 1em;
+}
+
+table.box ul {
+  margin-bottom: 0px;
+  margin-left: 0px;
+  padding-left: 10px;
+}
+
+table.box p {
+  margin-bottom: 0px;
+  margin-left: 0px;
+  padding-left: 0px;
+}
 </style>
 END_OF_HEAD