From ee3c728b674e134ce481fec3cb27f1a594084e2d Mon Sep 17 00:00:00 2001 From: Rhys Evans <EvansRM17@cardiff.ac.uk> Date: Tue, 28 Nov 2023 18:10:28 +0000 Subject: [PATCH] Initial homepage html created along with beginning of layout --- .../Webpages/WebpageController.java | 2 +- .../resources/templates/towns/Templating.html | 35 ++++++------ .../resources/templates/towns/caerphilly.html | 2 +- .../templates/towns/home/homePage.html | 57 +++++++++++++++++++ 4 files changed, 76 insertions(+), 20 deletions(-) create mode 100644 src/main/resources/templates/towns/home/homePage.html diff --git a/src/main/java/Team5/SmartTowns/Webpages/WebpageController.java b/src/main/java/Team5/SmartTowns/Webpages/WebpageController.java index 612aa553..5338f32f 100644 --- a/src/main/java/Team5/SmartTowns/Webpages/WebpageController.java +++ b/src/main/java/Team5/SmartTowns/Webpages/WebpageController.java @@ -29,7 +29,7 @@ public class WebpageController { @GetMapping("/home") public ModelAndView getHome(){ - ModelAndView modelAndView = new ModelAndView("home"); + ModelAndView modelAndView = new ModelAndView("towns/home/homePage"); return modelAndView; } diff --git a/src/main/resources/templates/towns/Templating.html b/src/main/resources/templates/towns/Templating.html index c27b5912..8f289442 100644 --- a/src/main/resources/templates/towns/Templating.html +++ b/src/main/resources/templates/towns/Templating.html @@ -1,25 +1,24 @@ <link rel="stylesheet" href="../../static/css/templatingstyle.css"> <header class="headerBar" th:fragment="header"> - -<div class="Logo"> - <img src="../../static/images/VZTA.png" height="97" width="400" alt="VZTA Logo"/> -</div> -<nav class="navBar"> - <ul> - <li>Home</li> - <li>FAQs</li> - <li>Contact us</li> - </ul> - <label class="work">Who we Work with:</label> - <select> + <div class="Logo"> + <img src="../../static/images/VZTA.png" height="97" width="400" alt="VZTA Logo"/> + </div> + <nav class="navBar"> <ul> - <option value="localauthorities">Local Authorities</option> - <option value="towns">Towns</option> - <option value="businesses">Businesses</option> - <option value="consumers">Consumers</option> + <li>Home</li> + <li>FAQs</li> + <li>Contact us</li> </ul> - </select> -</nav> + <label class="work">Who we Work with:</label> + <select> + <ul> + <option value="localauthorities">Local Authorities</option> + <option value="towns">Towns</option> + <option value="businesses">Businesses</option> + <option value="consumers">Consumers</option> + </ul> + </select> + </nav> </header> <div class="footerBar" th:fragment="footer"> diff --git a/src/main/resources/templates/towns/caerphilly.html b/src/main/resources/templates/towns/caerphilly.html index 811b8f5e..9c17a4a7 100644 --- a/src/main/resources/templates/towns/caerphilly.html +++ b/src/main/resources/templates/towns/caerphilly.html @@ -103,7 +103,7 @@ } .landmarkTitle{ - grid-area:landmarkTitle + grid-area:landmarkTitle; } .container{ display:grid; diff --git a/src/main/resources/templates/towns/home/homePage.html b/src/main/resources/templates/towns/home/homePage.html new file mode 100644 index 00000000..79500126 --- /dev/null +++ b/src/main/resources/templates/towns/home/homePage.html @@ -0,0 +1,57 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="UTF-8"> + <title>Title</title> + <link rel="stylesheet" th:href="@{/css/templatingstyle.css}"> + + + <style> + #homeTitle{ + grid-area: pageTitle; + } + .submitLand{ + grid-area: submitButton; + } + + .gridContainer1{ + display:grid; + grid-template-columns: 10% 70% 10% 10%; + grid-template-rows: auto; + grid-template-areas: + ". pageTitle pageTitle ." + ". . submitButton ."; + + + } + + </style> +</head> +<body> +<!--<header th:insert="~{../Templating.html::header}"></header>--> +<main> +<div class="gridContainer1"> + <H1 id="homeTitle"> Smart Towns - Trails</H1> + <button class="submitLand"> Submit Landmark!</button> + +</div> + + + + + + + + + + + + + + + +</main> +<!--<footer th:insert="~{../Templating::footer}"></footer>--> + +</body> +</html> -- GitLab