<!DOCTYPE html>
<html>
<head>
<title>{% if nav.title %}{{nav.title}}{% else %}Repositories{% endif %}</title>
<script>
window.jsVars = {};
{% if nav %}
window.jsVars['baseUrl'] = `{{ repoConfig.repos[nav.repoName].baseUrl | jsonStringify | safe }}`;
window.jsVars['nav'] = {{nav | jsonStringify | safe}};
window.jsVars['cloneDiv'] = `<label class="form-label">HTTPS URL</label>
<div class="input-group d-flex flex-nowrap">
<span class="clone overflow-hidden input-group-text">
{% set url = repos[nav.repoName].cloneUrl %}
{{ url }}
</span>
<button data-clone-url="{{url}}" class="btn btn-primary" id="clone-button">Copy</button>
</div>`;
{% endif %}
</script>
<script src="{{reposPath}}/frontend/top.js"></script>
<link rel="stylesheet" id="prism-theme" type="text/css" href="{{reposPath}}/vendor/prism.css" />
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.5/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-SgOJa3DmI69IUzQ2PVdRZhwQ+dy64/BUtbMJw1MZ8t5HZApcHrRKUc4W0kG879m7" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.6/dist/js/bootstrap.bundle.min.js" integrity="sha384-j1CDi7MgGQ12Z7Qab0qlWQ/Qqz24Gc6BM0thvEMVjHnfYGF0rmFCozFSxQBxwHKO" crossorigin="anonymous"></script>
<link rel="stylesheet" type="text/css" href="{{reposPath}}/vendor/main.css" />
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<div class="container-lg">
<div class="row pt-5">
<div class="col">
<header>
<div class="row d-flex justify-content-between pb-3">
<div class="col-auto">
<nav class="fs-4">
<a href="{% if reposPath == "" %}/{% else %}{{reposPath}}{% endif %}">Repositories</a>{% if nav.repoName %}<span class="text-secondary mx-2">></span><a href="{{reposPath}}/{{nav.repoName | slugify}}/branches/{{reposConfig.repos[nav.repoName].defaultBranch | slugify}}">{{nav.repoName}}</a>{% endif %}
</nav>
</div>
<div class="col-auto d-flex align-items-center">
<div class="dropdown">
<button class="dropdown-toggle btn" id="dark-mode-switch" type="button" data-bs-toggle="dropdown" aria-expanded="false">
<i class="bi bi-brightness-high"></i>
</button>
<ul class="dropdown-menu">
<li><button class="btn" data-theme-pref="light" onclick="toggleDarkMode(this)"><i class="bi bi-brightness-high mx-1"></i>Light</button></li>
<li><button class="btn" data-theme-pref="dark" onclick="toggleDarkMode(this)"><i class="bi bi-moon mx-1"></i>Dark</button></li>
<li><button class="btn" data-theme-pref="auto" onclick="toggleDarkMode(this)"><i class="bi bi-yin-yang mx-1"></i>Auto</button></li>
</ul>
</div>
</div>
</div>
{% if nav.repoName %}
<div class="row mb-4">
<div class="col-12 col-md order-2 order-md-1 pe-0">
<nav class="nav-tabs">
<ul class="nav">
<li class="nav-item">
<a class="nav-link {% if navTab == "landing" %}active{% endif %}" href="{{reposPath}}/{{nav.repoName | slugify}}/branches/{{nav.branchName | slugify}}">Landing Page</a>
</li>
<li class="nav-item">
<a class="nav-link {% if navTab == "files" %}active{% endif %}" href="{{reposPath}}/{{nav.repoName | slugify}}/branches/{{nav.branchName | slugify}}/files">Files</a>
</li>
<li class="nav-item">
<a class="nav-link {% if navTab == "patches" %}active{% endif %}" href="{{reposPath}}/{{nav.repoName | slugify}}/branches/{{nav.branchName | slugify}}/patches/page1">Changes</a>
</li>
<li class="nav-item">
<a class="nav-link {% if navTab == "branches" %}active{% endif %}" href="{{reposPath}}/{{nav.repoName | slugify}}/branches/{{nav.branchName | slugify}}/list">Branches</a>
</li>
</ul>
</nav>
</div>
<div class="col-12 col-md-auto order-1 order-md-2 pb-2 pb-md-0 mb-2 mb-md-0 border-bottom">
<div class="row">
<div class="col-auto px-2">
<button type="button" id="clone-popover-btn" class="btn btn-sm btn-primary" data-bs-toggle="popover" data-bs-placement="bottom">Clone <i class="bi bi-caret-down-fill"></i></button>
</div>
<div class="col-auto px-2">
<div class="input-group input-group-sm">
<span class="input-group-text">Branch</span>
<select class="form-select" onchange="selectBranch(this)" aria-label="Repository branch selector">
{% for branch in branches %}
{% if branch.repoName == nav.repoName %}
<option value="{{branch.repoName | slugify}},{{branch.branchName | slugify}},{{nav.path}}" {% if branch.branchName == nav.branchName %}selected{% endif %}>{{branch.branchName}}</option>
{% endif %}
{% endfor %}
</select>
</div>
</div>
</div>
</div>
</div>
{% endif %}
</header>
</div>
</div>
</div>
<div class="container-{% if width == "full"%}fluid{% else %}lg{% endif %}">
<div class="row">
<div class="col">