fixed image src
This commit is contained in:
parent
1c7f97ccb3
commit
867c2ea6d7
3 changed files with 34 additions and 26 deletions
2
dist/main.js
vendored
2
dist/main.js
vendored
File diff suppressed because one or more lines are too long
24
index.html
24
index.html
|
|
@ -1,17 +1,25 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
|
||||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/5.1.0/css/bootstrap.min.css">
|
<link
|
||||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css">
|
rel="stylesheet"
|
||||||
<link rel="stylesheet" href="../src/style.css">
|
href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/5.1.0/css/bootstrap.min.css"
|
||||||
|
/>
|
||||||
|
<link
|
||||||
|
rel="stylesheet"
|
||||||
|
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css"
|
||||||
|
/>
|
||||||
|
<link rel="stylesheet" href="../src/style.css" />
|
||||||
<title>Weather App</title>
|
<title>Weather App</title>
|
||||||
</head>
|
</head>
|
||||||
<body class="d-flex h-100 text-center bg-dark">
|
<body class="d-flex h-100 text-center bg-dark">
|
||||||
<div class="cover-container d-flex w-100 h-100 px-3 flex-column">
|
<div class="cover-container d-flex w-100 h-100 px-3 flex-column">
|
||||||
<header class="d-flex flex-wrap justify-content-center py-3 align-items-center">
|
<header
|
||||||
|
class="d-flex flex-wrap justify-content-center py-3 align-items-center"
|
||||||
|
>
|
||||||
<button class="btn btn-primary btn-lg" type="button" id="newButton">
|
<button class="btn btn-primary btn-lg" type="button" id="newButton">
|
||||||
Enter Location
|
Enter Location
|
||||||
</button>
|
</button>
|
||||||
|
|
@ -20,7 +28,7 @@
|
||||||
<main class="col-sm-4 py-3"></main>
|
<main class="col-sm-4 py-3"></main>
|
||||||
</center>
|
</center>
|
||||||
</div>
|
</div>
|
||||||
<script type="module" src="/dist/main.js"></script>
|
<script type="module" src="dist/main.js"></script>
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/2.9.2/umd/popper.min.js"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/2.9.2/umd/popper.min.js"></script>
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/5.1.0/js/bootstrap.min.js"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/5.1.0/js/bootstrap.min.js"></script>
|
||||||
</body>
|
</body>
|
||||||
|
|
|
||||||
|
|
@ -85,12 +85,12 @@ const populateOutputWindow = (weatherData) => {
|
||||||
new RegExp("(?<=/)[0-9]+(?=x)", "gi"),
|
new RegExp("(?<=/)[0-9]+(?=x)", "gi"),
|
||||||
"128"
|
"128"
|
||||||
);
|
);
|
||||||
console.log(currentIconURL);
|
|
||||||
currentIconURL = currentIconURL.replace(
|
currentIconURL = currentIconURL.replace(
|
||||||
new RegExp("(?<=x)[0-9]+(?=/)", "gi"),
|
new RegExp("(?<=x)[0-9]+(?=/)", "gi"),
|
||||||
"128"
|
"128"
|
||||||
);
|
);
|
||||||
console.log(currentIconURL);
|
// add http to currentIconURL
|
||||||
|
currentIconURL = "http:" + currentIconURL;
|
||||||
// display icon
|
// display icon
|
||||||
weatherIcon.src = currentIconURL;
|
weatherIcon.src = currentIconURL;
|
||||||
outputContainer.appendChild(weatherIcon);
|
outputContainer.appendChild(weatherIcon);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue