Skip to content

Commit

Permalink
Improved illustrations displays
Browse files Browse the repository at this point in the history
  • Loading branch information
pierreavn committed Aug 17, 2024
1 parent cc313ca commit 0c9987e
Show file tree
Hide file tree
Showing 8 changed files with 2,312 additions and 1,114 deletions.
3,378 changes: 2,280 additions & 1,098 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
},
"devDependencies": {
"@angular-devkit/build-angular": "^15.0.4",
"@angular/cli": "~15.0.4",
"@angular/cli": "^15.2.11",
"@angular/compiler-cli": "^15.0.0",
"@types/jasmine": "~4.3.0",
"@types/js-yaml": "^4.0.5",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<span>
<span class="ingredient">
{{ displayName }}
<tui-badge
*ngIf="displayBadge"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
.ingredient {
white-space: nowrap;
}

tui-badge {
background-color: var(--tui-info-bg);
color: black;
Expand Down
3 changes: 2 additions & 1 deletion src/app/cookbook/recipe/steps/step/step.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@

&__title {
text-transform: uppercase;
font-weight: bold;
margin-bottom: .5rem;
color: var(--tui-text-02);
font-size: 13px;
}
}
3 changes: 3 additions & 0 deletions src/app/cookbook/recipe/steps/steps.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
position: relative;
margin-top: -2rem;
transform: translateY(1rem);
color: var(--tui-text-02);
text-transform: uppercase;
font-size: 13px;

&::before {
content: " ";
Expand Down
17 changes: 6 additions & 11 deletions src/app/shared/components/recipe-card/recipe-card.component.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
<tui-island size="l" (click)="openRecipe()">
<div class="tui-island__content">
<div>
<img
*ngIf="recipe.pictures && recipe.pictures.length > 0"
class="image"
[src]="recipe.pictures[0]"
/><br/>
<p class="tui-island__category" *ngIf="recipe.category">{{ recipe.category }}</p>
<h3 class="tui-island__title">{{ recipe.name }}</h3>
</div>
</div>
<div
*ngIf="recipe.pictures && recipe.pictures.length > 0"
class="image"
[style.background-image]="'url(' + recipe.pictures[0] + ')'"></div>
<h3 class="tui-island__title">{{ recipe.name }}</h3>
<p class="tui-island__category" *ngIf="recipe.category">{{ recipe.category }}</p>
</tui-island>

17 changes: 15 additions & 2 deletions src/app/shared/components/recipe-card/recipe-card.component.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
img {
height: 10rem;
.image {
width: calc(100% + 2*1.25rem);
height: 8rem;
margin-bottom: 10px;
background-size: cover;
background-repeat: no-repeat;
background-position: center;
border-top-left-radius: var(--tui-radius-xl);
border-top-right-radius: var(--tui-radius-xl);
margin: -1.25rem;
margin-bottom: 1rem;
}

.tui-island__category {
margin-bottom: 0;
}

0 comments on commit 0c9987e

Please sign in to comment.