mirror of
https://github.com/macports/macports-webapp.git
synced 2026-07-13 03:18:42 -07:00
169 lines
8.5 KiB
HTML
169 lines
8.5 KiB
HTML
{% load static %}
|
|
{% load humanize %}
|
|
{% load notifications_tags %}
|
|
|
|
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
|
<link rel="stylesheet" href="{% static 'css/bootstrap.min.css' %}">
|
|
<link rel="stylesheet" href="{% static 'css/main.css' %}">
|
|
<link rel="stylesheet" href="{% static 'css/darktheme.css' %}" />
|
|
<link rel="shortcut icon" href="{% static 'images/favicon.ico' %}" />
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"
|
|
integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1"
|
|
crossorigin="anonymous"></script>
|
|
<link rel="stylesheet" type="text/css" href="{% static 'css/all.min.css' %}">
|
|
<script src="{% static 'js/jquery-3.3.1.min.js' %}"></script>
|
|
<script src="{% static 'js/bootstrap.min.js' %}"></script>
|
|
<script src="{% static 'js/typeahead.bundle.js' %}"></script>
|
|
<script src="{% static 'js/main.js' %}"></script>
|
|
<script src="{% static 'js/handlebars.min-v4.7.6.js' %}"></script>
|
|
<script src="{% static 'js/theme.js' %}"></script>
|
|
<script src="{% static 'js/clamp.js' %}"></script>
|
|
{% block head_scripts %}
|
|
{% endblock %}
|
|
|
|
<title>{% block title %}{% endblock %} MacPorts</title>
|
|
</head>
|
|
<body>
|
|
<script>
|
|
const themeConfig = new ThemeConfig();
|
|
themeConfig.initTheme();
|
|
</script>
|
|
<nav class="navbar navbar-expand-lg navbar-light bg-light">
|
|
<div class="container">
|
|
<a class="navbar-brand py-2" href="/"><img width="140px" src="{% static 'images/macports-flat-logo.svg' %}" class="img-fluid"></a>
|
|
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent"
|
|
aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
|
<span class="navbar-toggler-icon"></span>
|
|
</button>
|
|
|
|
<div class="p-0 collapse navbar-collapse" id="navbarSupportedContent">
|
|
{% if request.path != '/' and request.path != '/search/' %}
|
|
<form class="topnav-form" method="get" action="{% url 'search' %}">
|
|
<div class="form-row">
|
|
<div class="col-12" id="bloodhound">
|
|
<input type="text" class="quick-input-search form-control rounded-pill typeahead" id="q"
|
|
name="q"
|
|
placeholder="Search for ports...">
|
|
<img class="quick-input-search-spinner" id="search-spinner"
|
|
src="{% static 'images/tspinner.gif' %}">
|
|
<button type="submit" class="quick-input-search-icon btn" id="search_submit"><i
|
|
class="fa fa-search"></i></button>
|
|
<input type="hidden" value="on" name="name">
|
|
</div>
|
|
</div>
|
|
</form>
|
|
{% endif %}
|
|
<ul class="navbar-nav ml-auto p-0">
|
|
<li class="nav-item topnav-li {% if request.path == "/" %}active{% endif %}">
|
|
<a class="nav-link topnav-a" href="/">Home</a>
|
|
</li>
|
|
<li class="nav-item topnav-li {% if request.path == "/search/" %}active{% endif %}">
|
|
<a class="nav-link topnav-a" href="{% url 'search' %}">Ports</a>
|
|
</li>
|
|
<li class="nav-item topnav-li {% if request.path == "/all_builds/" %}active{% endif %}">
|
|
<a class="nav-link topnav-a" href="{% url 'all_builds' %}">Builds</a>
|
|
</li>
|
|
<li class="nav-item topnav-li {% if '/statistics/' in request.path %}active{% endif %}" style="border: 0;">
|
|
<a class="nav-link topnav-a" href="{% url 'stats' %}">Statistics</a>
|
|
</li>
|
|
{% if user.is_authenticated %}
|
|
<li class="nav-item dropdown topnav-li">
|
|
<a class="nav-link dropdown-toggle {% if '/accounts/' in request.path %}active{% endif %}" href="#" id="navbarDropdown" role="button" data-toggle="dropdown"
|
|
aria-haspopup="true" aria-expanded="false">
|
|
{{user.username|truncatechars:10}}
|
|
</a>
|
|
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
|
|
<a class="dropdown-item" href="{% url 'notifications' %}">Notifications ({% notifications_unread %})</a>
|
|
<a class="dropdown-item" href="{% url 'followed_ports' %}">My Watchlist</a>
|
|
<div class="dropdown-divider"></div>
|
|
<a class="dropdown-item" href="{% url 'account_profile' %}">Profile</a>
|
|
<a class="dropdown-item" href="{% url 'account_logout' %}">Logout</a>
|
|
</div>
|
|
</li>
|
|
{% else %}
|
|
<li class="nav-item dropdown topnav-li">
|
|
<a class="nav-link dropdown-toggle {% if '/accounts/' in request.path %}active{% endif %}" href="#" id="navbarDropdown" role="button" data-toggle="dropdown"
|
|
aria-haspopup="true" aria-expanded="false">
|
|
Watchlist
|
|
</a>
|
|
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
|
|
<a class="dropdown-item" href="{% url 'account_login' %}">Login</a>
|
|
<a class="dropdown-item" href="{% url 'account_signup' %}">Sign up</a>
|
|
<div class="dropdown-divider"></div>
|
|
<a class="dropdown-item text-secondary bg-warning" href="/accounts/github/login/?process=login">Quick GitHub Login<i class="fab fa-github ml-2"></i></a>
|
|
</div>
|
|
</li>
|
|
{% endif %}
|
|
<li class="nav-item ml-4">
|
|
<script type="text/javascript">
|
|
const darkSwitch = writeDarkSwitch(themeConfig);
|
|
</script>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
<div class="container" style="max-width: 800px">
|
|
{% if messages %}
|
|
{% for message in messages %}
|
|
<div class="alert alert-primary mt-2" role="alert">
|
|
{{ message }}
|
|
</div>
|
|
{% endfor %}
|
|
{% endif %}
|
|
</div>
|
|
<div class="container">
|
|
{% block content %}
|
|
{% endblock %}
|
|
</div>
|
|
<br><br>
|
|
<div class="bg-footer">
|
|
<div class="container p-4 text-light">
|
|
<div class="row">
|
|
<div class="col-lg-4">
|
|
<strong>
|
|
Quick Links:</strong>
|
|
<ul>
|
|
<li><a class="footer-links" href="{% url 'about_page' %}">About</a></li>
|
|
<li><a class="footer-links" href="{% url 'stats_faq' %}">Statistics FAQ</a></li>
|
|
<li><a class="footer-links" href="https://github.com/macports/macports-webapp">Git Repository</a></li>
|
|
<li><a class="footer-links" href="https://github.com/macports/macports-webapp/tree/master/docs">Documentation</a></li>
|
|
<li><a class="footer-links" href="/api/v1/">API</a></li>
|
|
<li><a class="footer-links" href="https://github.com/macports/macports-webapp/issues">Issues</a></li>
|
|
</ul>
|
|
</div>
|
|
<div class="col-lg-4">
|
|
<strong>MacPorts</strong>
|
|
<ul>
|
|
<li><a class="footer-links" href="https://www.macports.org">MacPorts Home</a></li>
|
|
<li><a class="footer-links" href="https://www.macports.org/install.php">Install MacPorts</a></li>
|
|
<li><a class="footer-links" href="https://trac.macports.org/wiki/FAQ">MacPorts FAQ</a></li>
|
|
<li><a class="footer-links" href="https://www.macports.org/news/">MacPorts News</a></li>
|
|
</ul>
|
|
</div>
|
|
<div class="col-lg-4">
|
|
Port Information was updated:<br>
|
|
<i class="footer-links">{{ port_info_updated_at|naturaltime }}</i><br>
|
|
<i><a class="footer-links" href="https://github.com/macports/macports-ports/commits/{{ port_info_updated_till_commit }}/">{{ port_info_updated_till_commit|slice:":8" }}</a></i><br><br>
|
|
|
|
Most recent build (in app's database) ran:<br>
|
|
<i><a class="footer-links" href="{% url 'all_builds' %}">{{ latest_build_fetched_at|naturaltime }}</a></i><br><br>
|
|
|
|
Latest stats submission was received:<br>
|
|
<i><a class="footer-links" href="{% url 'stats' %}">{{ latest_submission_made_at|naturaltime }}</a></i><br><br>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
{% block script %}
|
|
{% endblock %}
|
|
</body>
|
|
</html>
|