Untitled

 avatar
unknown
plain_text
a year ago
1.7 kB
3
Indexable
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js" integrity="sha512-v2CJ7UaYy4JwqLDIrZUI/4hqeoQieOmAZNXBeQyjo21dadnwR+8ZaIJVT8EE2iyI61OV8e6M8PP2/4hpQINQ/g==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
    <style>
        body {
            margin: 0;
            padding: 0;
            font-family: 'Arial', sans-serif;
            display: flex;
            align-items: center;
            justify-content: center;
            height: 100vh;
            background: linear-gradient(to right, #2193b0, #6dd5ed);
            color: #000;
        }

        .temperature-container {
            text-align: center;
        }

        .temperature {
            font-size: 4em;
            margin: 0;
        }
    </style>
</head>
<body>
    <div class="temperature-container">
        <div class="temperature" id="text-glavni"></div>
    </div>
</body>
<script>
    // A $( document ).ready() block.
$( document ).ready(function() {
    var settings = {
  "url": "https://6w9ogdp60d.execute-api.eu-north-1.amazonaws.com/prod/compare",
  "method": "GET",
  "timeout": 0,
  "headers": {
    "Content-Type": "application/json",
    "Access-Control-Allow-Origin": '*'  
  },
};

$.ajax(settings).done(function (response) {
    console.log(response)
  $("#text-glavni").html('Current temperature in Lješevo is '+response.ljesevo_temp + '°C, and in Västerås is ' + response.vesti_temp + '°C');
});
});

</script>
</html>
Leave a Comment