{% extends "base.html" %}

{% block libs %}
    {{ super() }}

    <!-- 
    IMPORTANT: Don't use boostrap in particular boostrap.css since it comes into conflict with mkdocs-material theme.
    Prefer low-level tools based on Jquery or JS library such as Tippyjs to get the work done.
    -->

    <!-- Jquery from Google CDN -->
    <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>

    <!-- Load Jquery UI -->
    <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.min.js"></script>
    <link rel="stylesheet" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">

    <!-- Handle jQuery plugin naming conflict between jQuery UI and Bootstrap
    https://stackoverflow.com/questions/13731400/jqueryui-tooltips-are-competing-with-twitter-bootstrap
    <script>
      $.widget.bridge('uibutton', $.ui.button);
      $.widget.bridge('uitooltip', $.ui.tooltip);
    </script>
    -->

    <!-- jQuery Modal -->
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-modal/0.9.1/jquery.modal.min.js"></script>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jquery-modal/0.9.1/jquery.modal.min.css" />

    <!-- Tippyjs for popovers https://atomiks.github.io/tippyjs/ -->
    <script src="https://unpkg.com/@popperjs/core@2"></script>
    <script src="https://unpkg.com/tippy.js@6"></script>

    <!-- font-awesome -->
    <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">

    <!--Pace support. http://github.hubspot.com/pace/ -->
    <script src="https://cdnjs.cloudflare.com/ajax/libs/pace/1.0.2/pace.min.js"></script>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/pace/1.0.2/themes/white/pace-theme-big-counter.min.css" />

    <script>
        paceOptions = {
            ajax: true,      // disabled
            document: true,  // activated
            eventLag: false  // disabled
            //target: 'article'
            //elements: {selectors: ['.my-page']}
        };
    </script>

    <!-- MathJax support
    <script type="text/javascript" async 
        src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-MML-AM_CHTML">
    </script> 
    -->

    <!-- This version is compatible with plotly. -->
    <script type="text/javascript" async 
        src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_SVG">
    </script> 

    <!-- Configure MathJax to produce automatic equation numbers http://docs.mathjax.org/en/latest/tex.html -->
    <script type="text/x-mathjax-config">
      MathJax.Hub.Config({
        //jax: ["input/TeX","output/HTML-CSS"],
        //tex2jax: {inlineMath: [['$','$']]},
        //displayAlign: "center",
        TeX: {
            equationNumbers: { autoNumber: "AMS" },
            extensions: ["AMSmath.js", "boldsymbol.js"],
            Macros: {
                "*": "{\\dagger}",
                "ra": "{\\rangle}",
                "la": "{\\langle}",
                // Workaround for bm package. See https://github.com/mathjax/MathJax/issues/1219
                bm: ["{\\boldsymbol #1}",1],
                // Mathcal symbols
                mcL: "{\\mathcal{L}}",
                mcG: "{\\mathcal{G}}",
                mcR: "{\\mathcal{R}}",
                mcS: "{\\mathcal{S}}",
                mcC: "{\\mathcal{C}}",
                mcO: "{\\mathcal{O}}",
                // Acronyms
                KS: "{\\text{KS}}",
                eph: "{\\text{e-ph}}",
                ee: "{\\text{e-e}}",
                phph: "{\\text{ph-ph}}",
                FM: "{\\text{FM}}",
                DW: "{\\text{DW}}",
                QP: "{\\text{QP}}",
                BZ: "{\\text{BZ}}",
                sign: "{\\text{sign}}",
                xc: "{\\text{xc}}",
                tchi: "{\\tilde\\chi}",
                // Symbols commonly used (k-points, eigenvalues ...)
                rr: "{\\bf r}",
                RR: "{\\bf R}",
                tt: "{\\bf t}",
                GG: "{\\bf G}",
                kk: "{\\bf k}",
                qq: "{\\bf q}",
                kq: "{\\kk + \\qq}",
                qG: "{\\bf q + G}",
                kG: "{\\bf k + G}",
                kmq: "{\\kk - \\qq}",
                kpq: "{\\kk + \\qq}",
                kpG: "{\\kk + \\GG}",
                qpG: "{\\qq + \\GG}",
                nk: "{n \\kk}",
                mk: "{, \\kk}",
                nks: "{n \\kk\\sigma}",
                mks: "{m \\kk\\sigma}",
                enk: "{\\varepsilon_\\nk}",
                emkq: "{\\varepsilon_{m\\kk+\\qq}}",
                qnu: "{\\qq \\nu}",
                wqnu: "{\\omega_{\\qnu}}",
                vnk: "{\\mathbf{v}_{n\\kk}}",
                vmkq: "{\\mathbf{v}_{m\\kk+\\qq}}",
                vnka: "{\\mathrm{v}_{n\\kk,\\alpha}}",
                vnkb: "{\\mathrm{v}_{n\\kk,\\beta}}",
                ef: "{\\varepsilon_F}",
                // EPH quantities
                gkkp: "{g_{mn\\nu}(\\kk,\\qq)}",
                gkq: "{g_{mn\\nu}(\\kk,\\qq)}",
                //\newcommand{\gkkpL}{g_{mn\nu}^\Lc(\kb,\qb)}
                // Many-body theory
                Go: "{G_0}",
                Wo: "{W_0}",
                Ueff: "{U_{\\text{eff}}}",
                // Greek symbols + tilde version
                ee: "{\\epsilon}",
                tee: "{\\tilde{\\epsilon}}",
                ww: "{\\omega}",
                tww: "{\\tilde\\omega}",
                dd: "{\\,\\text{d}}",
                vxc: "{v_\\xc}",
                // symrel
                Ri: "{\\mcR^{-1}}",
                Rit: "{\\mcR^{-1\\tau}}",
                // symrec
                Si: "{\\mcS^{-1}}}",
                Sit: "{\\Si^\\tau}}",
                // partial and functional derivative.
                PDER: ["{\\dfrac{\\partial #1}{\\partial #2}}", 2],
                FDER: ["{\\dfrac{\\delta #1}{\\delta #2}}", 2],
                // PAW
                tPsi: "{\\tilde\\Psi}",
                tpsi: "{\\tilde\\psi}",
                tPhi: "{\\tilde\\Phi}",
                tphi: "{\\tilde\\phi}",
                tprj: "{\\tilde p}"
            }
          }
      });
    </script>

    {% if page.meta and page.meta.plotly %}
        <!-- Plotly support -->
        <script type="text/javascript" src="https://cdn.plot.ly/plotly-latest.min.js"></script> 
    {% endif %}

    {% if page.meta and page.meta.light_gallery %}
        <!-- lightgallery support. See https://github.com/sachinchoolur/lightGallery-->
        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/lightgallery/1.6.0/css/lightgallery.min.css" 
            integrity="sha256-6hdzBLI5YrM1ltRrsPdV0y2CsqGgLYCeNlLFFQoh7MY=" crossorigin="anonymous" />

        <!-- A jQuery plugin that adds cross-browser mouse wheel support. (Optional) -->
        <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.1.13/jquery.mousewheel.min.js"></script>

        <script src="https://cdnjs.cloudflare.com/ajax/libs/lightgallery/1.6.0/js/lightgallery-all.min.js" 
            integrity="sha256-n9ZE2vNe6Iv4S6dUXnzuvvt2yLWOZPJqD787TC7S4W4=" crossorigin="anonymous"></script>
    {% endif %}

    <!-- Load fonts used for input variables -->
    <link href="https://fonts.googleapis.com/css?family=Inconsolata" rel="stylesheet">
{% endblock %}


{% block content %}
{{ super() }}

<!-- 
Add dropdown button with toolbar (based on https://bootsnipp.com/snippets/featured/inbox-by-gmail)
and return to Top button (based on https://codepen.io/rdallaire/pen/apoyx)
-->
<div class="md-container">
  <div class="row">
    <div id="inbox">
      <div class="fab btn-group show-on-hover dropup">
        <div data-toggle="tooltip" data-placement="left" title="Menu" style="margin-left: 42px;">
          <button id="return-to-top" type="button" class="btn btn-primary btn-io dropdown-toggle" data-toggle="dropdown">
            <span class="fa-stack fa-2x">
               <i class="fa fa-circle fa-stack-2x fab-backdrop"></i>
               <i class="fa fa-chevron-up fa-stack-1x fa-inverse fab-primary"></i>
               <i class="fa fa-map-signs fa-stack-1x fa-inverse fab-secondary"></i>
            </span>
          </button>
        </div>
        <ul class="dropdown-menu dropdown-menu-right" role="menu">
        {% set icons = [
          "fa-info-circle",
          "fa-terminal", 
          "fa-book", 
          "fa-graduation-cap", 
          "fa-file-text-o", 
          "fa-question", 
          "fa-user-circle-o", 
          ] %}
        {% for nav_item in nav | reverse %}
          <li>
            <a href="{{ (nav_item.children | first).canonical_url }}" 
               data-toggle="popover" data-tippy-content="{{ nav_item.title }}">
               <i class="fa {{ icons[loop.index0] }}"></i>
            </a>
          </li>
        {% endfor %}
        </ul>
      </div>
    </div>
  </div>
</div>
{% endblock %}

<!--
MkDocs version : {{ mkdocs_version }}
Build Date UTC : {{ build_date_utc }}
-->
