mirror of
https://gitlab.com/walljm/dynamicbible.git
synced 2025-07-23 23:39:50 -04:00
* fixed strong cross refs taking to much space (added scrolling and max-height)
* fixed the way the notes headings are rendered
This commit is contained in:
parent
caf3ef2d30
commit
75e7b91141
@ -20,5 +20,3 @@ Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.
|
|||||||
- setup CI/CD
|
- setup CI/CD
|
||||||
- strongs numbers with more than one number should appear in tabs or you need to update your text to assign only one number per word(s)
|
- strongs numbers with more than one number should appear in tabs or you need to update your text to assign only one number per word(s)
|
||||||
- strongs references need a scrolling box to prevent massive cards
|
- strongs references need a scrolling box to prevent massive cards
|
||||||
- fix the toString error
|
|
||||||
- fix headings/formatting of notes
|
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="card-content" *ngIf="cardItem" #note>
|
<div class="card-content" *ngIf="cardItem" #note>
|
||||||
<ngx-md class="markdown" *ngIf="this.data">{{ this.data.content }}</ngx-md>
|
<ngx-md class="markdown" *ngIf="this.data">{{ this.data.content }}</ngx-md>
|
||||||
|
<p class="center grey" *ngIf="cardItem && this.data.xref !== ''">✢</p>
|
||||||
<mat-expansion-panel *ngIf="cardItem && this.data.xref !== ''">
|
<mat-expansion-panel *ngIf="cardItem && this.data.xref !== ''">
|
||||||
<mat-expansion-panel-header>
|
<mat-expansion-panel-header>
|
||||||
<mat-panel-title>
|
<mat-panel-title>
|
||||||
|
@ -14,3 +14,5 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
margin: 3px;
|
margin: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import { Component, ViewChild, ElementRef, Input } from '@angular/core';
|
import { Component, ViewChild, ElementRef, Input, OnInit } from '@angular/core';
|
||||||
import { MatDialog } from '@angular/material/dialog';
|
import { MatDialog } from '@angular/material/dialog';
|
||||||
|
import { NgxMdService } from 'ngx-md';
|
||||||
import { NoteEditModalComponent } from './edit-modal/note-edit-modal.component';
|
import { NoteEditModalComponent } from './edit-modal/note-edit-modal.component';
|
||||||
import { CardComponent } from '../../components/card.component';
|
import { CardComponent } from '../../components/card.component';
|
||||||
import { AppService } from '../../services/app.service';
|
import { AppService } from '../../services/app.service';
|
||||||
@ -12,7 +13,7 @@ import { OkCancelModalComponent, OkCancelResult } from '../ok-cancel-modal/ok-ca
|
|||||||
templateUrl: './note-card.component.html',
|
templateUrl: './note-card.component.html',
|
||||||
styleUrls: ['./note-card.component.scss'],
|
styleUrls: ['./note-card.component.scss'],
|
||||||
})
|
})
|
||||||
export class NoteCardComponent extends CardComponent {
|
export class NoteCardComponent extends CardComponent implements OnInit {
|
||||||
@ViewChild('note') noteElement: ElementRef;
|
@ViewChild('note') noteElement: ElementRef;
|
||||||
|
|
||||||
@Input()
|
@Input()
|
||||||
@ -22,12 +23,23 @@ export class NoteCardComponent extends CardComponent {
|
|||||||
return this.cardItem.data as NoteItem;
|
return this.cardItem.data as NoteItem;
|
||||||
}
|
}
|
||||||
|
|
||||||
constructor(protected elementRef: ElementRef, protected appService: AppService, public dialog: MatDialog) {
|
constructor(
|
||||||
|
protected elementRef: ElementRef,
|
||||||
|
protected appService: AppService,
|
||||||
|
public dialog: MatDialog,
|
||||||
|
private markdown: NgxMdService
|
||||||
|
) {
|
||||||
super(elementRef, dialog, appService);
|
super(elementRef, dialog, appService);
|
||||||
|
|
||||||
this.icon$ = appService.select((state) => state.settings.value.cardIcons.note);
|
this.icon$ = appService.select((state) => state.settings.value.cardIcons.note);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ngOnInit(): void {
|
||||||
|
this.markdown.renderer.heading = (text: string, level: number) => {
|
||||||
|
return `<h${level + 1}>${text}</h${level + 1}>\n`;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
copy() {
|
copy() {
|
||||||
const html = this.noteElement.nativeElement.innerHTML;
|
const html = this.noteElement.nativeElement.innerHTML;
|
||||||
const text = this.noteElement.nativeElement.innerText;
|
const text = this.noteElement.nativeElement.innerText;
|
||||||
|
@ -53,11 +53,10 @@
|
|||||||
</div>
|
</div>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<ng-container *ngIf="notes$ | async as notes">
|
<ng-container *ngIf="notes$ | async as notes">
|
||||||
|
<p class="center grey" *ngIf="notes.length > 0">✢</p>
|
||||||
<mat-expansion-panel *ngIf="notes.length > 0">
|
<mat-expansion-panel *ngIf="notes.length > 0">
|
||||||
<mat-expansion-panel-header>
|
<mat-expansion-panel-header>
|
||||||
<mat-panel-title>
|
<mat-panel-title> Note References </mat-panel-title>
|
||||||
Note References
|
|
||||||
</mat-panel-title>
|
|
||||||
</mat-expansion-panel-header>
|
</mat-expansion-panel-header>
|
||||||
<div *ngFor="let note of notes">
|
<div *ngFor="let note of notes">
|
||||||
<button mat-raised-button class="reference" (click)="openNote(note)">
|
<button mat-raised-button class="reference" (click)="openNote(note)">
|
||||||
|
4
src/src/app/components/strongs/strongs.component.scss
Normal file
4
src/src/app/components/strongs/strongs.component.scss
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
.strongs-crossrefs {
|
||||||
|
max-height: 20em;
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
@ -5,6 +5,7 @@ import { StrongsResult } from '../../models/strongs-state';
|
|||||||
@Component({
|
@Component({
|
||||||
selector: 'app-strongs',
|
selector: 'app-strongs',
|
||||||
templateUrl: 'strongs.component.html',
|
templateUrl: 'strongs.component.html',
|
||||||
|
styleUrls: ['./strongs.component.scss'],
|
||||||
preserveWhitespaces: true,
|
preserveWhitespaces: true,
|
||||||
})
|
})
|
||||||
export class StrongsComponent {
|
export class StrongsComponent {
|
||||||
|
@ -33,6 +33,15 @@ body {
|
|||||||
font-size: 12pt;
|
font-size: 12pt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.center {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.grey {
|
||||||
|
color: #777;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
.card-title {
|
.card-title {
|
||||||
font-size: 1.5rem;
|
font-size: 1.5rem;
|
||||||
font-family: "Roboto Condensed";
|
font-family: "Roboto Condensed";
|
||||||
@ -111,6 +120,7 @@ a {
|
|||||||
.mat-h1,
|
.mat-h1,
|
||||||
.mat-headline,
|
.mat-headline,
|
||||||
.mat-typography h1 {
|
.mat-typography h1 {
|
||||||
|
font-weight: bold !important;
|
||||||
font-family: var(--card-heading-font-family) !important;
|
font-family: var(--card-heading-font-family) !important;
|
||||||
font-size: calc(var(--card-font-size) * 2) !important;
|
font-size: calc(var(--card-font-size) * 2) !important;
|
||||||
line-height: calc(var(--card-font-size) * 2.5) !important;
|
line-height: calc(var(--card-font-size) * 2.5) !important;
|
||||||
@ -119,6 +129,7 @@ a {
|
|||||||
.mat-h2,
|
.mat-h2,
|
||||||
.mat-title,
|
.mat-title,
|
||||||
.mat-typography h2 {
|
.mat-typography h2 {
|
||||||
|
font-weight: bold !important;
|
||||||
font-family: var(--card-heading-font-family) !important;
|
font-family: var(--card-heading-font-family) !important;
|
||||||
font-size: calc(var(--card-font-size) * 1.5) !important;
|
font-size: calc(var(--card-font-size) * 1.5) !important;
|
||||||
line-height: calc(var(--card-font-size) * 1.7) !important;
|
line-height: calc(var(--card-font-size) * 1.7) !important;
|
||||||
@ -127,17 +138,27 @@ a {
|
|||||||
.mat-h3,
|
.mat-h3,
|
||||||
.mat-subheading-2,
|
.mat-subheading-2,
|
||||||
.mat-typography h3 {
|
.mat-typography h3 {
|
||||||
|
font-weight: bold !important;
|
||||||
font-family: var(--card-heading-font-family) !important;
|
font-family: var(--card-heading-font-family) !important;
|
||||||
font-size: calc(var(--card-font-size) * 1.1) !important;
|
font-size: calc(var(--card-font-size) * 1.3) !important;
|
||||||
line-height: calc(var(--card-font-size) * 1.2) !important;
|
line-height: calc(var(--card-font-size) * 1.5) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mat-h4,
|
.mat-h4,
|
||||||
.mat-subheading-1,
|
.mat-subheading-1,
|
||||||
.mat-typography h4 {
|
.mat-typography h4 {
|
||||||
|
font-weight: bold !important;
|
||||||
|
font-family: var(--card-heading-font-family) !important;
|
||||||
|
font-size: calc(var(--card-font-size) * 1.1) !important;
|
||||||
|
line-height: calc(var(--card-font-size) * 1.3) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mat-h5,
|
||||||
|
.mat-typography h5 {
|
||||||
|
font-weight: bold !important;
|
||||||
font-family: var(--card-heading-font-family) !important;
|
font-family: var(--card-heading-font-family) !important;
|
||||||
font-size: var(--card-font-size) !important;
|
font-size: var(--card-font-size) !important;
|
||||||
line-height: calc(var(--card-font-size) * 1.1) !important;
|
line-height: calc(var(--card-font-size)) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mat-expansion-panel:not([class*="mat-elevation-z"]) {
|
.mat-expansion-panel:not([class*="mat-elevation-z"]) {
|
||||||
@ -148,3 +169,7 @@ a {
|
|||||||
.full-width {
|
.full-width {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
p {
|
||||||
|
font-size: var(--card-font-size);
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user