Skip to content

Commit

Permalink
Merge 31fcb18 into 5ad5613
Browse files Browse the repository at this point in the history
  • Loading branch information
xf- committed Nov 28, 2018
2 parents 5ad5613 + 31fcb18 commit 86f1dee
Show file tree
Hide file tree
Showing 13 changed files with 148 additions and 61 deletions.
4 changes: 2 additions & 2 deletions assets/favicon/site.webmanifest
@@ -1,6 +1,6 @@
{
"name": "Meshviewer",
"short_name": "Meshviewer",
"name": "Freifunk Meshviewer",
"short_name": "Freifunk Meshviewer",
"icons": [
{
"src": "./android-chrome-192x192.png",
Expand Down
16 changes: 8 additions & 8 deletions config.default.js
Expand Up @@ -64,14 +64,14 @@ module.exports = function () {
'name': 'node.firstSeen',
'value': 'FirstSeen'
},
{
'name': 'node.systemLoad',
'value': 'Load'
},
{
'name': 'node.ram',
'value': 'RAM'
},
// {
// 'name': 'node.systemLoad',
// 'value': 'Load'
// },
// {
// 'name': 'node.ram',
// 'value': 'RAM'
// },
{
'name': 'node.ipAddresses',
'value': 'IPs'
Expand Down
38 changes: 1 addition & 37 deletions config.js
Expand Up @@ -46,6 +46,7 @@ module.exports = function () {
'dataPath': [
'https://regensburg.freifunk.net/data/'
],
'reverseGeocodingApi': 'https://regensburg.freifunk.net/geocoding/reverse',
'siteName': 'Freifunk Regensburg',
'mapLayers': [
{
Expand All @@ -71,43 +72,6 @@ module.exports = function () {
'start': 19,
'end': 7
}
},
{
'name': 'OpenStreetMap.HOT',
'url': 'https://{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png',
'config': {
'maxZoom': 19,
'attribution': '&copy; Openstreetmap France | &copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
}
},
{
'name': 'HERE',
// Please use your own API key - Free plan is on right side after the pay plans
'url': 'https://{s}.base.maps.api.here.com/maptile/2.1/maptile/newest/normal.day/{z}/{x}/{y}/256/png8?app_id=YOUR_KEY&app_code=YOUR_CODE&lg=deu',
'config': {
'attribution': 'Map &copy; 1987-2014 <a href="http://developer.here.com">HERE</a>',
'subdomains': '1234',
'maxZoom': 20
}
},
{
'name': 'Esri.WorldImagery',
'url': '//server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}',
'config': {
'maxZoom': 20,
'attribution': 'Tiles &copy; Esri &mdash; Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community'
}
},
{
'name': 'HERE.hybridDay',
// Please use your own API key - Free plan is on right side after the pay plans
'url': 'https://{s}.aerial.maps.api.here.com/maptile/2.1/maptile/newest/{variant}/{z}/{x}/{y}/256/png8?app_id=YOUR_KEY&app_code=YOUR_CODE&lg=deu',
'config': {
'attribution': 'Map &copy; 1987-2014 <a href="http://developer.here.com">HERE</a>',
'subdomains': '1234',
'variant': 'hybrid.day',
'maxZoom': 20
}
}
],
// Set a visible frame
Expand Down
2 changes: 1 addition & 1 deletion gulp/config.js
Expand Up @@ -10,7 +10,7 @@ module.exports = function () {
json: 'locale/*.json',
html: ['html/*.html', './config*.js']
},
clean: [build + '/*.map', build + '/vendor', build + '/main.css'],
clean: [build + '/*.css.map', build + '/vendor', build + '/main.css'],
autoprefixer: ['> 1% in DE'],
browsersync: {
open: false,
Expand Down
2 changes: 1 addition & 1 deletion gulp/tasks/copy.js
Expand Up @@ -4,7 +4,7 @@ module.exports = function (gulp, plugins, config) {
.pipe(gulp.dest(config.build));
gulp.src(['assets/logo.svg', 'service-worker.js'])
.pipe(gulp.dest(config.build));
gulp.src(['polyfill.js'])
gulp.src(['polyfill.js', 'node_modules/raven-js/dist/raven.js'])
.pipe(gulp.dest(config.build + '/vendor'));
gulp.src(['node_modules/promise-polyfill/dist/polyfill.js'])
.pipe(gulp.dest(config.build + '/vendor/promise'));
Expand Down
4 changes: 2 additions & 2 deletions gulp/tasks/javascript.js
@@ -1,13 +1,13 @@
module.exports = function (gulp, plugins, config, env) {
return function javascript() {
return gulp.src('app.js')
.pipe(env.development(plugins.sourcemaps.init()))
.pipe(plugins.sourcemaps.init())
.pipe(plugins.requirejsOptimize(env.production() ? config.requireJs.prod : config.requireJs.dev))
.on('error', function () {
this.emit('end');
})
.pipe(env.production(plugins.uglify({ output: { comments: 'all' } })))
.pipe(env.development(plugins.sourcemaps.write('.', { addComment: true })))
.pipe(plugins.sourcemaps.write('.', { addComment: true }))
.pipe(gulp.dest(config.build));
};
};
25 changes: 18 additions & 7 deletions html/index.html
Expand Up @@ -3,24 +3,24 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<!--<meta name="image" content="https://regensburg.freifunk.net/meshviewer/apple-touch-icon.png">-->
<meta name="image" content="https://regensburg.freifunk.net/meshviewer/apple-touch-icon.png">

<meta itemprop="name" content="<!-- inject:title --><!-- endinject --> Meshviewer">
<meta name="description" itemprop="description" content="<!-- inject:title --><!-- endinject --> Knotenkarte - Zeigt alle Knoten, Statistiken und Verbindungen auf Karte oder Topologie">
<!--Uncomment & adjust local urls-->
<!--<meta itemprop="image" content="https://regensburg.freifunk.net/meshviewer/android-chrome-512x512.png">-->
<meta itemprop="image" content="https://regensburg.freifunk.net/meshviewer/android-chrome-512x512.png">

<!--<meta property="business:contact_data:locality" content="Regensburg">-->
<!--<meta property="business:contact_data:region" content="Bayern">-->
<meta property="business:contact_data:locality" content="Regensburg">
<meta property="business:contact_data:region" content="Bayern">
<meta property="business:contact_data:country_name" content="Germany">

<meta name="twitter:card" content="summary">
<meta name="twitter:site" content="@freifunk">
<meta name="twitter:site" content="@freifunkRGB">

<meta name="og:title" content="<!-- inject:title --><!-- endinject -->">
<meta name="og:description" content="<!-- inject:title --><!-- endinject --> Knotenkarte - Zeigt alle Knoten, Statistiken und Verbindungen auf Karte oder Topologie">
<!--<meta name="og:image" content="https://regensburg.freifunk.net/meshviewer/android-chrome-512x512.png">-->
<!--<meta name="og:url" content="https://regensburg.freifunk.net/meshviewer/">-->
<meta name="og:image" content="https://regensburg.freifunk.net/meshviewer/android-chrome-512x512.png">
<meta name="og:url" content="https://regensburg.freifunk.net/meshviewer/">
<meta name="og:site_name" content="<!-- inject:title --><!-- endinject -->">
<meta name="og:type" content="website">

Expand All @@ -31,6 +31,17 @@
<!-- endinject -->
<script src="vendor/polyfill.js" inline></script>
<script src="vendor/promise/polyfill.js" inline></script>
<script src="vendor/raven.js" inline></script>
<script>
Raven.config('https://d01637ef6bde46a2b891113a175e8df8@sentry.ffrgb.net/2', {
autoBreadcrumbs: {
'xhr': true,
'console': true,
'dom': true,
'location': true
}
}).install();
</script>
<script src="app.js"></script>
</head>
<body>
Expand Down
2 changes: 2 additions & 0 deletions lib/infobox/location.js
Expand Up @@ -6,6 +6,8 @@ define(['helper'], function (helper) {
sidebarTitle.textContent = _.t('location.location');
el.appendChild(sidebarTitle);

parent.window.postMessage(d, 'http://192.168.1.1');

helper.getJSON(config.reverseGeocodingApi + '?format=json&lat=' + d.lat + '&lon=' + d.lng + '&zoom=18&addressdetails=0&accept-language=' + _.locale())
.then(function (result) {
if (result.display_name) {
Expand Down
1 change: 1 addition & 0 deletions lib/main.js
Expand Up @@ -118,6 +118,7 @@ define(['moment', 'utils/router', 'leaflet', 'gui', 'helper', 'utils/language'],
document.querySelector('.loader').innerHTML += e.message
+ '<br /><br /><button onclick="location.reload(true)" class="btn text" aria-label="Try to reload">Try to reload</button><br /> or report to your community';
console.warn(e);
Raven.captureException(e);
});
};
});
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -54,6 +54,7 @@
"navigo": "^7.1.2",
"node-polyglot": "2.2.2",
"promise-polyfill": "^8.1.0",
"raven-js": "^3.27.0",
"rbush": "^2.0.2",
"requirejs": "^2.3.6",
"snabbdom": "^0.7.2"
Expand Down
85 changes: 85 additions & 0 deletions scss/custom/_custom.scss
Expand Up @@ -8,3 +8,88 @@

// SCSS supports css with a lot of additional features like variables or mixins.
// Autoprefixer runs in postcss, no need to add browser-prefixes like -webkit, -moz or -ms

@font-face {
font-family: 'Exo 2';
font-weight: 300;
src: local('Exo 2 Light'),
local('Exo2-Light'),
url('/typo3conf/ext/freifunk_regensburg/Resources/Public/Fonts/Exo2.0-Light-webfont.woff2') format('woff2'),
url('/typo3conf/ext/freifunk_regensburg/Resources/Public/Fonts/Exo2.0-Light-webfont.woff') format('woff'),
url('/typo3conf/ext/freifunk_regensburg/Resources/Public/Fonts/Exo2.0-Light-webfont.ttf') format('truetype');
}

@font-face {
font-family: 'Exo 2';
font-weight: 800;
src: local('Exo 2 Black'),
local('Exo2-Black'),
url('/typo3conf/ext/freifunk_regensburg/Resources/Public/Fonts/Exo2.0-Black-webfont.woff2') format('woff2'),
url('/typo3conf/ext/freifunk_regensburg/Resources/Public/Fonts/Exo2.0-Black-webfont.woff') format('woff'),
url('/typo3conf/ext/freifunk_regensburg/Resources/Public/Fonts/Exo2.0-Black-webfont.ttf') format('truetype');
}

a {
color: $color-freifunk-primary;
}

%leaflet-button {
background-color: $color-freifunk-primary;
color: $color-freifunk-secondary;
opacity: .9;

&.active,
&:hover {
color: $color-white;
opacity: 1;
}
}

button {
@extend %leaflet-button;

&.close {
&.active,
&:hover {
color: $color-primary;
}
}
}

.leaflet-control-zoom {
opacity: 1;

a {
@extend %leaflet-button;
}
}

.leaflet-control-layers {
&.leaflet-control {
opacity: 1;
}
}

.leaflet-container {
.leaflet-control-layers-toggle {
@extend %leaflet-button;
}
}

.ion-location {
color: $color-freifunk-primary;
}

.leaflet-label {
&.leaflet-label-right {
background-color: $color-white;
border: 2px solid $color-freifunk-primary;
border-radius: 0;
font-weight: normal;
opacity: .8;

&::before {
display: none;
}
}
}
18 changes: 18 additions & 0 deletions scss/custom/_variables.scss
Expand Up @@ -2,3 +2,21 @@
//$color-black: #fff;
//$color-white: invert($color-white);
//$color-primary: invert($color-primary);

$color-freifunk-primary: #e32d6d;
$color-freifunk-secondary: #f4c72f;
$color-freifunk-gray-light: #e9e9e9;
$color-freifunk-gray: #504f4e;
$color-freifunk-gray-dark: #3f3f3e;
$color-freifunk-gray-darker: #373636;

$color-black: $color-freifunk-gray-darker;
$color-primary: $color-freifunk-primary;
$color-gray-dark: $color-freifunk-gray-dark;

$font-family: 'Exo 2', sans-serif;
$font-family-secondary: 'Exo 2', sans-serif;

$shadows: 0;

$use-included-font: 0;
11 changes: 8 additions & 3 deletions yarn.lock
Expand Up @@ -4400,9 +4400,9 @@ node-pre-gyp@^0.10.0:
tar "^4"

node-releases@^1.0.1:
version "1.0.4"
resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.0.4.tgz#2d585de8c6c81d00017e063e7810a63889aa6756"
integrity sha512-GqRV9GcHw8JCRDaP/JoeNMNzEGzHAknMvIHqMb2VeTOmg1Cf9+ej8bkV12tHfzWHQMCkQ5zUFgwFUkfraynNCw==
version "1.0.5"
resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.0.5.tgz#a641adcc968b039a27345d92ef10b093e5cbd41d"
integrity sha512-Ky7q0BO1BBkG/rQz6PkEZ59rwo+aSfhczHP1wwq8IowoVdN/FpiP7qp0XW0P2+BVCWe5fQUBozdbVd54q1RbCQ==
dependencies:
semver "^5.3.0"

Expand Down Expand Up @@ -5066,6 +5066,11 @@ range-parser@~1.2.0:
resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.0.tgz#f49be6b487894ddc40dcc94a322f611092e00d5e"
integrity sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4=

raven-js@^3.27.0:
version "3.27.0"
resolved "https://registry.yarnpkg.com/raven-js/-/raven-js-3.27.0.tgz#9f47c03e17933ce756e189f3669d49c441c1ba6e"
integrity sha512-vChdOL+yzecfnGA+B5EhEZkJ3kY3KlMzxEhShKh6Vdtooyl0yZfYNFQfYzgMf2v4pyQa+OTZ5esTxxgOOZDHqw==

raw-body@^2.3.2:
version "2.3.3"
resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.3.3.tgz#1b324ece6b5706e153855bc1148c65bb7f6ea0c3"
Expand Down

0 comments on commit 86f1dee

Please sign in to comment.