Browse Source

Add proper about page

pull/67/head
squeaky otter 1 year ago
parent
commit
5e7a0303ba
Signed by: dashie GPG Key ID: C2D57B325840B755
7 changed files with 25 additions and 7 deletions
  1. +1
    -0
      CHANGELOG.md
  2. +6
    -4
      controllers/main.py
  3. +4
    -0
      static/css/main.css
  4. +1
    -0
      static/js/airsuckLoad.js
  5. +10
    -0
      templates/about.jinja2
  6. +1
    -1
      templates/home.jinja2
  7. +2
    -2
      templates/layout.jinja2

+ 1
- 0
CHANGELOG.md View File

@ -15,6 +15,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Scale on bottom-left of the map
- Leaflet hash handling in URL for hotlinking URLs
- Leaflet "Locate Me" control
- Proper /about page
### Changed


+ 6
- 4
controllers/main.py View File

@ -1,16 +1,18 @@
from flask import Blueprint, render_template, redirect
from flask import Blueprint, render_template
bp_main = Blueprint("bp_main", __name__)
# Show public logbooks
# Show map
@bp_main.route("/")
def home():
pcfg = {"title": "Home"}
pcfg = {"title": "Map"}
return render_template("home.jinja2", pcfg=pcfg)
@bp_main.route("/about")
def about():
return redirect("https://github.com/rhaamo/pyAirwaves/")
pcfg = {"title": "About"}
return render_template("about.jinja2", pcfg=pcfg)

+ 4
- 0
static/css/main.css View File

@ -32,6 +32,10 @@ div.content {
height: 100%;
}
div.content .noMap {
padding-top: 1rem;
}
html, body {
height: 100%;
}


+ 1
- 0
static/js/airsuckLoad.js View File

@ -117,5 +117,6 @@ $(document).ready(function () {
window.vehData = {}; // Create a generic array to hold our vehicle data
$.getScript("static/js/core/map_init.js", function () {
initMap();
Logger.info("Map initialized.")
});
});

+ 10
- 0
templates/about.jinja2 View File

@ -0,0 +1,10 @@
{% extends "layout.jinja2" %}
{% block content %}
<div class="noMap row justify-content-md-center">
<div class="col-md-10">
<p>This website runs pyAirwaves {{ g.cfg['PYAIRWAVES_VERSION'] }}</p>
<p>Sources of pyAirwaves can be found <a href="https://github.com/rhaamo/pyAirwaves" target="_blank">here</a>.
</div>
</div>
{% endblock %}

+ 1
- 1
templates/home.jinja2 View File

@ -9,7 +9,7 @@
<li title="Settings"><a href="#settings" role="tab"><i class="fa fa-cogs"></i></a></li>
<li title="Aircrafts list"><a href="#aircrafts" role="tab"><i class="fa fa-plane"></i></a></li>
<li title="Ships list"><a href="#ships" role="tab"><i class="fa fa-ship"></i></a></li>
<li class="locateMe" title="Locate Me" id="LocateMe"></li>
<li class="locateMe" title="Locate Me"><a href="javascript:void(0)" role="tab"><div id="LocateMe"></div></a></li>
<li class="controlZoomIn" title="Zoom in">
<a href="javascript:zoomIn()" role="tab">
<i class="fa fa-plus-square"></i>


+ 2
- 2
templates/layout.jinja2 View File

@ -47,10 +47,10 @@ This file is part of the airSuck project (https://github.com/rhaamo/pyAirwaves).
<div class="collapse navbar-collapse" id="navbarsExampleDefault">
<ul class="navbar-nav mr-auto">
<li class="nav-item active">
<li class="nav-item {% if request.endpoint == 'bp_main.home' %}active{% endif %}">
<a class="nav-link" href="/">Map</a>
</li>
<li class="nav-item">
<li class="nav-item {% if request.endpoint == 'bp_main.about' %}active{% endif %}">
<a class="nav-link" href="/about">About</a>
</li>
</ul>


Loading…
Cancel
Save