Permalink
Browse files

making sure we do not have errors when better_featured_image is not i…

…nstalled
  • Loading branch information...
shprink committed Dec 3, 2017
1 parent ad8b5e8 commit fc7a956e369fa33422801a84ab3ff0283cb44b27
View
@@ -76,8 +76,7 @@ const webpackConfig = {
new webpack.ContextReplacementPlugin(/moment\/locale$/, getRegexAutorizedLanguages()),
new HtmlWebpackPlugin({
filename: process.env.IONIC_WWW_DIR + '/index.html',
title: RawConfig.metas.title,
metas: RawConfig.metas,
config: RawConfig,
template: path.join(__dirname, '..', 'config', 'index.ejs'),
})
].concat(prodPlugins),
View
@@ -230,17 +230,7 @@
{
"type": "external",
"trans": "My blog (external link)",
"href": "http://julienrenaux.fr",
"href": "https://julienrenaux.fr",
"icon": "link"
},
{
"type": "internal",
"trans": "About (page)",
"page": "pagesItem",
"params": {
"slug": "about"
},
"icon": "information-circle",
"navRoot": true
}
]
@@ -5,20 +5,44 @@
"/": {
"prefix": false
},
"/bookmarks": {
"/posts": {
"prefix": false
},
"/settings": {
"/pages": {
"prefix": true
},
"/author": {
"prefix": true
},
"/authors": {
"prefix": false
},
"/category": {
"prefix": true
},
"/categories": {
"prefix": false
},
"/tabs": {
"/tag": {
"prefix": true
},
"/tags": {
"prefix": false
},
"/bookmarks": {
"prefix": false
},
"/list": {
"/settings": {
"prefix": false
},
"/movies": {
"prefix": true
},
"/item": {
"/actors": {
"prefix": true
},
"/custom-tabs": {
"prefix": false
}
}
}
@@ -5,7 +5,7 @@
for more info on Angular 2 Components.
-->
<div *ngIf="item">
<div *ngIf="item.featured_media !== 0" class="thumbnail" [style.background-image]="'url(' + item.better_featured_image.media_details.sizes.medium.source_url + ')'"></div>
<div *ngIf="item.featured_media !== 0 && item.better_featured_image" class="thumbnail" [style.background-image]="'url(' + item.better_featured_image?.media_details.sizes.medium.source_url + ')'"></div>
<div class="main-content" padding>
<h1 [innerHtml]="item.title.rendered"></h1>
<!--<author [link]="true" [authorId]="item.author" [date]="item.date"></author>-->
@@ -7,20 +7,13 @@
<ion-card>
<!--<ion-img
*ngIf="post.featured_media !== 0"
(click)="doOpen($event)"
class="thumbnail"
cache="true"
[src]="post.better_featured_image.media_details.sizes.medium.source_url"></ion-img>-->
<div
*ngIf="post.featured_media !== 0"
*ngIf="post.featured_media !== 0 && post.better_featured_image"
(click)="onClick && onClick($event, post)"
class="thumbnail"
[lazyLoad]="post.better_featured_image.media_details.sizes.medium.source_url"
[lazyLoad]="post.better_featured_image?.media_details.sizes.medium.source_url"
[scrollObservable]="content.ionScroll"
></div>
<ion-card-content (click)="onClick && onClick($event, post)">
<ion-card-title [innerHtml]="post.title.rendered"></ion-card-title>
<author [author]="author$ | async" [date]="post.date"></author>
@@ -5,8 +5,8 @@
for more info on Angular 2 Components.
-->
<div *ngIf="item">
<div *ngIf="item.featured_media !== 0" class="thumbnail"
[style.background-image]="'url(' + item.better_featured_image.media_details.sizes.medium.source_url + ')'">
<div *ngIf="item.featured_media !== 0 && item.better_featured_image" class="thumbnail"
[style.background-image]="'url(' + item.better_featured_image?.media_details.sizes.medium.source_url + ')'">
</div>
<div class="main-content" padding>
<h1 [innerHtml]="item.title.rendered"></h1>

0 comments on commit fc7a956

Please sign in to comment.