feat: Create static training company website with courses and installment calculator
Co-authored-by: aider (openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat>
This commit is contained in:
parent
1af89914d5
commit
ed376c8738
@ -0,0 +1,53 @@
|
||||
body {
|
||||
font-family: Helvetica;
|
||||
background-color: #EAEAEA;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
header img {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
nav, footer {
|
||||
background-color: #625B5B;
|
||||
color: white;
|
||||
padding: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
nav a {
|
||||
font-weight: bold;
|
||||
background-color: #EAEAEA;
|
||||
color: #625B5B;
|
||||
padding: 10px;
|
||||
margin: 50px;
|
||||
border-radius: 20px;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
nav a:hover {
|
||||
background-color: #625B5B;
|
||||
color: #EAEAEA;
|
||||
border: 1px solid #EAEAEA;
|
||||
}
|
||||
|
||||
ul {
|
||||
margin-left: 40px;
|
||||
list-style-type: circle;
|
||||
}
|
||||
|
||||
table {
|
||||
border: 1px dashed #625B5B;
|
||||
width: 60%;
|
||||
margin-left: 40px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.kontrolki {
|
||||
margin: 5px;
|
||||
}
|
||||
|
||||
main {
|
||||
padding: 20px;
|
||||
}
|
||||
52
i1.html
52
i1.html
@ -0,0 +1,52 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="pl">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Kursy komputerowe</title>
|
||||
<link rel="stylesheet" href="css/layout.css">
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<img src="imgs/baner.png" alt="kursy komputerowe">
|
||||
</header>
|
||||
<nav>
|
||||
<a href="i1.html">Strona główna</a>
|
||||
<a href="raty.html">Koszt rat</a>
|
||||
<a href="https://moje-szkolenia.pl/">Nasz partner</a>
|
||||
</nav>
|
||||
<main>
|
||||
<h3>Kursy komputerowe - programowanie</h3>
|
||||
<table>
|
||||
<tr>
|
||||
<th>Kurs</th>
|
||||
<th>Czas trwania</th>
|
||||
<th>Cena</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>React.js</td>
|
||||
<td>4 miesiące</td>
|
||||
<td>1500 zł</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>JavaScript</td>
|
||||
<td>3 miesiące</td>
|
||||
<td>1200 zł</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>HTML + CSS</td>
|
||||
<td>2 miesiące</td>
|
||||
<td>800 zł</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h3>Adres do korespondencji</h3>
|
||||
<ul>
|
||||
<li>Adres: Katowice, ul. Mariacka 5</li>
|
||||
<li>Telefon: 32 888 88 88</li>
|
||||
</ul>
|
||||
<a href="mailto:kursy@komputerowe.pl">skontaktuj się</a>
|
||||
</main>
|
||||
<footer>
|
||||
<p>Autor strony: 99010101010</p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
37
js/script.js
37
js/script.js
@ -0,0 +1,37 @@
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
document.getElementById('oblicz').addEventListener('click', function() {
|
||||
// Pobieranie wybranych kursów
|
||||
const wybraneKursy = document.querySelectorAll('input[name="kurs"]:checked');
|
||||
// Ceny kursów
|
||||
const cenaReact = 1500;
|
||||
const cenaJavaScript = 1200;
|
||||
|
||||
// Obliczanie całkowitej kwoty
|
||||
let calkowitaKwota = 0;
|
||||
wybraneKursy.forEach(kurs => {
|
||||
if (kurs.value === 'React.js') {
|
||||
calkowitaKwota += cenaReact;
|
||||
} else if (kurs.value === 'JavaScript') {
|
||||
calkowitaKwota += cenaJavaScript;
|
||||
}
|
||||
});
|
||||
|
||||
// Pobieranie liczby rat
|
||||
const iloscRat = parseInt(document.getElementById('raty').value);
|
||||
// Pobieranie miasta
|
||||
const miasto = document.getElementById('miasto').value;
|
||||
|
||||
// Sprawdzanie poprawności danych
|
||||
if (wybraneKursy.length === 0 || isNaN(iloscRat) || iloscRat <= 0) {
|
||||
document.getElementById('wynik').textContent = 'Proszę wybrać przynajmniej jeden kurs i podać poprawną liczbę rat.';
|
||||
return;
|
||||
}
|
||||
|
||||
// Obliczanie miesięcznej raty
|
||||
const rata = calkowitaKwota / iloscRat;
|
||||
|
||||
// Wyświetlanie wyniku
|
||||
document.getElementById('wynik').textContent =
|
||||
`Kurs odbędzie się w ${miasto}. Koszt całkowity: ${calkowitaKwota} zł. Płacisz ${iloscRat} rat po ${rata.toFixed(2)} zł`;
|
||||
});
|
||||
});
|
||||
49
raty.html
Normal file
49
raty.html
Normal file
@ -0,0 +1,49 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="pl">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Kursy komputerowe</title>
|
||||
<link rel="stylesheet" href="css/layout.css">
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<img src="imgs/baner.png" alt="kursy komputerowe">
|
||||
</header>
|
||||
<nav>
|
||||
<a href="i1.html">Strona główna</a>
|
||||
<a href="raty.html">Koszt rat</a>
|
||||
<a href="https://moje-szkolenia.pl/">Nasz partner</a>
|
||||
</nav>
|
||||
<main>
|
||||
<h3>Oblicz miesięczną ratę</h3>
|
||||
<form id="formularz">
|
||||
<div>
|
||||
<input type="checkbox" id="react" class="kontrolki" name="kurs" value="React.js">
|
||||
<label for="react">Kurs React.js</label>
|
||||
</div>
|
||||
<div>
|
||||
<input type="checkbox" id="javascript" class="kontrolki" name="kurs" value="JavaScript">
|
||||
<label for="javascript">Kurs JavaScript</label>
|
||||
</div>
|
||||
<div>
|
||||
<label for="raty">Liczba rat: </label>
|
||||
<input type="number" id="raty" class="kontrolki" name="raty" min="1">
|
||||
</div>
|
||||
<div>
|
||||
<label for="miasto">Miasto: </label>
|
||||
<select id="miasto" class="kontrolki" name="miasto">
|
||||
<option value="Warszawa">Warszawa</option>
|
||||
<option value="Katowice">Katowice</option>
|
||||
<option value="Gdańsk">Gdańsk</option>
|
||||
</select>
|
||||
</div>
|
||||
<button type="button" id="oblicz" class="kontrolki">Oblicz</button>
|
||||
</form>
|
||||
<p id="wynik"></p>
|
||||
</main>
|
||||
<footer>
|
||||
<p>Autor strony: 99010101010</p>
|
||||
</footer>
|
||||
<script src="js/script.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Reference in New Issue
Block a user