Skip to content

Commit 3d9ffdf

Browse files
committed
Update lookbook markers and helper overlay
1 parent 8f011a0 commit 3d9ffdf

File tree

2 files changed

+42
-25
lines changed

2 files changed

+42
-25
lines changed

views/css/everblock.css

Lines changed: 32 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -33,25 +33,25 @@
3333
display: flex;
3434
align-items: center;
3535
justify-content: center;
36-
background-color: #fff;
36+
background-color: transparent;
3737
border: 3px solid #f25b76;
3838
box-shadow: 0 12px 24px rgba(242, 91, 118, 0.25);
39-
transition: transform 0.2s ease, box-shadow 0.2s ease;
40-
}
41-
42-
.lookbook-marker::after {
43-
content: "";
44-
display: block;
45-
width: 0.9rem;
46-
height: 0.9rem;
47-
border-radius: 50%;
48-
background-color: #f25b76;
39+
transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease;
40+
color: #f25b76;
4941
}
5042

5143
.lookbook-marker:focus,
52-
.lookbook-marker:hover {
44+
.lookbook-marker:hover,
45+
.lookbook-marker:active {
5346
transform: scale(1.05);
5447
box-shadow: 0 16px 32px rgba(242, 91, 118, 0.35);
48+
background-color: #f25b76;
49+
color: #fff;
50+
}
51+
52+
.lookbook-marker:focus-visible {
53+
outline: 3px solid rgba(242, 91, 118, 0.35);
54+
outline-offset: 2px;
5555
}
5656

5757
.prettyblock-lookbook {
@@ -84,16 +84,26 @@
8484
margin: 0 auto;
8585
}
8686

87+
.lookbook-image {
88+
margin-bottom: 3.5rem;
89+
}
90+
8791
.lookbook-helper {
92+
position: absolute;
93+
left: 50%;
94+
bottom: 0;
95+
transform: translate(-50%, 50%);
8896
display: inline-flex;
8997
align-items: center;
9098
gap: 0.75rem;
91-
padding: 0.75rem 1.5rem;
99+
padding: 0.85rem 1.75rem;
92100
border-radius: 999px;
93101
background-color: #fff;
94-
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
102+
border: 1px solid rgba(242, 91, 118, 0.25);
103+
box-shadow: 0 18px 36px rgba(242, 91, 118, 0.18);
95104
font-size: 0.95rem;
96105
color: #3a3a3a;
106+
z-index: 1;
97107
}
98108

99109
.lookbook-helper-icon {
@@ -103,7 +113,8 @@
103113
width: 2.5rem;
104114
height: 2.5rem;
105115
border-radius: 50%;
106-
background: linear-gradient(135deg, rgba(242, 91, 118, 0.12), rgba(242, 91, 118, 0.25));
116+
border: 2px solid #f25b76;
117+
background-color: #fff;
107118
color: #f25b76;
108119
}
109120

@@ -120,6 +131,12 @@
120131
.prettyblock-lookbook.columns-3 {
121132
grid-template-columns: 1fr;
122133
}
134+
135+
.lookbook-helper {
136+
width: calc(100% - 3rem);
137+
max-width: 320px;
138+
padding: 0.75rem 1.25rem;
139+
}
123140
}
124141

125142
@media (min-width: 992px) {

views/templates/hook/prettyblocks/prettyblock_lookbook.tpl

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -45,27 +45,27 @@
4545
{if $block.settings.title}
4646
<h2 class="mb-3">{$block.settings.title|escape:'htmlall':'UTF-8'}</h2>
4747
{/if}
48-
<div class="lookbook-image position-relative mb-3 d-inline-block">
48+
<div class="lookbook-image position-relative d-inline-block">
4949
{if isset($block.settings.image.url) && $block.settings.image.url}
5050
<img src="{$block.settings.image.url}" alt="{$block.settings.title|escape:'htmlall':'UTF-8'}" class="img-fluid w-100" loading="lazy">
5151
{/if}
5252
{if isset($block.states) && $block.states}
5353
{foreach from=$block.states item=state}
5454
{if isset($state.product.id) && $state.product.id}
55-
<button type="button" class="btn btn-light rounded-circle lookbook-marker position-absolute" style="top:{$state.top|default:'0%'|escape:'htmlall'};left:{$state.left|default:'0%'|escape:'htmlall'};transform:translate(-50%,-50%);" data-product-id="{$state.product.id}">
55+
<button type="button" class="lookbook-marker position-absolute" style="top:{$state.top|default:'0%'|escape:'htmlall'};left:{$state.left|default:'0%'|escape:'htmlall'};transform:translate(-50%,-50%);" data-product-id="{$state.product.id}">
5656
<span class="visually-hidden">{l s='View product' mod='everblock'}</span>
5757
</button>
5858
{/if}
5959
{/foreach}
6060
{/if}
61-
</div>
62-
<div class="lookbook-helper" role="note">
63-
<span class="lookbook-helper-icon" aria-hidden="true">
64-
<svg class="lookbook-helper-svg" width="20" height="20" viewBox="0 0 20 20" focusable="false" aria-hidden="true">
65-
<path d="M5 2.5a1 1 0 0 0-1 1v10.042a1 1 0 0 0 1.707.707l2.586-2.586 2.48 4.96a1 1 0 0 0 1.342.447l1.856-.928a1 1 0 0 0 .447-1.342l-2.48-4.96 3.293.658A1 1 0 0 0 16 8.52V3.5a1 1 0 0 0-1-1H5z" fill="currentColor"/>
66-
</svg>
67-
</span>
68-
<span class="lookbook-helper-text">{l s='Cliquez sur un point pour voir le produit' mod='everblock'}</span>
61+
<div class="lookbook-helper" role="note">
62+
<span class="lookbook-helper-icon" aria-hidden="true">
63+
<svg class="lookbook-helper-svg" width="24" height="24" viewBox="0 0 24 24" focusable="false" aria-hidden="true">
64+
<path d="M12 2a1 1 0 0 1 1 1v9.25l.586-.586a2 2 0 0 1 3.414 1.414v2.5A5.5 5.5 0 0 1 11.5 21H9a5 5 0 0 1-5-5v-3.586l-1.293 1.293a1 1 0 0 1-1.414-1.414l3.75-3.75A1 1 0 0 1 6.75 9H9V5a1 1 0 0 1 2 0V3a1 1 0 0 1 1-1zm-6 9.5a.5.5 0 0 0-.5.5v5a3.5 3.5 0 0 0 3.5 3.5h2.5a3.5 3.5 0 0 0 3.5-3.5v-2.5a1 1 0 0 0-1.707-.707l-1.586 1.586A1 1 0 0 1 11 15v-5a1 1 0 0 0-2 0v1.5a.5.5 0 0 1-.5.5H9a1 1 0 0 0-.707.293l-2.25 2.25A1 1 0 0 1 4 14.5v-3z" fill="currentColor" fill-rule="evenodd" clip-rule="evenodd"/>
65+
</svg>
66+
</span>
67+
<span class="lookbook-helper-text">{l s='Cliquez sur un point pour voir le produit' mod='everblock'}</span>
68+
</div>
6969
</div>
7070
</div>
7171

0 commit comments

Comments
 (0)