Code refactor and formatting
This commit is contained in:
33
src/templates/index.html
Normal file
33
src/templates/index.html
Normal file
@@ -0,0 +1,33 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="pl">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Strona główna</title>
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
|
||||
</head>
|
||||
<body>
|
||||
<h1>Witamy na stronie głównej!</h1>
|
||||
<ul>
|
||||
<li><a href="{{ url_for('logowanie') }}">Logowanie</a></li>
|
||||
<li><a href="{{ url_for('signup') }}">Rejestracja</a></li>
|
||||
<li>
|
||||
<form id="pogodaForm" action="#" method="get" style="display:inline;" onsubmit="return goToWeather();">
|
||||
<label for="city">Pogoda dla miasta:</label>
|
||||
<input type="text" id="city" name="city" required>
|
||||
<button type="submit">Sprawdź</button>
|
||||
</form>
|
||||
<script>
|
||||
function goToWeather() {
|
||||
var city = document.getElementById('city').value;
|
||||
if(city) {
|
||||
window.location.href = '/pogoda/' + encodeURIComponent(city);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
</li>
|
||||
<li><a href="{{ url_for('zaloguj') }}">Zaloguj (test sesji)</a></li>
|
||||
<li><a href="{{ url_for('wyloguj') }}">Wyloguj (test sesji)</a></li>
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user