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:
parent
131af1f4f4
commit
9d13cff002
@ -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">
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user