-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New TPR service list component with search #494
Changes from 16 commits
fca119e
5811278
ce7b8a1
278dfd7
be1c80f
e083bda
2fed651
04fe883
d1e2216
694d6ca
70a7bf8
b5b45cc
03ed869
79c3c7b
aec21d3
3a91473
1dd0c9a
7e2de81
0d5b96c
4c3c6cf
9634352
3422de4
01168c5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,85 +24,80 @@ $teaser-icon-size-desktop: 48px; | |
margin-right: calc(#{$spacing-and-half} / 2); | ||
} | ||
|
||
.service__link { | ||
border: 1px solid $color-black; | ||
display: block; | ||
height: 100%; | ||
margin-top: $spacing-half; | ||
padding: $spacing-and-half calc(#{$spacing-and-half} + #{$teaser-icon-size-mobile} + #{$spacing}) $spacing-and-half $spacing-and-half; | ||
position: relative; | ||
text-decoration: none; | ||
|
||
@include breakpoint($breakpoint-l) { | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: space-between; | ||
line-height: 0; // Remove extra space under the arrow icon on larger card | ||
margin-top: 0; | ||
min-height: 240px; // As in designs | ||
padding: $spacing-double $spacing-and-half calc(#{$spacing-and-half} + #{$spacing-and-half}); | ||
} | ||
|
||
&::before { | ||
background-color: $color-gold; | ||
content: ''; | ||
display: block; | ||
height: 100%; | ||
left: 0; | ||
position: absolute; | ||
top: 0; | ||
width: $spacing-half; | ||
|
||
@include breakpoint($breakpoint-l) { | ||
bottom: 0; | ||
height: $spacing-and-half; | ||
right: 0; | ||
top: auto; | ||
width: 100%; | ||
} | ||
} | ||
|
||
&:hover { | ||
text-decoration: underline; | ||
|
||
.hel-icon { | ||
margin-left: $spacing; | ||
|
||
@media (prefers-reduced-motion) { | ||
margin-left: 0; | ||
} | ||
} | ||
} | ||
} | ||
|
||
.service__title { | ||
@include font('h4'); | ||
margin: 0; | ||
} | ||
|
||
.hel-icon { | ||
--icon-size: #{$teaser-icon-size-mobile}; | ||
bottom: 50%; | ||
left: auto; | ||
position: absolute; | ||
right: $spacing; | ||
transform: translateY(50%); | ||
dragos-dumi-ibm marked this conversation as resolved.
Show resolved
Hide resolved
|
||
transition: all 0.3s; | ||
|
||
@media (prefers-reduced-motion) { | ||
transition: none; | ||
} | ||
@include pseudo-icon('arrow-right'); | ||
@include hover-link-arrow-transition; | ||
|
||
@include breakpoint($breakpoint-l) { | ||
--icon-size: #{ $teaser-icon-size-desktop}; | ||
margin-top: $spacing-and-half; | ||
position: static; | ||
right: auto; | ||
dragos-dumi-ibm marked this conversation as resolved.
Show resolved
Hide resolved
|
||
transform: none; | ||
} | ||
} | ||
} | ||
|
||
.service__link { | ||
border: 1px solid $color-black; | ||
display: block; | ||
height: 100%; | ||
margin-top: $spacing-half; | ||
padding: $spacing-and-half calc(#{$spacing-and-half} + #{$teaser-icon-size-mobile} + #{$spacing}) $spacing-and-half $spacing-and-half; | ||
position: relative; | ||
text-decoration: none; | ||
|
||
@include breakpoint($breakpoint-l) { | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: space-between; | ||
line-height: 0; // Remove extra space under the arrow icon on larger card | ||
margin-top: 0; | ||
min-height: 240px; // As in designs | ||
padding: $spacing-double $spacing-and-half calc(#{$spacing-and-half} + #{$spacing-and-half}); | ||
} | ||
|
||
&::before { | ||
background-color: $color-gold; | ||
content: ''; | ||
display: block; | ||
height: 100%; | ||
left: 0; | ||
position: absolute; | ||
top: 0; | ||
width: $spacing-half; | ||
|
||
@include breakpoint($breakpoint-l) { | ||
bottom: 0; | ||
height: $spacing-and-half; | ||
right: 0; | ||
top: auto; | ||
width: 100%; | ||
} | ||
} | ||
|
||
&:hover { | ||
text-decoration: underline; | ||
|
||
.hel-icon { | ||
transform: translateX($spacing-quarter); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why was this animation size adjusted? Now it seems too small compared to the icon size. Please do not move code and change code in same commit. Also, please make smaller commits that only change one thing and have a properly formatted message so that we can follow your logic. By properly formatted message I mean that each commit message should read as if it had this string in front of it: Like this: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hello. Will check again the comments and the mobile version.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we've updated the icon for existing card. the transition all was an issue for style lint as well as other styles around that arrow so that's why we removed some styles initially. Now we've refactored the code around that arrow to keep same animation but to pass stylelint checks |
||
|
||
@media (prefers-reduced-motion) { | ||
transform: none; | ||
} | ||
} | ||
} | ||
} | ||
|
||
.service--units__container { | ||
margin-bottom: $spacing-quadruple; | ||
margin-top: $spacing-quadruple; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{% embed '@hdbt/component/card.twig' with { | ||
card_modifier_class: 'card--tpr-service-teaser', | ||
card_title: entity.label, | ||
card_url: service_url, | ||
card_description: content.description, | ||
card_tags: content.errand_services[0]['#items'], | ||
} %} | ||
{% endembed %} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{% block paragraph %} | ||
{% embed "@hdbt/misc/component.twig" with | ||
{ | ||
component_classes: [ 'component--service-list-search' ], | ||
component_title: content.field_service_list_title, | ||
component_description: content.field_service_list_description, | ||
} | ||
%} | ||
|
||
{% block component_content %} | ||
{{ drupal_view('service_list', 'block_search', services_list_views_argument) }} | ||
|
||
{% endblock component_content %} | ||
{% endembed %} | ||
{% endblock paragraph %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was the icon size for mobile removed here? We should not break existing card layouts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you checked that you did not break mobile layouts for these? To me it seems that you broke the arrows from these cards. See the prod and your branch difference.