{% if page and page.meta.language %}
<!DOCTYPE html lang="{{ page.meta.language }}">
{% else %}
<!DOCTYPE html lang="{{ config.language }}">
{% endif %}
<head>
  <meta charset="utf-8">
  <meta http-equiv="x-ua-compatible" content="ie=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

  {% if page and page.meta.language %}
  <meta http-equiv="content-language" content="{{ page.meta.language }}">
{% else %}
<meta http-equiv="content-language" content="{{ config.language }}">
{% endif %}

  <meta http-equiv="content-language" content="{{ config.language }}">
    {% if page and page.meta.summary %}
    <meta property="og:site_name" content="{{ config.site_name }}" />
    <meta property="og:type" content="website" />
    <meta property="og:title" content="{% if page.title %}{{ page.title }} | {% endif %}{{ config.site_name }}" />
    {% if page and page.meta.summary %}
    
    <meta name="description" content="{{ page.meta.summary }}">
      <meta property="og:description" content="{{ page.meta.summary }}" />
      <meta name="twitter:description" content="{{ page.meta.summary }}" />
    {% endif %}
    {% if page and page.meta.image %}
    <meta property="og:image" content="{{ page.meta.image|url }}" />
    {% else %}
    <meta property="og:image" content="{{ config.image|url }}" />
    {% endif %}
    <meta name="twitter:card" content="Summary Card" />
    {% endif %}

    {% if config.site_short_name %}
    <title>{% if page.title %}{{ page.title }} | {% endif %}{{ config.site_short_name }}</title>
    {% else %}
    <title>{% if page.title %}{{ page.title }} | {% endif %}{{ config.site_name }}</title>
    {% endif %}
  

  {% if config.favicon %}
  <link rel="favicon" href="{{ config.favicon|url }}">
  {% endif %}
  <script async>var base_url = '{{ base_url }}';</script>
  <script src="https://code.jquery.com/jquery-3.6.1.slim.min.js" integrity="sha256-w8CvhFs7iHNVUtnSP0YKEg00p9Ih13rlL9zGqvLdePA=" crossorigin="anonymous"></script>
{% if config.google_analytics %}
   <!-- Google tag (gtag.js) -->
<script async async src="https://www.googletagmanager.com/gtag/js?id={{config.google_analytics}}"></script>
<script async>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', '{{config.google_analytics}}');
</script>
  {% endif %}
<!-- The page supports both dark and light color schemes,
         and the page author prefers / default is light. -->
         <meta name="color-scheme" content="light dark">

         <link href="https://cdn.jsdelivr.net/npm/bootstrap-dark-5@1.1.3/dist/css/bootstrap-nightshade.min.css" rel="stylesheet" media="not print">
         <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" media="print">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.8.0/font/bootstrap-icons.css">
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous"></script>
  <link rel="stylesheet" href="{{ "css/theme.css"|url }}">

  <link rel="stylesheet"
      href="//cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.6.0/build/styles/default.min.css">
  <script async src="//cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.6.0/build/highlight.min.js"></script>
  
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/pygments-rouge-css@0.1.0/vs.min.css">

  {% for path in config.extra_css %}
    <link href="{{ path|url }}" rel="stylesheet">
  {% endfor %}
 

  {% block extrahead %}
  {% endblock %}
</head>

<body>
  <script>
    "use strict";class DarkMode{constructor(){this._hasGDPRConsent=!1,this.cookieExpiry=365,"loading"===document.readyState?document.addEventListener("DOMContentLoaded",(function(){DarkMode.onDOMContentLoaded()})):DarkMode.onDOMContentLoaded()}get inDarkMode(){return DarkMode.getColorScheme()==DarkMode.VALUE_DARK}set inDarkMode(e){this.setDarkMode(e,!1)}get hasGDPRConsent(){return this._hasGDPRConsent}set hasGDPRConsent(e){if(this._hasGDPRConsent=e,e){const e=DarkMode.readCookie(DarkMode.DATA_KEY);e&&(DarkMode.saveCookie(DarkMode.DATA_KEY,"",-1),localStorage.setItem(DarkMode.DATA_KEY,e))}else{const e=localStorage.getItem(DarkMode.DATA_KEY);e&&(localStorage.removeItem(DarkMode.DATA_KEY),DarkMode.saveCookie(DarkMode.DATA_KEY,e))}}get documentRoot(){return document.getElementsByTagName("html")[0]}static saveCookie(e,o="",t=365){let a="";if(t){const e=new Date;e.setTime(e.getTime()+24*t*60*60*1e3),a="; expires="+e.toUTCString()}document.cookie=e+"="+o+a+"; SameSite=Strict; path=/"}saveValue(e,o,t=this.cookieExpiry){this.hasGDPRConsent?DarkMode.saveCookie(e,o,t):localStorage.setItem(e,o)}static readCookie(e){const o=e+"=",t=document.cookie.split(";");for(let e=0;e<t.length;e++){const a=t[e].trim();if(a.startsWith(o))return a.substring(o.length)}return""}readValue(e){if(this.hasGDPRConsent)return DarkMode.readCookie(e);{const o=localStorage.getItem(e);return o||""}}eraseValue(e){this.hasGDPRConsent?this.saveValue(e,"",-1):localStorage.removeItem(e)}getSavedColorScheme(){const e=this.readValue(DarkMode.DATA_KEY);return e||""}getPreferedColorScheme(){return window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?DarkMode.VALUE_DARK:window.matchMedia&&window.matchMedia("(prefers-color-scheme: light)").matches?DarkMode.VALUE_LIGHT:""}setDarkMode(e,o=!0){const t=document.querySelectorAll("[data-"+DarkMode.DATA_SELECTOR+"]");if(0==t.length)e?(this.documentRoot.classList.remove(DarkMode.CLASS_NAME_LIGHT),this.documentRoot.classList.add(DarkMode.CLASS_NAME_DARK)):(this.documentRoot.classList.remove(DarkMode.CLASS_NAME_DARK),this.documentRoot.classList.add(DarkMode.CLASS_NAME_LIGHT));else for(let o=0;o<t.length;o++)t[o].setAttribute("data-"+DarkMode.DATA_SELECTOR,e?DarkMode.VALUE_DARK:DarkMode.VALUE_LIGHT);o&&this.saveValue(DarkMode.DATA_KEY,e?DarkMode.VALUE_DARK:DarkMode.VALUE_LIGHT)}toggleDarkMode(e=!0){let o;const t=document.querySelector("[data-"+DarkMode.DATA_SELECTOR+"]");o=t?t.getAttribute("data-"+DarkMode.DATA_SELECTOR)==DarkMode.VALUE_DARK:this.documentRoot.classList.contains(DarkMode.CLASS_NAME_DARK),this.setDarkMode(!o,e)}resetDarkMode(){this.eraseValue(DarkMode.DATA_KEY);const e=this.getPreferedColorScheme();if(e)this.setDarkMode(e==DarkMode.VALUE_DARK,!1);else{const e=document.querySelectorAll("[data-"+DarkMode.DATA_SELECTOR+"]");if(0==e.length)this.documentRoot.classList.remove(DarkMode.CLASS_NAME_LIGHT),this.documentRoot.classList.remove(DarkMode.CLASS_NAME_DARK);else for(let o=0;o<e.length;o++)e[o].setAttribute("data-"+DarkMode.DATA_SELECTOR,"")}}static getColorScheme(){const e=document.querySelector("[data-"+DarkMode.DATA_SELECTOR+"]");if(e){const o=e.getAttribute("data-"+DarkMode.DATA_SELECTOR);return o==DarkMode.VALUE_DARK||o==DarkMode.VALUE_LIGHT?o:""}return darkmode.documentRoot.classList.contains(DarkMode.CLASS_NAME_DARK)?DarkMode.VALUE_DARK:darkmode.documentRoot.classList.contains(DarkMode.CLASS_NAME_LIGHT)?DarkMode.VALUE_LIGHT:""}static updatePreferedColorSchemeEvent(){let e=darkmode.getSavedColorScheme();e||(e=darkmode.getPreferedColorScheme(),e&&darkmode.setDarkMode(e==DarkMode.VALUE_DARK,!1))}static onDOMContentLoaded(){let e=darkmode.readValue(DarkMode.DATA_KEY);e||(e=DarkMode.getColorScheme(),e||(e=darkmode.getPreferedColorScheme()));const o=e==DarkMode.VALUE_DARK;darkmode.setDarkMode(o,!1),window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",(function(){DarkMode.updatePreferedColorSchemeEvent()}))}}DarkMode.DATA_KEY="bs.prefers-color-scheme",DarkMode.DATA_SELECTOR="bs-color-scheme",DarkMode.VALUE_LIGHT="light",DarkMode.VALUE_DARK="dark",DarkMode.CLASS_NAME_LIGHT="light",DarkMode.CLASS_NAME_DARK="dark";const darkmode=new DarkMode;
  </script>
  {% if not config.disable_header %}
    <header>
    <nav class="navbar navbar-expand-sm navbar-toggleable-sm  border-bottom box-shadow mb-3">
      <div class="container">
          <a class="navbar-brand text-body" asp-area="" href="{{ "/"|url }}">
            {% if config.logo %}
            <img src="{{ config.logo|url }}" alt="{{ config.site_name }}" width="28" height="28"/>
            {% endif%}
            {{ config.site_name }}
          </a>
          <div class="navbar-collapse collapse d-sm-inline-flex justify-content-between print-hide">
              <p></p>
              <div class="d-none d-md-flex input-group mb-3" style="max-width: 300px;">
                <button class="btn btn-outline-secondary" onclick="darkmode.toggleDarkMode();" type="button"><i class="bi bi-brightness-high"></i></button>
                
              {% if config.visible_search!=false %}
                  <input class="form-control me-2" type="search" id="searchbox" placeholder="{{ config.site_name }}で検索" aria-label="検索"/>
                  <button class="btn btn-outline-secondary" type="button" onclick="search(false);">
                      <i class="bi bi-search"></i>
                  </button>
                  {% endif %}
              </div>
          </div>
      </div>
  </nav>
  <nav class="navbar border-bottom box-shadow mb-3 d-md-none  print-hide">
    <div class="container">
        <div class="navbar-collapse d-flex">
          <p>
            <div class="d-flex input-group mb-3">
              {% if page and page.meta.disable_nav %}
              <!-- NAV -->
              {% else %}
              <button class="btn btn-outline-secondary" onclick="toggle_nav(this);" type="button" data-bs-toggle="collapse" data-bs-target="#nav" title="ナビゲーションを表示"><i class="bi bi-book"></i></button>
              {% endif %}
              <button class="btn btn-outline-secondary" onclick="darkmode.toggleDarkMode();" type="button"><i class="bi bi-brightness-high"></i></button>
              
              {% if config.visible_search %}
              <input class="form-control" type="search" id="searchbox_mobile" placeholder="{{ config.site_name }}で検索" aria-label="検索">
              <button class="btn btn-outline-secondary" type="button" onclick="search(true);"><i class="bi bi-search"></i></button>
              {% endif %}
              {% if page and page.meta.disable_tol %}
               <!-- TOL -->
              {% else %}
              {% if page.toc %}
              <button class="btn btn-outline-secondary" onclick="toggle_toc(this);" type="button" data-bs-toggle="collapse" data-bs-target="#tol"><i class="bi bi-list-ul"></i></button>
              {% endif %}
              {% endif %}
          </div>
          </p>
        </div>
    </div>
</nav>
</header>
{% endif %}
  <div class="container">
    <main role="main" class="pb-3">
      <div class="row">
        
    {% if page and page.meta.disable_nav %}
    <!-- NAV -->
    {% else %}
    <div class="col-12 col-md-2 print-hide">
      <div class="collapse d-md-block text-nowrap" id="nav"  style="overflow-x:scroll;">
        <ul class="list-group list-group-flush">
        {% for nav_item in nav %}
        {% if not nav_item.children %}
        <li class="list-group-item"><a class="text-decoration-none {% if not nav_item.active %} text-muted{% else %} text-body{% endif %}" href="{{ nav_item.url|url }}">{{ nav_item.title }}</a></li>
        {% else %}
        <li class="list-group-item">
          <a class="nav_cop {% if not nav_item.active %} text-muted{% else %} text-body{% endif %}" aria-expanded="false" data-bs-toggle="collapse" role="button" >{{ nav_item.title }}</a>
          <ul class="collapse list-group list-group-flush {% if nav_item.active %}show{% endif %} ">
            {% include "nav.html" %}
          </ul>
        </li>
        {% endif %}
        {% endfor %}
      </ul>
      </div>
    </div>
    {% endif %}
       {% block main_content %}
       {% endblock %}
      </div>
      </div>
      <script src="{{ "js/theme.js"|url }}"></script>
      {% for path in config.extra_javascript %}
    <script async src="{{ path|url }}"></script>
      {% endfor %}
    </main>
  </div>
  
  {% if not config.disable_footer %}
  <footer class="border-top footer text-muted .position-absolute.bottom-0.start-50.translate-middle-x" style="padding-top:15px;">
    <div class="container">
      <div class="row">
        <div class="col-md">
          {% if config.copyright %}
          <p>{{ config.copyright }}</p>
          {% endif %}
        </div>
        {% if config.footimg %}
        <div class="col-md-1">
          <p>
            <img class="fit-picture" src="{{ config.footimg|url }}" height="30em" width="30em">
          </p>
        </div>
        {% endif %}
      </div>
    </div>
  </footer>
  {% endif %}

<div class="modal fade" id="searchModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="searchModal" aria-hidden="true">
  <div class="modal-dialog modal-lg print-hide">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title" id="searchModalLabel">検索</h5>
        <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="閉じる"></button>
      </div>
      <div class="modal-body">
        <div class="input-group mb-3">
          <input id="mkdocs-search-query" type="text" class="form-control" aria-label="検索" aria-describedby="inputGroup-sizing-default">
        </div>
        <div id="mkdocs-search-results">
          No results found
        </div>

      </div>
    </div>
  </div>
</div>
  <script async src="https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js"></script>
  <script async>mermaid.initialize({startOnLoad: true});</script>
</body>
</html>
