<!DOCTYPE html>
<html lang="{{ app()->getLocale() }}">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">

  <!-- CSRF Token -->
  <meta name="csrf-token" content="{{ csrf_token() }}">
  <title>テクニカル諏訪子</title>
  <!-- Styles -->
  <link rel="shortcut icon" href="/img/favicon.jpeg">
  <link rel="apple-touch-icon" sizes="57x57" href="/apple-icon-57x57.png">
  <link rel="apple-touch-icon" sizes="60x60" href="/apple-icon-60x60.png">
  <link rel="apple-touch-icon" sizes="72x72" href="/apple-icon-72x72.png">
  <link rel="apple-touch-icon" sizes="76x76" href="/apple-icon-76x76.png">
  <link rel="apple-touch-icon" sizes="114x114" href="/apple-icon-114x114.png">
  <link rel="apple-touch-icon" sizes="120x120" href="/apple-icon-120x120.png">
  <link rel="apple-touch-icon" sizes="144x144" href="/apple-icon-144x144.png">
  <link rel="apple-touch-icon" sizes="152x152" href="/apple-icon-152x152.png">
  <link rel="apple-touch-icon" sizes="180x180" href="/apple-icon-180x180.png">
  <link rel="apple-touch-icon" href="/apple-touch-icon.png" />
  <link rel="apple-touch-icon" sizes="57x57" href="/apple-touch-icon-57x57.png" />
  <link rel="apple-touch-icon" sizes="72x72" href="/apple-touch-icon-72x72.png" />
  <link rel="apple-touch-icon" sizes="76x76" href="/apple-touch-icon-76x76.png" />
  <link rel="apple-touch-icon" sizes="114x114" href="/apple-touch-icon-114x114.png" />
  <link rel="apple-touch-icon" sizes="120x120" href="/apple-touch-icon-120x120.png" />
  <link rel="apple-touch-icon" sizes="144x144" href="/apple-touch-icon-144x144.png" />
  <link rel="apple-touch-icon" sizes="152x152" href="/apple-touch-icon-152x152.png" />
  <link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon-180x180.png" />
  <link rel="icon" type="image/png" sizes="192x192"  href="/android-icon-192x192.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
  <link rel="icon" type="image/png" sizes="96x96" href="/favicon-96x96.png">
  <link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
  <link rel="manifest" href="/manifest.json">
  <meta name="Description" content="テクニカル諏訪子のホームページ">
  <meta name="msapplication-TileColor" content="#3daee9">
  <meta name="msapplication-TileImage" content="/ms-icon-144x144.png">
  <meta name="theme-color" content="#3daee9">
  <link href="{{ asset('css/app.css') }}" rel="stylesheet">
</head>
<body>
  <nav class="navbar fixed-top navbar-dark bg-dark navbar-expand-md">
    <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#hide-smaho" aria-controls="hide-smaho" aria-expanded="false" aria-label="hide-smaho">
      <span class="navbar-toggler-icon"></span>
    </button>
    <div class="collapse navbar-collapse" id="hide-smaho">
      <a href="#" class="navbar-brand"><img src="/img/favicon.webp" style="border-radius: 4px;" width="30" height="30" alt="favicon" /></a>
      <ul class="navbar-nav mr-auto">
        <li class="nav-item"><a class="nav-link{{ (strpos($_SERVER['REQUEST_URI'], '/blog') !== false || $_SERVER['REQUEST_URI'] == '/' ? ' active' : '') }}" href="/">トップ</a></li>
        <li class="nav-item"><a class="nav-link{{ ($_SERVER['REQUEST_URI'] == '/passman' ? ' active' : '') }}" href="#">パスマン</a></li>
      </ul>
      <ul class="navbar-nav ml-auto">
        <li class="nav-item dropdown">
          <a class="nav-link dropdown-toggle" href="#" id="userdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
          @if ($user)
            <img src="/{{ $user->profile->avatar }}" width="25px" height="25px" alt="{{ $user->profile->showname }}のアイコン" />
            <span style="{{ $user->profile->name_style }}">{{ $user->profile->showname }}</span>
          @else
            未入会者
          @endif
          </a>
          <div class="dropdown-menu dropdown-menu-right" aria-labelledby="userdown">
          @if ($user)
            <a href="/profile/{{ $user->id }}" class="dropdown-item">プロファイルの表示</a>
            <a href="/profile/{{ $user->id }}" class="dropdown-item">プロファイルの編集</a>
            @if ($user->perm['blg_addpost'] || $user->perm['blg_addpage'] || $user->perm['blg_editpost'] || $user->perm['blg_editpage'] || $user->perm['blg_delpost'] || $user->perm['blg_delpage'])
            <div class="dropdown-divider"></div>
            @endif
            @if ($user->perm['blg_addpost'] || $user->perm['blg_addpage'])
            <a href="/content/add" class="dropdown-item">投稿の追加</a>
            @endif
            <div class="dropdown-divider"></div>
            <a href="/logout" class="dropdown-item">サインアウト</a>
          @else
            <a href="/login" class="dropdown-item">サインイン</a>
            <a href="/register" class="dropdown-item">新規登録</a>
          @endif
          </div>
        </li>
      </ul>
    </div>
  </nav>
  <main id="app">
    <section>
      <div class="container">
        <div class="row" style="padding: 32px 0;">
          <div class="col">
            <img class="img-fluid logo-img" src="/img/header.webp" alt="ヘッダー" />
            <div class="logo-c">テクニカル諏訪子</div>
            <div class="logo-br">
              <div class="logo-sns"><a href="https://www.youtube.com/user/UltimatePisman" alt="ユーチューブ"><img src="/img/youtube.webp" alt="ユーチューブのロゴ" /></a></div>
              <div class="logo-sns"><a href="https://www.nicovideo.jp/user/14848316" alt="ニコニコ動画"><img src="/img/niconico.webp" alt="ニコニコ動画のロゴ" /></a></div>
              <div class="logo-sns"><a href="https://www.bitchute.com/channel/technicalsuwako" alt="ビットチュート"><img src="/img/bitchute.webp" alt="ビットチュートのロゴ" /></a></div>
              <div class="logo-sns"><a href="https://www.twitter.com/TechnicalSuwako" alt="ツイッター"><img src="/img/twitter.webp" alt="ツイッターのロゴ" /></a></div>
              <div class="logo-sns"><a href="https://www.parler.com/profile/TechnicalSuwako/posts" alt="パルラー"><img src="/img/parler.webp" alt="パルラーのロゴ"></a></div>
              <div class="logo-sns"><discord /></div>
            </div>
          </div>
        </div>
        <div class="row nomobile">
          <div class="col-md" style="padding-bottom: 32px;">
            <div class="within" style="background-color: #31363b;">
              <appbar />
            </div>
          </div>
        </div>
        <div class="row">
          <div class="col-md-3" style="padding-bottom: 32px;">
            <div class="nav flex-column nav-pills sidemenu">
              <a href="/" class="nav-link {{ ($_SERVER['REQUEST_URI'] == '/' ? 'bara' : 'bar') }}">トップ</a>
              @foreach ($menu as $m)
                <a href="/{{ $m['slug'] }}" class="nav-link {{ ($_SERVER['REQUEST_URI'] == '/'.$m['slug'] ? 'bara' : 'bar') }}">{{ $m['title'] }}</a>
              @endforeach
            </div>
          </div>
          <div class="col-md">
            @yield('content')
          </div>
        </div>
        <div class="row">
          <div class="col-sm" style="text-align: center; margin: 20px; color: #bdc3c7;">
            テクニカル諏訪子のホームページに来まして有難う御座います。ソースコードは<a href="https://git.076.ne.jp/communities/current/076server">こちら</a>です。
          </div>
        </div>
      </div>
    </section>
  </main>

  <!-- Scripts -->
  <script src="{{ asset('js/app.js') }}"></script>
</body>
</html>
