parent
e1cdbd566a
commit
84695203ea
@ -1,17 +1,15 @@
|
||||
<div class="NOTES_COMPONENT">
|
||||
<div class="container">
|
||||
<span>Edit note </span><span style="color: grey; font-size: 0.9em;">(supports markdown)</span>
|
||||
<div class="left">
|
||||
<textarea [(ngModel)]="note" cols="50" rows="10"></textarea>
|
||||
</div>
|
||||
|
||||
<span><span>Preview </span><span style="color: grey; font-size: 0.9em;">(Unscaled)</span></span>
|
||||
<div class="right">
|
||||
<notes [note]="note"></notes>
|
||||
</div>
|
||||
<div class="container">
|
||||
<span>Edit note </span><span style="color: grey; font-size: 0.9em;">(supports markdown)</span>
|
||||
<div>
|
||||
<textarea [(ngModel)]="note" cols="50" rows="10"></textarea>
|
||||
</div>
|
||||
<div mat-dialog-actions>
|
||||
<button mat-button color="warn" (click)="cancel()">Cancel</button>
|
||||
<button mat-button (click)="save()" cdkFocusInitial>Save</button>
|
||||
|
||||
<span><span>Preview </span><span style="color: grey; font-size: 0.9em;">(Unscaled)</span></span>
|
||||
<div class="w-100">
|
||||
<div class="display-component" [innerHTML]="md.render(note ?? '')"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div mat-dialog-actions>
|
||||
<button mat-button color="warn" (click)="cancel()">Cancel</button>
|
||||
<button mat-button (click)="save()" cdkFocusInitial>Save</button>
|
||||
</div>
|
@ -0,0 +1,24 @@
|
||||
.container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 700px;
|
||||
width: 500px;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
img {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
max-height: 100%;
|
||||
object-fit: contain;
|
||||
}
|
||||
|
||||
.display-component {
|
||||
max-height: 100%;
|
||||
height: 100%;
|
||||
display: grid;
|
||||
grid-auto-flow: row;
|
||||
grid-template-rows: repeat(auto-fit, minmax(50px, 1fr));
|
||||
width: 100%;
|
||||
}
|
@ -1 +1 @@
|
||||
<div #ref *ngIf="note" class="NOTES_COMPONENT display-component" [innerHTML]="md.render(note)"></div>
|
||||
<div #ref *ngIf="note" class="display-component" [innerHTML]="md.render(this.note)"></div>
|
@ -1,30 +1,30 @@
|
||||
.NOTES_COMPONENT {
|
||||
.container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
img {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
max-height: 100%;
|
||||
object-fit: contain;
|
||||
}
|
||||
.container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 800px;
|
||||
width: 1200px;
|
||||
}
|
||||
|
||||
&.display-component {
|
||||
max-height: 100%;
|
||||
height: 100%;
|
||||
display: grid;
|
||||
grid-auto-flow: row;
|
||||
grid-template-rows: repeat(auto-fit, minmax(50px, 1fr));
|
||||
}
|
||||
img {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
max-height: 100%;
|
||||
object-fit: contain;
|
||||
}
|
||||
|
||||
& {
|
||||
font-size: 1.3em;
|
||||
}
|
||||
.display-component {
|
||||
max-height: 100%;
|
||||
height: 100%;
|
||||
display: grid;
|
||||
grid-auto-flow: row;
|
||||
grid-template-rows: repeat(auto-fit, minmax(50px, 1fr));
|
||||
font-size: 1.3em;
|
||||
}
|
||||
|
||||
.note-preview {
|
||||
min-height: 400px;
|
||||
}
|
||||
.note-preview {
|
||||
min-height: 400px;
|
||||
max-height: 400px;
|
||||
min-width: 600px;
|
||||
max-width: 600px;
|
||||
}
|
||||
|
Loading…
Reference in new issue