update lock img

This commit is contained in:
2026-11-19 17:40:07 +03:00
parent 0119ac291f
commit 33cc27797e
6 changed files with 235 additions and 126 deletions
+15
View File
@@ -0,0 +1,15 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" fill="none">
<rect x="7" y="7" width="86" height="86" fill="rgba(255,255,255,0.02)" stroke="#4B453B" stroke-width="1.6" stroke-dasharray="3 3"/>
<g transform="translate(34.4 34.4) scale(1.3)" stroke="#8A8172" stroke-width="1.6" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path d="M6 11 H18 V20 H6 Z"/>
<path d="M8.5 11 V8 A3.5 3.5 0 0 1 15.5 8 V11"/>
</g>
<rect x="3.5" y="3.5" width="7" height="7" fill="#14120F" stroke="#4B453B" stroke-width="1"/>
<rect x="89.5" y="3.5" width="7" height="7" fill="#14120F" stroke="#4B453B" stroke-width="1"/>
<rect x="3.5" y="89.5" width="7" height="7" fill="#14120F" stroke="#4B453B" stroke-width="1"/>
<rect x="89.5" y="89.5" width="7" height="7" fill="#14120F" stroke="#4B453B" stroke-width="1"/>
<path d="M50 3.5 L53.5 7 L50 10.5 L46.5 7 Z" fill="#14120F" stroke="#4B453B" stroke-width="1"/>
<path d="M50 89.5 L53.5 93 L50 96.5 L46.5 93 Z" fill="#14120F" stroke="#4B453B" stroke-width="1"/>
<path d="M3.5 50 L7 46.5 L10.5 50 L7 53.5 Z" fill="#14120F" stroke="#4B453B" stroke-width="1"/>
<path d="M89.5 50 L93 46.5 L96.5 50 L93 53.5 Z" fill="#14120F" stroke="#4B453B" stroke-width="1"/>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

@@ -4,7 +4,7 @@
<img <img
class="card__stamp" class="card__stamp"
[src]="!attraction().visited ? lockIcon : attraction().iconUrl || lockIcon" [src]="!attraction().visited ? lockIcon : attraction().iconUrl || lockIcon"
alt="" alt="icon"
width="72" width="72"
height="72" height="72"
/> />
+24 -8
View File
@@ -30,13 +30,21 @@
</p> </p>
</div> </div>
<div class="pack__percent anim-percent" [style.--to-p]="progress(area)" aria-hidden="true"> <div
class="pack__percent anim-percent"
[style.--to-p]="progress(area)"
aria-hidden="true"
>
<span>{{ progress(area) }}%</span> <span>{{ progress(area) }}%</span>
</div> </div>
</div> </div>
<div class="pack__bar" aria-hidden="true"> <div class="pack__bar" aria-hidden="true">
<span class="anim-grow" [style.--from]="'0%'" [style.--to]="progress(area) + '%'"></span> <span
class="anim-grow"
[style.--from]="'0%'"
[style.--to]="progress(area) + '%'"
></span>
</div> </div>
<div class="city-card__cells"> <div class="city-card__cells">
@@ -47,15 +55,23 @@
[attr.aria-label]=" [attr.aria-label]="
attraction.name + (obtained(attraction) ? ', получено' : ', не получен') attraction.name + (obtained(attraction) ? ', получено' : ', не получен')
" "
>
@if (obtained(attraction) && attraction.iconUrl) {
<img [src]="attraction?.iconUrl" alt="" />
} @else {
<div
class="icon-wrapper"
[class.disable-icon]="!obtained(attraction) && attraction.iconUrl"
> >
<img <img
[src]=" class="main-icon"
obtained(attraction) && attraction.iconUrl [src]="attraction?.iconUrl || '/assets/icons/cell-lock.svg'"
? attraction.iconUrl alt=""
: '/assets/icons/cell-lock.svg'
"
[alt]=""
/> />
<img class="lock-icon" src="/assets/icons/cell-lock-line.svg" alt="" />
</div>
}
</span> </span>
} }
</div> </div>
+35 -2
View File
@@ -128,7 +128,7 @@
padding: 0; padding: 0;
border: 0; border: 0;
border-radius: 10px; border-radius: 10px;
background: #171512;
color: inherit; color: inherit;
text-decoration: none; text-decoration: none;
cursor: pointer; cursor: pointer;
@@ -142,7 +142,7 @@
} }
.cell--open { .cell--open {
background: rgb(224 184 79 / 10%); background: rgb(224 184 79 / 10%) !important;
box-shadow: inset 0 0 0 1.5px var(--color-accent); box-shadow: inset 0 0 0 1.5px var(--color-accent);
} }
@@ -185,3 +185,36 @@
gap: 10px; gap: 10px;
} }
} }
.icon-wrapper {
position: relative;
width: 96px;
height: 96px;
.main-icon {
width: 100%;
height: 100%;
object-fit: contain;
}
.lock-icon {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-52.4%, -52.4%);
width: 100%;
height: 100%;
object-fit: contain;
}
}
.disable-icon {
opacity: 0.2;
background-color: #1c1a17;
.main-icon {
filter: brightness(0);
height: 90%;
}
}
+12 -1
View File
@@ -97,10 +97,21 @@
<span class="card__spark card__spark--c"></span> <span class="card__spark card__spark--c"></span>
<span class="card__spark card__spark--d"></span> <span class="card__spark card__spark--d"></span>
} }
<div
class="icon-wrapper"
[class.disable-icon]="!isOpen(landmark) && landmark?.iconUrl"
>
<img <img
[src]="isOpen(landmark) && landmark.iconUrl ? landmark.iconUrl : '/assets/icons/cell-lock.svg'" class="main-icon"
[src]="landmark?.iconUrl || '/assets/icons/cell-lock.svg'"
alt="" alt=""
/> />
@if (!isOpen(landmark) && landmark?.iconUrl) {
<img class="lock-icon" src="/assets/icons/cell-lock-line.svg" alt="" />
}
</div>
</div> </div>
<div class="card__body"> <div class="card__body">
<h2>{{ landmark.name }}</h2> <h2>{{ landmark.name }}</h2>
+34
View File
@@ -315,3 +315,37 @@
grid-template-columns: 1fr; grid-template-columns: 1fr;
} }
} }
.icon-wrapper {
position: relative;
width: 96px;
height: 96px;
.main-icon {
width: 100%;
height: 100%;
object-fit: contain;
}
.lock-icon {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 100%;
height: 100%;
object-fit: contain;
}
}
.disable-icon {
opacity: 0.2;
background-color: #1c1a17;
.main-icon {
filter: brightness(0);
height: 90%;
}
}