Text: Custom Images

Enabling Custom Images

特別な meta-image 要素を用いることで、そのテーマを共有する他のユーザーが Customize - Theme から簡単に画像を変更することができる。書式は以下の通り。
<meta name="image:***" content="+++"/>
*** には内容名などの分かり易い名前(スペースを含んでも良い)を、+++ にはフォント名を指定する。ページに要素として {image:***} と記述すると、その部分が +++ に置き換わる。画像が得られない場合、1px の透過画像に置き換わる。

例:

<html>
    <head>
        <!-- DEFAULT IMAGE -->
        <meta name="image:Background" content="http://static.tumblr.com/..."/>
        <meta name="image:Header" content=""/>
        
        <style type="text/css">
            body {
                background: #2D567C url('{image:Background}');
            }
        </style>
    </head>
    <body>
        {block:IfHeaderImage}<img src="{image:Header}"/>{/block:IfHeaderImage}
        {block:IfNotHeaderImage}<h1>{title}</h1>{/block:IfNotHeaderImage}
    </body>
</html>