<?php
$template = <<<END
<section class="recipe1_recipe">
<p class="btn"><a href="javascript:history.back()">&lt;&lt; 前のページに戻る</a></p>
<article>
<h2>{val item/title}</h2>
<div class="recipe-img">
<!--{def item/image}-->
<figure>
<img src="user_data/{val item/image_file}" class="mb15" alt=""><br>
</figure>
<!--{/def}-->
<h3>{val item/material_title}</h3>
<p class="markdown">{rval item/material}</p>
</div>
<!--/.recipe-img-->
<div class="recipe">
<h3>{val item/subtitle2}</h3>
<p class="markdown">{rval item/text}</p>
<ol>
<!--{each item/list}-->
<li>
<!--{def item/list/step_image}-->
<img src="user_data/{val item/list/step_image}" alt="" class="thumb">
<!--{/def}-->
{val item/list/step_text}
</li>
<!--{/each}-->
</ol>
</div>
<!--/.recipe-->
</article>
</section>
END;

$recipe1_recipe = array(
	"title" => "recipe1レシピ",
	"name" => "recipe1_recipe",			// 名称、重複すると正しく動作しません
	"template" => $template,		// ブロックのテンプレート
	"input" => array(
    	"help" => array(
	    	"title" => "使い方",
		    "type" => "comment",
    		"link" => DOCUMENT1 . "/?act=recipe1_recipe",
	    	"class" => "notice",
	    ),
		"title" => array(
			"title" => "タイトル",
			"type" => "text",
		),
		"subtitle" => array(
			"title" => "サブタイトル",
			"type" => "text",
		),
		"image" => array(
			"title" => "画像",
			"type" => "image",
		),
		"material_title" => array(
			"title" => "材料タイトル",
			"type" => "text",
		),
		"material" => array(
			"title" => "材料内容",
			"type" => "textarea",
		),
		"subtitle2" => array(
			"title" => "サブタイトル2",
			"type" => "text",
		),
		"text" => array(
			"title" => "説明",
			"type" => "textarea",
		),
		"step_image1" => array(
			"title" => "作り方画像1",
			"type" => "image",
		),
		"step_text1" => array(
			"title" => "作り方説明1",
			"type" => "textarea",
		),
		"step_image2" => array(
			"title" => "作り方画像2",
			"type" => "image",
		),
		"step_text2" => array(
			"title" => "作り方説明2",
			"type" => "textarea",
		),
		"step_image3" => array(
			"title" => "作り方画像3",
			"type" => "image",
		),
		"step_text3" => array(
			"title" => "作り方説明3",
			"type" => "textarea",
		),
		"step_image4" => array(
			"title" => "作り方画像4",
			"type" => "image",
		),
		"step_text4" => array(
			"title" => "作り方説明4",
			"type" => "textarea",
		),
		"step_image5" => array(
			"title" => "作り方画像5",
			"type" => "image",
		),
		"step_text5" => array(
			"title" => "作り方説明5",
			"type" => "textarea",
		),
		"step_image6" => array(
			"title" => "作り方画像6",
			"type" => "image",
		),
		"step_text6" => array(
			"title" => "作り方説明6",
			"type" => "textarea",
		),
		"step_image7" => array(
			"title" => "作り方画像7",
			"type" => "image",
		),
		"step_text7" => array(
			"title" => "作り方説明7",
			"type" => "textarea",
		),
		"step_image8" => array(
			"title" => "作り方画像8",
			"type" => "image",
		),
		"step_text8" => array(
			"title" => "作り方説明8",
			"type" => "textarea",
		),
		"step_image9" => array(
			"title" => "作り方画像9",
			"type" => "image",
		),
		"step_text9" => array(
			"title" => "作り方説明9",
			"type" => "textarea",
		),
		"step_image10" => array(
			"title" => "作り方画像10",
			"type" => "image",
		),
		"step_text10" => array(
			"title" => "作り方説明10",
			"type" => "textarea",
		),
	),
    "repeat" => array("step_text", "step_image"),
);

block_add($recipe1_recipe);