@thecodeblogs/blog 0.19.3 → 0.19.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1242,10 +1242,8 @@ class EntryRendererComponent {
|
|
|
1242
1242
|
});
|
|
1243
1243
|
let showFn = () => {
|
|
1244
1244
|
this.state = 'in';
|
|
1245
|
-
console.log('here2');
|
|
1246
1245
|
};
|
|
1247
|
-
|
|
1248
|
-
setTimeout(showFn.bind(this), 400);
|
|
1246
|
+
setTimeout(showFn.bind(this), 50);
|
|
1249
1247
|
}
|
|
1250
1248
|
ngAfterViewChecked() {
|
|
1251
1249
|
if (!this.editMode) {
|
|
@@ -1301,15 +1299,15 @@ class EntryRendererComponent {
|
|
|
1301
1299
|
});
|
|
1302
1300
|
}
|
|
1303
1301
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: EntryRendererComponent, deps: [{ token: PrismService }, { token: i0.NgZone }, { token: IdentityService }, { token: CommentService }, { token: i1$3.Router }, { token: EntryService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1304
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.3", type: EntryRendererComponent, isStandalone: true, selector: "app-entry-renderer", inputs: { entry: { classPropertyName: "entry", publicName: "entry", isSignal: true, isRequired: false, transformFunction: null }, editMode: { classPropertyName: "editMode", publicName: "editMode", isSignal: false, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div\n *ngIf=\"entry()\"\n>\n <h2>{{entry()?.title}}</h2>\n <a *ngIf=\"me?.id === entry()?.getProp('author_id')\" href=\"javascript:void(0)\" (click)=\"edit(entry())\"><h4>[Edit]</h4></a>\n <h3>Posted {{entry()?.create_date.toString() | timeAgo}} on {{entry()?.create_date?.getMonth() + 1}}/{{entry()?.create_date?.getDate()}}/{{entry()?.create_date?.getFullYear()}}</h3>\n <h5 *ngIf=\"entry()?.showEditInformation()\">Article was last edited {{entry()?.edit_date.toString() | timeAgo}}</h5>\n <br>\n <p *ngIf=\"entry()?.tags?.length > 0\">Tags: <span *ngFor=\"let tag of entry()?.tags; let last = last\">{{tag}}<ng-container *ngIf=\"!last\"> |\n </ng-container></span><span *ngIf=\"entry()?.views\">, {{entry()._friendly_views}} views</span></p>\n <br>\n\n <ng-container *ngFor=\"let section of entry()?.sections\">\n <h4>{{section?.subheading}}</h4>\n <ng-container *ngFor=\"let content of section?.contents\">\n <ng-container [ngSwitch]=\"content.type\">\n <ng-container *ngSwitchCase=\"ContentType.CODE\">\n <pre><code class=\"language-ts\">{{content?.value}}</code></pre>\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.URL\">\n <a [href]=\"content?.value\" target=\"_blank\">{{content.title}}</a><br>\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.IMAGE\">\n <div class=\"restrict\">\n <div class=\"image\">\n <img [src]=\"content?.value\"/>\n </div>\n <div class=\"description\" *ngIf=\"content?.description\">{{content?.description}}</div>\n <div class=\"source\" *ngIf=\"content?.source\">\n <a [href]=\"content?.source\" [target]=\"'_blank'\">Source: {{content?.source}}</a>\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"ContentType.MEDIA\">\n <ng-container *ngIf=\"mediaIsZip(content)\">\n <div class=\"download\">\n <a href=\"content?.value\">{{content?.description}}</a>\n </div>\n </ng-container>\n <ng-container *ngIf=\"!mediaIsZip(content)\">\n <div class=\"restrict\">\n <div class=\"image\">\n <img [src]=\"content?.value\"/>\n </div>\n <div class=\"description\" *ngIf=\"content?.description\">{{content?.description}}</div>\n <div class=\"source\" *ngIf=\"content?.source\">\n <a [href]=\"content?.source\" [target]=\"'_blank'\">Source: {{content?.source}}</a>\n </div>\n </div>\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.HTML\">\n <app-static-html\n [value]=\"content?.value\"\n >\n </app-static-html>\n </ng-container>\n <ng-container *ngSwitchDefault>\n <p>{{content?.value}}</p>\n </ng-container>\n </ng-container>\n </ng-container>\n </ng-container>\n <ng-container>\n <h2>Comments</h2>\n <p *ngIf=\"comments?.length == 0\">There are no comments yet.</p>\n <ng-container *ngIf=\"comments?.length > 0\">\n <div *ngFor=\"let comment of comments\">\n <mat-card style=\"margin-bottom: 20px;\" class=\"restrict\">\n <mat-card-title><img class=\"gravatar\" src=\"{{comment.gravatar_url}} + ?s=30\"> {{comment.user_display_name}}</mat-card-title>\n <mat-card-subtitle>{{comment.date_obj | timeAgo}}</mat-card-subtitle>\n <mat-card-content>\n <p>{{comment.content}}</p>\n <ng-container *ngIf=\"me?.id === entry()?.__server_generated_properties?.author_id\">\n <a href=\"javascript:void(0);\" *ngIf=\"!comment?.approved\" (click)=\"approve(comment)\">Approve</a>\n <a href=\"javascript:void(0);\" *ngIf=\"comment?.approved\" (click)=\"unapprove(comment)\">Unapprove</a>\n </ng-container>\n </mat-card-content>\n </mat-card>\n </div>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"!me\">\n <a href=\"/signup\">Signup</a> or <a href=\"/login\">login</a> to join the conversation!\n </ng-container>\n <ng-container *ngIf=\"me && !me?.comments_public\">\n <p>Note, your comments will not be public be default. It is possible I will make your comments public, but for now comments are just between you and me.</p>\n </ng-container>\n <ng-container *ngIf=\"me\">\n <h2 style=\"width: 100%;\">Leave a Comment</h2>\n <br>\n <mat-form-field class=\"restrict\" style=\"width: 100%;\" appearance=\"outline\">\n <mat-label>Comment</mat-label>\n <textarea [(ngModel)]=\"commentText\" (keydown.enter)=\"postComment($event)\" matInput></textarea>\n </mat-form-field>\n <br>\n <button (click)=\"postComment($event)\" style=\"text-align: right;\" mat-button>Submit</button>\n </ng-container>\n <div style=\"margin-bottom: 30px;\"></div>\n</div>\n\n", styles: [".image{width:100%;text-align:center;justify-content:center}.source,.description{text-align:center;font-size:12px}.gravatar{margin-right:20px}.smaller{text-size:12px;text-color:gray}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i5$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5$1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i5$1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i5$1.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i6.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i6.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i7.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i7.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: MatCardModule }, { kind: "component", type: i9.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i9.MatCardContent, selector: "mat-card-content" }, { kind: "directive", type: i9.MatCardSubtitle, selector: "mat-card-subtitle, [mat-card-subtitle], [matCardSubtitle]" }, { kind: "directive", type: i9.MatCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { kind: "ngmodule", type: MatChipsModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "ngmodule", type: MatAutocompleteModule }, { kind: "ngmodule", type: MatRadioModule }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i13.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "ngmodule", type: MatDatepickerModule }, { kind: "ngmodule", type: MatTimepickerModule }, { kind: "component", type: StaticHtmlComponent, selector: "app-static-html", inputs: ["value"] }, { kind: "pipe", type: TimeAgoPipe, name: "timeAgo" }], animations: [
|
|
1302
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.3", type: EntryRendererComponent, isStandalone: true, selector: "app-entry-renderer", inputs: { entry: { classPropertyName: "entry", publicName: "entry", isSignal: true, isRequired: false, transformFunction: null }, editMode: { classPropertyName: "editMode", publicName: "editMode", isSignal: false, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div\n [@entryAnimation]=\"state\"\n *ngIf=\"entry()\"\n>\n <h2>{{entry()?.title}}</h2>\n <a *ngIf=\"me?.id === entry()?.getProp('author_id')\" href=\"javascript:void(0)\" (click)=\"edit(entry())\"><h4>[Edit]</h4></a>\n <h3>Posted {{entry()?.create_date.toString() | timeAgo}} on {{entry()?.create_date?.getMonth() + 1}}/{{entry()?.create_date?.getDate()}}/{{entry()?.create_date?.getFullYear()}}</h3>\n <h5 *ngIf=\"entry()?.showEditInformation()\">Article was last edited {{entry()?.edit_date.toString() | timeAgo}}</h5>\n <br>\n <p *ngIf=\"entry()?.tags?.length > 0\">Tags: <span *ngFor=\"let tag of entry()?.tags; let last = last\">{{tag}}<ng-container *ngIf=\"!last\"> |\n </ng-container></span><span *ngIf=\"entry()?.views\">, {{entry()._friendly_views}} views</span></p>\n <br>\n\n <ng-container *ngFor=\"let section of entry()?.sections\">\n <h4>{{section?.subheading}}</h4>\n <ng-container *ngFor=\"let content of section?.contents\">\n <ng-container [ngSwitch]=\"content.type\">\n <ng-container *ngSwitchCase=\"ContentType.CODE\">\n <pre><code class=\"language-ts\">{{content?.value}}</code></pre>\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.URL\">\n <a [href]=\"content?.value\" target=\"_blank\">{{content.title}}</a><br>\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.IMAGE\">\n <div class=\"restrict\">\n <div class=\"image\">\n <img [src]=\"content?.value\"/>\n </div>\n <div class=\"description\" *ngIf=\"content?.description\">{{content?.description}}</div>\n <div class=\"source\" *ngIf=\"content?.source\">\n <a [href]=\"content?.source\" [target]=\"'_blank'\">Source: {{content?.source}}</a>\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"ContentType.MEDIA\">\n <ng-container *ngIf=\"mediaIsZip(content)\">\n <div class=\"download\">\n <a href=\"content?.value\">{{content?.description}}</a>\n </div>\n </ng-container>\n <ng-container *ngIf=\"!mediaIsZip(content)\">\n <div class=\"restrict\">\n <div class=\"image\">\n <img [src]=\"content?.value\"/>\n </div>\n <div class=\"description\" *ngIf=\"content?.description\">{{content?.description}}</div>\n <div class=\"source\" *ngIf=\"content?.source\">\n <a [href]=\"content?.source\" [target]=\"'_blank'\">Source: {{content?.source}}</a>\n </div>\n </div>\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.HTML\">\n <app-static-html\n [value]=\"content?.value\"\n >\n </app-static-html>\n </ng-container>\n <ng-container *ngSwitchDefault>\n <p>{{content?.value}}</p>\n </ng-container>\n </ng-container>\n </ng-container>\n </ng-container>\n <ng-container>\n <h2>Comments</h2>\n <p *ngIf=\"comments?.length == 0\">There are no comments yet.</p>\n <ng-container *ngIf=\"comments?.length > 0\">\n <div *ngFor=\"let comment of comments\">\n <mat-card style=\"margin-bottom: 20px;\" class=\"restrict\">\n <mat-card-title><img class=\"gravatar\" src=\"{{comment.gravatar_url}} + ?s=30\"> {{comment.user_display_name}}</mat-card-title>\n <mat-card-subtitle>{{comment.date_obj | timeAgo}}</mat-card-subtitle>\n <mat-card-content>\n <p>{{comment.content}}</p>\n <ng-container *ngIf=\"me?.id === entry()?.__server_generated_properties?.author_id\">\n <a href=\"javascript:void(0);\" *ngIf=\"!comment?.approved\" (click)=\"approve(comment)\">Approve</a>\n <a href=\"javascript:void(0);\" *ngIf=\"comment?.approved\" (click)=\"unapprove(comment)\">Unapprove</a>\n </ng-container>\n </mat-card-content>\n </mat-card>\n </div>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"!me\">\n <a href=\"/signup\">Signup</a> or <a href=\"/login\">login</a> to join the conversation!\n </ng-container>\n <ng-container *ngIf=\"me && !me?.comments_public\">\n <p>Note, your comments will not be public be default. It is possible I will make your comments public, but for now comments are just between you and me.</p>\n </ng-container>\n <ng-container *ngIf=\"me\">\n <h2 style=\"width: 100%;\">Leave a Comment</h2>\n <br>\n <mat-form-field class=\"restrict\" style=\"width: 100%;\" appearance=\"outline\">\n <mat-label>Comment</mat-label>\n <textarea [(ngModel)]=\"commentText\" (keydown.enter)=\"postComment($event)\" matInput></textarea>\n </mat-form-field>\n <br>\n <button (click)=\"postComment($event)\" style=\"text-align: right;\" mat-button>Submit</button>\n </ng-container>\n <div style=\"margin-bottom: 30px;\"></div>\n</div>\n\n", styles: [".image{width:100%;text-align:center;justify-content:center}.source,.description{text-align:center;font-size:12px}.gravatar{margin-right:20px}.smaller{text-size:12px;text-color:gray}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i5$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5$1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i5$1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i5$1.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i6.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i6.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i7.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i7.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: MatCardModule }, { kind: "component", type: i9.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i9.MatCardContent, selector: "mat-card-content" }, { kind: "directive", type: i9.MatCardSubtitle, selector: "mat-card-subtitle, [mat-card-subtitle], [matCardSubtitle]" }, { kind: "directive", type: i9.MatCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { kind: "ngmodule", type: MatChipsModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "ngmodule", type: MatAutocompleteModule }, { kind: "ngmodule", type: MatRadioModule }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i13.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "ngmodule", type: MatDatepickerModule }, { kind: "ngmodule", type: MatTimepickerModule }, { kind: "component", type: StaticHtmlComponent, selector: "app-static-html", inputs: ["value"] }, { kind: "pipe", type: TimeAgoPipe, name: "timeAgo" }], animations: [
|
|
1305
1303
|
trigger('entryAnimation', [
|
|
1306
1304
|
state('in', style({ transform: 'translateX(0%)' })),
|
|
1307
|
-
state('out', style({ transform: 'translateX(110%)' })),
|
|
1305
|
+
state('out', style({ transform: 'translateX(-110%)' })),
|
|
1308
1306
|
transition('in => out', [
|
|
1309
|
-
animate('
|
|
1307
|
+
animate('300ms ease-out', style({ transform: 'translateX(-110%)' }))
|
|
1310
1308
|
]),
|
|
1311
1309
|
transition('out => in', [
|
|
1312
|
-
animate('
|
|
1310
|
+
animate('300ms ease-in', style({ transform: 'translateX(0%)' }))
|
|
1313
1311
|
])
|
|
1314
1312
|
]),
|
|
1315
1313
|
] }); }
|
|
@@ -1335,15 +1333,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.3", ngImpor
|
|
|
1335
1333
|
], animations: [
|
|
1336
1334
|
trigger('entryAnimation', [
|
|
1337
1335
|
state('in', style({ transform: 'translateX(0%)' })),
|
|
1338
|
-
state('out', style({ transform: 'translateX(110%)' })),
|
|
1336
|
+
state('out', style({ transform: 'translateX(-110%)' })),
|
|
1339
1337
|
transition('in => out', [
|
|
1340
|
-
animate('
|
|
1338
|
+
animate('300ms ease-out', style({ transform: 'translateX(-110%)' }))
|
|
1341
1339
|
]),
|
|
1342
1340
|
transition('out => in', [
|
|
1343
|
-
animate('
|
|
1341
|
+
animate('300ms ease-in', style({ transform: 'translateX(0%)' }))
|
|
1344
1342
|
])
|
|
1345
1343
|
]),
|
|
1346
|
-
], template: "<div\n *ngIf=\"entry()\"\n>\n <h2>{{entry()?.title}}</h2>\n <a *ngIf=\"me?.id === entry()?.getProp('author_id')\" href=\"javascript:void(0)\" (click)=\"edit(entry())\"><h4>[Edit]</h4></a>\n <h3>Posted {{entry()?.create_date.toString() | timeAgo}} on {{entry()?.create_date?.getMonth() + 1}}/{{entry()?.create_date?.getDate()}}/{{entry()?.create_date?.getFullYear()}}</h3>\n <h5 *ngIf=\"entry()?.showEditInformation()\">Article was last edited {{entry()?.edit_date.toString() | timeAgo}}</h5>\n <br>\n <p *ngIf=\"entry()?.tags?.length > 0\">Tags: <span *ngFor=\"let tag of entry()?.tags; let last = last\">{{tag}}<ng-container *ngIf=\"!last\"> |\n </ng-container></span><span *ngIf=\"entry()?.views\">, {{entry()._friendly_views}} views</span></p>\n <br>\n\n <ng-container *ngFor=\"let section of entry()?.sections\">\n <h4>{{section?.subheading}}</h4>\n <ng-container *ngFor=\"let content of section?.contents\">\n <ng-container [ngSwitch]=\"content.type\">\n <ng-container *ngSwitchCase=\"ContentType.CODE\">\n <pre><code class=\"language-ts\">{{content?.value}}</code></pre>\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.URL\">\n <a [href]=\"content?.value\" target=\"_blank\">{{content.title}}</a><br>\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.IMAGE\">\n <div class=\"restrict\">\n <div class=\"image\">\n <img [src]=\"content?.value\"/>\n </div>\n <div class=\"description\" *ngIf=\"content?.description\">{{content?.description}}</div>\n <div class=\"source\" *ngIf=\"content?.source\">\n <a [href]=\"content?.source\" [target]=\"'_blank'\">Source: {{content?.source}}</a>\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"ContentType.MEDIA\">\n <ng-container *ngIf=\"mediaIsZip(content)\">\n <div class=\"download\">\n <a href=\"content?.value\">{{content?.description}}</a>\n </div>\n </ng-container>\n <ng-container *ngIf=\"!mediaIsZip(content)\">\n <div class=\"restrict\">\n <div class=\"image\">\n <img [src]=\"content?.value\"/>\n </div>\n <div class=\"description\" *ngIf=\"content?.description\">{{content?.description}}</div>\n <div class=\"source\" *ngIf=\"content?.source\">\n <a [href]=\"content?.source\" [target]=\"'_blank'\">Source: {{content?.source}}</a>\n </div>\n </div>\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.HTML\">\n <app-static-html\n [value]=\"content?.value\"\n >\n </app-static-html>\n </ng-container>\n <ng-container *ngSwitchDefault>\n <p>{{content?.value}}</p>\n </ng-container>\n </ng-container>\n </ng-container>\n </ng-container>\n <ng-container>\n <h2>Comments</h2>\n <p *ngIf=\"comments?.length == 0\">There are no comments yet.</p>\n <ng-container *ngIf=\"comments?.length > 0\">\n <div *ngFor=\"let comment of comments\">\n <mat-card style=\"margin-bottom: 20px;\" class=\"restrict\">\n <mat-card-title><img class=\"gravatar\" src=\"{{comment.gravatar_url}} + ?s=30\"> {{comment.user_display_name}}</mat-card-title>\n <mat-card-subtitle>{{comment.date_obj | timeAgo}}</mat-card-subtitle>\n <mat-card-content>\n <p>{{comment.content}}</p>\n <ng-container *ngIf=\"me?.id === entry()?.__server_generated_properties?.author_id\">\n <a href=\"javascript:void(0);\" *ngIf=\"!comment?.approved\" (click)=\"approve(comment)\">Approve</a>\n <a href=\"javascript:void(0);\" *ngIf=\"comment?.approved\" (click)=\"unapprove(comment)\">Unapprove</a>\n </ng-container>\n </mat-card-content>\n </mat-card>\n </div>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"!me\">\n <a href=\"/signup\">Signup</a> or <a href=\"/login\">login</a> to join the conversation!\n </ng-container>\n <ng-container *ngIf=\"me && !me?.comments_public\">\n <p>Note, your comments will not be public be default. It is possible I will make your comments public, but for now comments are just between you and me.</p>\n </ng-container>\n <ng-container *ngIf=\"me\">\n <h2 style=\"width: 100%;\">Leave a Comment</h2>\n <br>\n <mat-form-field class=\"restrict\" style=\"width: 100%;\" appearance=\"outline\">\n <mat-label>Comment</mat-label>\n <textarea [(ngModel)]=\"commentText\" (keydown.enter)=\"postComment($event)\" matInput></textarea>\n </mat-form-field>\n <br>\n <button (click)=\"postComment($event)\" style=\"text-align: right;\" mat-button>Submit</button>\n </ng-container>\n <div style=\"margin-bottom: 30px;\"></div>\n</div>\n\n", styles: [".image{width:100%;text-align:center;justify-content:center}.source,.description{text-align:center;font-size:12px}.gravatar{margin-right:20px}.smaller{text-size:12px;text-color:gray}\n"] }]
|
|
1344
|
+
], template: "<div\n [@entryAnimation]=\"state\"\n *ngIf=\"entry()\"\n>\n <h2>{{entry()?.title}}</h2>\n <a *ngIf=\"me?.id === entry()?.getProp('author_id')\" href=\"javascript:void(0)\" (click)=\"edit(entry())\"><h4>[Edit]</h4></a>\n <h3>Posted {{entry()?.create_date.toString() | timeAgo}} on {{entry()?.create_date?.getMonth() + 1}}/{{entry()?.create_date?.getDate()}}/{{entry()?.create_date?.getFullYear()}}</h3>\n <h5 *ngIf=\"entry()?.showEditInformation()\">Article was last edited {{entry()?.edit_date.toString() | timeAgo}}</h5>\n <br>\n <p *ngIf=\"entry()?.tags?.length > 0\">Tags: <span *ngFor=\"let tag of entry()?.tags; let last = last\">{{tag}}<ng-container *ngIf=\"!last\"> |\n </ng-container></span><span *ngIf=\"entry()?.views\">, {{entry()._friendly_views}} views</span></p>\n <br>\n\n <ng-container *ngFor=\"let section of entry()?.sections\">\n <h4>{{section?.subheading}}</h4>\n <ng-container *ngFor=\"let content of section?.contents\">\n <ng-container [ngSwitch]=\"content.type\">\n <ng-container *ngSwitchCase=\"ContentType.CODE\">\n <pre><code class=\"language-ts\">{{content?.value}}</code></pre>\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.URL\">\n <a [href]=\"content?.value\" target=\"_blank\">{{content.title}}</a><br>\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.IMAGE\">\n <div class=\"restrict\">\n <div class=\"image\">\n <img [src]=\"content?.value\"/>\n </div>\n <div class=\"description\" *ngIf=\"content?.description\">{{content?.description}}</div>\n <div class=\"source\" *ngIf=\"content?.source\">\n <a [href]=\"content?.source\" [target]=\"'_blank'\">Source: {{content?.source}}</a>\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"ContentType.MEDIA\">\n <ng-container *ngIf=\"mediaIsZip(content)\">\n <div class=\"download\">\n <a href=\"content?.value\">{{content?.description}}</a>\n </div>\n </ng-container>\n <ng-container *ngIf=\"!mediaIsZip(content)\">\n <div class=\"restrict\">\n <div class=\"image\">\n <img [src]=\"content?.value\"/>\n </div>\n <div class=\"description\" *ngIf=\"content?.description\">{{content?.description}}</div>\n <div class=\"source\" *ngIf=\"content?.source\">\n <a [href]=\"content?.source\" [target]=\"'_blank'\">Source: {{content?.source}}</a>\n </div>\n </div>\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.HTML\">\n <app-static-html\n [value]=\"content?.value\"\n >\n </app-static-html>\n </ng-container>\n <ng-container *ngSwitchDefault>\n <p>{{content?.value}}</p>\n </ng-container>\n </ng-container>\n </ng-container>\n </ng-container>\n <ng-container>\n <h2>Comments</h2>\n <p *ngIf=\"comments?.length == 0\">There are no comments yet.</p>\n <ng-container *ngIf=\"comments?.length > 0\">\n <div *ngFor=\"let comment of comments\">\n <mat-card style=\"margin-bottom: 20px;\" class=\"restrict\">\n <mat-card-title><img class=\"gravatar\" src=\"{{comment.gravatar_url}} + ?s=30\"> {{comment.user_display_name}}</mat-card-title>\n <mat-card-subtitle>{{comment.date_obj | timeAgo}}</mat-card-subtitle>\n <mat-card-content>\n <p>{{comment.content}}</p>\n <ng-container *ngIf=\"me?.id === entry()?.__server_generated_properties?.author_id\">\n <a href=\"javascript:void(0);\" *ngIf=\"!comment?.approved\" (click)=\"approve(comment)\">Approve</a>\n <a href=\"javascript:void(0);\" *ngIf=\"comment?.approved\" (click)=\"unapprove(comment)\">Unapprove</a>\n </ng-container>\n </mat-card-content>\n </mat-card>\n </div>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"!me\">\n <a href=\"/signup\">Signup</a> or <a href=\"/login\">login</a> to join the conversation!\n </ng-container>\n <ng-container *ngIf=\"me && !me?.comments_public\">\n <p>Note, your comments will not be public be default. It is possible I will make your comments public, but for now comments are just between you and me.</p>\n </ng-container>\n <ng-container *ngIf=\"me\">\n <h2 style=\"width: 100%;\">Leave a Comment</h2>\n <br>\n <mat-form-field class=\"restrict\" style=\"width: 100%;\" appearance=\"outline\">\n <mat-label>Comment</mat-label>\n <textarea [(ngModel)]=\"commentText\" (keydown.enter)=\"postComment($event)\" matInput></textarea>\n </mat-form-field>\n <br>\n <button (click)=\"postComment($event)\" style=\"text-align: right;\" mat-button>Submit</button>\n </ng-container>\n <div style=\"margin-bottom: 30px;\"></div>\n</div>\n\n", styles: [".image{width:100%;text-align:center;justify-content:center}.source,.description{text-align:center;font-size:12px}.gravatar{margin-right:20px}.smaller{text-size:12px;text-color:gray}\n"] }]
|
|
1347
1345
|
}], ctorParameters: () => [{ type: PrismService }, { type: i0.NgZone }, { type: IdentityService }, { type: CommentService }, { type: i1$3.Router }, { type: EntryService }], propDecorators: { editMode: [{
|
|
1348
1346
|
type: Input
|
|
1349
1347
|
}] } });
|