From 9cd41b9d510030b3618c42183a0250acccc32a12 Mon Sep 17 00:00:00 2001 From: Ekaitz Zarraga Date: Sun, 29 Jan 2023 22:27:23 +0100 Subject: Add JavaScript backend and adjust style accordignly --- css/style.css | 10 +++-- index.html | 39 +++++++------------ js/index.js | 123 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 142 insertions(+), 30 deletions(-) create mode 100644 js/index.js diff --git a/css/style.css b/css/style.css index b3a5a60..6e22d00 100644 --- a/css/style.css +++ b/css/style.css @@ -16,11 +16,9 @@ body{ .day-forecast { border-radius: 5px; border: 1px solid lightgrey; - background: right/contain content-box border-box no-repeat url('/media/examples/rain.svg') white; } -.day-forecast > h2, -.day-forecast > p { +.day-forecast > h2 { margin: 0.2rem; font-size: 1rem; } @@ -29,12 +27,16 @@ body{ display: flex; flex-wrap: wrap; justify-content: space-between; + align-items: center; } .day-forecast-text{ min-width: 200px; + margin: 0 2rem; } .day-forecast-image{ - padding: 1em; + padding: 1rem; + margin: 0 2rem; + font-size: 60pt; } footer{ diff --git a/index.html b/index.html index 19a3a7e..eb69ebc 100644 --- a/index.html +++ b/index.html @@ -24,44 +24,31 @@ - - +
-

Weather forecast for Seattle

+

Weather forecast for Bilbao

+