Wednesday, April 17 2024 @ 03:05 AM JST

HTML5 のテーマのhtml属性とhead属性他

  • Wednesday, May 06 2015 @ 09:28 PM JST
  • 投稿者:
  • 表示回数 2,654
Geeklog

GeeklogでHTML5テーマを開発する場合に、注意する点は以下です。

1.functions.phpでHTML5を宣言

1.functions.phpのfunction theme_config_テーマ名()を以下のように修正してください。コンフィギュレーションのテーマでのDOCTYPE宣言よりこちらを優先します。

function theme_config_テーマ名()
{
    return array(
        'image_type' => 'png',
        'doctype' => 'xhtml5',
        'etag' => true,
        'supported_version_theme' => '2.1.0' 
    );
}

2. header.thtml

HTML5では、html タグは、xlmns属性が不要になりました。
{doctype}
<html{html_attribute}>
<head>
なお、本家版は{lang_attribute}です。{html_attribute}は日本語版のみが提供するテーマ変数です。
{doctype}
<html{lang_attribute}{xmlns}>
<head>
以下HTML5ではデフォルトとなるため不要です。
<meta http-equiv="content-style-type" content="text/css">
<meta http-equiv="content-script-type" content="text/javascript">