Skip to content
Snippets Groups Projects
Commit 150f273b authored by Connor Brock's avatar Connor Brock
Browse files

Added a dynamic Thymeleaf value that updates depending how many items are in...

Added a dynamic Thymeleaf value that updates depending how many items are in the List to a HTML element.
parent b278ab25
No related branches found
No related tags found
1 merge request!41Resolve "As a convenience enthusiast, I want a drop down menu to be able to quickly scan QR codes I find along my dragon trail so that I may continue on my adventure without disruption."
......@@ -21,8 +21,10 @@ public class DragonsTaleController {
@GetMapping("/dragonstale")
public ModelAndView getDragonsTale(){
List<Landmarks> landmarksList = landmarksDragonstrail;
int landmarksListSize = landmarksDragonstrail.size();
modelAndView = new ModelAndView("/dragonstale/index");
modelAndView.addObject("landmarksList", landmarksList);
modelAndView.addObject("getListSize", landmarksListSize);
return modelAndView;
}
......@@ -33,16 +35,9 @@ public class DragonsTaleController {
return modelAndView;
}
// @GetMapping("/{trailID}/QRScan") //In here, we could use trailID as a string variable and use it to track what trail the user clicked from.
// public ModelAndView getQRScanner(@PathVariable Optional<Integer> trailID){
// ModelAndView modelAndView = new ModelAndView("/dragonstale/index");
// //Can we extract the pathvariable in a JS function?
// return modelAndView;
// }
//Create another controller that directs to the given DragonsTale..Trail.. and updates the users account accordingly.
// This code is to be used
// @GetMapping("dragonstale/{qrCode}/{id}")
// public String qrCodeCheck(@PathVariable Optional<String> qrCode, @PathVariable Optional<Integer> id){
// if (qrCode.isPresent()){
......
.centre{
body{
display: flex;
flex-direction: column;
text-align: center;
......@@ -8,6 +8,16 @@
background-color: #927BB7;
}
.dropdown{
background-color: coral;
color: white;
padding: 20px;
font-size: 16px;
border: none;
cursor: pointer;
}
.landmarkName{
font-weight: bold;
text-align: left;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment