<?php
// パーツ基本のテンプレート
$template = <<<END
<!-- haken1_gallery:haken1ギャラリー -->
<section class="haken1_gallery {val item/class}">
<!--{def item/title}-->
<h2>{val item/title}</h2>
<!--{/def}-->
<div class="list-slide blur">
<!--{each item/list}-->
<div class="list">
<figure><a href="{val item/list/link}"><img src="user_data/{val item/list/image}" alt=""></a></figure>
</div>
<!--{/each}-->
</div>
<!--/.list-slide-->
</section>
END;

$haken1_gallery = array(					// ブロック定義
	"title" => "haken1ギャラリー",			// ブロックの名称
	"name" => "haken1_gallery",			// 名称、重複すると正しく動作しません
	"template" => $template,		// ブロックのテンプレート
	"input" => array(				// ブロックの入力定義
		"help" => array(
			"title" => "使い方",
			"type" => "comment",
			"link" => DOCUMENT1 . "/?act=haken1_gallery",
			"class" => "notice",
		),
        "class" => array(
            "title" => "背景",
            "type" => "select",
            "list" => array(
                "" => "なし",
                "bg1" => "色１",
                "bg2" => "色２",
                "bg3" => "色３",
            ),
        ),
        "title" => array(
			"title" => "タイトル",
			"type" => "text",
			"info" => "入力しないとタイトルは出ません",
		),
		"dummy1" => array(
			"title" => " ",
			"type" => "comment",
		),
		"image1" => array(
			"title" => "画像1",
			"type" => "image",
		),
		"link1" => array(
			"title" => "リンク1",
			"type" => "text",
		),
		"dummy2" => array(
			"title" => " ",
			"type" => "comment",
		),
		"image2" => array(
			"title" => "画像2",
			"type" => "image",
		),
		"link2" => array(
			"title" => "リンク2",
			"type" => "text",
		),
		"dummy3" => array(
			"title" => " ",
			"type" => "comment",
		),
		"image3" => array(
			"title" => "画像3",
			"type" => "image",
		),
		"link3" => array(
			"title" => "リンク3",
			"type" => "text",
		),
		"dummy4" => array(
			"title" => " ",
			"type" => "comment",
		),
		"image4" => array(
			"title" => "画像4",
			"type" => "image",
		),
		"link4" => array(
			"title" => "リンク4",
			"type" => "text",
		),
		"dummy5" => array(
			"title" => " ",
			"type" => "comment",
		),
		"image5" => array(
			"title" => "画像5",
			"type" => "image",
		),
		"link5" => array(
			"title" => "リンク5",
			"type" => "text",
		),
		"dummy6" => array(
			"title" => " ",
			"type" => "comment",
		),
		"image6" => array(
			"title" => "画像6",
			"type" => "image",
		),
		"link6" => array(
			"title" => "リンク6",
			"type" => "text",
		),
		"dummy7" => array(
			"title" => " ",
			"type" => "comment",
		),
		"image7" => array(
			"title" => "画像7",
			"type" => "image",
		),
		"link7" => array(
			"title" => "リンク7",
			"type" => "text",
		),
		"dummy8" => array(
			"title" => " ",
			"type" => "comment",
		),
		"image8" => array(
			"title" => "画像8",
			"type" => "image",
		),
		"link8" => array(
			"title" => "リンク8",
			"type" => "text",
		),
		"dummy9" => array(
			"title" => " ",
			"type" => "comment",
		),
		"image9" => array(
			"title" => "画像9",
			"type" => "image",
		),
		"link9" => array(
			"title" => "リンク9",
			"type" => "text",
		),
		"dummy10" => array(
			"title" => " ",
			"type" => "comment",
		),
		"image10" => array(
			"title" => "画像10",
			"type" => "image",
		),
		"link10" => array(
			"title" => "リンク10",
			"type" => "text",
		),
	),
	"repeat" => array("image", "link"),		// 自動でlistにまとめるもの
);

// パーツの登録
block_add($haken1_gallery);