<?php
$template = <<<END
<!-- 背景画像付きタイトルブロック -->
<!--{def item/image_file}-->
<h2 id="head_title" class="title hairsalon_head" style="background: url(user_data/{val item/image_file}) no-repeat center center / cover;"><span>{val item/subtitle}<span>{val item/title}</span></span></h2>
<!--{/def}-->
<!--{ndef item/image_file}-->
<h2 id="head_title" class="title hairsalon_head"><span>{val item/subtitle}<span>{val item/title}</span></span></h2>
<!--{/ndef}-->
END;

$hairsalon_head = array(
	"title" => "背景指定付タイトル",
	"name" => "hairsalon_head",		// 名称、重複すると正しく動作しません
	"template" => $template,		// ブロックのテンプレート
	"input" => array(
		"help" => array(
			"title" => "使い方",
			"type" => "comment",
			"link" => DOCUMENT1 . "/?act=hairsalon_head",
			"class" => "notice",
		),
		"title" => array(
			"title" => "タイトル",
			"type" => "text",
			"placeholder" => "例：当サイトについて",
		),
		"subtitle" => array(
			"title" => "サブタイトル",
			"type" => "text",
			"placeholder" => "例：About this site",
		),
		"image" => array(
			"title" => "背景画像",
			"type" => "image",
		),
	),
);

block_add($hairsalon_head);
