Skip to content

Commit

Permalink
Further tweaks to the books display
Browse files Browse the repository at this point in the history
  • Loading branch information
josephmyers committed Oct 15, 2024
1 parent 04412cc commit a5a41aa
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,11 @@ <h2>Training the language model</h2>
<ng-container matColumnDef="book">
<th mat-header-cell *matHeaderCellDef></th>
<td mat-cell *matCellDef="let element" class="bookName">
<span class="confirm-book">{{ element.ranges.join(", ") }}</span>
<div class="confirm-books cell-padding-block">
@for (range of element.ranges; track range) {
<span class="confirm-book">{{ range }}</span>
}
</div>
</td>
</ng-container>
<ng-container matColumnDef="source">
Expand All @@ -169,7 +173,7 @@ <h2>
<mat-card class="confirm-section mat-elevation-z2">
<span class="explanation">{{ t("confirm_translate") }}</span>
<div class="confirm-translate">
<div class="confirm-translate-books">
<div class="confirm-books confirm-translate-books">
@for (book of userSelectedTranslateBooks; track book) {
<span class="confirm-book">{{ book.name }}</span>
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ app-notice {
font-style: italic;
display: inline-block;
margin-bottom: 12px;
font-weight: 100;
}

.mat-mdc-table {
Expand All @@ -97,14 +98,20 @@ app-notice {
}

.confirm-translate-books {
padding-inline-start: 16px;
}

.cell-padding-block {
padding-block: 16px;
}

.confirm-books {
display: flex;
flex-wrap: wrap;
column-gap: 24px;
flex-direction: column;
column-gap: 32px;
row-gap: 8px;
padding-inline-start: 16px;
}

.confirm-book {
padding-block: 4px;
font-weight: 500;
}
Original file line number Diff line number Diff line change
Expand Up @@ -296,9 +296,12 @@ export class DraftGenerationStepsComponent extends SubscriptionDisposable implem
function addGroup(group: TrainingBook[]): void {
let range;
if (group.length === 1) {
range = Canon.bookNumberToId(group[0].number);
range = Canon.bookNumberToEnglishName(group[0].number);
} else {
range = Canon.bookNumberToId(group[0].number) + '-' + Canon.bookNumberToId(group[group.length - 1].number);
range =
Canon.bookNumberToEnglishName(group[0].number) +
' - ' +
Canon.bookNumberToEnglishName(group[group.length - 1].number);
}
continguousGroups.push({ ranges: [range], source: group[0].source, target: group[0].target });
}
Expand Down

0 comments on commit a5a41aa

Please sign in to comment.