{% assign uriPackage = page.url | remove_first: "/" | split: "/" %}
{% assign package = uriPackage[0] %}
{% assign version = uriPackage[1] %}
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="docsearch:version" content="4.0">
    <title>{{ page.title }} - {{ site.data.project.title }}</title>
    <meta name="description" content="{{ site.data.project.description }}">
    <link rel="icon" type="image/x-icon" href="//theme.thephpleague.com/img/favicon.ico" />
    <link rel="apple-touch-icon-precomposed" href="//theme.thephpleague.com/img/apple-touch-icon-precomposed.png">
    <link rel="stylesheet" href="//theme.thephpleague.com/css/all.css?2">
    <link rel="stylesheet" href="/custom.css?27">
</head>
<body>
<header>
    <div class="header-content">
        <a class="logo" href="/">
            <span class="name"><em>League\</em>Uri</span>
        </a>

        <nav>
            <h2>Packages</h2>
            <ul>
{% for v in site.data.packages.package %}
                <li{% if package == v[0] %} class="selected"{% endif %}><a href="/{{ v[0] }}/{{ v[1].documentation[0]}}/">{{ v[1].name }}</a></li>
{% endfor %}
            </ul>
        </nav>
    </div>
</header>

<input type="checkbox" id="menu">
<label for="menu" onclick>
    <div class="closed">&#9776;</div>
    <div class="open">&#10799;</div>
</label>

<main>
    <menu>
        <div class="versions-small">
        <h2>Packages</h2>
            <ul>
{% for v in site.data.packages.package %}
                <li{% if package == v[0] %} class="selected"{% endif %}><a href="/{{ v[0] }}/">{{ v[1].name }}</a></li>
{% endfor %}
            </ul>
        </div>

        <div class="menu-section">
            <h2>Versions</h2>
            <ul>
                {% for link in site.data.packages.package[package].documentation %}
                    <li {% if version == link %}class="selected"{% endif %}>
                        <a href="/{{ package}}/{{ link }}/">v{{ link }}</a>
                    </li>
                {% endfor %}
            </ul>
        </div>

        {% for section in site.data.menu.packages[package][version] %}
        <div class="menu-section">
            <h2>{{ section[0] }}</h2>
            <ul>
                {% for link in section[1] %}
                    <li {% if page.url == link[1] %}class="selected"{% endif %}>
                        <a href="{{ link[1] }}">{{ link[0] }}</a>
                    </li>
                {% endfor %}
            </ul>
        </div>
        {% endfor %}

    </menu>
    <article>
    {% if version != site.data.packages.package[package].version %}
        <p class="message-notice">Please consider using the <a href="/{{ package}}/{{ site.data.packages.package[package].version }}/">the latest stable version</a> for any production code.</p>
    {% endif %}

    {% for deprecated in site.data.project.deprecated %}
{% if deprecated[0] == package %}
        <p class="message-notice">This package is deprecated Please consider using an <a href="/{{ deprecated[1] }}">stable alternative</a> for any production code.</p>
{% endif %}
    {% endfor %}

        {{ content }}
    </article>
</main>
<aside class="sponsors hide">
    <p>Love this package ? <a href="https://github.com/sponsors/{{ site.data.project.author.github_account }}">Support its development!</a></p>
</aside>
<footer>
    <span>&copy; Copyright <a href="//thephpleague.com">The League of Extraordinary Packages</a>.</span>
    <span>Site design by <a href="//reinink.ca">Jonathan Reinink</a> and <a href="//nyamsprod.com">Ignace Nyamagana Butera</a>.</span>
</footer>

<script src="/custom.js?5"></script>
</body>
</html>
