82 lines
4.1 KiB
Plaintext
82 lines
4.1 KiB
Plaintext
<!DOCTYPE html>
|
||
<html lang="ja">
|
||
<head>
|
||
<meta content="text/html; charset=utf-8" http-equiv="content-type" />
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||
<link rel="icon" href="/favicon.ico" id="favicon">
|
||
<title>{{ SITEINFO['title'] }}: {{ $pagetit }}</title>
|
||
<link rel="stylesheet" type="text/css" href="/static/style.css" />
|
||
{@ if (isset($custCss) && !empty($custCss) && !is_bool($custCss)) @}
|
||
{@ foreach ($custCss as $css) @}
|
||
{{{ $css }}}
|
||
{@ endforeach @}
|
||
{@ endif @}
|
||
{@ if (isset($meta)) @}
|
||
{@ if (isset($meta->author)) @}
|
||
<meta name="author" content="{{ $meta->author }}" />
|
||
{@ endif @}
|
||
{@ if (isset($meta->thumbnail) && !empty($meta->thumbnail)) @}
|
||
<meta name="thumbnail" content="/static/{{ $meta->thumbnail }}" />
|
||
{@ endif @}
|
||
{@ endif @}
|
||
<meta name="description" content="{{ $description }}" />
|
||
<meta name="keywords" content="{{ SITEINFO['tags'].(isset($meta->category) ? ',' : '') }}{@ if (isset($meta) && isset($meta->category)) @}{@ foreach ($meta->category as $k => $cat) @}{{ $cat.($k === array_last($meta->category) ? '' : ',') }}{@ endforeach @}{@ endif @}" />
|
||
|
||
<meta property="og:title" content="{{ SITEINFO['title'] }}: {{ $pagetit }}" />
|
||
<meta property="og:description" content="{{ $description }}" />
|
||
<meta property="og:locale" content="{{ str_contains($_SERVER['REQUEST_URI'], '/enblog') ? 'en_US' : 'ja_JP' }}" />
|
||
<meta property="og:site_name" content="{{ SITEINFO['title'] }}" />
|
||
<meta property="og:type" content="{{ isset($meta) && isset($meta->thumbnail) ? 'article' : 'website' }}" />
|
||
<meta property="og:url" content="{{ isset($_SERVER['REQUEST_URI']) ? 'https://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'] : 'https://'.$_SERVER['HTTP_HOST'] }}" />
|
||
{@ if (isset($meta) && isset($meta->thumbnail) && !empty($meta->thumbnail)) @}
|
||
<meta property="og:image" content="https://{{ $_SERVER['HTTP_HOST'] }}/static/article/{{ $meta->thumbnail }}" />
|
||
<meta property="og:image:secure_url" content="https://{{ $_SERVER['HTTP_HOST'] }}/static/article/{{ $meta->thumbnail }}" />
|
||
{$ $imgspec = getImageInfo('/public/static/article/'.$meta->thumbnail)->fullInfo; $}
|
||
<meta property="og:image:type" content="{{ $imgspec->type }}" />
|
||
<meta property="og:image:width" content="{{ $imgspec->width }}" />
|
||
<meta property="og:image:height" content="{{ $imgspec->height }}" />
|
||
<meta property="og:image:alt" content="{{ $meta->title }}" />
|
||
{@ endif @}
|
||
|
||
{@ if (TWITTER_HANDLE != '') @}
|
||
<meta name="twitter:card" content="summary_large_image" />
|
||
<meta name="twitter:site" content="{{ TWITTER_HANDLE }}" />
|
||
<meta name="twitter:creator" content="{{ TWITTER_HANDLE }}" />
|
||
<meta name="twitter:title" content="{{ SITEINFO['title'] }}: {{ $pagetit }}" />
|
||
<meta name="twitter:url" content="{{ isset($_SERVER['REQUEST_URI']) ? 'https://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'] : 'https://'.$_SERVER['HTTP_HOST'] }}" />
|
||
<meta name="twitter:description" content="{{ $description }}" />
|
||
{@ if (isset($meta) && isset($meta->thumbnail) && !empty($meta->thumbnail)) @}
|
||
<meta name="twitter:image:src" content="https://{{ $_SERVER['HTTP_HOST'] }}/static/article/{{ $meta->thumbnail }}" />
|
||
{@ endif @}
|
||
{@ endif @}
|
||
{@ if (ATOM_ENABLED) @}
|
||
<link rel="alternate" type="application/atom+xml" title="{{ SITEINFO['title'] }} feed" href="/blog.atom" />
|
||
{@ endif @}
|
||
</head>
|
||
<body>
|
||
<div class="container">
|
||
<header>
|
||
<div class="logo">
|
||
{{ SITEINFO['title'] }}{{ "\n" }}
|
||
</div>
|
||
<nav>
|
||
{@ foreach ($menu as $m) @}
|
||
{@ if ($m['show']) @}
|
||
<a class="{{ $m['class'] }}{{ $curPage == $m['page'] ? ' active' : '' }}" href="{{ $m['href'] }}">{{ $m['text'] }}</a>
|
||
{@ endif @}
|
||
{@ endforeach @}
|
||
{@ if (AUTH_ENABLED) @}
|
||
<div>
|
||
{@ if (isset($user) && isset($user->id) && $user->id > 0) @}
|
||
お帰りなしゃ~い、<a style="text-decoration: none;" href="/profile/{{ $user->username }}">{{{ namecolor($user) }}}</a>! (<a href="/logout">ログアウト</a>)
|
||
{@ else @}
|
||
<a href="/login">ログイン</a>
|
||
{@ if (AUTH_REGISTER_ENABLED) @}
|
||
| <a href="/register">登録</a>
|
||
{@ endif @}
|
||
{@ endif @}
|
||
</div>
|
||
{@ endif @}
|
||
</nav>
|
||
</header>
|
||
<main> |