merged with develop

This commit is contained in:
Peter Skrlj
2019-02-12 08:47:38 +01:00
2 changed files with 42 additions and 0 deletions

View File

@@ -38,6 +38,10 @@
.title span {
font-size: 22px;
font-weight: bold;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
display: block;
}
.price span {
@@ -128,3 +132,35 @@
.publisher {
max-width: 300px;
}
/* Portrait */
@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) and (orientation: portrait) and (-webkit-min-device-pixel-ratio: 2) {
.title span {
max-width: 370px;
}
}
/* Landscape */
@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) and (orientation: landscape) and (-webkit-min-device-pixel-ratio: 2) {
.title span {
max-width: 810px;
}
}
/* Portrait */
/* Declare the same value for min- and max-width to avoid colliding with desktops */
/* Source: https://medium.com/connect-the-dots/css-media-queries-for-ipad-pro-8cad10e17106*/
@media only screen and (min-device-width: 1024px) and (max-device-width: 1024px) and (orientation: portrait) and (-webkit-min-device-pixel-ratio: 2) {
.title span {
max-width: 565px;
}
}
/* Landscape */
/* Declare the same value for min- and max-width to avoid colliding with desktops */
/* Source: https://medium.com/connect-the-dots/css-media-queries-for-ipad-pro-8cad10e17106*/
@media only screen and (min-device-width: 1366px) and (max-device-width: 1366px) and (orientation: landscape) and (-webkit-min-device-pixel-ratio: 2) {
.title span {
max-width: 900px;
}
}

View File

@@ -33,6 +33,12 @@ export class ProductCardComponent implements OnInit {
if (this._product.price.toString().indexOf('.') === -1) {
return this._product.price + ',00';
}
const afterDecimal = this._product.price.toString().split('.')[1];
if (afterDecimal.length !== 2) {
return this._product.price.toString().replace('.', ',') + '0';
}
return this._product.price.toString().replace('.', ',');
}