<?php
$template = <<<END
<!-- haken1_grid: グリッド -->
<section class="{val item/class}">
<h2>{val item/title}</h2>
<div class="list-container">
<!--{each item/list}-->
<div class="list blur">
<!--{def item/list/image}-->
<figure><img src="user_data/{val item/list/image}" alt=""></figure>
<!--{/def}-->
<div class="text">
<h4>{val item/list/title}</h4>
<p class="markdown-body">{rval item/list/text}</p>
</div>
<!--{def item/list/badge}-->
<span class="new">{val item/list/badge}</span>
<!--{/def}-->
<!--{def item/list/link}-->
<p class="c"><a href="{val item/list/link}" class="btn1 block">詳しくみる</a></p>
<!--{/def}-->
</div>
<!--{/each}-->
</div>
<!--/.list-container-->
</section>
END;

$haken1_grid = array(
	"title" => "haken1グリッド",
	"name" => "haken1_grid",			// 名称、重複すると正しく動作しません
	"template" => $template,		// ブロックのテンプレート
	"input" => array(
		"help" => array(
			"title" => "使い方",
			"type" => "comment",
			"link" => DOCUMENT1 . "/?act=haken1_grid",
			"class" => "notice",
		),
		"title" => array(
			"title" => "タイトル",
			"type" => "text",
		),
		"class" => array(
			"title" => "背景",
			"type" => "select",
			"list" => array(
				"" => "なし",
				"bg1" => "色1",
				"bg2" => "色2",
				"bg3" => "色3",
			),
		),
		"dummy1" => array(
			"title" => " ",
			"type" => "comment",
		),
		"title1" => array(
			"title" => "タイトル1",
			"type" => "text",
		),
		"image1" => array(
			"title" => "画像１",
			"type" => "image",
		),
		"text1" => array(
			"title" => "内容1",
			"type" => "textarea",
		),
		"link1" => array(
			"title" => "リンク先1",
			"type" => "text",
		),
		"badge1" => array(
			"title" => "バッジ1",
			"type" => "text",
		),
		"dummy2" => array(
			"title" => " ",
			"type" => "comment",
		),
		"title2" => array(
			"title" => "タイトル2",
			"type" => "text",
		),
		"image2" => array(
			"title" => "画像2",
			"type" => "image",
		),
		"text2" => array(
			"title" => "内容2",
            "type" => "textarea",
		),
		"link2" => array(
			"title" => "リンク先2",
			"type" => "text",
		),
		"badge2" => array(
			"title" => "バッジ2",
			"type" => "text",
		),
		"dummy3" => array(
			"title" => " ",
			"type" => "comment",
		),
		"title3" => array(
			"title" => "タイトル3",
			"type" => "text",
		),
		"image3" => array(
			"title" => "画像3",
			"type" => "image",
		),
		"text3" => array(
			"title" => "内容3",
			"type" => "textarea",
		),
		"link3" => array(
			"title" => "リンク先3",
			"type" => "text",
		),
		"badge3" => array(
			"title" => "バッジ3",
			"type" => "text",
		),
		"dummy4" => array(
			"title" => " ",
			"type" => "comment",
		),
		"title4" => array(
			"title" => "タイトル4",
			"type" => "text",
		),
		"image4" => array(
			"title" => "画像4",
			"type" => "image",
		),
		"text4" => array(
			"title" => "内容4",
			"type" => "textarea",
		),
		"link4" => array(
			"title" => "リンク先4",
			"type" => "text",
		),
		"badge4" => array(
			"title" => "バッジ4",
			"type" => "text",
		),
		"dummy5" => array(
			"title" => " ",
			"type" => "comment",
		),
		"title5" => array(
			"title" => "タイトル5",
			"type" => "text",
		),
		"image5" => array(
			"title" => "画像5",
			"type" => "image",
		),
		"text5" => array(
			"title" => "内容5",
			"type" => "textarea",
		),
		"link5" => array(
			"title" => "リンク先5",
			"type" => "text",
		),
		"badge5" => array(
			"title" => "バッジ5",
			"type" => "text",
		),
		"dummy6" => array(
			"title" => " ",
			"type" => "comment",
		),
		"title6" => array(
			"title" => "タイトル6",
			"type" => "text",
		),
		"image6" => array(
			"title" => "画像6",
			"type" => "image",
		),
		"text6" => array(
			"title" => "内容6",
			"type" => "textarea",
		),
		"link6" => array(
			"title" => "リンク先6",
			"type" => "text",
		),
		"badge6" => array(
			"title" => "バッジ6",
			"type" => "text",
		),
	),
	"repeat" => array(
		"title", "image", "text", "link", "badge",
	),
);

block_add($haken1_grid);