Skip to content

Commit

Permalink
CoverageMatrix: use own style on erasmus column
Browse files Browse the repository at this point in the history
Erasmus code has max 12 characters. On small screen
we don't need so much width as 200px.
  • Loading branch information
Emkas committed May 6, 2022
1 parent 285f0d8 commit 147f162
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ static void generateHtmlTableHeader(StringBuilder sb) {

/* Erasmus code */

row1.append(genRow("Erasmus code", NAME_COLOR_CLASS, 2, 1, "ewpst__cell-schac"));
row1.append(genRow("Erasmus code", NAME_COLOR_CLASS, 2, 1, "ewpst__cell-erasmus"));

/* Primary Network APIs */

Expand Down Expand Up @@ -185,7 +185,7 @@ static void generateHtmlTableHeader(StringBuilder sb) {
/* Erasmus code */

cell = new CoverageMatrixCell(NAME_COLOR_CLASS);
cell.addClass("ewpst__cell-schac");
cell.addClass("ewpst__cell-erasmus");
this.cells.add(cell);
Collection<String> erasmusCodes = hei.getOtherIds("erasmus");
Optional<String> erasmusCode = erasmusCodes.stream().findFirst();
Expand Down
6 changes: 6 additions & 0 deletions src/main/resources/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,12 @@ a:hover {
word-break: break-all;
}

.ewpst__cell-erasmus {
min-width: 10em;
width: 200px;
word-break: break-all;
}

/* Column appearance (cc stands for "column color") */

.ewpst__cell.ewpst__cell--cc1 {
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/templates/heiSearch.pebble
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
{{ hei.id }}
</a>
</td>
<td class="ewpst__cell ewpst__cell--cc1 ewpst__cell-schac">
<td class="ewpst__cell ewpst__cell--cc1 ewpst__cell-erasmus">
{% if hei.otherIds('erasmus') is not empty %}
{{ hei.otherIds('erasmus') | first }}
{% endif %}
Expand Down

0 comments on commit 147f162

Please sign in to comment.