Compare commits

..
Author SHA1 Message Date
Xaver Maierhofer
ed06ff6b09 [!!!][TASK] Refactor Scss, add Sass-lint and adjust styling
Add variables to allow easy modifications to color, font and also extending Style
2017-03-18 20:06:42 +01:00
Xaver Maierhofer
6175d6bb7a [TASK] Update eslint to 2.11.0 2017-03-18 16:30:18 +01:00
Milan Pässler
931ca67fc2 [BUGFIX] bower package name should be lowercase 2017-03-18 16:29:47 +01:00
Milan Pässler
340c1d9a53 [TASK] Add required information into package.json 2017-03-18 16:29:30 +01:00
Xaver Maierhofer
ae59f75594 [TASK] Use strict 2017-03-18 16:26:29 +01:00
Xaver Maierhofer
d57ce0052a [TASK] Add scss to grunt watcher 2017-03-18 16:26:29 +01:00
Xaver Maierhofer
894f32da54 [TASK] Style layer selector 2017-03-18 16:26:29 +01:00
Milan Pässler
a8c19ba44c [!!!][TASK] Use eslint default 2017-03-18 16:26:29 +01:00
Xaver Maierhofer
a627e2febc [TASK] Remove tablesort number
No complex different styled numbers need to be sorted
2017-03-18 16:26:29 +01:00
Xaver Maierhofer
e32fe6648d [TASK] Remove jsHashes 2017-03-18 16:26:29 +01:00
Xaver Maierhofer
a2ab0dce4f [TASK] Simple sort for firmware versions 2017-03-18 16:26:29 +01:00
Xaver Maierhofer
90d2c3e444 [TASK] Replace numeraljs with toFixed vanilla js 2017-03-18 16:26:29 +01:00
Xaver Maierhofer
a56876a10e [TASK] Update npm bower install module 2017-03-18 16:26:29 +01:00
Xaver Maierhofer
2d5e35324a [TASK] Add helper.js to grunt watch 2017-03-18 16:26:29 +01:00
Xaver Maierhofer
28de7c5403 [TASK] Adjust marker style - focus on online nodes 2017-03-18 16:26:29 +01:00
Milan Pässler
2630b6197d fix linting 2017-03-18 16:26:29 +01:00
Nils Schneider
62d64c717c [TASK] remove build.js, it is not needed anymore 2017-03-18 16:26:29 +01:00
Xaver Maierhofer
5691406d09 [TASK] Format load average 2017-03-18 16:26:29 +01:00
Xaver Maierhofer
e80f7d899d [TASK] Only add german language from numeral.js 2017-03-18 16:26:29 +01:00
Xaver Maierhofer
292c5c020c [TASK] Unicode instead of utf8 icons 2017-03-18 16:26:25 +01:00
Xaver Maierhofer
58279ac213 [BUGFIX] Enable build for default 2017-03-17 03:23:28 +01:00
Xaver Maierhofer
6f4b9d6701 [TASK] Replace all specialchars in NODE_NAME in stat urls 2017-03-17 03:23:28 +01:00
Xaver Maierhofer
e9e393e105 [TASK] Seperate dev and default for requirejs 2017-03-17 03:23:28 +01:00
Xaver Maierhofer
5921a5f355 [TASK] Add index option to grunt-conncet server 2017-03-17 03:23:28 +01:00
Xaver Maierhofer
c9458ffcae [TASK] CGL - Optimize returns and unnecessary math 2017-03-17 03:23:28 +01:00
Xaver Maierhofer
c7b58d5743 [TASK] Inline style and icon css and es6-shim 2017-03-17 03:23:28 +01:00
Xaver Maierhofer
7389547e3e [BUGFIX] Correct css path to icon font 2017-03-17 03:23:28 +01:00
Xaver Maierhofer
6aec0b21a8 [TASK] Update bower components 2017-03-17 03:23:28 +01:00
Xaver Maierhofer
04eb8f039b [TASK] Only include additional german locale
English is default
2017-03-17 03:23:28 +01:00
Xaver Maierhofer
0abd4130cf [TASK] Use own iconfont set
Reduce overhead in initial load
2017-03-17 03:23:28 +01:00
Milan Pässler
418b630e02 change code style to ffrgb/meshviewer fork 2017-03-17 03:23:07 +01:00
H4ndl3
59ba0ba29e add loading animation
Create _loader.scss

Update main.scss

Update _base.scss

Update gui.js

Update index.html

removed trailing spaces

removed trailing white spaces for real
2017-03-17 03:16:41 +01:00
82 changed files with 4580 additions and 7427 deletions

View file

@ -11,6 +11,6 @@ trim_trailing_whitespace = true
end_of_line = lf
insert_final_newline = true
[*.{js,html,scss,json}]
[*.{js,html,scss,json,yml,md}]
indent_size = 2
indent_style = space

2
.gitignore vendored
View file

@ -3,3 +3,5 @@ node_modules/
build/
.sass-cache/
config.json
.idea/
.eslintrc

3
.sass-lint.yml Normal file
View file

@ -0,0 +1,3 @@
rules:
no-color-literals: 0
single-line-per-selector: 0

View file

@ -1,7 +1,7 @@
language: node_js
node_js:
- "lts/*"
- "node"
before_install:
- gem install sass
- npm install -g grunt-cli
install:
- yarn
script: node_modules/.bin/grunt
- npm install
script: grunt

View file

@ -1,24 +1,11 @@
module.exports = function (grunt) {
grunt.loadNpmTasks("grunt-git-describe")
"use strict";
grunt.initConfig({
"git-describe": {
options: {},
default: {}
}
})
grunt.loadTasks("tasks");
grunt.registerTask("saveRevision", function() {
grunt.event.once("git-describe", function (rev) {
grunt.option("gitRevision", rev)
})
grunt.task.run("git-describe")
})
grunt.loadTasks("tasks")
grunt.registerTask("default", ["lint", "saveRevision", "copy", "sass", "postcss", "requirejs"])
grunt.registerTask("lint", ["eslint"])
grunt.registerTask("dev", ["default", "connect:server", "watch"])
}
grunt.registerTask("default", ["bower-install-simple", "lint", "copy", "sass", "postcss", "requirejs:default", "inline"]);
grunt.registerTask("lint", ["sasslint", "eslint"]);
grunt.registerTask("dev", ["bower-install-simple", "lint", "copy", "sass", "requirejs:dev"]);
grunt.registerTask("serve", ["dev", "connect:server", "watch"]);
};

View file

@ -1,8 +1,8 @@
[![Build Status](https://travis-ci.org/hopglass/hopglass.svg?branch=master)](https://travis-ci.org/hopglass/hopglass)
[![Build Status](https://travis-ci.org/plumpudding/hopglass.svg?branch=master)](https://travis-ci.org/plumpudding/hopglass)
# HopGlass
HopGlass is a frontend for the [HopGlass Server](https://github.com/hopglass/hopglass-server).
HopGlass is a frontend for the [HopGlass Server](https://github.com/plumpudding/hopglass-server).
# Screenshots
@ -14,32 +14,29 @@ HopGlass is a frontend for the [HopGlass Server](https://github.com/hopglass/hop
# Dependencies
- NodeJS
- yarn (recommended) or npm
- npm
- bower
- grunt-cli
- Sass (>= 3.2)
# Installing dependencies
Install npm package-manager. On Debian-like systems run:
sudo apt-get install nodejs
sudo apt-get install npm
**Note:** The official Debian packages for NodeJS are quite old, you might want to check at [NodeSource](https://github.com/nodesource/distributions/blob/master/README.md) for current binaries installable with your distribution's package manager.
On Mac you can install nodejs and yarn via brew:
On Mac you have to install only npm via brew and sass
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install node
brew install yarn
On Arch Linux you can install nodejs and yarn via pacman:
sudo pacman -S nodejs yarn
npm install node-sass
Execute these commands on your server as a normal user to prepare the dependencies:
git clone https://github.com/hopglass/hopglass
git clone https://github.com/plumpudding/hopglass
cd hopglass
yarn install # or `npm install`
npm install
npm install grunt-cli
# Building
@ -49,13 +46,22 @@ Just run the following command from the hopglass directory:
This will generate `build/` containing all required files.
## Development
Use `grunt serve` for development.
# Configure
Copy `config.json.example` to `build/config.json` and change it to match your community.
## Customize style
Start your development and edit files in `scss/custom/`. Additional information in comments.
## dataPath (string/array)
`dataPath` can be either a string containing the address of a [HopGlass Server](https://github.com/hopglass/hopglass-server) or an array containing multiple addresses.
`dataPath` can be either a string containing the address of a [HopGlass Server](https://github.com/plumpudding/hopglass-server) or an array containing multiple addresses.
Don't forget the trailing slash!
Also, proxying the data through a webserver will allow GZip and thus will greatly reduce bandwidth consumption.
It may help with firewall problems too.

44
app.js
View file

@ -1,36 +1,30 @@
"use strict";
require.config({
baseUrl: "lib",
paths: {
"leaflet": "../node_modules/leaflet/dist/leaflet",
"leaflet.label": "../node_modules/leaflet-label/dist/leaflet.label",
"leaflet.providers": "../node_modules/leaflet-providers/leaflet-providers",
"chroma-js": "../node_modules/chroma-js/chroma.min",
"moment": "../node_modules/moment/min/moment-with-locales.min",
"tablesort": "../node_modules/tablesort/tablesort.min",
"tablesort.numeric": "../node_modules/tablesort/src/sorts/tablesort.numeric",
"d3": "../node_modules/d3/d3.min",
"numeral": "../node_modules/numeraljs/min/numeral.min",
"numeral-intl": "../node_modules/numeraljs/min/languages.min",
"virtual-dom": "../node_modules/virtual-dom/dist/virtual-dom",
"rbush": "../node_modules/rbush/rbush",
"helper": "../helper",
"jshashes": "../node_modules/jshashes/hashes"
"leaflet": "../bower_components/leaflet/dist/leaflet",
"leaflet.label": "../bower_components/Leaflet.label/dist/leaflet.label",
"leaflet.providers": "../bower_components/leaflet-providers/leaflet-providers",
"chroma-js": "../bower_components/chroma-js/chroma.min",
"moment": "../bower_components/moment/min/moment.min",
"moment.de": "../bower_components/moment/locale/de",
"tablesort": "../bower_components/tablesort/src/tablesort",
"d3": "../bower_components/d3/d3.min",
"virtual-dom": "../bower_components/virtual-dom/dist/virtual-dom",
"rbush": "../bower_components/rbush/rbush",
"helper": "utils/helper"
},
shim: {
"leaflet.label": ["leaflet"],
"leaflet.providers": ["leaflet"],
"moment.de": ["moment"],
"tablesort": {
exports: "Tablesort"
},
"numeral-intl": {
deps: ["numeral"],
exports: "numeral"
},
"tablesort.numeric": ["tablesort"],
"helper": ["numeral-intl"]
}
}
})
});
require(["main", "helper"], function (main) {
getJSON("config.json").then(main)
})
require(["main", "helper"], function (main, helper) {
helper.getJSON("config.json").then(main);
});

View file

@ -0,0 +1,7 @@
@mixin icon($name, $code, $prefix: 'ion-') {
.#{$prefix}#{$name} {
&:before {
content: '#{$code}';
}
}
}

BIN
assets/icons/fonts/icon.ttf Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

45
assets/icons/icon.scss Normal file
View file

@ -0,0 +1,45 @@
// Needed for standalone scss
// @import 'icon-mixin';
@font-face {
font-family: 'ionicons';
font-style: normal;
font-weight: normal;
src: url('fonts/icon.woff2') format('woff2'),
url('fonts/icon.woff') format('woff'),
url('fonts/icon.ttf') format('truetype');
}
[class^='ion-'], [class*=' ion-'] {
&:before {
display: inline-block;
font-family: $font-family-icons;
font-style: normal;
font-variant: normal;
font-weight: normal;
line-height: 1;
speak: none;
text-rendering: auto;
text-transform: none;
vertical-align: 0;
}
}
@include icon('android-add', '\f2c7');
@include icon('chevron-left', '\f124');
@include icon('chevron-right', '\f125');
@include icon('pin', '\f3a3');
@include icon('wifi', '\f25c');
@include icon('eye', '\f133');
@include icon('ios-arrow-thin-left', '\f3d5');
@include icon('ios-arrow-thin-right', '\f3d6');
@include icon('arrow-up-b', '\f10d');
@include icon('arrow-down-b', '\f104');
@include icon('android-locate', '\f2e9');
@include icon('android-close', '\f2d7');
@include icon('android-lock', '\f392');
@include icon('ios-copy', '\f41c');
@include icon('location', '\f456');
@include icon('android-remove', '\f2f4');
@include icon('ios-person', '\f47e');
@include icon('layer', '\f229');

32
bower.json Normal file
View file

@ -0,0 +1,32 @@
{
"name": "hopglass",
"ignore": [
"node_modules",
"bower_components",
"**/.*",
"test",
"tests"
],
"dependencies": {
"Leaflet.label": "~0.2.1",
"chroma-js": "~1.1.1",
"leaflet": "~0.7.7",
"moment": "~2.13.0",
"requirejs": "~2.2.0",
"tablesort": "https://github.com/tristen/tablesort.git#v4.0.1",
"roboto-slab-fontface": "*",
"es6-shim": "~0.35.1",
"almond": "~0.3.2",
"d3": "~3.5.17",
"roboto-fontface": "~0.4.5",
"virtual-dom": "~2.1.1",
"leaflet-providers": "~1.1.10",
"rbush": "https://github.com/mourner/rbush.git#~1.4.3"
},
"authors": [
"Milan Pässler <me@petabyteboy.de>",
"Nils Schneider <nils@nilsschneider.net>"
],
"license": "AGPL3",
"private": true
}

View file

@ -1,9 +0,0 @@
({
baseUrl: "lib",
name: "../node_modules/almond/almond",
mainConfigFile: "app.js",
include: "../app",
wrap: true,
optimize: "uglify",
out: "app-combined.js"
})

View file

@ -5,25 +5,11 @@
"showContact": true,
"maxAge": 14,
"mapLayers": [
{ "name": "CartoDB",
"url": "https://cartodb-basemaps-{s}.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png",
"config": {
"maxZoom": 18,
"attribution": "&copy; <a href=\"http://www.openstreetmap.org/copyright\">OpenStreetMap</a>, &copy; | <a href=\"https://carto.com/attribution\">CARTO</a>"
}
},
{
"name": "OpenStreetMap.HOT"
},
{
"name": "Luftbilder NRW",
"url": "https://www.wms.nrw.de/geobasis/wms_nw_dop?",
"config": {
"maxZoom": 20,
"attribution": "<a href=\"http://www.bezreg-koeln.nrw.de/brk_internet/geobasis/luftbilderzeugnisse/digitale_orthophotos/index.html\">DOP20</a>, Land NRW (2017), Datenlizenz Deutschland - Namensnennung - Version 2.0 (<a href=\"https://www.govdata.de/dl-de/by-2-0\">www.govdata.de/dl-de/by-2-0</a>)",
"format": "image/jpeg",
"layers": "nw_dop_rgb"
}
"name": "Stamen.TonerLite"
}
],
"nodeInfos": [

249
helper.js
View file

@ -1,228 +1,241 @@
function get(url) {
return new Promise(function(resolve, reject) {
var req = new XMLHttpRequest()
req.open('GET', url)
return new Promise(function (resolve, reject) {
var req = new XMLHttpRequest();
req.open('GET', url);
req.onload = function() {
req.onload = function () {
if (req.status == 200) {
resolve(req.response)
resolve(req.response);
}
else {
reject(Error(req.statusText))
reject(Error(req.statusText));
}
}
};
req.onerror = function() {
reject(Error("Network Error"))
}
req.onerror = function () {
reject(Error("Network Error"));
};
req.send()
})
req.send();
});
}
function getJSON(url) {
return get(url).then(JSON.parse)
return get(url).then(JSON.parse);
}
function sortByKey(key, d) {
return d.slice().sort( function (a, b) {
return a[key] - b[key]
}).reverse()
return d.slice().sort(function (a, b) {
return a[key] - b[key];
}).reverse();
}
function limit(key, m, d) {
return d.filter( function (d) {
return d[key].isAfter(m)
})
return d.filter(function (d) {
return d[key].isAfter(m);
});
}
function sum(a) {
return a.reduce( function (a, b) {
return a + b
}, 0)
return a.reduce(function (a, b) {
return a + b;
}, 0);
}
function one() {
return 1
return 1;
}
function trueDefault(d) {
return d === undefined ? true : d
return d === undefined ? true : d;
}
function dictGet(dict, key) {
var k = key.shift()
var k = key.shift();
if (!(k in dict))
return null
if (!(k in dict)) {
return null;
}
if (key.length == 0)
return dict[k]
if (key.length == 0) {
return dict[k];
}
return dictGet(dict[k], key)
return dictGet(dict[k], key);
}
function localStorageTest() {
var test = 'test'
var test = 'test';
try {
localStorage.setItem(test, test)
localStorage.removeItem(test)
return true
} catch(e) {
return false
localStorage.setItem(test, test);
localStorage.removeItem(test);
return true;
} catch (e) {
return false;
}
}
function listReplace(s, subst) {
for (key in subst) {
var re = new RegExp(key, 'g')
s = s.replace(re, subst[key])
var re = new RegExp(key, 'g');
s = s.replace(re, subst[key]);
}
return s
return s;
}
/* Helpers working with nodes */
function offline(d) {
return !d.flags.online
return !d.flags.online;
}
function online(d) {
return d.flags.online
return d.flags.online;
}
function has_location(d) {
return "location" in d.nodeinfo &&
Math.abs(d.nodeinfo.location.latitude) < 90 &&
Math.abs(d.nodeinfo.location.longitude) < 180
Math.abs(d.nodeinfo.location.latitude) < 90 &&
Math.abs(d.nodeinfo.location.longitude) < 180;
}
function subtract(a, b) {
var ids = {}
var ids = {};
b.forEach( function (d) {
ids[d.nodeinfo.node_id] = true
})
b.forEach(function (d) {
ids[d.nodeinfo.node_id] = true;
});
return a.filter( function (d) {
return !(d.nodeinfo.node_id in ids)
})
return a.filter(function (d) {
return !(d.nodeinfo.node_id in ids);
});
}
/* Helpers working with links */
function showDistance(d) {
if (isNaN(d.distance))
return
if (isNaN(d.distance)) {
return;
}
return numeral(d.distance).format("0,0") + " m"
return d.distance.toFixed(0) + " m"
}
function showTq(d) {
return numeral(1/d.tq).format("0%")
return (1 / d.tq * 100).toFixed(0) + "%"
}
/* Infobox stuff (XXX: move to module) */
function attributeEntry(el, label, value) {
if (value === null || value == undefined)
return
var tr = document.createElement("tr")
var th = document.createElement("th")
if (typeof label === "string")
th.textContent = label
else {
th.appendChild(label)
tr.className = "routerpic"
if (value === null || value == undefined) {
return;
}
tr.appendChild(th)
var tr = document.createElement("tr");
var th = document.createElement("th");
if (typeof label === "string") {
th.textContent = label;
} else {
th.appendChild(label);
tr.className = "routerpic";
}
var td = document.createElement("td")
tr.appendChild(th);
if (typeof value == "function")
value(td)
else
td.appendChild(document.createTextNode(value))
var td = document.createElement("td");
tr.appendChild(td)
if (typeof value == "function") {
value(td);
} else {
td.appendChild(document.createTextNode(value));
}
el.appendChild(tr)
tr.appendChild(td);
return td
el.appendChild(tr);
return td;
}
function createIframe(opt, width, height) {
el = document.createElement("iframe")
width = typeof width !== 'undefined' ? width : '100%'
height = typeof height !== 'undefined' ? height : '350px'
el = document.createElement("iframe");
width = typeof width !== 'undefined' ? width : '100%';
height = typeof height !== 'undefined' ? height : '350px';
if (opt.src)
el.src = opt.src
else
el.src = opt
if (opt.src) {
el.src = opt.src;
} else {
el.src = opt;
}
if (opt.frameBorder)
el.frameBorder = opt.frameBorder
else
el.frameBorder = 1
if (opt.frameBorder) {
el.frameBorder = opt.frameBorder;
} else {
el.frameBorder = 1;
}
if (opt.width)
el.width = opt.width
else
el.width = width
if (opt.width) {
el.width = opt.width;
} else {
el.width = width;
}
if (opt.height)
el.height = opt.height
else
el.height = height
if (opt.height) {
el.height = opt.height;
} else {
el.height = height;
}
el.scrolling = "no"
el.seamless = "seamless"
el.scrolling = "no";
el.seamless = "seamless";
return el
return el;
}
function showStat(o, subst) {
var content, caption
subst = typeof subst !== 'undefined' ? subst : {}
var content, caption;
subst = typeof subst !== 'undefined' ? subst : {};
if (o.thumbnail) {
content = document.createElement("img")
content.src = listReplace(o.thumbnail, subst)
content = document.createElement("img");
content.src = listReplace(o.thumbnail, subst);
}
if (o.caption) {
caption = listReplace(o.caption, subst)
caption = listReplace(o.caption, subst);
if (!content)
content = document.createTextNode(caption)
if (!content) {
content = document.createTextNode(caption);
}
}
if (o.iframe) {
content = createIframe(o.iframe, o.width, o.height)
if (o.iframe.src)
content.src = listReplace(o.iframe.src, subst)
else
content.src = listReplace(o.iframe, subst)
content = createIframe(o.iframe, o.width, o.height);
if (o.iframe.src) {
content.src = listReplace(o.iframe.src, subst);
} else {
content.src = listReplace(o.iframe, subst);
}
}
var p = document.createElement("p")
var p = document.createElement("p");
if (o.href) {
var link = document.createElement("a")
link.target = "_blank"
link.href = listReplace(o.href, subst)
link.appendChild(content)
var link = document.createElement("a");
link.target = "_blank";
link.href = listReplace(o.href, subst);
link.appendChild(content);
if (caption && o.thumbnail)
link.title = caption
if (caption && o.thumbnail) {
link.title = caption;
}
p.appendChild(link)
} else
p.appendChild(content)
p.appendChild(link);
} else {
p.appendChild(content);
}
return p
return p;
}

View file

@ -1,28 +1,27 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, user-scalable=no">
<link rel="stylesheet" href="css/ionicons.min.css">
<link rel="stylesheet" href="css/roboto-slab/roboto-slab-fontface.css">
<link rel="stylesheet" href="css/roboto/roboto-fontface.css">
<link rel="stylesheet" href="style.css">
<script src="vendor/es6-shim/es6-shim.min.js"></script>
<script src="app.js"></script>
<script>
console.log("Version: #revision#")
</script>
</head>
<body>
<div class="loader">
<p>
Lade<br />
<span class="spinner"></span><br />
Karte &amp; Knoten...
</p>
<noscript>
<strong>JavaScript required</strong>
</noscript>
</div>
</body>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, user-scalable=no">
<link rel="stylesheet" href="roboto-slab-fontface.css">
<link rel="stylesheet" href="roboto-fontface.css">
<link rel="stylesheet" href="style.css?__inline=true">
<script src="vendor/es6-shim/es6-shim.min.js?__inline=true"></script>
<script src="app.js"></script>
<script>
console.log("Version: #revision#");
</script>
</head>
<body>
<div class="loader">
<p>
Lade<br/>
<span class="spinner"></span><br/>
Karte &amp; Knoten...
</p>
<noscript>
<strong>JavaScript required</strong>
</noscript>
</div>
</body>
</html>

View file

@ -1,17 +1,27 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, user-scalable=no">
<link rel="stylesheet" href="node_modules/roboto-fontface/css/roboto-slab/roboto-slab-fontface.css">
<link rel="stylesheet" href="node_modules/roboto-fontface/css/roboto/roboto-fontface.css">
<link rel="stylesheet" href="node_modules/leaflet/dist/leaflet.css">
<link rel="stylesheet" href="node_modules/leaflet-label/dist/leaflet.label.css">
<link rel="stylesheet" href="node_modules/ionicons/css/ionicons.min.css">
<link rel="stylesheet" href="style.css">
<script src="node_modules/es6-shim/es6-shim.min.js"></script>
<script src="node_modules/requirejs/require.js" data-main="app"></script>
</head>
<body>
</body>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, user-scalable=no">
<link rel="stylesheet" href="bower_components/roboto-slab-fontface/roboto-slab-fontface.css">
<link rel="stylesheet" href="bower_components/roboto-fontface/roboto-fontface.css">
<link rel="stylesheet" href="bower_components/leaflet/dist/leaflet.css">
<link rel="stylesheet" href="bower_components/Leaflet.label/dist/leaflet.label.css">
<link rel="stylesheet" href="assets/icons/hopglass-icons.css">
<link rel="stylesheet" href="style.css">
<script src="bower_components/es6-shim/es6-shim.min.js"></script>
<script src="bower_components/requirejs/require.js" data-main="app"></script>
</head>
<body>
<div class="loader">
<p>
Lade<br/>
<span class="spinner"></span><br \>
Karte &amp; Knoten...
</p>
<noscript>
<strong>JavaScript required</strong>
</noscript>
</div>
</body>
</html>

View file

@ -1,38 +1,38 @@
define(function () {
return function() {
"use strict";
return function () {
this.render = function (d) {
var el = document.createElement("div")
d.appendChild(el)
var s = "<h2>Über HopGlass</h2>"
var s = "<h2>Über HopGlass</h2>";
s += "<p>Mit Doppelklick und Shift+Doppelklick kann man in der Karte "
s += "auch zoomen.</p>"
s += "<p>Mit Doppelklick und Shift+Doppelklick kann man in der Karte ";
s += "auch zoomen.</p>";
s += "<h3>AGPL 3</h3>"
s += "<h3>AGPL 3</h3>";
s += "<p>Copyright (C) Milan Pässler</p>"
s += "<p>Copyright (C) Nils Schneider</p>"
s += "<p>Copyright (C) Milan Pässler</p>";
s += "<p>Copyright (C) Nils Schneider</p>";
s += "<p>This program is free software: you can redistribute it and/or "
s += "modify it under the terms of the GNU Affero General Public "
s += "License as published by the Free Software Foundation, either "
s += "version 3 of the License, or (at your option) any later version.</p>"
s += "<p>This program is free software: you can redistribute it and/or ";
s += "modify it under the terms of the GNU Affero General Public ";
s += "License as published by the Free Software Foundation, either ";
s += "version 3 of the License, or (at your option) any later version.</p>";
s += "<p>This program is distributed in the hope that it will be useful, "
s += "but WITHOUT ANY WARRANTY; without even the implied warranty of "
s += "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the "
s += "GNU Affero General Public License for more details.</p>"
s += "<p>This program is distributed in the hope that it will be useful, ";
s += "but WITHOUT ANY WARRANTY; without even the implied warranty of ";
s += "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ";
s += "GNU Affero General Public License for more details.</p>";
s += "<p>You should have received a copy of the GNU Affero General "
s += "Public License along with this program. If not, see "
s += "<a href=\"https://www.gnu.org/licenses/\">"
s += "https://www.gnu.org/licenses/</a>.</p>"
s += "<p>You should have received a copy of the GNU Affero General ";
s += "Public License along with this program. If not, see ";
s += "<a href=\"https://www.gnu.org/licenses/\">";
s += "https://www.gnu.org/licenses/</a>.</p>";
s += "<p>The source code is available at "
s += "<a href=\"https://github.com/hopglass/hopglass\">"
s += "https://github.com/hopglass/hopglass</a>."
s += "<p>The source code is available at ";
s += "<a href=\"https://github.com/plumpudding/hopglass\">";
s += "https://github.com/plumpudding/hopglass</a>.";
el.innerHTML = s
}
}
})
d.innerHTML = s;
};
};
});

View file

@ -1,20 +1,23 @@
define([], function () {
"use strict";
return function (tag) {
if (!tag)
tag = "div"
if (!tag) {
tag = "div";
}
var self = this
var self = this;
var container = document.createElement(tag)
var container = document.createElement(tag);
self.add = function (d) {
d.render(container)
}
d.render(container);
};
self.render = function (el) {
el.appendChild(container)
}
el.appendChild(container);
};
return self
}
})
return self;
};
});

Some files were not shown because too many files have changed in this diff Show more