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"?>
<!--
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">
<name>Lecte</name>
<description>

View File

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

View File

@ -1,4 +1,8 @@
#!/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..."

View File

@ -1,4 +1,8 @@
#!/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/generate_credits.sh

View File

@ -1,4 +1,9 @@
#!/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.
# It removes about 6MB from the build size.

View File

@ -1,4 +1,8 @@
#!/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/..."

View File

@ -1,8 +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
file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
* 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/.
*/
/*
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
* 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/.

View File

@ -1,4 +1,5 @@
/*
* 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/.

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
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/.
*/
* 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 3, 2020, 11:55:50 AM
Author : Skylar Ittner

View File

@ -1,8 +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
file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
* 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/.
*/
#web-barcode-ui {

View File

@ -1,5 +1,6 @@
<!DOCTYPE html>
<!--
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/.

View File

@ -1,4 +1,5 @@
/*
* 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/.

View File

@ -1,4 +1,5 @@
/*
* 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/.

View File

@ -1,4 +1,5 @@
/*
* 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/.
@ -10,30 +11,26 @@ var userPosition = {
coords: {
latitude: 0.0,
longitude: 0.0,
accuracy: 999999
accuracy: 99999
},
updated: 0
};
// 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.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
// Should improve UX for weather tool at least
$.ajax({
url: SETTINGS.geoipapi,
dataType: 'json',
timeout: 10 * 1000,
success: function (resp) {
if (resp.status == "OK" && userPosition.coords.accuracy > 99999) {
userPosition.coords.latitude = resp.location.latitude;
userPosition.coords.longitude = resp.location.longitude;
userPosition.coords.accuracy = 99999;
userPosition.updated = time();
}
apirequest("geoip", [], function (resp) {
// Only use this if the last stored location is more than a day old
if (resp.status == "OK" && userPosition.coords.accuracy >= 99999 && timeDiff(userPosition.updated) > 60 * 60 * 24) {
userPosition.coords.latitude = resp.location.latitude;
userPosition.coords.longitude = resp.location.longitude;
userPosition.coords.accuracy = 99999;
}
});
@ -45,6 +42,7 @@ if ("geolocation" in navigator) {
navigator.geolocation.watchPosition(function (position) {
userPosition.coords = position.coords;
userPosition.updated = time();
setStorage("user_position_updated", userPosition.updated);
setStorage("user_latitude", userPosition.coords.latitude);
setStorage("user_longitude", userPosition.coords.longitude);
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
* 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/.

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
* 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;
@ -12,7 +15,7 @@ var app = new Framework7({
root: "#app",
name: "Lecte",
id: "vote.lecte.Lecte",
theme: "ios",
theme: platform_theme,
card: {
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
* 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/.

View File

@ -1,4 +1,5 @@
/*
* 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/.

View File

@ -1,4 +1,5 @@
/*
* 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/.
@ -136,7 +137,11 @@ function mapboxMap() {
});
}
map.animateMapIn(userPosition.coords.latitude, userPosition.coords.longitude, 12);
if (userPosition.coords.accuracy >= 99999) {
map.animateMapIn(userPosition.coords.latitude, userPosition.coords.longitude, 1);
} else {
map.animateMapIn(userPosition.coords.latitude, userPosition.coords.longitude, 12);
}
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
* 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/.

View File

@ -1,4 +1,5 @@
/*
* 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/.
@ -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() {
platform_type = "cordova";
@ -94,7 +112,7 @@ function initCordova() {
function initNW() {
platform_type = "nw";
platform_theme = "md";
openBrowser = function (url) {
nw.Window.open(url, {
id: url
@ -136,7 +154,7 @@ function initNW() {
function initBrowser() {
platform_type = "browser";
platform_theme = "md";
openBrowser = function (url) {
window.open(url);
}
@ -144,7 +162,7 @@ function initBrowser() {
openExternalBrowser = function (url) {
window.open(url);
}
$("#app").on("click", ".geolink", function (evt) {
window.open($(this).attr("href"), "_blank");
evt.preventDefault();
@ -160,6 +178,8 @@ function initPlatform() {
initBrowser();
}
platform_theme = getPlatformTheme();
$.getJSON("package.json", function (data) {
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
* 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/.
*/
function logout() {
app.dialog.confirm(
"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
* 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/.
*/
/**
* Save something to persistent storage.
* @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
* 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/.
*/
function gatherSyncData() {
var data = {
localStorage: {},

View File

@ -1,4 +1,5 @@
/*
* 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/.
@ -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.
* (Mostly) compatible with PHP's date() function.

View File

@ -1,7 +1,10 @@
<!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
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<!--
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/.
-->
<title>Lecte</title>
<meta charset="UTF-8">
<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/css/tablet.css" />
<link rel="stylesheet" href="assets/css/profiles.css" />
<script src="cordova.js"></script>
<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
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<!--
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="page" data-name="credits">
<div class="navbar">
@ -367,7 +370,7 @@ SOFTWARE.
The following software may be included in this product: ansicolors. A copy of the source code may be downloaded from git://github.com/thlorenz/ansicolors.git. This software contains the following license and notice below:
Copyright 2013 Thorsten Lorenz.
Copyright 2013 Thorsten Lorenz.
All rights reserved.
Permission is hereby granted, free of charge, to any person
@ -449,7 +452,7 @@ THE SOFTWARE.
The following software may be included in this product: cardinal, redeyed. A copy of the source code may be downloaded from git://github.com/thlorenz/cardinal.git (cardinal), git://github.com/thlorenz/redeyed.git (redeyed). This software contains the following license and notice below:
Copyright 2012 Thorsten Lorenz.
Copyright 2012 Thorsten Lorenz.
All rights reserved.
Permission is hereby granted, free of charge, to any person
@ -481,25 +484,25 @@ The MIT License
Copyright (c) 2013 Max Ogden
Permission is hereby granted, free of charge,
to any person obtaining a copy of this software and
associated documentation files (the "Software"), to
deal in the Software without restriction, including
without limitation the rights to use, copy, modify,
merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom
the Software is furnished to do so,
Permission is hereby granted, free of charge,
to any person obtaining a copy of this software and
associated documentation files (the "Software"), to
deal in the Software without restriction, including
without limitation the rights to use, copy, modify,
merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom
the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice
The above copyright notice and this permission notice
shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-----
@ -2684,15 +2687,15 @@ modification, are permitted provided that the following conditions are met:
names of the contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL ARTUR ADIB BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
================================================================================
@ -3768,19 +3771,19 @@ The following software may be included in this product: debug. A copy of the sou
Copyright (c) 2014 TJ Holowaychuk <tj@vision-media.ca>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software
and associated documentation files (the 'Software'), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
Permission is hereby granted, free of charge, to any person obtaining a copy of this software
and associated documentation files (the 'Software'), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial
The above copyright notice and this permission notice shall be included in all copies or substantial
portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-----
@ -5171,15 +5174,15 @@ modification, are permitted provided that the following conditions are met:
names of the contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL ARTUR ADIB BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-----

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
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<!--
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="page" data-name="credits">
<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
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<!--
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="page tabbed" data-name="discover">
<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
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<!--
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="page" data-name="login">
<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
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<!--
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="page tabbed" data-name="main">
@ -13,27 +16,27 @@
<div class="toolbar tabbar tabbar-labels toolbar-bottom">
<div class="toolbar-inner">
<a href="/" data-route-tab-id="ranking-tab" class="tab-link">
<i class="icon f7-icons if-not-md">list_number</i>
<i class="icon material-icons md-only">poll</i>
<a href="/" data-route-tab-id="discover-tab" class="tab-link">
<i class="icon f7-icons ios-only">search</i>
<i class="icon material-icons if-not-ios">search</i>
<!-- Label text -->
<span class="tabbar-label">Ranking</span>
<span class="tabbar-label">Find</span>
</a>
<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 material-icons md-only">near_me</i>
<i class="icon f7-icons ios-only">location</i>
<i class="icon material-icons if-not-ios">near_me</i>
<span class="tabbar-label">Map</span>
</a>
<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 material-icons md-only">account_circle</i>
<i class="icon f7-icons ios-only">person_circle</i>
<i class="icon material-icons if-not-ios">account_circle</i>
<span class="tabbar-label">Profile</span>
</a>
</div>
</div>
<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="myprofile-tab"></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-content card-content-padding"></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
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<!--
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="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
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<!--
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="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
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<div class="row">
<!--
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="row justify-content-center">
<div class="col-100 medium-50 large-33">
<div class="card">
<div class="card-content row no-gap align-items-stretch">
@ -32,12 +34,23 @@
<div class="card">
<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 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 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 />
<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>

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>
<script>
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="col-100 medium-50 large-33">
<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
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<!--
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="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
* 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/.
@ -12,8 +13,8 @@ var routes = [
tabs: [
{
path: '/',
id: 'ranking-tab',
url: "pages/tabs/ranking.html"
id: 'discover-tab',
url: "pages/tabs/discover.html"
},
{
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
* 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/.
@ -36,9 +37,7 @@ var SETTINGS = {
"user_latitude", "user_longitude",
"lastsync", "lastchange"
],
geocodeapi: "http://localhost/lecteapi/geocode.php",
geoipapi: "https://api.lecte.vote/geoip.php",
apiserver: "http://localhost/lecteapi/",
loginurl: "https://auth.lecte.vote/login/"
// geocodeapi: "https://api.lecte.vote/geocode.php",
// loginurl: "https://auth.lecte.vote/login/"