1
0
mirror of https://github.com/xuthus83/pigallery2.git synced 2025-01-14 14:43:17 +08:00

Improve blog UI and fix missing short text #587

This commit is contained in:
Patrik J. Braun 2023-09-08 00:04:24 +02:00
parent 131af1f4f4
commit 9d13cff002
2 changed files with 42 additions and 40 deletions

View File

@ -6,7 +6,7 @@
<ng-container *ngIf="open"> <ng-container *ngIf="open">
<div *ngIf="markdowns.length > 1" class="row"> <div *ngIf="markdowns.length > 1" class="row">
<hr class="col"> <hr class="col">
<div class="col-auto">{{md.file | toRelativePath}}</div> <div class="col-auto small fst-italic">{{md.file | toRelativePath}}</div>
</div> </div>
<markdown <markdown
[data]="md.text"> [data]="md.text">

View File

@ -40,7 +40,8 @@ export class BlogService {
if (dates.length == 0) { if (dates.length == 0) {
return [{ return [{
text: markdown, text: markdown,
file: file file: file,
textShort: markdown.substring(0, 200)
}]; }];
} }
@ -55,7 +56,8 @@ export class BlogService {
if (matches.length == 0) { if (matches.length == 0) {
return [{ return [{
text: markdown, text: markdown,
file: file file: file,
textShort: markdown.substring(0, 200)
}]; }];
} }
@ -99,7 +101,7 @@ export class BlogService {
} }
ret.forEach(md => md.textShort = md.text.substring(0, 200)); ret.forEach(md => md.textShort = md.text.substring(0, 200));
console.log(ret);
return ret; return ret;
} }