made table-styles globally aavilable for all tables, not only colonnade

This commit is contained in:
Felix Hamann 2018-06-26 19:17:25 +02:00
parent 5103974980
commit 7abc0dbc2f
4 changed files with 150 additions and 156 deletions

View File

@ -254,3 +254,79 @@ a.btn.btn-info:hover,
.btn.btn-info:hover { .btn.btn-info:hover {
background-color: var(--color-grey) background-color: var(--color-grey)
} }
/* GENERAL TABLE STYLES */
.table {
margin: 21px 0;
width: 100%;
}
.table--striped {
.table__row:not(.no-stripe):nth-child(even) {
background-color: rgba(0, 0, 0, 0.03);
}
}
.table--hover {
.table__row:not(.no-hover):not(.table__row--head):hover {
background-color: rgba(0, 0, 0, 0.07);
}
}
/* TABLE DESIGN */
.table__row {
/* TODO: move outside of table__row as soon as tds and ths get their own class */
/* .table__td, .table__th { */
td, th {
padding-top: 14px;
padding-bottom: 10px;
padding-left: 10px;
padding-right: 10px;
max-width: 300px;
}
/* .table__td { */
td {
font-size: 16px;
color: #808080;
line-height: 1.4;
vertical-align: top;
}
/* .table__th { */
th {
background-color: var(--color-dark);
position: relative;
font-size: 16px;
color: #fff;
line-height: 1.4;
padding-top: 10px;
padding-bottom: 10px;
font-weight: bold;
text-align: left;
}
}
@media (max-width: 1200px) {
.table th {
padding: 4px 6px;
}
}
.table__td-content {
max-height: 100px;
overflow-y: auto;
}
.table__th-link {
color: white;
font-weight: bold;
&:hover {
color: inherit;
}
}

View File

@ -1,40 +1,37 @@
<div .ui.container> <div .profile>
<h1> <table .table.table--striped.table--hover>
_{MsgProfileHeading} #{userDisplayName} <tr.table__row>
<table .table .table-striped >
<tr>
<th> _{MsgName} <th> _{MsgName}
<td> #{display userDisplayName} <td> #{display userDisplayName}
<tr> <tr.table__row>
<th> _{MsgMatrikelNr} <th> _{MsgMatrikelNr}
<td> #{display userMatrikelnummer} <td> #{display userMatrikelnummer}
<tr> <tr.table__row>
<th> _{MsgEMail} <th> _{MsgEMail}
<td> #{display userEmail} <td> #{display userEmail}
<tr> <tr.table__row>
<th> _{MsgIdent} <th> _{MsgIdent}
<td> #{display userIdent} <td> #{display userIdent}
<tr> <tr.table__row>
<th> _{MsgPlugin} <th> _{MsgPlugin}
<td> #{display userPlugin} <td> #{display userPlugin}
$if not $ null admin_rights $if not $ null admin_rights
<tr> <tr.table__row>
<th> Administrator <th> Administrator
<td> <td>
<ul> <ul>
$forall institute <- admin_rights $forall institute <- admin_rights
<li>#{display institute} <li>#{display institute}
$if not $ null lecturer_rights $if not $ null lecturer_rights
<tr> <tr.table__row>
<th> Lehrberechtigt <th> Lehrberechtigt
<td> <td>
<ul> <ul>
$forall institute <- lecturer_rights $forall institute <- lecturer_rights
<li>#{display institute} <li>#{display institute}
$if not $ null lecture_owner $if not $ null lecture_owner
<tr> <tr.table__row>
<th> Eigene Kurse <th> Eigene Kurse
<td> <td>
<ul> <ul>
@ -42,7 +39,7 @@
<li> <li>
<a href=@{CourseR tid csh CShowR}>#{display tid} - #{csh} <a href=@{CourseR tid csh CShowR}>#{display tid} - #{csh}
$if not $ null lecture_corrector $if not $ null lecture_corrector
<tr> <tr.table__row>
<th> Korrektor <th> Korrektor
<td> <td>
<ul> <ul>
@ -50,24 +47,24 @@
<li> <li>
<a href=@{CourseR tid csh CShowR}>#{display tid} - #{csh} <a href=@{CourseR tid csh CShowR}>#{display tid} - #{csh}
$if not $ null studies $if not $ null studies
<tr> <tr.table__row>
<th> Studiengänge <th> Studiengänge
<td> <td>
<table .table .table-striped .table-hover> <table .table .table-striped .table-hover>
<tr> <tr.table__row>
<th> Abschluss <th> Abschluss
<th> Studiengang <th> Studiengang
<th> Studienart <th> Studienart
<th> Semester <th> Semester
$forall (degree,field,fieldtype,semester) <- studies $forall (degree,field,fieldtype,semester) <- studies
<tr> <tr.table__row>
<td> #{display degree} <td> #{display degree}
<td> #{display field} <td> #{display field}
<td> #{display fieldtype} <td> #{display fieldtype}
<td> #{display semester} <td> #{display semester}
$if not $ null participant $if not $ null participant
<tr> <tr.table__row>
<th> Teilnehmer <th> Teilnehmer
<td> <td>
<ul> <ul>

View File

@ -3,7 +3,7 @@ $newline never
$maybe sortableP <- pSortable $maybe sortableP <- pSortable
$with toSortable <- toSortable sortableP $with toSortable <- toSortable sortableP
<thead> <thead>
<tr .table__row.table__row--head> <tr .table__row>
$forall OneColonnade{..} <- getColonnade dbtColonnade $forall OneColonnade{..} <- getColonnade dbtColonnade
<!-- TODO: give ths a class 'table__th' --> <!-- TODO: give ths a class 'table__th' -->
<!-- TODO: wrap content of th in 'div.table__th-content' --> <!-- TODO: wrap content of th in 'div.table__th-content' -->

View File

@ -1,83 +1,4 @@
/* SORTABLE TABLE */
.table {
margin: 21px 0;
width: 100%;
}
.table--striped {
.table__row:not(.no-stripe):nth-child(even) {
background-color: rgba(0, 0, 0, 0.03);
}
}
.table--hover {
.table__row:not(.no-hover):not(.table__row--head):hover {
background-color: rgba(0, 0, 0, 0.07);
}
}
/* TABLE DESIGN */
.table__row {
/* TODO: move outside of table__row as soon as tds and ths get their own class */
/* .table__td, .table__th { */
td, th {
padding-top: 14px;
padding-bottom: 10px;
padding-left: 10px;
padding-right: 10px;
max-width: 300px;
}
/* .table__td { */
td {
font-size: 16px;
color: #808080;
line-height: 1.4;
vertical-align: top;
}
&.table__row--head {
background-color: var(--color-dark);
}
/* .table__th { */
th {
position: relative;
font-size: 16px;
color: #fff;
line-height: 1.4;
padding-top: 10px;
padding-bottom: 10px;
font-weight: bold;
text-align: left;
}
}
@media (max-width: 1200px) {
.table th {
padding: 4px 6px;
}
}
.table__td-content {
max-height: 100px;
overflow-y: auto;
}
.table__th-link {
color: white;
font-weight: bold;
&:hover {
color: inherit;
}
}
/* SORTABLE */
.table { .table {
/* TODO: move outside of table as soon as tds and ths get their own class */ /* TODO: move outside of table as soon as tds and ths get their own class */