Attention ! Gitlab fournissant maintenant nativement des certificats Let’s Encrypt aux domaines personnalisés des Gitlab Pages, nous avons coupé notre service qui le faisait automatiquement pour vous.

Il est impératif, pour que votre domaine personnalisé continue à avoir un certificat Let’s Encrypt à jour, d’activer la fonctionnalité native dans les paramètres de votre projet. Cette activation remplacera votre certificat actuel par un nouveau certificat Let’s Encrypt géré par Gitlab.

Voir les détails sur https://docs.framasoft.org/fr/gitlab/gitlab-pages-le.html

Commit 23b9acae authored by Adrien Pavie's avatar Adrien Pavie

Initial commit

parents
/node_modules
/dist
/dist.zip
*.log
This diff is collapsed.
# OpenAdvertMap
# Interactive map showing advertisement data from OpenStreetMap
# Author: Adrien PAVIE
#
# Makefile
# Folders
SRC_FOLDER=./src
DIST_FOLDER=./dist
NM_FOLDER=./node_modules
IMG_FOLDER=$(SRC_FOLDER)/img
# Binaries
BROWSERIFY=$(NM_FOLDER)/browserify/bin/cmd.js
NPMCSS=$(NM_FOLDER)/npm-css/bin/npm-css
UGLIFYCSS=$(NM_FOLDER)/uglifycss/uglifycss
UGLIFYJS=$(NM_FOLDER)/uglify-js-harmony/bin/uglifyjs
WATCHIFY=$(NM_FOLDER)/watchify/bin/cmd.js
# Options
BABELIFY_TRANSFORM=-t [ babelify --presets [ latest stage-0 ] ]
# Targets
CSS_OUT=$(DIST_FOLDER)/OAM.css
CSS_MIN_OUT=$(DIST_FOLDER)/OAM.min.css
DIST_ZIP=./dist.zip
MAIN_JS_OUT=$(DIST_FOLDER)/OAM.js
MAIN_JS_MIN_OUT=$(DIST_FOLDER)/OAM.min.js
# Tasks
all: deps assets jsdebug js distzip
deps:
npm install
assets: distfolder html images nm_assets css mincss
distfolder:
mkdir -p $(DIST_FOLDER)
html:
cp $(SRC_FOLDER)/*.html $(DIST_FOLDER)/
images:
cp -r $(IMG_FOLDER) $(DIST_FOLDER)/
rm -f $(DIST_FOLDER)/img/*.svg
nm_assets:
cp $(NM_FOLDER)/leaflet/dist/images/* $(DIST_FOLDER)/img/
css:
$(NPMCSS) $(SRC_FOLDER)/css/OAM.css > $(CSS_OUT)
sed -i 's#images/#img/#g;s#../img/#img/#g' $(CSS_OUT)
mincss:
$(UGLIFYCSS) --ugly-comments $(CSS_OUT) > $(CSS_MIN_OUT)
jsdebug:
$(BROWSERIFY) $(BABELIFY_TRANSFORM) $(SRC_FOLDER)/js/ctrl/Main.js --debug --s OAM > $(MAIN_JS_OUT)
js:
$(BROWSERIFY) $(SRC_FOLDER)/js/ctrl/Main.js --s OAM $(BABELIFY_TRANSFORM) | $(UGLIFYJS) -c > $(MAIN_JS_MIN_OUT)
distzip:
rm -f $(DIST_ZIP)
zip -9 -r $(DIST_ZIP) $(DIST_FOLDER)/
# Watch
watchmain:
$(WATCHIFY) --debug $(SRC_FOLDER)/js/ctrl/Main.js -o $(MAIN_JS_OUT) --s OAM -v $(BABELIFY_TRANSFORM)
# Cleaning
clean:
rm -rf $(DIST_FOLDER)
rm -f $(DIST_ZIP)
OpenAdvertMap
=============
Read-me
-------
OpenAdvertMap is an interactive map showing advertisement-related data from [OpenStreetMap](http://openstreetmap.org). OpenAdvertMap is written in JavaScript (ES6).
A live demo is available at: http://projets.pavie.info/openadvertmap/
Build
-----
### Dependencies
* npm
* sed
### Compiling
If you want to build OpenAdvertMap by yourself, you can do the following (but it's not necessary for install, as a build is already available in [Tags page](https://framagit.org/PanierAvide/OpenAdvertMap/tags)):
```
make
```
When this is done, OpenAdvertMap is ready in **dist/** folder.
Installation
------------
If you want to install your own OpenAdvertMap instance, just upload the content of the **dist/** folder after build (or of **dist.zip**) in your own FTP or web server. That's all.
License
-------
Copyright 2016 Adrien PAVIE
See LICENSE for complete AGPL3 license.
OpenAdvertMap is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenAdvertMap is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with OpenAdvertMap. If not, see <http://www.gnu.org/licenses/>.
{
"name": "openadvertmap",
"version": "1.0.0",
"description": "Interactive map showing advertisement data from OpenStreetMap",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "https://framagit.org/PanierAvide/OpenAdvertMap.git"
},
"keywords": [
"ad",
"advert",
"advertisement",
"openstreetmap",
"map"
],
"author": "Adrien Pavie",
"license": "SEE LICENSE IN LICENSE.txt",
"devDependencies": {
"babel-preset-latest": "^6.16.0",
"babel-preset-stage-0": "^6.16.0",
"babelify": "^7.3.0",
"browserify": "^13.1.1",
"npm-css": "^0.2.3",
"uglify-js-harmony": "^2.6.2",
"uglifycss": "0.0.25",
"watchify": "^3.7.0"
},
"dependencies": {
"leaflet": "^1.0.2",
"leaflet-hash": "^0.2.1",
"leaflet-overpass-layer": "^2.4.1"
}
}
/*
* This file is part of OpenAdvertMap.
*
* OpenAdvertMap is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* any later version.
*
* OpenAdvertMap is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with OpenAdvertMap. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* OAM CSS bundle
*/
/** Node modules imports **/
@import "../../node_modules/leaflet/dist/leaflet.css";
@import "../../node_modules/leaflet-overpass-layer/dist/OverPassLayer.css";
/** General style **/
html, body {
margin: 0;
padding: 0;
width: 100%;
height: 100%;
color: #D35400;
font-family: Arial, sans;
}
a {
color: #1E8BC3;
text-decoration: none;
}
header {
margin: 0;
padding: 0;
width: 100%;
height: 50px;
background-color: #FDE3A7;
color: #d2d7d3;
border-bottom: 1px solid #6C7A89;
}
header img.logo {
height: 40px;
margin: 5px 10px;
}
#openadvertmap {
position: absolute;
top: 51px;
left: 0;
right: 0;
bottom: 0;
}
<!DOCTYPE html5>
<html>
<!--
This file is part of OpenAdvertMap.
OpenAdvertMap is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
any later version.
OpenAdvertMap is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with OpenAdvertMap. If not, see <http://www.gnu.org/licenses/>.
-->
<!--
OpenAdvertMap
Interactive map showing advertisement data from OpenStreetMap
Author: Adrien PAVIE
Main page
-->
<head>
<!-- General definitions -->
<title>OpenAdvertMap</title>
<meta charset="utf-8" />
<meta name="description" content="Interactive map showing advertisement data from OpenStreetMap" />
<meta name="keywords" content="ad, advert, advertisement, map, openstreetmap" />
<meta name="author" content="Adrien PAVIE (PanierAvide)" />
<meta name="copyright" content="&copy; Adrien PAVIE 2016, under AGPL v3" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<!--link rel="icon" type="image/png" href="img/logo.32.png" /-->
<!-- Stylesheets -->
<link rel="stylesheet" href="OAM.min.css" />
</head>
<body>
<!-- Header -->
<header>
<a href="./" title="OpenAdvertMap"><img src="img/logo_full_light.512.png" class="logo" alt="OpenAdvertMap" /></a>
</header>
<!-- OpenAdvertMap div -->
<div id="openadvertmap"></div>
<!-- JS libraries -->
<script src="OAM.js"></script>
<!--script src="OAM.min.js"></script-->
<!-- Init code -->
<script>
var main = OAM.init("openadvertmap");
</script>
</body>
</html>
/*
* This file is part of OpenAdvertMap.
*
* OpenAdvertMap is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* any later version.
*
* OpenAdvertMap is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with OpenAdvertMap. If not, see <http://www.gnu.org/licenses/>.
*/
let L = require("leaflet");
require("leaflet-hash");
require("../../../node_modules/leaflet-overpass-layer/dist/OverPassLayer.bundle.js");
/**
* Main controller manages everything related to main page.
*/
class Main {
//CONSTRUCTOR
constructor(divId) {
/*
* Map init
*/
this.map = L.map(divId).setView([42.5, -3], 3);
this.map.attributionControl.setPrefix('<a href="http://pavie.info">&copy; Adrien Pavie 2016</a> | <a href="https://framagit.org/PanierAvide/OpenAdvertMap">About</a>');
let hash = new L.Hash(this.map);
var http = window.location && window.location.protocol == 'https:' ? 'https:' : 'http:';
L.tileLayer(http+'//{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
name: "OpenStreetMap",
attribution: "Tiles <a href=\"http://openstreetmap.org/\">OSM</a>",
maxZoom: 19
}).addTo(this.map);
/*
* Overpass layer
*/
this.mapData = new L.OverPassLayer({
'query': '(node({{bbox}})[advertising]);out qt;'
}).addTo(this.map);
}
}
module.exports = {
init: function(divId) {
return new Main(divId);
}
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment