Skip to content

Commit

Permalink
Change verse/prose behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
davivcu committed Jul 11, 2024
1 parent 3abf4c3 commit 1c07397
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/app/app.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -236,4 +236,4 @@ export interface CustomEditorialConvention {
};
}

export type TextFlow = 'prose' | 'prose_strict' | 'verses';
export type TextFlow = 'prose' | 'prose_mixed' | 'verses';
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export class VerseProseSelectComponent {

@Output() textModeSelectionChange: EventEmitter<TextFlow> = new EventEmitter();

public textFlowTypes: TextFlow[] = ['prose_strict', 'prose', 'verses'];
public textFlowTypes: TextFlow[] = ['prose', 'prose_mixed', 'verses'];

public selectedType: TextFlow = 'prose';

Expand Down
2 changes: 1 addition & 1 deletion src/app/components/verse/verse.component.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<span class="verse l " [evtHtmlAttributes]="data.attributes"
[class.display-block]="displayBlock$ | async" [class]="data.class" >
<span *ngIf="!plainTextFlow" class="verse-num" [class.hidden]="(displayBlock$ | async) && showNumber">{{data.n}}</span>
<span *ngIf="!plainTextFlow" class="verse-num" [class.verse-baloon]="baloon" [class.hidden]="(displayBlock$ | async) && showNumber">{{data.n}}</span>
<evt-source-note *ngIf="data.source !== null || data.analogue !== null" [data]="data"></evt-source-note>
<evt-content-viewer *ngFor="let el of data.content" [content]="el" [editionLevel]="editionLevel"
[itemsToHighlight]="itemsToHighlight" [evtHighlight]="highlightData" [textFlow]="textFlow" [withDeletions]="withDeletions" [selectedLayer]="selectedLayer">
Expand Down
9 changes: 6 additions & 3 deletions src/app/components/verse/verse.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@
height: 16px;
color: get-color(versesColor);
font-size: 0.7em;
border: 1px solid #000000b5;
border-radius: 8px;
padding-bottom: 1rem;
&:before {
content: '';
width: 100%;
Expand All @@ -41,4 +38,10 @@
}
}
}
.verse-baloon {
border: 1px solid #000000b5;
border-radius: 8px;
padding-bottom: 1rem;
padding-right: 0.1rem;
}
}
6 changes: 5 additions & 1 deletion src/app/components/verse/verse.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,12 @@ export class VerseComponent {
return !isNaN(num) && num % this.verseNumberPrinter !== 0;
}

get baloon() {
return this.textFlow !== 'verses';
}

get plainTextFlow() {
return this.textFlow === 'prose_strict';
return this.textFlow === 'prose';
}

constructor(
Expand Down
4 changes: 0 additions & 4 deletions src/assets/config/custom-styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,6 @@
vertical-align: text-bottom;
}

evt-verse {
display: block;
}

evt-page :not(evt-apparatus-entry-detail) .head {
font-weight: bold;
display: inline-block;
Expand Down
4 changes: 2 additions & 2 deletions src/assets/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@
"omitted": "omitted",
"prose": "Prose",
"verses": "Verses",
"option_prose": "Prose with verse numbers",
"option_prose": "Prose",
"option_prose_mixed": "Prose with verse numbers",
"option_verses": "Verses",
"option_prose_strict": "Prose",
"page": "Page {{value}}",
"front": "Front",
"mainText": "Main text",
Expand Down
4 changes: 2 additions & 2 deletions src/assets/i18n/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@
"omitted": "omissione",
"prose": "Prosa",
"verses": "Versi",
"option_prose": "Prose with verse numbers",
"option_prose": "Prose",
"option_prose_mixed": "Prose with verse numbers",
"option_verses": "Verses",
"option_prose_strict": "Prose",
"page": "Pagina {{value}}",
"front": "Front",
"mainText": "Testo principale",
Expand Down

0 comments on commit 1c07397

Please sign in to comment.