jda_m06/uf02/exercici_json/index.html
2022-02-16 16:13:08 +01:00

82 lines
2.9 KiB
HTML
Executable file

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>M6 UF2</title>
<!-- w3.css -->
<link rel="stylesheet" href="style/w3.css">
<!-- BootStrap -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script>
<!-- jQuery -->
<script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
<!-- Custom -->
<script src="js/functions.js"></script>
</head>
<body>
<div class="w3-container">
<div class="w3-container w3-center" style="width: 100%;">
<h2 onclick="printList('r')">Movie Colection</h2>
<div class="w3-row w3-padding">
<button id="debugTag" class="btn btn-dark w3-margin" onclick="printList('r')">Reset &#10226;</button>
<button class="btn btn-dark w3-margin" onclick="printList('a')">Order &#8673;</button>
<button class="btn btn-dark w3-margin" onclick="printList('d')">Order &#8675;</button>
<button class="btn btn-dark w3-margin" onclick="calcMitjana()">Average &#9711;</button>
<div class="form-group">
<input type="text" placeholder="Search.. " class="form-control" id="search-bar" onkeydown="search()">
</div>
</form>
<h2 id="calcMitjana"></h2>
</div>
</div>
<div class="w3-container w3-center">
<table class="table" id="contentTable" style="display:none">
<thead class="thead-dark">
<tr>
<th scope="col">#</th>
<th scope="col">Image</th>
<th scope="col">Title</th>
<th scope="col">Year</th>
<th scope="col">Rating</th>
<th scope="col">Details</th>
</tr>
</thead>
<tbody id="contentItems">
</tbody>
</table>
</div>
</div>
<div class="modal fade" id="myModal" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<img src="" id="modalMovieImage" style="width:100%; max-width: 75px">
<h3 class="modal-title" id="modalMovieTitle" style="font-weight: bold;"></h3>
</div>
<div class="modal-body">
<h5 id="modalMovieYear"></h5>
<h5 id="modalMovieRating"></h5>
<h5 id="modalMovieCountry"></h5>
<p id="modalMoviePlot"></p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal" onclick="$('#myModal').modal('hide')">Close</button>
</div>
</div>
</div>
</div>
</body>
</html>