Browse Source

Uchycení řádku a sloupce v tabulce

sifrovackav2
Jonas Havelka 3 months ago
parent
commit
b4c693a9ab
  1. 29
      mamweb/static/css/mamweb.css
  2. 6
      odevzdavatko/templates/odevzdavatko/tabulka.html

29
mamweb/static/css/mamweb.css

@ -1243,6 +1243,35 @@ div.gdpr {
background: rgb(253, 237, 213);
}
/*Přichycování prvního sloupce a řádku*/
.dosla_reseni {
display: block;
max-height: 90vh;
max-width: 90vw;
overflow: auto;
margin-left: 5vw;
}
.dosla_reseni thead tr {
position: sticky;
top: 0;
z-index: 1;
}
.dosla_reseni tr:nth-child(even) td:first-child, .dosla_reseni thead tr, .dosla_reseni thead tr:first-child td:first-child {
background: rgb(253, 237, 213);
}
.dosla_reseni tr:nth-child(odd) td:first-child {
background: #fffbf6;
}
.dosla_reseni tr td:first-child {
position: sticky;
left: 0;
}
/* */
.odevzdana_reseni tr th, .odevzdana_reseni tr td {
border: 1px solid black;

6
odevzdavatko/templates/odevzdavatko/tabulka.html

@ -21,8 +21,8 @@ Do data (včetně): {{ filtr.reseni_do }}
<input type=submit value="Změň ročník">
</form>
<div style="overflow-x: scroll;">
<table class="dosla_reseni">
<thead>
<tr>
<td></td> {# Prázdná buňka v levém horním rohu #}
{% for p in problemy %}
@ -32,6 +32,8 @@ Do data (včetně): {{ filtr.reseni_do }}
</th>
{% endfor %}
</tr>
</thead>
<tbody>
{% for resitel,hodnoty in radky%}
<tr>
<td>
@ -52,8 +54,8 @@ Do data (včetně): {{ filtr.reseni_do }}
{% endfor %}
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endblock %}

Loading…
Cancel
Save