-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
78 lines (59 loc) · 2.17 KB
/
Copy pathindex.html
File metadata and controls
78 lines (59 loc) · 2.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<!DOCTYPE html>
<html>
<head>
<!-- CCCS310 - Assignment 4
* @student Noemi Desmarais-Racine
* @date 2022-04-20
*
* @last modified 11/2023: update random house api
This is a book search engine requesting XML and JSON from APIs with JavaScript
and displaying the results with JavaScript, CSS and HTML
-->
<meta charset="UTF-8">
<title>Book Search Engine</title>
<!-- External Google font called Mulish -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Mulish:ital,wght@0,300;0,400;0,500;0,700;0,900;1,400;1,700&display=swap" rel="stylesheet">
<!-- External stylesheet on the local folder -->
<link href='style.css' rel='stylesheet'>
<script src="script.js"></script>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css" integrity="sha256-p4NxAoJBhIIN+hmNHrzRCf9tD/miZyoHS5obTRR9BMY=" crossorigin="" />
<script src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js" integrity="sha256-20nQCchB9co0qIjJZRGuk2/Z9VM+kNiyxNV1lvTlZBo=" crossorigin=""></script>
<script>
function init(){
var map = L.map('map').setView([51.0809,-114.1644], 11);
L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
}).addTo(map);
L.marker([51.0809,-114.1644]).addTo(map)
.bindPopup('This is a Leaflet popup.<br> So fun.')
.openPopup();
}
</script>
<style>
#map { height: 280px; }
</style>
</head>
<body onload="init()">
<header>
<h1>Search for Books</h1>
<h5>This is a simple JavaScript book search engine requesting JSON from openlibrary.org and penguinrandomhouse.com APIs.</h5>
</header>
<main>
<section>
<div id="searchbar">
<input id="searchInput" type="search" placeholder="Search for books" />
<input id="searchBtn" type="button" value="SEARCH"/>
</div>
<div id="map"></div>
<h3 id="booktitle">Book List</h3>
<br/><br/>
<div id="books"></div>
</section>
</main>
<footer>
<h6>Copyright © CCCS310 A4</h6>
</footer>
</body>
</html>