Skip to content
Snippets Groups Projects
Commit 80ca37ba authored by Rhys Evans's avatar Rhys Evans
Browse files

further styling to dynamic towns page

parent 91331444
No related branches found
No related tags found
1 merge request!34Resolve "As a user, I would like a town specific page which shows all trails for that town so that I can easily see my progress"
...@@ -60,13 +60,13 @@ public class PlacesController { ...@@ -60,13 +60,13 @@ public class PlacesController {
int townIDFromTable= placeRepo.getTownIDFromName(townNamee); int townIDFromTable= placeRepo.getTownIDFromName(townNamee);
for (int i=0;i<trailslocations.size();i++){ for (int i=0;i<trailslocations.size();i++){
int trailID = trailsRepo.getTrailIDFromTrailName(trailslocations.get(i).getTrailName()); int trailID = trailsRepo.getTrailIDFromTrailName(trailslocations.get(i).getTrailName());
if ((trailID>100)&&(trailID<200)){ if ((trailID>100)&&(trailID<200)&&(Objects.equals(townNamee, "Caerphilly"))){
correctTrails.add(trailslocations.get(i)); correctTrails.add(trailslocations.get(i));
} }
if ((trailID>200)&&(trailID<300)){ if ((trailID>200)&&(trailID<300)&&(Objects.equals(townNamee, "Risca"))){
correctTrails.add(trailslocations.get(i)); correctTrails.add(trailslocations.get(i));
} }
if ((trailID>300)&&(trailID<400)){ if ((trailID>300)&&(trailID<400)&& (Objects.equals(townNamee, "Penarth")) ){
correctTrails.add(trailslocations.get(i)); correctTrails.add(trailslocations.get(i));
} }
} }
......
...@@ -4,13 +4,69 @@ ...@@ -4,13 +4,69 @@
<meta charset="UTF-8"> <meta charset="UTF-8">
<title th:text="${town.getTownName()}"></title> <title th:text="${town.getTownName()}"></title>
<link rel="stylesheet" th:href="@{/css/templatingstyle.css}"> <link rel="stylesheet" th:href="@{/css/templatingstyle.css}">
<link rel="stylesheet" th:href="@{/css/locationPageFragsStyle.css}"> <!-- <link rel="stylesheet" th:href="@{/css/locationPageFragsStyle.css}">-->
<style>
.townFragment{
background-color: rgb(206, 153, 253);
color: black;
border-color: white;
align-content: center;
text-align: center;
border-radius: 25px;
max-width: 800px;
margin: 0 auto;
}
.townPageFrag{
background: rgb(41, 41, 41);
color: wheat;
}
#return{
padding-bottom: 10px;
}
iframe{
margin-top: 20px;
margin-bottom: 60px;
border: white 2px solid;
}
H1{
padding-top: 5px;
padding-bottom:3px ;
margin-bottom: 0;
}
#townHeader{
margin: 0;
padding: 0;
}
#checkpointList{
list-style: none;
}
</style>
</head> </head>
<body > <body >
<header th:insert="~{/fragments/Templating.html::header}"></header> <header th:insert="~{/fragments/Templating.html::header}"></header>
<main> <main>
<hr style="height:40px; visibility:hidden;" /> <hr style="height:40px; visibility:hidden;" />
<section class="townFragment">
<H1 th:text="${town.getTownName()}"></H1>
<hr style="height:20px; visibility:hidden;" />
<div th:each="trail, indexValue:${trails}">
<li id="checkpointList">
<div><a th:href="'/trails/'+${trail.getTrailName().replace(' ', '-')}" th:text="${trail.getTrailName()}"></a></div>
<ul></ul>
</li>
</div>
</section>
<hr style="height:40px; visibility:hidden;" /> <hr style="height:40px; visibility:hidden;" />
</main> </main>
......
...@@ -105,6 +105,7 @@ ...@@ -105,6 +105,7 @@
</div> </div>
<hr style="height:20px; visibility:hidden;" />
</article> </article>
<hr style="height:40px; visibility:hidden;" /> <hr style="height:40px; visibility:hidden;" />
</main> </main>
......
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