Skip to content

Commit

Permalink
Use columns for longer biographicalOrHistoricalInformation (RPB-38)
Browse files Browse the repository at this point in the history
  • Loading branch information
fsteeg committed Nov 21, 2023
1 parent b08179e commit 3ed6fab
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
7 changes: 3 additions & 4 deletions app/models/AuthorityResource.java
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,9 @@ private String find(String... fields) {
false);
List<String> collect = stream.map(n -> n.asText().replaceAll("[δ∞]", "\"").replace('Æ', '\''))
.collect(Collectors.toList());
return "<h3>Biogramm</h3><p>" + collect.get(0) + "</p>"
+ collect.subList(1, collect.size()).stream()
.map(s -> "<h3>Biogramm <small>/ alternativ</small></h3><p>" + s + "</p>")
.collect(Collectors.joining());
return "<p>" + collect.get(0) + "</p>" + collect.subList(1, collect.size()).stream()
.map(s -> "<h3>Biogramm <small>/ alternativ</small></h3><p>" + s + "</p>")
.collect(Collectors.joining());
}
}
return "";
Expand Down
3 changes: 3 additions & 0 deletions app/views/details.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,10 @@ <h1>
<div class="row">
<div class="tab-content">
<div class="col-md-12">
<h3>Biogramm</h3>
<div @if(resource.biogramme.size > 600){class="biogramme"}>
@Html(resource.biogramme)
</div>
</div>
</div>
</div>
Expand Down
4 changes: 4 additions & 0 deletions public/stylesheets/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -356,3 +356,7 @@ figcaption {
.json-ld-icon {
height: 1.4em
}

.biogramme {
column-width: 30em;
}

0 comments on commit 3ed6fab

Please sign in to comment.