-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #102 from spe-uob/dev
main <-- dev v0.2.1
- Loading branch information
Showing
9 changed files
with
222 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,9 @@ | |
<meta charset="utf-8"> | ||
<script src="https://use.fontawesome.com/639e5b5645.js"></script> | ||
<link rel="stylesheet" href="/styles.css"> | ||
<link href="https://db.onlinewebfonts.com/c/97294bc26984beb9185137b039854f9b?family=D-DIN" rel="stylesheet" type="text/css"/> | ||
<link href="https://db.onlinewebfonts.com/c/8e59fdbc7a7fdb1bab1b12af14615047?family=ITCAvantGardeGothicW05-Book" | ||
rel="stylesheet" type="text/css"/> | ||
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous"> | ||
<title>Error 404 - Not Found</title> | ||
</head> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,9 @@ | |
<meta charset="utf-8"> | ||
<script src="https://use.fontawesome.com/639e5b5645.js"></script> | ||
<link rel="stylesheet" href="/styles.css"> | ||
<link href="https://db.onlinewebfonts.com/c/97294bc26984beb9185137b039854f9b?family=D-DIN" rel="stylesheet" type="text/css"/> | ||
<link href="https://db.onlinewebfonts.com/c/8e59fdbc7a7fdb1bab1b12af14615047?family=ITCAvantGardeGothicW05-Book" | ||
rel="stylesheet" type="text/css"/> | ||
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous"> | ||
<title>Error 500 - No Results</title> | ||
</head> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,9 @@ | |
<meta charset="utf-8"> | ||
<script src="https://use.fontawesome.com/639e5b5645.js"></script> | ||
<link rel="stylesheet" href="/styles.css"> | ||
<link href="https://db.onlinewebfonts.com/c/97294bc26984beb9185137b039854f9b?family=D-DIN" rel="stylesheet" type="text/css"/> | ||
<link href="https://db.onlinewebfonts.com/c/8e59fdbc7a7fdb1bab1b12af14615047?family=ITCAvantGardeGothicW05-Book" | ||
rel="stylesheet" type="text/css"/> | ||
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous"> | ||
<title>Uh-Oh Error</title> | ||
</head> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,8 +9,8 @@ | |
<link rel="stylesheet" href="/styles.css"> | ||
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" | ||
integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous"> | ||
<link href="//db.onlinewebfonts.com/c/97294bc26984beb9185137b039854f9b?family=D-DIN" rel="stylesheet" type="text/css"/> | ||
<link href="//db.onlinewebfonts.com/c/8e59fdbc7a7fdb1bab1b12af14615047?family=ITCAvantGardeGothicW05-Book" | ||
<link href="https://db.onlinewebfonts.com/c/97294bc26984beb9185137b039854f9b?family=D-DIN" rel="stylesheet" type="text/css"/> | ||
<link href="https://db.onlinewebfonts.com/c/8e59fdbc7a7fdb1bab1b12af14615047?family=ITCAvantGardeGothicW05-Book" | ||
rel="stylesheet" type="text/css"/> | ||
<title>Museum Search Tool</title> | ||
</head> | ||
|
@@ -23,58 +23,98 @@ | |
<h1 id="title">Hidden Museums Web Search Tool</h1> | ||
<main class="content"> | ||
<div id="search-box" action="search"> | ||
<form class="form" action="/search"> | ||
<form class="form" action="/search" onsubmit="cleanURL()"> | ||
<div class="input-group mb-3"> | ||
<input id="q" name="q" class="form-control" type="text" placeholder="Search"> | ||
<button id="search-button" class="btn btn-primary" type="submit"> | ||
<i class="fa fa-search"></i> | ||
</button> | ||
</div> | ||
<table class="table" id="filters"> | ||
<tr> | ||
<th scope="col">Filter</th> | ||
<th scope="col">Option</th> | ||
<th scope="col">Input</th> | ||
</tr> | ||
<tr class="Refine"> | ||
<td> | ||
<select class="Filter1"> | ||
<option th:each="i : ${fieldList}" th:value="${i}" | ||
th:with="prettyField=${i.replaceAll('_', ' ')}" th:text="${#strings.capitalize(prettyField)}" | ||
th:selected='${i=="medium"}'> | ||
</option> | ||
</select> | ||
</td> | ||
<td> | ||
<input type="radio" id="refineBy" name="option1" value="refineBy" onclick="toRefine(1)"> | ||
<label for="refine">Refine</label><br> | ||
<input type="radio" id="excludeBy" name="option1" value="excludeBy" onclick="toExclude(1)"> | ||
<label for="exclude">Exclude</label><br> | ||
</td> | ||
<td> | ||
<input class="form-control Filter1" type="text" placeholder="Input"> | ||
</td> | ||
</tr> | ||
<tr class="Exclude"> | ||
<td> | ||
<select class="Filter2"> | ||
<option th:each="i : ${fieldList}" th:value="${i}" | ||
th:with="prettyField=${i.replaceAll('_', ' ')}" th:text="${#strings.capitalize(prettyField)}" | ||
th:selected='${i=="medium"}'> | ||
</option> | ||
</select> | ||
</td> | ||
<td> | ||
<input type="radio" id="refine" name="option2" value="refineBy" onclick="toRefine(2)"> | ||
<label for="refine">Refine</label><br> | ||
<input type="radio" id="exclude" name="option2" value="excludeBy" onclick="toExclude(2)"> | ||
<label for="exclude">Exclude</label><br> | ||
</td> | ||
<td> | ||
<input class="form-control Filter2" type="text" placeholder="Input"> | ||
</td> | ||
</tr> | ||
</table> | ||
</form> | ||
</div> | ||
|
||
<table class="table" id="filters"> | ||
<tr> | ||
<th scope="col">Filter</th> | ||
<th scope="col">Input</th> | ||
</tr> | ||
<tr> | ||
<td> | ||
<select id="field1" name="field1"> | ||
<option th:each="i : ${fieldList}" th:value="${i}" th:text="${i}" th:selected='${i=="medium"}'> | ||
</option> | ||
</select> | ||
</td> | ||
<td> | ||
<input id="Input1" name="Input1" class="form-control" type="text" placeholder="Input"> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td> | ||
<select id="field2" name="field2"> | ||
<option th:each="i : ${fieldList}" th:value="${i}" th:text="${i}" th:selected='${i=="medium"}'> | ||
</option> | ||
</select> | ||
</td> | ||
<td> | ||
<input id="Input2" name="Input2" class="form-control" type="text" placeholder="Input"> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td> | ||
<select id="field3" name="field3"> | ||
<option selected disabled hidden style='display: none' value=''></option> | ||
<option th:each="i : ${fieldList}" th:value="${i}" th:text="${i}"></option> | ||
</select> | ||
</td> | ||
<td> | ||
<input id="Input3" name="Input3" class="form-control" type="text" placeholder="Input"> | ||
</td> | ||
</tr> | ||
</table> | ||
|
||
<a href="/infographics" >infographics</a> | ||
</main> | ||
|
||
</body> | ||
<script> | ||
function cleanURL() { | ||
let inputs = document.getElementsByClassName("Filter1"); | ||
console.log(inputs) | ||
if (inputs[1].value.length === 0 && inputs[1].type !== 'submit') { | ||
inputs[0].disabled = true; | ||
inputs[1].disabled = true; | ||
} | ||
let inputs2 = document.getElementsByClassName("Filter2"); | ||
console.log(inputs2) | ||
if (inputs2[1].value.length === 0 && inputs2[1].type !== 'submit') { | ||
inputs2[0].disabled = true; | ||
inputs2[1].disabled = true; | ||
} | ||
} | ||
function toRefine(i) { | ||
let className = "Filter" + i.toString(); | ||
console.log(className); | ||
let inputs = document.getElementsByClassName(className); | ||
inputs[0].id = "refineField"; | ||
inputs[0].name = "refineField"; | ||
inputs[1].id = "refineQ"; | ||
inputs[1].name = "refineQ"; | ||
} | ||
function toExclude(i) { | ||
let className = "Filter" + i.toString(); | ||
console.log(className); | ||
let inputs = document.getElementsByClassName(className); | ||
inputs[0].id = "excludeField"; | ||
inputs[0].name = "excludeField"; | ||
inputs[1].id = "excludeQ"; | ||
inputs[1].name = "excludeQ"; | ||
} | ||
</script> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,12 +5,25 @@ | |
<meta charset="UTF-8"> | ||
<title>Infographics</title> | ||
<script src="https://use.fontawesome.com/639e5b5645.js"></script> | ||
|
||
<link href="//db.onlinewebfonts.com/c/97294bc26984beb9185137b039854f9b?family=D-DIN" rel="stylesheet" type="text/css"/> | ||
<link href="//db.onlinewebfonts.com/c/8e59fdbc7a7fdb1bab1b12af14615047?family=ITCAvantGardeGothicW05-Book" | ||
rel="stylesheet" type="text/css"/> | ||
<link rel="stylesheet" href="/styles.css"> | ||
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous"> | ||
</head> | ||
|
||
<body> | ||
<div class="BristolMuseum stay"> | ||
<a href="/"> | ||
<img src="https://external-content.duckduckgo.com/iu/?u=https%3A%2F%2Ftse1.mm.bing.net%2Fth%3Fid%3DOIP.OCdb4ZnlSV7vmUEh3SXcjwHaFl%26pid%3DApi&f=1" | ||
alt="Bristol museum logo" height="100"> | ||
</a> | ||
<button class="dropdown-btn navBut"><a href="/search"> Back to search</a></button> | ||
</div> | ||
<br> | ||
<br> | ||
<br> | ||
<br> | ||
<div> | ||
<canvas id="myChart"></canvas> | ||
</div> | ||
|
@@ -43,7 +56,7 @@ | |
const data = { | ||
labels: datesToInclude, | ||
datasets: [{ | ||
label: 'Artworks by time', | ||
label: 'Number of Artworks per year', | ||
backgroundColor: 'rgb(255, 99, 132)', | ||
borderColor: 'rgb(255, 99, 132)', | ||
data: numOfDates, | ||
|
Oops, something went wrong.