Removed post types completely.
This commit is contained in:
parent
462aedd1fc
commit
2d68daf383
@ -19,7 +19,7 @@ export class PostComponent implements OnInit {
|
|||||||
// console.log('post component has inited: '+this.post.id);
|
// console.log('post component has inited: '+this.post.id);
|
||||||
// console.log(this.post);
|
// console.log(this.post);
|
||||||
|
|
||||||
this.dataloaderService.getPost(this.post.type, this.post.id).subscribe(content => {
|
this.dataloaderService.getPost(this.post.id).subscribe(content => {
|
||||||
this.htmlContainer.nativeElement.innerHTML = content;
|
this.htmlContainer.nativeElement.innerHTML = content;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,11 +3,6 @@
|
|||||||
</div>
|
</div>
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<div class="btn-group" role="group" aria-label="Categories">
|
|
||||||
<button type="button" class="btn btn-secondary">All</button>
|
|
||||||
<button *ngFor='let postType of postTypes | async' type="button" class="btn btn-secondary">{{postType}}</button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<app-post *ngFor='let post of posts | async' [post]="post"></app-post>
|
<app-post *ngFor='let post of posts | async' [post]="post"></app-post>
|
||||||
</div>
|
</div>
|
||||||
@ -37,14 +37,17 @@ export class DataloaderService {
|
|||||||
* Fetch the 'full fat' post. This returns HTML content that can be wrapped in any container, no sanitizing done.
|
* Fetch the 'full fat' post. This returns HTML content that can be wrapped in any container, no sanitizing done.
|
||||||
* @param filename the filename for which the post needs to be fetched
|
* @param filename the filename for which the post needs to be fetched
|
||||||
*/
|
*/
|
||||||
getPost(type: String, id: String): Observable<String> {
|
getPost(id: String): Observable<String> {
|
||||||
const httpOptions = {
|
const httpOptions = {
|
||||||
headers: new HttpHeaders({ 'Content-Type': 'text/html', 'Accept': 'text/html' })
|
headers: new HttpHeaders({ 'Content-Type': 'text/html', 'Accept': 'text/html' })
|
||||||
};
|
};
|
||||||
|
|
||||||
// console.log('launching GET');
|
// console.log('launching GET');
|
||||||
const url = 'assets/post/' + type + '/' + id + '/full.html';
|
const url = 'assets/post/' + id + '/full.html';
|
||||||
|
|
||||||
// console.log('fetching: '+url);
|
// console.log('fetching: '+url);
|
||||||
|
console.log('getPost called: '+url);
|
||||||
|
|
||||||
return this.http.get(url, {responseType: 'text'});
|
return this.http.get(url, {responseType: 'text'});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user