Skip to content

Commit

Permalink
Merge pull request #41 from DasSkelett/merge-freifunk-ffm-master
Browse files Browse the repository at this point in the history
Merge freifunk-ffm changes
  • Loading branch information
GoliathLabs authored Sep 11, 2022
2 parents 8678a7b + 2905c16 commit 6ed121b
Show file tree
Hide file tree
Showing 25 changed files with 21,465 additions and 6,606 deletions.
2 changes: 0 additions & 2 deletions .sass-lint.yml

This file was deleted.

10 changes: 10 additions & 0 deletions .stylelintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"extends": "stylelint-config-standard",
"rules": {
"at-rule-no-unknown": [true, {
"ignoreAtRules": ["function", "if", "each", "include", "mixin"]
}],
"number-leading-zero": "never",
"no-descending-specificity": null
}
}
24 changes: 24 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
sudo: false
dist: trusty

language: node_js

node_js:
- "14"

os:
- linux
- osx

matrix:
include:
- node_js: "12"
os: linux
cache:
yarn: true

before_script:
- if git status | grep -q "modified. \.travis\.yml"; then echo "Dirty yarn.lock"; exit 1; fi

script:
- gulp
3 changes: 1 addition & 2 deletions app.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
'use strict';

require.config({
baseUrl: 'lib',
paths: {
'polyglot': '../node_modules/node-polyglot/build/polyglot',
'Navigo': '../node_modules/navigo/lib/navigo',
'leaflet': '../node_modules/leaflet/dist/leaflet',
'moment': '../node_modules/moment/moment',
'moment': '../node_modules/moment/min/moment.min',
// d3 modules indirect dependencies
// by d3-zoom: d3-drag
'd3-ease': '../node_modules/d3-ease/dist/d3-ease',
Expand Down
7 changes: 4 additions & 3 deletions assets/icons/icon.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ $cache-breaker: unique-id();
font-family: 'ionicons';
font-style: normal;
font-weight: normal;
src: url('fonts/meshviewer.woff2?rel=#{$cache-breaker}') format('woff2'),
url('fonts/meshviewer.woff?rel=#{$cache-breaker}') format('woff'),
url('fonts/meshviewer.ttf?rel=#{$cache-breaker}') format('truetype');
src:
url('fonts/meshviewer.woff2?rel=#{$cache-breaker}') format('woff2'),
url('fonts/meshviewer.woff?rel=#{$cache-breaker}') format('woff'),
url('fonts/meshviewer.ttf?rel=#{$cache-breaker}') format('truetype');
}

[class^='ion-'],
Expand Down
2 changes: 0 additions & 2 deletions gulp/tasks/copy.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ module.exports = function (gulp, plugins, config) {
.pipe(gulp.dest(config.build));
gulp.src(['polyfill.js'])
.pipe(gulp.dest(config.build + '/vendor'));
gulp.src(['node_modules/promise-polyfill/dist/polyfill.js'])
.pipe(gulp.dest(config.build + '/vendor/promise'));
return gulp.src(['assets/fonts/*', 'assets/icons/fonts/*'])
.pipe(gulp.dest(config.build + '/fonts'));
};
Expand Down
2 changes: 1 addition & 1 deletion gulp/tasks/sass.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module.exports = function (gulp, plugins, config, env) {
return function sass() {
return gulp.src('scss/*.scss')
.pipe(env.development(plugins.sourcemaps.init()))
.pipe(plugins.sass({
.pipe(require('gulp-sass')(require('sass'))({
outputStyle: 'compressed',
sourceMap: false
}))
Expand Down
10 changes: 7 additions & 3 deletions gulp/tasks/sasslint.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
module.exports = function (gulp, plugins, config, env) {
return function sasslint() {
return gulp.src('scss/**/*.scss')
.pipe(plugins.sassLint())
.pipe(plugins.sassLint.format())
.pipe(env.production(plugins.sassLint.failOnError()));
.pipe(plugins.stylelint({
syntax: 'scss',
failAfterError: env.production(),
reporters: [
{ formatter: 'string', console: true }
]
}));
};
};
1 change: 0 additions & 1 deletion html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
<!-- contents of html partials will be injected here -->
<!-- endinject -->
<script src="vendor/polyfill.js" inline></script>
<script src="vendor/promise/polyfill.js" inline></script>
<script src="app.js" inline></script>
</head>
<body>
Expand Down
2 changes: 1 addition & 1 deletion lib/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ define(['map/clientlayer', 'map/labellayer', 'map/button', 'leaflet', 'map/activ
var layers = config.mapLayers.map(function (d) {
return {
'name': d.name,
'layer': L.tileLayer(d.url.replace('{retina}', L.Browser.retina ? '@2x' : ''), d.config)
'layer': L.tileLayer(d.url.replace('{format}', document.createElement('canvas').toDataURL('image/webp').indexOf('data:image/webp') === 0 ? 'webp' : 'png'), d.config)
};
});

Expand Down
6 changes: 3 additions & 3 deletions lib/utils/helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,10 @@ define({
}
},
showStat: function showStat(V, o, subst) {
var content = V.h('img', { attrs: { src: require('helper').listReplace(o.image, subst) } });
var content = V.h('img', { attrs: { src: require('helper').listReplace(o.image, subst), width: o.width, height: o.height, alt: _.t('loading', { name: o.name }) } });

if (o.href) {
return V.h('p', V.h('a', {
return V.h('div', V.h('a', {
attrs:
{
href: require('helper').listReplace(o.href, subst),
Expand All @@ -129,7 +129,7 @@ define({
}
}, content));
}
return V.h('p', content);
return V.h('div', content);
},

getTileBBox: function getTileBBox(s, map, tileSize, margin) {
Expand Down
3 changes: 2 additions & 1 deletion locale/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,5 +94,6 @@
"none": "keine",
"remove": "entfernen",
"close": "schließen",
"deprecation": "Warnung: Dieser Knoten ist veraltet, und wird demnächst nicht mehr unterstützt. Mehr Infos unter <a href='https://openwrt.org/supported_devices/432_warning'>4/32 warning</a>. <br> Wenn du der Eigentümer des Gerätes bist, bitten wir dich, das Gerät zu ersetzen, um weiterhin am Netz teilnehmen zu können."
"deprecation": "Warnung: Dieser Knoten ist veraltet, und wird demnächst nicht mehr unterstützt. Mehr Infos unter <a href='https://openwrt.org/supported_devices/432_warning'>4/32 warning</a>. <br> Wenn du der Eigentümer des Gerätes bist, bitten wir dich, das Gerät zu ersetzen, um weiterhin am Netz teilnehmen zu können.",
"loading": "%{name} graph (wird generiert)"
}
3 changes: 2 additions & 1 deletion locale/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,5 +94,6 @@
"none": "none",
"remove": "remove",
"close": "close",
"deprecation": "This node is deprecated, and will be out of support soon. More information under <a href='https://openwrt.org/supported_devices/432_warning'>4/32 warning</a>.<br>If you're the owner, please replace it with an modern device!"
"deprecation": "This node is deprecated, and will be out of support soon. More information under <a href='https://openwrt.org/supported_devices/432_warning'>4/32 warning</a>.<br>If you're the owner, please replace it with an modern device!",
"loading": "%{name} graph (is generated)"
}
Loading

0 comments on commit 6ed121b

Please sign in to comment.