Update license headers, implement "fancy" API support

This commit is contained in:
Skylar Ittner 2020-05-02 17:09:56 -06:00
parent 33a8fb9cec
commit defe5a0998
42 changed files with 327 additions and 121 deletions

View File

@ -1,4 +1,10 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?> <?xml version="1.0" encoding="utf-8" standalone="no"?>
<!--
Copyright 2020 Netsyms Technologies.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
-->
<widget xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0" id="vote.lecte.Lecte" version="1.0.0"> <widget xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0" id="vote.lecte.Lecte" version="1.0.0">
<name>Lecte</name> <name>Lecte</name>
<description> <description>

View File

@ -3,4 +3,5 @@ auxiliary.org-netbeans-modules-cordova.phonegap=true
file.reference.Lecte-test=test file.reference.Lecte-test=test
file.reference.Lecte-www=www file.reference.Lecte-www=www
files.encoding=UTF-8 files.encoding=UTF-8
project.license=mpl
site.root.folder=${file.reference.Lecte-www} site.root.folder=${file.reference.Lecte-www}

View File

@ -1,4 +1,8 @@
#!/bin/bash #!/bin/bash
# Copyright 2020 Netsyms Technologies.
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
echo "Generating credits files..." echo "Generating credits files..."

View File

@ -1,4 +1,8 @@
#!/bin/sh #!/bin/sh
# Copyright 2020 Netsyms Technologies.
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
./scripts/www_npm_install.sh ./scripts/www_npm_install.sh
./scripts/generate_credits.sh ./scripts/generate_credits.sh

View File

@ -1,4 +1,9 @@
#!/bin/bash #!/bin/bash
# Copyright 2020 Netsyms Technologies.
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# This script removes some stuff in `www/node_modules` that the app doesn't need to run. # This script removes some stuff in `www/node_modules` that the app doesn't need to run.
# It removes about 6MB from the build size. # It removes about 6MB from the build size.

View File

@ -1,4 +1,8 @@
#!/bin/bash #!/bin/bash
# Copyright 2020 Netsyms Technologies.
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
echo "Installing node modules in www/..." echo "Installing node modules in www/..."

View File

@ -1,8 +1,9 @@
/* /*
This Source Code Form is subject to the terms of the Mozilla Public * Copyright 2020 Netsyms Technologies.
License, v. 2.0. If a copy of the MPL was not distributed with this * This Source Code Form is subject to the terms of the Mozilla Public
file, You can obtain one at http://mozilla.org/MPL/2.0/. * License, v. 2.0. If a copy of the MPL was not distributed with this
*/ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
/* /*
Framework7 and FontAwesome both have a .fab class Framework7 and FontAwesome both have a .fab class

View File

@ -1,4 +1,5 @@
/* /*
* Copyright 2020 Netsyms Technologies.
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.

View File

@ -1,4 +1,5 @@
/* /*
* Copyright 2020 Netsyms Technologies.
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.

View File

@ -0,0 +1,35 @@
/*
* Copyright 2020 Netsyms Technologies.
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
/*
Created on : Apr 29, 2020, 9:29:20 PM
Author : Skylar Ittner
*/
.profile-card .card-header {
display: block;
}
.profile-card .profile-image {
float: left;
width: 80px;
max-width: 25%;
position: relative;
margin-right: 2rem;
}
.profile-card .profile-image img {
width: 100%;
}
.profile-card .profile-name {
}
.profile-card .profile-location {
color: #8e8e93;
font-size: 90%;
}

View File

@ -1,8 +1,9 @@
/* /*
This Source Code Form is subject to the terms of the Mozilla Public * Copyright 2020 Netsyms Technologies.
License, v. 2.0. If a copy of the MPL was not distributed with this * This Source Code Form is subject to the terms of the Mozilla Public
file, You can obtain one at http://mozilla.org/MPL/2.0/. * License, v. 2.0. If a copy of the MPL was not distributed with this
*/ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
/* /*
Created on : Apr 3, 2020, 11:55:50 AM Created on : Apr 3, 2020, 11:55:50 AM
Author : Skylar Ittner Author : Skylar Ittner

View File

@ -1,8 +1,9 @@
/* /*
This Source Code Form is subject to the terms of the Mozilla Public * Copyright 2020 Netsyms Technologies.
License, v. 2.0. If a copy of the MPL was not distributed with this * This Source Code Form is subject to the terms of the Mozilla Public
file, You can obtain one at http://mozilla.org/MPL/2.0/. * License, v. 2.0. If a copy of the MPL was not distributed with this
*/ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#web-barcode-ui { #web-barcode-ui {

View File

@ -1,5 +1,6 @@
<!DOCTYPE html> <!DOCTYPE html>
<!-- <!--
Copyright 2020 Netsyms Technologies.
This Source Code Form is subject to the terms of the Mozilla Public This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/. file, You can obtain one at http://mozilla.org/MPL/2.0/.

View File

@ -1,4 +1,5 @@
/* /*
* Copyright 2020 Netsyms Technologies.
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.

View File

@ -1,4 +1,5 @@
/* /*
* Copyright 2020 Netsyms Technologies.
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.

View File

@ -1,4 +1,5 @@
/* /*
* Copyright 2020 Netsyms Technologies.
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
@ -10,30 +11,26 @@ var userPosition = {
coords: { coords: {
latitude: 0.0, latitude: 0.0,
longitude: 0.0, longitude: 0.0,
accuracy: 999999 accuracy: 99999
}, },
updated: 0 updated: 0
}; };
// Preload last known location while GPS warms up // Preload last known location while GPS warms up
if (getStorage("user_latitude") != null && getStorage("user_longitude") != null) { if (getStorage("user_latitude") != null && getStorage("user_longitude") != null && getStorage("user_position_updated") != null) {
userPosition.coords.latitude = getStorage("user_latitude"); userPosition.coords.latitude = getStorage("user_latitude");
userPosition.coords.longitude = getStorage("user_longitude"); userPosition.coords.longitude = getStorage("user_longitude");
userPosition.updated = getStorage("user_position_updated");
userPosition.coords.accuracy = 99999;
} }
// Request the user's IP geolocation as a poor substitute for an actual location // Request the user's IP geolocation as a poor substitute for an actual location
// Should improve UX for weather tool at least apirequest("geoip", [], function (resp) {
$.ajax({ // Only use this if the last stored location is more than a day old
url: SETTINGS.geoipapi, if (resp.status == "OK" && userPosition.coords.accuracy >= 99999 && timeDiff(userPosition.updated) > 60 * 60 * 24) {
dataType: 'json',
timeout: 10 * 1000,
success: function (resp) {
if (resp.status == "OK" && userPosition.coords.accuracy > 99999) {
userPosition.coords.latitude = resp.location.latitude; userPosition.coords.latitude = resp.location.latitude;
userPosition.coords.longitude = resp.location.longitude; userPosition.coords.longitude = resp.location.longitude;
userPosition.coords.accuracy = 99999; userPosition.coords.accuracy = 99999;
userPosition.updated = time();
}
} }
}); });
@ -45,6 +42,7 @@ if ("geolocation" in navigator) {
navigator.geolocation.watchPosition(function (position) { navigator.geolocation.watchPosition(function (position) {
userPosition.coords = position.coords; userPosition.coords = position.coords;
userPosition.updated = time(); userPosition.updated = time();
setStorage("user_position_updated", userPosition.updated);
setStorage("user_latitude", userPosition.coords.latitude); setStorage("user_latitude", userPosition.coords.latitude);
setStorage("user_longitude", userPosition.coords.longitude); setStorage("user_longitude", userPosition.coords.longitude);
if (mapLocationControlStarted) { if (mapLocationControlStarted) {

View File

@ -1,4 +1,5 @@
/* /*
* Copyright 2020 Netsyms Technologies.
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.

View File

@ -1,6 +1,9 @@
/* This Source Code Form is subject to the terms of the Mozilla Public /*
* Copyright 2020 Netsyms Technologies.
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
var $$ = Dom7; var $$ = Dom7;
@ -12,7 +15,7 @@ var app = new Framework7({
root: "#app", root: "#app",
name: "Lecte", name: "Lecte",
id: "vote.lecte.Lecte", id: "vote.lecte.Lecte",
theme: "ios", theme: platform_theme,
card: { card: {
swipeToClose: false swipeToClose: false
}, },

View File

@ -1,4 +1,5 @@
/* /*
* Copyright 2020 Netsyms Technologies.
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.

View File

@ -1,4 +1,5 @@
/* /*
* Copyright 2020 Netsyms Technologies.
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.

View File

@ -1,4 +1,5 @@
/* /*
* Copyright 2020 Netsyms Technologies.
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
@ -136,7 +137,11 @@ function mapboxMap() {
}); });
} }
if (userPosition.coords.accuracy >= 99999) {
map.animateMapIn(userPosition.coords.latitude, userPosition.coords.longitude, 1);
} else {
map.animateMapIn(userPosition.coords.latitude, userPosition.coords.longitude, 12); map.animateMapIn(userPosition.coords.latitude, userPosition.coords.longitude, 12);
}
return map; return map;
} }

View File

@ -1,4 +1,5 @@
/* /*
* Copyright 2020 Netsyms Technologies.
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.

View File

@ -1,4 +1,5 @@
/* /*
* Copyright 2020 Netsyms Technologies.
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
@ -68,6 +69,23 @@ var watchLocation = function (success, error) {
} }
} }
function getPlatformTheme() {
if (Framework7.device.ios) {
return "ios";
} else if (Framework7.device.macos) {
// Apple is trending towards one OS for all their crap,
// let's be ahead of that curve
return "ios";
} else if (Framework7.device.nwjs) {
return "md";
} else if (Framework7.device.android) {
return "md";
} else if (Framework7.device.desktop) {
return "aurora";
}
return "md";
}
function initCordova() { function initCordova() {
platform_type = "cordova"; platform_type = "cordova";
@ -94,7 +112,7 @@ function initCordova() {
function initNW() { function initNW() {
platform_type = "nw"; platform_type = "nw";
platform_theme = "md";
openBrowser = function (url) { openBrowser = function (url) {
nw.Window.open(url, { nw.Window.open(url, {
id: url id: url
@ -136,7 +154,7 @@ function initNW() {
function initBrowser() { function initBrowser() {
platform_type = "browser"; platform_type = "browser";
platform_theme = "md";
openBrowser = function (url) { openBrowser = function (url) {
window.open(url); window.open(url);
} }
@ -160,6 +178,8 @@ function initPlatform() {
initBrowser(); initBrowser();
} }
platform_theme = getPlatformTheme();
$.getJSON("package.json", function (data) { $.getJSON("package.json", function (data) {
app_version = data.version; app_version = data.version;
}); });

View File

@ -1,10 +1,10 @@
/* /*
* Copyright 2020 Netsyms Technologies.
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/ */
function logout() { function logout() {
app.dialog.confirm( app.dialog.confirm(
"Are you sure you want to log out?", "Are you sure you want to log out?",

View File

@ -1,10 +1,10 @@
/* /*
* Copyright 2020 Netsyms Technologies.
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/ */
/** /**
* Save something to persistent storage. * Save something to persistent storage.
* @param {string} key * @param {string} key

View File

@ -1,10 +1,10 @@
/* /*
* Copyright 2020 Netsyms Technologies.
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/ */
function gatherSyncData() { function gatherSyncData() {
var data = { var data = {
localStorage: {}, localStorage: {},

View File

@ -1,4 +1,5 @@
/* /*
* Copyright 2020 Netsyms Technologies.
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
@ -16,6 +17,44 @@ function uuidv4() {
}); });
} }
/**
* Perform a request against the API server. A simple wrapper around $.ajax().
*
* If username and password are strings, they will be used to authenticate.
*
* @param {string} action Request action
* @param {array} data AJAX data to POST
* @param {function} success
* @param {function} error
* @param {string|undefined} username
* @param {string|undefined} password
* @returns {jqXHR}
*/
function apirequest(action, data, success, error, username, password) {
return $.ajax({
url: SETTINGS.apiserver + action,
dataType: "json",
method: "POST",
data: data,
timeout: 10 * 1000,
beforeSend: function (xhr) {
if (typeof username === 'string' && typeof password === 'string') {
xhr.setRequestHeader("Authorization", "Basic " + btoa(username + ":" + password));
}
},
success: function (val) {
if (typeof success == 'function') {
success(val);
}
},
error: function () {
if (typeof error == 'function') {
error();
}
}
});
}
/** /**
* Take a UNIX timestamp (seconds since Jan 1 1970) and format it. * Take a UNIX timestamp (seconds since Jan 1 1970) and format it.
* (Mostly) compatible with PHP's date() function. * (Mostly) compatible with PHP's date() function.

View File

@ -1,7 +1,10 @@
<!DOCTYPE html> <!DOCTYPE html>
<!-- This Source Code Form is subject to the terms of the Mozilla Public <!--
- License, v. 2.0. If a copy of the MPL was not distributed with this Copyright 2020 Netsyms Technologies.
- file, You can obtain one at http://mozilla.org/MPL/2.0/. --> This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
-->
<title>Lecte</title> <title>Lecte</title>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
@ -22,6 +25,8 @@
<link rel="stylesheet" href="assets/fonts/roboto/Roboto.css" /> <link rel="stylesheet" href="assets/fonts/roboto/Roboto.css" />
<link rel="stylesheet" href="assets/css/tablet.css" /> <link rel="stylesheet" href="assets/css/tablet.css" />
<link rel="stylesheet" href="assets/css/profiles.css" />
<script src="cordova.js"></script> <script src="cordova.js"></script>
<div id="app" class="color-theme-green"> <div id="app" class="color-theme-green">

View File

@ -1,6 +1,9 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public <!--
- License, v. 2.0. If a copy of the MPL was not distributed with this Copyright 2020 Netsyms Technologies.
- file, You can obtain one at http://mozilla.org/MPL/2.0/. --> This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
-->
<div class="page" data-name="credits"> <div class="page" data-name="credits">
<div class="navbar"> <div class="navbar">

View File

@ -1,6 +1,9 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public <!--
- License, v. 2.0. If a copy of the MPL was not distributed with this Copyright 2020 Netsyms Technologies.
- file, You can obtain one at http://mozilla.org/MPL/2.0/. --> This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
-->
<div class="page" data-name="credits"> <div class="page" data-name="credits">
<div class="navbar"> <div class="navbar">

View File

@ -1,7 +1,9 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public <!--
- License, v. 2.0. If a copy of the MPL was not distributed with this Copyright 2020 Netsyms Technologies.
- file, You can obtain one at http://mozilla.org/MPL/2.0/. --> This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
-->
<div class="page tabbed" data-name="discover"> <div class="page tabbed" data-name="discover">
<div class="navbar no-tablet"> <div class="navbar no-tablet">

View File

@ -1,7 +1,9 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public <!--
- License, v. 2.0. If a copy of the MPL was not distributed with this Copyright 2020 Netsyms Technologies.
- file, You can obtain one at http://mozilla.org/MPL/2.0/. --> This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
-->
<div class="page" data-name="login"> <div class="page" data-name="login">
<div class="navbar"> <div class="navbar">

View File

@ -1,6 +1,9 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public <!--
- License, v. 2.0. If a copy of the MPL was not distributed with this Copyright 2020 Netsyms Technologies.
- file, You can obtain one at http://mozilla.org/MPL/2.0/. --> This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
-->
<div class="page tabbed" data-name="main"> <div class="page tabbed" data-name="main">
@ -13,27 +16,27 @@
<div class="toolbar tabbar tabbar-labels toolbar-bottom"> <div class="toolbar tabbar tabbar-labels toolbar-bottom">
<div class="toolbar-inner"> <div class="toolbar-inner">
<a href="/" data-route-tab-id="ranking-tab" class="tab-link"> <a href="/" data-route-tab-id="discover-tab" class="tab-link">
<i class="icon f7-icons if-not-md">list_number</i> <i class="icon f7-icons ios-only">search</i>
<i class="icon material-icons md-only">poll</i> <i class="icon material-icons if-not-ios">search</i>
<!-- Label text --> <!-- Label text -->
<span class="tabbar-label">Ranking</span> <span class="tabbar-label">Find</span>
</a> </a>
<a href="/map" data-route-tab-id="map-tab" class="tab-link"> <a href="/map" data-route-tab-id="map-tab" class="tab-link">
<i class="icon f7-icons if-not-md">location</i> <i class="icon f7-icons ios-only">location</i>
<i class="icon material-icons md-only">near_me</i> <i class="icon material-icons if-not-ios">near_me</i>
<span class="tabbar-label">Map</span> <span class="tabbar-label">Map</span>
</a> </a>
<a href="/myprofile" data-route-tab-id="myprofile-tab" class="tab-link"> <a href="/myprofile" data-route-tab-id="myprofile-tab" class="tab-link">
<i class="icon f7-icons if-not-md">person_circle</i> <i class="icon f7-icons ios-only">person_circle</i>
<i class="icon material-icons md-only">account_circle</i> <i class="icon material-icons if-not-ios">account_circle</i>
<span class="tabbar-label">Profile</span> <span class="tabbar-label">Profile</span>
</a> </a>
</div> </div>
</div> </div>
<div class="tabs tabs-routable"> <div class="tabs tabs-routable">
<div class="tab page-content" id="ranking-tab"></div> <div class="tab page-content" id="discover-tab"></div>
<div class="tab page-content" id="map-tab"></div> <div class="tab page-content" id="map-tab"></div>
<div class="tab page-content" id="myprofile-tab"></div> <div class="tab page-content" id="myprofile-tab"></div>
</div> </div>

View File

@ -1,3 +1,9 @@
<!--
Copyright 2020 Netsyms Technologies.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
-->
<div class="card"> <div class="card">
<div class="card-content card-content-padding"></div> <div class="card-content card-content-padding"></div>
</div> </div>

View File

@ -1,6 +1,9 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public <!--
- License, v. 2.0. If a copy of the MPL was not distributed with this Copyright 2020 Netsyms Technologies.
- file, You can obtain one at http://mozilla.org/MPL/2.0/. --> This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
-->
<div class="page" data-name="profile"> <div class="page" data-name="profile">

View File

@ -1,6 +1,9 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public <!--
- License, v. 2.0. If a copy of the MPL was not distributed with this Copyright 2020 Netsyms Technologies.
- file, You can obtain one at http://mozilla.org/MPL/2.0/. --> This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
-->
<div class="page" data-name="settings"> <div class="page" data-name="settings">

View File

@ -1,8 +1,10 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public <!--
- License, v. 2.0. If a copy of the MPL was not distributed with this Copyright 2020 Netsyms Technologies.
- file, You can obtain one at http://mozilla.org/MPL/2.0/. --> This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
<div class="row"> file, You can obtain one at http://mozilla.org/MPL/2.0/.
-->
<div class="row justify-content-center">
<div class="col-100 medium-50 large-33"> <div class="col-100 medium-50 large-33">
<div class="card"> <div class="card">
<div class="card-content row no-gap align-items-stretch"> <div class="card-content row no-gap align-items-stretch">
@ -32,12 +34,23 @@
<div class="card"> <div class="card">
<div class="card-content row no-gap align-items-stretch"> <div class="card-content row no-gap align-items-stretch">
<div class="col-25 small-20 display-flex justify-content-center align-items-center"> <div class="col-25 small-20 display-flex justify-content-center align-items-center">
<div style="font-size: 140%; color: rgba(76,175,80,0.8);">+230</div> <div style="font-size: 140%; color: rgba(76,175,80,0.8);">+197</div>
</div> </div>
<div class="col-75 small-80 padding" style="border-left: 1px solid rgba(0,0,0,0.1);"> <div class="col-75 small-80 padding" style="border-left: 1px solid rgba(0,0,0,0.1);">
<b>John Doe</b> <b>Jane Doe</b>
<br /> <br />
<span>Honest</span> <div class="chip">
<div class="chip-media bg-color-green">
<i class="fas fa-comment-check"></i>
</div>
<div class="chip-label">Honest</div>
</div>
<div class="chip">
<div class="chip-media bg-color-blue">
<i class="fas fa-car-mechanic"></i>
</div>
<div class="chip-label">Auto Mechanic</div>
</div>
</div> </div>
</div> </div>
</div> </div>

View File

@ -1,3 +1,9 @@
<!--
Copyright 2020 Netsyms Technologies.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
-->
<div id="mapbox"></div> <div id="mapbox"></div>
<script> <script>
reloadMap(); reloadMap();

View File

@ -1,3 +1,21 @@
<!--
Copyright 2020 Netsyms Technologies.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
-->
<div class="card profile-card">
<div class="card-header padding">
<div class="profile-image"><img src="https://images.unsplash.com/photo-1504629186813-5b49d61560ae?ixlib=rb-1.2.1&q=80&fm=jpg&crop=entropy&cs=tinysrgb&w=640"/></div>
<div class="profile-name">...</div>
<div class="profile-location"><i class="fas fa-map-marker"></i> ...</div>
</div>
<div class="card-content padding">
</div>
</div>
<div class="row"> <div class="row">
<div class="col-100 medium-50 large-33"> <div class="col-100 medium-50 large-33">
<div class="card"> <div class="card">

View File

@ -1,6 +1,9 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public <!--
- License, v. 2.0. If a copy of the MPL was not distributed with this Copyright 2020 Netsyms Technologies.
- file, You can obtain one at http://mozilla.org/MPL/2.0/. --> This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
-->
<div class="page" data-name="welcome"> <div class="page" data-name="welcome">

View File

@ -1,4 +1,5 @@
/* /*
* Copyright 2020 Netsyms Technologies.
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
@ -12,8 +13,8 @@ var routes = [
tabs: [ tabs: [
{ {
path: '/', path: '/',
id: 'ranking-tab', id: 'discover-tab',
url: "pages/tabs/ranking.html" url: "pages/tabs/discover.html"
}, },
{ {
path: '/map', path: '/map',

View File

@ -1,4 +1,5 @@
/* /*
* Copyright 2020 Netsyms Technologies.
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
@ -36,9 +37,7 @@ var SETTINGS = {
"user_latitude", "user_longitude", "user_latitude", "user_longitude",
"lastsync", "lastchange" "lastsync", "lastchange"
], ],
apiserver: "http://localhost/lecteapi/",
geocodeapi: "http://localhost/lecteapi/geocode.php",
geoipapi: "https://api.lecte.vote/geoip.php",
loginurl: "https://auth.lecte.vote/login/" loginurl: "https://auth.lecte.vote/login/"
// geocodeapi: "https://api.lecte.vote/geocode.php", // geocodeapi: "https://api.lecte.vote/geocode.php",
// loginurl: "https://auth.lecte.vote/login/" // loginurl: "https://auth.lecte.vote/login/"