- Create the following files
- index.html
- search.html
- src/index.js
- src/search.js
- src/style.css
- In
index.html
andsearch.html
add the base code with the libraries (axios and font-awesome)
axios: library to make requests to the backend
font-awesome: icons library base code:
<!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>Document</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
<link rel="stylesheet" href="./src/style.css">
</head>
<body>
</body>
</html>
- Create our header with styles
- Add javascript files in html
(before close body tag)
, for example
<script src="./src/index.js"></script>
-
In our javascript files do the request to backend with axios
-
Then create a main function, which contains our logic code to print to the html files
-
Finally make the styles for responsive pages.