<?php
$template = <<<END
<!--bis62_slide:スライドショー-->
<aside id="mainimg" class="bis62_slide">
<!--{each item/list}-->
<!--{def item/list/image}-->
<div class="slide {val item/list/text_pos}">
<div>
<div>
<h1>{rval item/list/title}</h1>
<p class="markdown-body">{rval item/list/text}</p>
<!--{def item/list/link}-->
<p class="btn-border-radius"><a href="{val item/list/link}">もっと詳しくみる</a></p>
<!--{/def}-->
</div>
</div>
<img src="user_data/{val item/list/image}" alt="">
</div>
<!--{/def}-->
<!--{/each}-->
</aside>
END;

$bis62_slide = array(						// ブロック
		"title" => "biz62スライドショー",	// ブロックの名称
		"name" => "bis62_slide",			// 名称、重複すると正しく動作しません
		"template" => $template,		// ブロックのテンプレート
		"input" => array(				// ブロックの入力定義
		"help" => array(
			"title" => "使い方",
			"type" => "comment",
			"link" => DOCUMENT1 . "/?act=bis62_slide",
			"class" => "notice",
		),
			"notice1" => array(
				"title" => "このブロックはトップページにしか使えません",
				"type" => "comment",
				"class"=> "notice",
			),
			"image1" => array(
				"title" => "画像1",
				"type" => "image",
			),
			"title1" => array(
				"title" => "見出し1",
				"type" => "textarea",
			),
			"text1" => array(
				"title" => "文字1",
				"type" => "textarea",
			),
			"text_pos1" => array(
				"title" => "文字位置1",
				"type" => "select",
				"list" => array(
					"slide1 slide0" => "左",
					"slide3 slide0" => "中央",
					"slide2 slide0" => "右",
				),
			),
			"link1" => array(
				"title" => "リンク1",
				"type" => "text",
			),
			"image2" => array(
				"title" => "画像2",
				"type" => "image",
			),
			"title2" => array(
				"title" => "見出し2",
				"type" => "textarea",
			),
			"text2" => array(
				"title" => "文字表示2",
				"type" => "textarea",
			),
			"text_pos2" => array(
				"title" => "文字位置2",
				"type" => "select",
				"list" => array(
					"slide1" => "左",
					"slide3" => "中央",
					"slide2" => "右",
				),
			),
			"link2" => array(
				"title" => "リンク2",
				"type" => "text",
			),
			"image3" => array(
				"title" => "画像3",
				"type" => "image",
			),
			"title3" => array(
				"title" => "見出し3",
				"type" => "textarea",
			),
			"text3" => array(
				"title" => "文字表示3",
				"type" => "textarea",
			),
			"text_pos3" => array(
				"title" => "文字位置3",
				"type" => "select",
				"list" => array(
					"slide1" => "左",
					"slide3" => "中央",
					"slide2" => "右",
				),
			),
			"link3" => array(
				"title" => "リンク3",
				"type" => "text",
			),
		),
		"repeat" => array("image", "text_pos", "text", "title", "link"),
		"output" => "slide",		// 出力位置
	);

block_add($bis62_slide);
