iframe.html 1.32 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<!DOCTYPE html>
<html>
    <head>
        <title>ParlementairesJS</title>

        <meta charset="utf-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />

        <script src="parlementaires.js"></script>
        <link rel='stylesheet' href='parlementaires.css' type='text/css' media='all' />

        <style>
            html {
                font-family: sans-serif;
            }
            body {
                padding: 0;
                margin: 0;
            }
            html, body, #map {
                height: 100%;
                width: 100%;
            }
            #parlementaires {
                padding: 1em 3em 1em 3em;
            }
        </style>
    </head>
    <body>
        <div id="parlementaires"></div>
        <script type="text/javascript">
            var hash = window.location.hash.substr(1);

            if (!hash) throw new Error("Dataset is missing");

            var dataset = hash.split('-')[0];
            var filter = decodeURI(hash.split('-')[1]);

            ParlementairesJS({
                dataset: "/json/" + dataset + ".json",
                datasetConfig: "/json/" + dataset + "-config.json",
                commissionFilter: filter
            }).display('parlementaires');
        </script>
    </body>
</html>