| | </head> |
| | <body> |
| | - <div class="container"> |
| | - <header> |
| | - <h1><?php echo SITE_TITLE; ?></h1> |
| | - <nav class="nav"> |
| | - <a href="?">Home</a> |
| | - <?php if ($currentRepo): ?> |
| | - <a href="?repo=<?php echo urlencode($currentRepo['safe_name']); ?>">Files</a> |
| | - <a href="?action=commits<?php echo $repoParam; ?>">Commits</a> |
| | - <a href="?action=refs<?php echo $repoParam; ?>">Branches</a> |
| | - <?php endif; ?> |
| | - </nav> |
| | +<div class="container"> |
| | + <header> |
| | + <h1><?php echo SITE_TITLE; ?></h1> |
| | + <nav class="nav"> |
| | + <a href="?">Home</a> |
| | + <?php if ($currentRepo): ?> |
| | + <a href="?repo=<?php echo urlencode($currentRepo['safe_name']); ?>">Files</a> |
| | + <a href="?action=commits<?php echo $repoParam; ?>">Commits</a> |
| | + <a href="?action=refs<?php echo $repoParam; ?>">Branches</a> |
| | + <?php endif; ?> |
| | |
| | - <?php if ($currentRepo): ?> |
| | - <div class="repo-selector"> |
| | - <label>Repository:</label> |
| | - <select onchange="window.location.href='?repo=' + encodeURIComponent(this.value)"> |
| | - <option value="">Select repository...</option> |
| | - <?php foreach ($repositories as $repo): ?> |
| | - <option value="<?php echo htmlspecialchars($repo['safe_name']); ?>" <?php echo $repo['safe_name'] === $currentRepo['safe_name'] ? 'selected' : ''; ?>> |
| | - <?php echo htmlspecialchars($repo['name']); ?> |
| | - </option> |
| | - <?php endforeach; ?> |
| | - </select> |
| | - </div> |
| | + <?php if ($currentRepo): ?> |
| | + <div class="repo-selector"> |
| | + <label>Repository:</label> |
| | + <select onchange="window.location.href='?repo=' + encodeURIComponent(this.value)"> |
| | + <option value="">Select repository...</option> |
| | + <?php foreach ($repositories as $repo): ?> |
| | + <option value="<?php echo htmlspecialchars($repo['safe_name']); ?>" <?php echo $repo['safe_name'] === $currentRepo['safe_name'] ? 'selected' : ''; ?>> |
| | + <?php echo htmlspecialchars($repo['name']); ?> |
| | + </option> |
| | + <?php endforeach; ?> |
| | + </select> |
| | + </div> |
| | + <?php endif; ?> |
| | + </nav> |
| | |
| | - <div style="margin-top: 15px;"> |
| | - <span class="current-repo"> |
| | - Current: <strong><?php echo htmlspecialchars($currentRepo['name']); ?></strong> |
| | - </span> |
| | - </div> |
| | - <?php endif; ?> |
| | - </header> |
| | + <?php if ($currentRepo): ?> |
| | + <div style="margin-top: 15px;"> |
| | + <span class="current-repo"> |
| | + Current: <strong><?php echo htmlspecialchars($currentRepo['name']); ?></strong> |
| | + </span> |
| | + </div> |
| | + <?php endif; ?> |
| | + </header> |
| | |
| | <?php |