<?php
// パーツ基本のテンプレート
$template = <<<END
<!-- block_slideshow:スライドショー -->
<section class="block_slideshow">
<!--{def item/size_big}-->
<!--{def item/title}-->
<h2>{val item/title}</h2>
<!--{/def}-->
<!--{def item/text}-->
<p class="markdown-body">{rval item/text}</p>
<!--{/def}-->
<div class="slide1-maru">
<!--{def item/image1}-->
<div class="slide-maru slide1-maru">
<img src="user_data/{val item/image1_file}" alt="">
</div>
<!--{/def}-->
<!--{def item/image2}-->
<div class="slide-maru slide2-maru">
<img src="user_data/{val item/image2_file}" alt="">
</div>
<!--{/def}-->
<!--{def item/image3}-->
<div class="slide-maru slide3-maru">
<img src="user_data/{val item/image3_file}" alt="">
</div>
<!--{/def}-->
<!--{def item/image4}-->
<div class="slide-maru slide4-maru">
<img src="user_data/{val item/image4_file}" alt="">
</div>
<!--{/def}-->
<!--{def item/image5}-->
<div class="slide-maru slide5-maru">
<img src="user_data/{val item/image5_file}" alt="">
</div>
<!--{/def}-->
<!--{def item/image6}-->
<div class="slide-maru slide6-maru">
<img src="user_data/{val item/image6_file}" alt="">
</div>
<!--{/def}-->
<!--{def item/image7}-->
<div class="slide-maru slide7-maru">
<img src="user_data/{val item/image7_file}" alt="">
</div>
<!--{/def}-->
<!--{def item/image8}-->
<div class="slide-maru slide8-maru">
<img src="user_data/{val item/image8_file}" alt="">
</div>
<!--{/def}-->
<!--{def item/image9}-->
<div class="slide-maru slide9-maru">
<img src="user_data/{val item/image9_file}" alt="">
</div>
<!--{/def}-->
<!--{def item/image10}-->
<div class="slide-maru slide10-maru">
<img src="user_data/{val item/image10_file}" alt="">
</div>
<!--{/def}-->
<div class="slide-indicators-maru"></div><!--現在表示中ボタン-->
</div>
<!--{/def}-->
<!--{ndef item/size_big}-->
<div class="list-half1-maru">
<div class="list-maru">
<figure class="slide1-maru">
<!--{def item/image1}-->
<div class="slide-maru slide1-maru">
<img src="user_data/{val item/image1_file}" alt="">
</div>
<!--{/def}-->
<!--{def item/image2}-->
<div class="slide-maru slide2-maru">
<img src="user_data/{val item/image2_file}" alt="">
</div>
<!--{/def}-->
<!--{def item/image3}-->
<div class="slide-maru slide3-maru">
<img src="user_data/{val item/image3_file}" alt="">
</div>
<!--{/def}-->
<!--{def item/image4}-->
<div class="slide-maru slide4-maru">
<img src="user_data/{val item/image4_file}" alt="">
</div>
<!--{/def}-->
<!--{def item/image5}-->
<div class="slide-maru slide5-maru">
<img src="user_data/{val item/image5_file}" alt="">
</div>
<!--{/def}-->
<!--{def item/image6}-->
<div class="slide-maru slide6-maru">
<img src="user_data/{val item/image6_file}" alt="">
</div>
<!--{/def}-->
<!--{def item/image7}-->
<div class="slide-maru slide7-maru">
<img src="user_data/{val item/image7_file}" alt="">
</div>
<!--{/def}-->
<!--{def item/image8}-->
<div class="slide-maru slide8-maru">
<img src="user_data/{val item/image8_file}" alt="">
</div>
<!--{/def}-->
<!--{def item/image9}-->
<div class="slide-maru slide9-maru">
<img src="user_data/{val item/image9_file}" alt="">
</div>
<!--{/def}-->
<!--{def item/image10}-->
<div class="slide-maru slide10-maru">
<img src="user_data/{val item/image10_file}" alt="">
</div>
<!--{/def}-->
<div class="slide-indicators-maru"></div><!--現在表示中ボタン-->
</figure>
<div class="text-maru">
<!--{def item/title}-->
<h4>{val item/title}</h4>
<!--{/def}-->
<!--{def item/text}-->
<p class="markdown-body">{rval item/text}</p>
<!--{/def}-->
<!--{def item/link}-->
<p class="btn1-maru"><a href="{val item/link}">詳しくみる</a></p>
<!--{/def}-->
</div>
</div>
</div>
<!--/.list-half1-maru-->
<!--{/ndef}-->
</section>
END;

$block_style = <<<END
/* このブロック用のスタイル宣言 */
END;

$block_script = <<<END
/* このブロック用のスクリプト */
END;

$block_slideshow = array(					// ブロック定義
	"title" => "スライドショー（ページ内）",			// ブロックの名称
	"name" => "block_slideshow",			// 名称、重複すると正しく動作しません
	"template" => $template,		// ブロックのテンプレート
//	"js_file" => "glb.js",			// 追加のjsファイル（parts内に入れる）
//	"css_file" => "glb.css",		// 追加のcssファイル（parts内に入れる）
//	"stylesheet" => $block_style,	// 追加スタイルシート
//	"javascript" => $block_script,	// 追加スクリプト
	"input" => array(				// ブロックの入力定義
		"help" => array(
			"title" => "使い方",
			"type" => "comment",
			"link" => DOCUMENT1 . "/?act=block_slideshow",
			"class" => "notice",
		),
		"title" => array(
			"title" => "タイトル",
			"type" => "text",
		),
		"size_big" => array(
			"title" => "表示サイズ",
			"type" => "select",
			"list" => array(
				"" => "小",
				"1" => "大",
			),
		),
		"text" => array(
			"title" => "説明文",
			"type" => "textarea",
		),
		"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_slideshow);

