Mała naprawa + styl
This commit is contained in:
@@ -3,8 +3,10 @@
|
|||||||
function obliczBMR($plec, $waga, $wzrost, $wiek) {
|
function obliczBMR($plec, $waga, $wzrost, $wiek) {
|
||||||
if ($plec == 'm') {
|
if ($plec == 'm') {
|
||||||
return (10 * $waga) + (6.25 * $wzrost) - (5 * $wiek) + 5;
|
return (10 * $waga) + (6.25 * $wzrost) - (5 * $wiek) + 5;
|
||||||
} else {
|
} else if ($plec == 'k') {
|
||||||
return (10 * $waga) + (6.25 * $wzrost) - (5 * $wiek) - 161;
|
return (10 * $waga) + (6.25 * $wzrost) - (5 * $wiek) - 161;
|
||||||
|
} else {
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -33,10 +35,11 @@ $wynik = ustalCel($podstawa, $cel);
|
|||||||
<html lang="pl">
|
<html lang="pl">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<title>Kalkulator Fitness</title>
|
<title>Kalkulator fitness</title>
|
||||||
|
<link rel="stylesheet" href="style.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h2>Kalkulator Kalorii</h2>
|
<h2>Kalkulator kalorii</h2>
|
||||||
<form method="post">
|
<form method="post">
|
||||||
<div>
|
<div>
|
||||||
<label>Płeć:</label>
|
<label>Płeć:</label>
|
||||||
|
|||||||
@@ -0,0 +1,85 @@
|
|||||||
|
body {
|
||||||
|
background-color: #1a1a1a;
|
||||||
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
|
font-size: 12px;
|
||||||
|
color: #cccccc;
|
||||||
|
margin: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
h2 {
|
||||||
|
font-size: 18px;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #ffffff;
|
||||||
|
border-bottom: 1px solid #444444;
|
||||||
|
padding-bottom: 5px;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
width: 350px;
|
||||||
|
}
|
||||||
|
|
||||||
|
form {
|
||||||
|
width: 350px;
|
||||||
|
}
|
||||||
|
|
||||||
|
form div {
|
||||||
|
margin-bottom: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
label {
|
||||||
|
display: block;
|
||||||
|
font-weight: bold;
|
||||||
|
margin-bottom: 3px;
|
||||||
|
color: #999999;
|
||||||
|
}
|
||||||
|
|
||||||
|
input[type="number"], select {
|
||||||
|
border: 1px solid #555555;
|
||||||
|
background-color: #2b2b2b;
|
||||||
|
color: #ffffff;
|
||||||
|
padding: 2px;
|
||||||
|
font-size: 12px;
|
||||||
|
width: 160px;
|
||||||
|
}
|
||||||
|
|
||||||
|
input[type="number"]:focus {
|
||||||
|
border-color: #0066ff;
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
button {
|
||||||
|
margin-top: 10px;
|
||||||
|
padding: 4px 12px;
|
||||||
|
background-color: #333333;
|
||||||
|
border: 1px solid #666666;
|
||||||
|
color: #ffffff;
|
||||||
|
font-size: 12px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
button:hover {
|
||||||
|
background-color: #444444;
|
||||||
|
border-color: #999999;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wynik {
|
||||||
|
margin-top: 25px;
|
||||||
|
padding: 10px;
|
||||||
|
border: 1px solid #0066ff;
|
||||||
|
background-color: #001a33;
|
||||||
|
width: 330px;
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wynik strong {
|
||||||
|
color: #3399ff;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
input::-webkit-outer-spin-button,
|
||||||
|
input::-webkit-inner-spin-button {
|
||||||
|
-webkit-appearance: none;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
input[type=number] {
|
||||||
|
-moz-appearance: textfield;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user