From b0c20e02a5207b8c1cbd76a0f3a283d0f5e79473 Mon Sep 17 00:00:00 2001 From: Robert Marshall Date: Mon, 6 Sep 2021 10:38:15 +0100 Subject: [PATCH] Add maps page, starting on a mechanism to save interesting locations. --- src/Website/Controllers/MapsController.cs | 16 ++++++++++++ src/Website/Views/Maps/Index.cshtml | 32 +++++++++++++++++++++++ src/Website/Views/Shared/_Layout.cshtml | 1 + src/Website/wwwroot/css/map.scss | 14 ++++++++++ src/Website/wwwroot/css/style.scss | 1 + 5 files changed, 64 insertions(+) create mode 100644 src/Website/Controllers/MapsController.cs create mode 100644 src/Website/Views/Maps/Index.cshtml create mode 100644 src/Website/wwwroot/css/map.scss diff --git a/src/Website/Controllers/MapsController.cs b/src/Website/Controllers/MapsController.cs new file mode 100644 index 0000000..f3d2dac --- /dev/null +++ b/src/Website/Controllers/MapsController.cs @@ -0,0 +1,16 @@ +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Mvc; + +namespace Website.Controllers { + [Authorize] + public class MapsController : Controller { + public IActionResult Index() { + return View(); + } + + [HttpPost] + public IActionResult CreateMap(string name) { + throw new System.NotImplementedException(); + } + } +} \ No newline at end of file diff --git a/src/Website/Views/Maps/Index.cshtml b/src/Website/Views/Maps/Index.cshtml new file mode 100644 index 0000000..22ea120 --- /dev/null +++ b/src/Website/Views/Maps/Index.cshtml @@ -0,0 +1,32 @@ + +@{ + ViewBag.Title = "Maps"; + Layout = "_Layout"; +} + +@section head { + + +} + + + +
+ +
+ + +
+ + \ No newline at end of file diff --git a/src/Website/Views/Shared/_Layout.cshtml b/src/Website/Views/Shared/_Layout.cshtml index bdb39d7..cbcfa2f 100644 --- a/src/Website/Views/Shared/_Layout.cshtml +++ b/src/Website/Views/Shared/_Layout.cshtml @@ -14,6 +14,7 @@ + @await RenderSectionAsync("head", false)
diff --git a/src/Website/wwwroot/css/map.scss b/src/Website/wwwroot/css/map.scss new file mode 100644 index 0000000..cf12608 --- /dev/null +++ b/src/Website/wwwroot/css/map.scss @@ -0,0 +1,14 @@ +#map{ + height: 80vh; + margin: 0 10px; + + .leaflet-control{ + opacity: 0; + } + + &:hover{ + .leaflet-control{ + opacity: 1; + } + } +} \ No newline at end of file diff --git a/src/Website/wwwroot/css/style.scss b/src/Website/wwwroot/css/style.scss index 212ef01..b3468fd 100644 --- a/src/Website/wwwroot/css/style.scss +++ b/src/Website/wwwroot/css/style.scss @@ -3,6 +3,7 @@ $fa-font-path: "../webfonts"; @import "../../node_modules/@fortawesome/fontawesome-free/scss/fontawesome.scss"; @import "../../node_modules/@fortawesome/fontawesome-free/scss/solid.scss"; +@import "map.css"; * { box-sizing: border-box;