mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2025-12-13 01:36:22 +00:00
refactor: inline display of dish icons
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@import "src/theme/util/_mixins.scss";
|
||||
@import "src/theme/common/_helper.scss";
|
||||
|
||||
ion-item {
|
||||
--border-color: transparent;
|
||||
@@ -36,19 +37,7 @@ ion-item {
|
||||
}
|
||||
::ng-deep {
|
||||
ion-note {
|
||||
ul {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
|
||||
li {
|
||||
list-style-type: none;
|
||||
display: inline;
|
||||
}
|
||||
|
||||
li:not(:first-child):before {
|
||||
content: " • ";
|
||||
}
|
||||
}
|
||||
@extend %horizontal-list;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ import {SCDish} from '@openstapps/core';
|
||||
*/
|
||||
@Component({
|
||||
selector: 'stapps-dish-detail-content',
|
||||
styleUrls: ['dish-detail-content.scss'],
|
||||
templateUrl: 'dish-detail-content.html',
|
||||
})
|
||||
export class DishDetailContentComponent {
|
||||
|
||||
@@ -1,29 +1,30 @@
|
||||
<ion-grid>
|
||||
<ion-row>
|
||||
<ion-col>
|
||||
<stapps-simple-card
|
||||
[title]="'categories' | propertyNameTranslate: item | titlecase"
|
||||
[content]="'categories' | thingTranslate: item"
|
||||
></stapps-simple-card>
|
||||
<ion-card *ngIf="item.categories">
|
||||
<ion-card-header>
|
||||
{{ 'categories' | thingTranslate: item | join: ', ' | titlecase }}
|
||||
</ion-card-header>
|
||||
</ion-card>
|
||||
</ion-col>
|
||||
<ion-col>
|
||||
<ion-card *ngIf="item.characteristics">
|
||||
<ion-card-header class="no-padding-inline-start">{{
|
||||
'data.types.dish.CHARACTERISTICS' | translate
|
||||
}}</ion-card-header>
|
||||
<ion-card-content class="no-padding-inline-start">
|
||||
<p
|
||||
*ngFor="
|
||||
let characteristic of 'characteristics' | thingTranslate: item
|
||||
"
|
||||
>
|
||||
<img
|
||||
*ngIf="characteristic.image"
|
||||
[src]="characteristic.image"
|
||||
alt=""
|
||||
/><span> {{ characteristic.name }}</span>
|
||||
</p>
|
||||
</ion-card-content>
|
||||
<ion-card-header class="no-padding-inline-start vertical-list">
|
||||
<ul>
|
||||
<li>
|
||||
<ng-container
|
||||
*ngFor="
|
||||
let characteristic of 'characteristics' | thingTranslate: item
|
||||
"
|
||||
>
|
||||
<img
|
||||
[src]="characteristic.image"
|
||||
[alt]="characteristic.name | titlecase"
|
||||
/>
|
||||
</ng-container>
|
||||
</li>
|
||||
</ul>
|
||||
</ion-card-header>
|
||||
</ion-card>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
@@ -86,7 +87,7 @@
|
||||
-->
|
||||
<stapps-simple-card
|
||||
*ngIf="item.additives"
|
||||
[title]="'additives' | propertyNameTranslate: item | titlecase"
|
||||
[title]="'additives' | propertyNameTranslate: item"
|
||||
[content]="'additives' | thingTranslate: item | join: ', '"
|
||||
>
|
||||
</stapps-simple-card>
|
||||
|
||||
6
src/app/modules/data/types/dish/dish-detail-content.scss
Normal file
6
src/app/modules/data/types/dish/dish-detail-content.scss
Normal file
@@ -0,0 +1,6 @@
|
||||
@import "src/theme/common/_helper.scss";
|
||||
.vertical-list {
|
||||
ul li img {
|
||||
filter: invert(0%) sepia(25%) saturate(5940%) hue-rotate(121deg) brightness(70%) contrast(87%);
|
||||
}
|
||||
}
|
||||
@@ -6,9 +6,25 @@
|
||||
<p class="title-sub ion-hide-sm-down">
|
||||
{{ 'description' | thingTranslate: item }}
|
||||
</p>
|
||||
<ion-note>{{
|
||||
'categories' | thingTranslate: item | join: ', '
|
||||
}}</ion-note>
|
||||
<ion-note>
|
||||
<ul>
|
||||
<li>
|
||||
{{ 'categories' | thingTranslate: item | join: ', ' | titlecase }}
|
||||
</li>
|
||||
<li *ngIf="item.characteristics">
|
||||
<ng-container
|
||||
*ngFor="
|
||||
let characteristic of 'characteristics' | thingTranslate: item
|
||||
"
|
||||
>
|
||||
<img
|
||||
[src]="characteristic.image"
|
||||
[alt]="characteristic.name | titlecase"
|
||||
/>
|
||||
</ng-container>
|
||||
</li>
|
||||
</ul>
|
||||
</ion-note>
|
||||
</div>
|
||||
</ion-col>
|
||||
<ion-col width-10 text-right>
|
||||
|
||||
@@ -13,3 +13,45 @@
|
||||
.clickable {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
|
||||
%vertical-list {
|
||||
ul {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
|
||||
li {
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
li img {
|
||||
max-height: 1.25rem;
|
||||
vertical-align: text-bottom;
|
||||
filter: invert(45%) sepia(0%) saturate(0%) hue-rotate(227deg) brightness(97%) contrast(82%);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
%horizontal-list {
|
||||
@extend %vertical-list;
|
||||
ul {
|
||||
li {
|
||||
display: inline;
|
||||
}
|
||||
li:not(:first-child):before {
|
||||
content: " • ";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.vertical-list {
|
||||
@extend %vertical-list;
|
||||
}
|
||||
|
||||
.horizontal-list {
|
||||
@extend %vertical-list;
|
||||
li {
|
||||
display: inline;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user