diff --git a/app/plot_app/static/css/main.css b/app/plot_app/static/css/main.css index 0077cafa7..367d503be 100644 --- a/app/plot_app/static/css/main.css +++ b/app/plot_app/static/css/main.css @@ -19,16 +19,25 @@ body { h1 { margin: 2em 0 0 0; color: #2e484c; - font-family: 'Titillium Web', sans-serif; + font-family: 'Play', sans-serif; font-size: 23px; - font-weight: 700; + font-weight: 400; text-transform: uppercase; } +h1 img { + vertical-align: top; +} h1 .name { - color: #444; - font-size: 26px; + color: #e3e3e3; + font-size: 32px; text-transform: none; - padding-left: 3px; + padding-left: 8px; + padding-top: 15px; + display: inline-block; +} + +.bg-blue { + background-color: #06465c !important; } /* bootstrap buttons */ diff --git a/app/plot_app/static/images/logo.png b/app/plot_app/static/images/logo.png index ea05a26a8..d6353500b 100644 Binary files a/app/plot_app/static/images/logo.png and b/app/plot_app/static/images/logo.png differ diff --git a/app/plot_app/static/js/upload.js b/app/plot_app/static/js/upload.js new file mode 100644 index 000000000..81df25997 --- /dev/null +++ b/app/plot_app/static/js/upload.js @@ -0,0 +1,79 @@ + +function restoreSetting(key) { + var value = localStorage.getItem(key); + if (value !== null) { + var field = $("#"+key)[0]; + if (field.type == 'checkbox'){ + field.checked = (value == 'true'); + } else { + field.value = value; + } + console.log(key+', '+value); + } +} +function saveSetting(key) { + var field = $("#"+key)[0]; + if (field.type == 'checkbox'){ + var value = field.checked; + } else { + var value = field.value; + } + localStorage.setItem(key, value); + console.log(key+', '+value); +} + +function saveSettings() { + saveSetting('email'); + saveSetting('access'); +} + +function updateAccess() { + var access = document.getElementById('access').value; + var ids = ["flightreport", "personal"]; + ids.forEach((value) => { + if (value == access) { + document.getElementById(value).style.display='table-row'; + } else { + document.getElementById(value).style.display='none'; + } + }); + document.getElementById('public').value = access == "flightreport" ? "true" : "false"; +} + +function validateForm() { + var valid = true; + var error_html = ""; + if (document.getElementById('access').value == "notset") { + error_html += "Access, " + valid = false; + } + var email = document.getElementById('email').value; + if (!email.includes("@") || email.length < 5) { // very simple check + error_html += "E-Mail, " + valid = false; + } + if (document.getElementById('file').value.length == 0) { + error_html += "Log File, " + valid = false; + } + + // Report + if (!valid) { + error_html = "