diff --git a/src/main/java/Team5/SmartTowns/Landmarks/Landmarks.java b/src/main/java/Team5/SmartTowns/Landmarks/Landmarks.java index 506c31f2f210dcce56357e1af31dba8ef3fa7a72..81c6f5b7e296aef4e31894bd4f3aaaec607fb1c4 100644 --- a/src/main/java/Team5/SmartTowns/Landmarks/Landmarks.java +++ b/src/main/java/Team5/SmartTowns/Landmarks/Landmarks.java @@ -18,11 +18,10 @@ public class Landmarks { // Initialized object to getID from trail. //Predefined Landmark for Dragons Tale. - public static List<Landmarks> landmarksDragonstrail = List.of( + private static List<Landmarks> landmarksDragonstrail = List.of( new Landmarks( 1, "A scent of...Dragon", "The Dragon has been spotted near by, find the QR code to continue" , "Start your discovery, at the sweet shop."), new Landmarks( 2, "They've been found!", "Don't let them escape, find the next QR code to continue!", "Location test") ); - private Integer trailID; private int landmarkID; @NotEmpty(message = "You must type in a username.") @@ -34,6 +33,10 @@ public class Landmarks { private String landmarkLocation; private String landmarkPicture; + public static List<Landmarks> getLandmarksDragonstrail() { + return landmarksDragonstrail; + } + // Constructor for List above. public Landmarks( int landmarkID, String landmarkName, String landmarkDescription, String landmarkLocation) { this.landmarkID = landmarkID; diff --git a/src/main/java/Team5/SmartTowns/trails/Trail.java b/src/main/java/Team5/SmartTowns/trails/Trail.java index efc9e125af8f94a79e29c21e1de4b1cdf3d5a503..a7067f83758ce0904851b89a51880dc9782da104 100644 --- a/src/main/java/Team5/SmartTowns/trails/Trail.java +++ b/src/main/java/Team5/SmartTowns/trails/Trail.java @@ -14,6 +14,7 @@ public class Trail { new Trail(4,"Trail4", "This is trail four"), new Trail(5,"A Dragon's Tale", "EDITING THIS") ); + int id; String name; String description; diff --git a/src/main/resources/data.sql b/src/main/resources/data.sql index 0e1eb096cf6d40e21f1877f7d950deab910017e0..5ab7f183eefb987f9c2d0b0c16ebc359c411d750 100644 --- a/src/main/resources/data.sql +++ b/src/main/resources/data.sql @@ -54,11 +54,5 @@ insert into badgeprogress (userID, badgeID, progress) value ('2', '2', '70'); delete from stickerprogress; insert into stickerprogress (userID, stickerID, hasSticker) value ('1', '1', true); insert into stickerprogress (userID, stickerID, hasSticker) value ('1', '3', true); -insert into stickerprogress (userID, stickerID, hasSticker) value ('2', '2', true); - -delete from dragonstale; -insert into dragonstale (landmarkID, landmarkName, landmarkDescription) value (1, 'A scent of...Dragon', 'The Dragon has been spotted near by, find the QR code to continue'); -insert into dragonstale (landmarkID, landmarkName, landmarkDescription) value (2, 'They''ve been found!', 'Don''t let them escape, find the next QR code to continue!'); - -delete from testuser; -insert into testuser (userID, user_name, qrCodeScan) value (1, 'Dave', JSON_OBJECT('one', true, 'two', false, 'three', false)); \ No newline at end of file +<<<<<<< HEAD +insert into stickerprogress (userID, stickerID, hasSticker) value ('2', '2', true); \ No newline at end of file diff --git a/src/main/resources/static/css/dragonstaless.css b/src/main/resources/static/css/dragonstaless.css index 69503719953005705fd789f816766664caa2d3d2..2f456a23299e5296a53d8c37f48d93345fe84a9a 100644 --- a/src/main/resources/static/css/dragonstaless.css +++ b/src/main/resources/static/css/dragonstaless.css @@ -8,10 +8,19 @@ background-color: #927BB7; } -#homeimg.centre{ - box-shadow: 100px -100px purple; +.landmarkName{ + font-weight: bold; + text-align: left; +} + +.landmarkDesc{ + font-style: italic; + text-align: left; } body{ - background-color: #927BB7; -} \ No newline at end of file + background-color: #E8A87C; +} + + + diff --git a/src/main/resources/static/scripts/qrCode.js b/src/main/resources/static/scripts/qrCode.js new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/src/main/resources/templates/towns/trails/dragonstale/index.html b/src/main/resources/templates/towns/trails/dragonstale/index.html index 21ef46b042f44eaf03bdb47075245e8d9b6a895d..80aa32934673ddca22af19a7f7772a378ce9c774 100644 --- a/src/main/resources/templates/towns/trails/dragonstale/index.html +++ b/src/main/resources/templates/towns/trails/dragonstale/index.html @@ -5,14 +5,16 @@ <title>A Dragon's Tale</title> <link rel="stylesheet" th:href="@{/css/dragonstaless.css}"> <link rel="stylesheet" th:href="@{/css/templatingstyle.css}"> + <script src="./node_modules/html5-qrcode/html5-qrcode.min.js"></script> </head> <body> <header th:insert="towns/Templating.html :: header"></header> + <!-- As this predefined trail will be accessible from multiple different towns, this thymeleaf element will display the town the user is currently trying to access and display it accordingly. <span th:text="${townName}"> --> <div class="centre"> <h1> Welcome, to a dragon's tale! </h1> <img th:src="@{/images/trails/dragonstalehome.png}" alt="Image of a dragon" id="homeimg"> - <h2> Discover the mystery of the dragon, track its location and follow it throughout the town of (thymeleaf element) to discover a prize! </h2> + <h2> Discover the mystery of the dragon, track its location and follow it throughout the town of to discover a prize! </h2> </div> <div class="centre"> @@ -22,15 +24,28 @@ </p> </div> + + <!-- tabs --> <div class="centre"> - <ul th:each="item : ${landmarksList}"> - <p th:text="${item.landmarkName}"></p> - <p th:text="${item.landmarkDescription}"></p> + <h2>There are <span th:text="${getListSize}"> Size of List </span> adventures in this journey! </h2> + <ul th:each="item : ${landmarksList}" id="tabBox"> + <li> + <a id="tabIdCounter" href="#landmarkTabLink" th:text="${item.landmarkName}"> Landmark Tab</a> + </li> </ul> </div> + + <!-- Need to mark each element to an ID then loop through them. --> + <div class="centre" id="listOfLandmarks"> + <p th:each="item : ${landmarksList}"> + <span th:text="${item.landmarkDescription}" class="landmarkDesc" id="landmarkTabLink"> Landmark Description</span> + </p> + </div> + + <!-- If use is starting their journey, this will display begin. If not, they'll continue their journey. <span th:text="${beginOrContinue}"> --> <div class="centre"> - <h3>Begin your hunt!</h3> + <h3> Begin or Continue your hunt!</h3> <button type="button" id="begin">Click here!</button> </div> diff --git a/src/main/resources/templates/towns/trails/welshhistory/welshhistory.html b/src/main/resources/templates/towns/trails/welshhistory/welshhistory.html deleted file mode 100644 index 9a4ae9e885b177cdaa5d12ef77ae9f52ec72f071..0000000000000000000000000000000000000000 --- a/src/main/resources/templates/towns/trails/welshhistory/welshhistory.html +++ /dev/null @@ -1,10 +0,0 @@ -<!DOCTYPE html> -<html lang="en"> -<head> - <meta charset="UTF-8"> - <title>The Roman Empire</title> -</head> -<body> - -</body> -</html> \ No newline at end of file