index

 avatar
unknown
plain_text
a year ago
1.7 kB
7
Indexable
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Weather App</title>
    <style type="text/css">
        body {
            font-family: Arial, sans-serif;
            margin: 0;
            padding: 0;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            background-color: #f0f0f0;
        }
        .container {
            text-align: center;
        }
        h1 {
            margin-bottom: 20px;
        }
        input[type="text"] {
            padding: 8px;
            margin-right: 5px;
        }
        button {
            padding: 8px 20px;
            background-color: #007bff;
            color: white;
            border: none;
            cursor: pointer;
        }
        #weather-info {
            margin-top: 20px;
        }
    </style>
</head>
<body>
    <div class="container">
        <h1>Weather App</h1>
        <form id="searchForm">
            <input type="text" id="city-input" name="city" placeholder="Enter city name">
            <button id="search-button">Search</button>
        </form>
        <div id="weather-info">
            <% if (weatherData !== "") { %>
                <div id="weather-info">
                    <%= weatherData %>
                </div>
            <% } else { %>
                <div id="weather-info">
                    No weather data available.
                </div>
            <% } %>
            
        </div>
    </div>

</body>
</html>
Editor is loading...
Leave a Comment