diff --git a/static/bower.json b/static/bower.json index 167700f..3874f6f 100644 --- a/static/bower.json +++ b/static/bower.json @@ -16,6 +16,6 @@ "tests" ], "dependencies": { - "leaflet-dist": "~0.7.2" + "lodash": "~3.1.0" } } diff --git a/static/css/style.css b/static/css/style.css index 65e87ff..799b3e6 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -2,6 +2,11 @@ html, body { margin: 0; padding: 0; height: 100%; + font-family: 'Lora', serif; +} + +*, *:before, *:after { + box-sizing: border-box; } body { @@ -12,3 +17,40 @@ body { #map { height: 100%; } + +#year-picker { + position: absolute; + z-index: 10; + top: 6px; + right: 6px; +} + +#year-picker ul { + margin: 0; + padding: 0; + list-style: none; +} + +#year-picker li { + display: inline-block; +} + +#year-picker a { + display: block; + width: 72px; + padding: 12px; + margin: 3px; + background: #222; + text-decoration: none; + color: #ddd; + text-align: center; + transition: background .3s ease; +} + +#year-picker a:hover { + background: #333; +} + +#year-picker .active a { + background: #444; +} diff --git a/static/js/main.js b/static/js/main.js index 3ab504e..141312c 100644 --- a/static/js/main.js +++ b/static/js/main.js @@ -1,5 +1,13 @@ (function () { + // set up background map var map = L.map('map').setView([52.50, 13.40], 11); var layer = new L.StamenTileLayer("toner-lite"); map.addLayer(layer); + + $.get('/articles') + .fail(console.error.bind(console)) + .then(function (data) { + console.log('Got data successfully!'); + console.log(data); + }); })(); diff --git a/views/index.tpl b/views/index.tpl index 795d4dc..e5089f2 100644 --- a/views/index.tpl +++ b/views/index.tpl @@ -1,13 +1,28 @@
-