Merge branch 'sptak' into fk1810

This commit is contained in:
Tomasz 2024-10-18 13:59:02 +02:00
commit 7489da78a4
3 changed files with 74 additions and 17 deletions

View File

@ -11,6 +11,9 @@
.category-buttons { .category-buttons {
margin: 10px 0; margin: 10px 0;
text-align: center; text-align: center;
background-color: #A9A9A9;
} }
.category-buttons button { .category-buttons button {
@ -18,10 +21,12 @@
padding: 10px 15px; padding: 10px 15px;
font-size: 16px; font-size: 16px;
cursor: pointer; cursor: pointer;
background-color: #f2f2f2; background-color: lightgray;
border: 1px solid #ccc; border: 1px solid black;
border-radius: 4px; border-radius: 4px;
transition: background-color 0.3s, color 0.3s, border 0.3s; transition: background-color 0.3s, color 0.3s, border 0.3s;
} }
.category-buttons button.active { .category-buttons button.active {
@ -35,20 +40,21 @@ table {
width: 100%; width: 100%;
border-collapse: collapse; border-collapse: collapse;
margin-top: 20px; margin-top: 20px;
background-color: whitesmoke;
} }
th, td { th, td {
border: 1px solid #ddd; border: 1px solid grey;
padding: 8px; padding: 8px;
text-align: center; text-align: center;
} }
th { th {
background-color: #f2f2f2; background-color: whitesmoke;
} }
tr:nth-child(even) { tr:nth-child(even) {
background-color: #f9f9f9; background-color: whitesmoke;
} }
/* Stylizacja kontenera klasy */ /* Stylizacja kontenera klasy */
@ -127,6 +133,8 @@ footer.footer {
margin: 5px 0; margin: 5px 0;
font-size: 14px; font-size: 14px;
color: #333; color: #333;
} }
/* Stylizacja przycisków ogólna */ /* Stylizacja przycisków ogólna */
@ -143,3 +151,22 @@ input[type="checkbox"] {
transform: scale(1.2); transform: scale(1.2);
cursor: pointer; cursor: pointer;
} }
.sticky {
position: sticky;
top: 0;
background-color: white; /* lub inny kolor, aby tło było widoczne */
z-index: 1000; /* zapewnia, że będzie na wierzchu */
border-bottom: 1px solid #ccc; /* opcjonalnie, aby oddzielić od treści */
}
.dark-background {
background-color: #2e2e2e; /* Ciemnoszare tło */
color: #ffffff; /* Jasny kolor tekstu dla lepszej czytelności */
margin: 0;
padding: 0;
font-family: Arial, sans-serif;
}
.lead {
background-color: #555;
}

View File

@ -4,10 +4,26 @@
<meta charset="UTF-8"> <meta charset="UTF-8">
<title>Ocena Zachowania</title> <title>Ocena Zachowania</title>
<link rel="stylesheet" href="css/style.css"> <link rel="stylesheet" href="css/style.css">
<style>
table {
width: 100%;
border-collapse: collapse;
}
th {
position: sticky;
top: 0;
background-color: lightgray; /* Kolor tła nagłówka */
z-index: 10; /* Zapewnia, że nagłówek będzie nad innymi elementami */
border: 1px solid #ddd; /* Opcjonalnie: Dodanie obramowania */
padding: 8px;
}
</style>
</head> </head>
<body> <body class="dark-background">
<h1 class="lead" style="font-size: 48px;"><em>Ocena Zachowania</em></h1>
<h1>Ocena Zachowania</h1>
<div> <div>
<button onclick="showTab('criteria')">Ocena z zachowania</button> <button onclick="showTab('criteria')">Ocena z zachowania</button>
@ -150,15 +166,18 @@
<div id="stats-output"></div> <div id="stats-output"></div>
</div> </div>
<hr class="footer-line">
<footer class="footer"> <footer class="footer">
<div class="footer-left"> <div class="footer-left">
<p>B. Hrynowiecki</p> <p>B. Hrynowiecki</p>
<p>K. Michalak</p> <p>K. Michalak</p>
<p>F. Kowalski</p> <p>F. Kowalski</p>
<p>S. Ptak</p>
<p>M. Marszalik</p>
</div> </div>
<hr class="footer-line">
<div class="footer-right"> <div class="footer-right">
<p>Led and Authored by M. Pabiszczak</p> <p>M. Pabiszczak</p>
</div> </div>
</footer> </footer>

View File

@ -414,3 +414,14 @@ async function generateTable(category) {
tbody.appendChild(row); tbody.appendChild(row);
}); });
} }
//window.onscroll = function() {
// const stickyElements = document.querySelectorAll('.sticky');
//stickyElements.forEach(element => {
// if (window.pageYOffset > element.offsetTop) {
// element.classList.add('active');
// } else {
// element.classList.remove('active');
//}
//});
//};