frontend-1

ref: master

./weather.html


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<!DOCTYPE html>
<html lang="pt-br">
  <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Previsão do Tempo</title>
    <link rel="stylesheet" href="css/reset.css">
    <link rel="stylesheet" href="css/layout.css">
    <link rel="stylesheet" href="css/header.css">
    <link rel="stylesheet" href="css/form.css">
    <link rel="stylesheet" href="css/footer.css">
    <link rel="stylesheet" href="css/tabs.css">
    <link rel="stylesheet" href="css/weather.css">
  </head>
  <body>
    <header>
      <h1>Previsão do Tempo</h1>
      <button id="menuToggle"></button>
      <nav>
        <ul class="hidden">
          <li><a href="index.html">Início</a></li>
          <li><a href="tasks.html">Tarefas</a></li>
          <li><a href="weather.html">Previsão do Tempo</a></li>
        </ul>
      </nav>
    </header>

    <main>
      <h1>Previsão do Tempo</h1>
      <div class="tabs">
        <button class="tab-button active" data-tab="current-weather">Clima Atual</button>
        <button class="tab-button" data-tab="search-weather">Buscar por Cidade</button>
      </div>

      <div class="tab-content active" id="current-weather">
        <div id="weather">
          <p id="location">Obtendo sua localização...</p>
          <p id="temperature"></p>
          <p id="conditions"></p>
        </div>
      </div>

      <div class="tab-content" id="search-weather">
        <form id="city-form">
          <label for="city-input">Digite o nome da cidade:</label>
          <input type="text" id="city-input" placeholder="Ex.: Bagé" required />
          <button type="submit">Buscar Clima</button>
        </form>
        <div id="city-weather">
          <p id="city-location"></p>
          <p id="city-temperature"></p>
          <p id="city-conditions"></p>
        </div>
      </div>
    </main>

    <footer>
      <p>© 2025</p>
    </footer>
    <script src="js/menu.js" defer></script>
    <script src="js/weather.js" defer></script>
  </body>
</html>