<?php
$template = <<<END
<!-- block_grid4:グリッド４列-->
<section class="block_grid4">
<!--{def item/title}-->
<h2>{val item/title}</h2>
<!--{/def}-->
<!--{def item/text}-->
<p class="markdown-body">{rval item/text}</p>
<!--{/def}-->
<div class="list-grid3-maru column-4-maru {val item/frame}">
<!--{each item/list}-->
<div class="list-maru">
<!--{def item/list/image}-->
<figure><a href="{val item/list/link}"><img src="user_data/{val item/list/image}" alt=""></a></figure>
<!--{/def}-->
<div class="text-maru">
<h4>{val item/list/subtitle}</h4>
<p class="markdown-body">{rval item/list/text}</p>
</div>
<!--{def item/list/link}-->
<p class="btn1-maru {val item/list/color}"><a href="{val item/list/link}">詳しくみる</a></p>
<!--{/def}-->
<!--{def item/list/icon}-->
<span class="icon1-maru {val item/list/color}">{val item/list/icon}</span>
<!--{/def}-->
</div>
<!--/.list-grid1-maru-->
<!--{/each}-->
</div>
</section>
END;

$block_grid4 = array(					// ブロック定義
	"title" => "グリッド４列",			// ブロックの名称
	"name" => "block_grid4",			// 名称、重複すると正しく動作しません
	"template" => $template,		// ブロックのテンプレート
	"input" => array(				// ブロックの入力定義
		"help" => array(
			"title" => "使い方",
			"type" => "comment",
			"link" => DOCUMENT1 . "/?act=block_grid4",
			"class" => "notice",
		),
		"title" => array(
			"title" => "タイトル",
			"type" => "text",
		),
		"text" => array(
			"title" => "説明",
			"type" => "textarea",
		),
		"frame" => array(
			"title" => "フレーム",
			"type" => "select",
			"list" => array(
				"" => "なし",
				"frame1-maru" => "白",
				"frame2-maru" => "線",
			),
		),
		"dummy1" => array(
			"title" => " ",
			"type" => "comment",
		),
		"subtitle1" => array(
			"title" => "見出し1",
			"type" => "text",
		),
		"image1" => array(
			"title" => "画像1",
			"type" => "image",
		),
		"text1" => array(
			"title" => "詳細1",
			"type" => "textarea",
		),
		"link1" => array(
			"title" => "リンク1",
			"type" => "text",
		),
		"icon1" => array(
			"title" => "バッジ1",
			"type" => "text",
		),
		"color1" => array(
			"title" => "色1",
			"type" => "select",
			"list" => array(
				"" => "なし",
				"bgcolor-blue-maru" => "青",
				"bgcolor-red-maru" => "赤",
				"bgcolor-yellow-maru" => "黄",
			),
		),
		"dummy2" => array(
			"title" => " ",
			"type" => "comment",
		),
		"subtitle2" => array(
			"title" => "見出し2",
			"type" => "text",
		),
		"image2" => array(
			"title" => "画像2",
			"type" => "image",
		),
		"text2" => array(
			"title" => "詳細2",
			"type" => "textarea",
		),
		"link2" => array(
			"title" => "リンク2",
			"type" => "text",
		),
		"icon2" => array(
			"title" => "バッジ2",
			"type" => "text",
		),
		"color2" => array(
			"title" => "色2",
			"type" => "select",
			"list" => array(
				"" => "なし",
				"bgcolor-blue-maru" => "青",
				"bgcolor-red-maru" => "赤",
				"bgcolor-yellow-maru" => "黄",
			),
		),
		"dummy3" => array(
			"title" => " ",
			"type" => "comment",
		),
		"subtitle3" => array(
			"title" => "見出し3",
			"type" => "text",
		),
		"image3" => array(
			"title" => "画像3",
			"type" => "image",
		),
		"text3" => array(
			"title" => "詳細3",
			"type" => "textarea",
		),
		"link3" => array(
			"title" => "リンク3",
			"type" => "text",
		),
		"icon3" => array(
			"title" => "バッジ3",
			"type" => "text",
		),
		"color3" => array(
			"title" => "色3",
			"type" => "select",
			"list" => array(
				"" => "なし",
				"bgcolor-blue-maru" => "青",
				"bgcolor-red-maru" => "赤",
				"bgcolor-yellow-maru" => "黄",
			),
		),
		"dummy4" => array(
			"title" => " ",
			"type" => "comment",
		),
		"subtitle4" => array(
			"title" => "見出し4",
			"type" => "text",
		),
		"image4" => array(
			"title" => "画像4",
			"type" => "image",
		),
		"text4" => array(
			"title" => "詳細4",
			"type" => "textarea",
		),
		"link4" => array(
			"title" => "リンク4",
			"type" => "text",
		),
		"icon4" => array(
			"title" => "バッジ4",
			"type" => "text",
		),
		"color4" => array(
			"title" => "色4",
			"type" => "select",
			"list" => array(
				"" => "なし",
				"bgcolor-blue-maru" => "青",
				"bgcolor-red-maru" => "赤",
				"bgcolor-yellow-maru" => "黄",
			),
		),
		"dummy5" => array(
			"title" => " ",
			"type" => "comment",
		),
		"subtitle5" => array(
			"title" => "見出し5",
			"type" => "text",
		),
		"image5" => array(
			"title" => "画像5",
			"type" => "image",
		),
		"text5" => array(
			"title" => "詳細5",
			"type" => "textarea",
		),
		"link5" => array(
			"title" => "リンク5",
			"type" => "text",
		),
		"icon5" => array(
			"title" => "バッジ5",
			"type" => "text",
		),
		"color5" => array(
			"title" => "色5",
			"type" => "select",
			"list" => array(
				"" => "なし",
				"bgcolor-blue-maru" => "青",
				"bgcolor-red-maru" => "赤",
				"bgcolor-yellow-maru" => "黄",
			),
		),
		"dummy6" => array(
			"title" => " ",
			"type" => "comment",
		),
		"subtitle6" => array(
			"title" => "見出し6",
			"type" => "text",
		),
		"image6" => array(
			"title" => "画像6",
			"type" => "image",
		),
		"text6" => array(
			"title" => "詳細6",
			"type" => "textarea",
		),
		"link6" => array(
			"title" => "リンク6",
			"type" => "text",
		),
		"icon6" => array(
			"title" => "バッジ6",
			"type" => "text",
		),
		"color6" => array(
			"title" => "色6",
			"type" => "select",
			"list" => array(
				"" => "なし",
				"bgcolor-blue-maru" => "青",
				"bgcolor-red-maru" => "赤",
				"bgcolor-yellow-maru" => "黄",
			),
		),
		"dummy7" => array(
			"title" => " ",
			"type" => "comment",
		),
		"subtitle7" => array(
			"title" => "見出し7",
			"type" => "text",
		),
		"image7" => array(
			"title" => "画像7",
			"type" => "image",
		),
		"text7" => array(
			"title" => "詳細7",
			"type" => "textarea",
		),
		"link7" => array(
			"title" => "リンク7",
			"type" => "text",
		),
		"icon7" => array(
			"title" => "バッジ7",
			"type" => "text",
		),
		"color7" => array(
			"title" => "色7",
			"type" => "select",
			"list" => array(
				"" => "なし",
				"bgcolor-blue-maru" => "青",
				"bgcolor-red-maru" => "赤",
				"bgcolor-yellow-maru" => "黄",
			),
		),
		"dummy8" => array(
			"title" => " ",
			"type" => "comment",
		),
		"subtitle8" => array(
			"title" => "見出し8",
			"type" => "text",
		),
		"image8" => array(
			"title" => "画像8",
			"type" => "image",
		),
		"text8" => array(
			"title" => "詳細8",
			"type" => "textarea",
		),
		"link8" => array(
			"title" => "リンク8",
			"type" => "text",
		),
		"icon8" => array(
			"title" => "バッジ8",
			"type" => "text",
		),
		"color8" => array(
			"title" => "色8",
			"type" => "select",
			"list" => array(
				"" => "なし",
				"bgcolor-blue-maru" => "青",
				"bgcolor-red-maru" => "赤",
				"bgcolor-yellow-maru" => "黄",
			),
		),
		"dummy9" => array(
			"title" => " ",
			"type" => "comment",
		),
		"subtitle9" => array(
			"title" => "見出し9",
			"type" => "text",
		),
		"image9" => array(
			"title" => "画像9",
			"type" => "image",
		),
		"text9" => array(
			"title" => "詳細9",
			"type" => "textarea",
		),
		"link9" => array(
			"title" => "リンク9",
			"type" => "text",
		),
		"icon9" => array(
			"title" => "バッジ9",
			"type" => "text",
		),
		"color9" => array(
			"title" => "色9",
			"type" => "select",
			"list" => array(
				"" => "なし",
				"bgcolor-blue-maru" => "青",
				"bgcolor-red-maru" => "赤",
				"bgcolor-yellow-maru" => "黄",
			),
		),
	),
	"repeat" => array("subtitle", "text", "image", "icon", "color", "link"),	// 自動でlistにまとめるもの
);

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