<?php
// パーツ基本のテンプレート
$template = <<<END
<!-- block_gallery:ギャラリー -->
<section class="block_gallery">
<!--{def item/title}-->
<h2>{val item/title}</h2>
<!--{/def}-->
<div class="thumbnail-slide-container-maru">
<!--{def item/move_right}-->
<div class="thumbnail-slide-maru slide-rtl-maru">
<!--{/def}-->
<!--{ndef item/move_right}-->
<div class="thumbnail-slide-maru slide-ltr-maru">
<!--{/def}-->
<!--{each item/list}-->
<div><a href="#"><img src="user_data/{val item/list/image}" alt=""></a></div>
<!--{/each}-->
</div>
</div>
</section>
END;

$block_gallery = array(					// ブロック定義
	"title" => "ギャラリー",			// ブロックの名称
	"name" => "block_gallery",			// 名称、重複すると正しく動作しません
	"template" => $template,		// ブロックのテンプレート
	"input" => array(				// ブロックの入力定義
		"help" => array(
			"title" => "使い方",
			"type" => "comment",
			"link" => DOCUMENT1 . "/?act=block_gallery",
			"class" => "notice",
		),
		"title" => array(
			"title" => "タイトル",
			"type" => "text",
			"info" => "入力しないとタイトルは出ません",
		),
		"move_right" => array(
			"title" => "移動方向",
			"type" => "select",
			"list" => array(
				"" => "右",
				"1" => "左",
			),
			"info" => "画像は4枚以上指定してください",
		),
		"image1" => array(
			"title" => "画像1",
			"type" => "image",
		),
		"image2" => array(
			"title" => "画像2",
			"type" => "image",
		),
		"image3" => array(
			"title" => "画像3",
			"type" => "image",
		),
		"image4" => array(
			"title" => "画像4",
			"type" => "image",
		),
		"image5" => array(
			"title" => "画像5",
			"type" => "image",
		),
		"image6" => array(
			"title" => "画像6",
			"type" => "image",
		),
		"image7" => array(
			"title" => "画像7",
			"type" => "image",
		),
		"image8" => array(
			"title" => "画像8",
			"type" => "image",
		),
		"image9" => array(
			"title" => "画像9",
			"type" => "image",
		),
		"image10" => array(
			"title" => "画像10",
			"type" => "image",
		),
	),
	"repeat" => array("image"),		// 自動でlistにまとめるもの
);

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