Add dynamic photo's index on Location page

This commit is contained in:
2021-10-10 21:40:25 +02:00
parent e44f51c0c4
commit 51dc9650ec
3 changed files with 34 additions and 24 deletions

View File

@@ -42,10 +42,34 @@
// Photo number
&__index {
position: absolute;
right: -250px;
top: 50%;
transform: translateY(-50%);
z-index: 1;
@include bp (sm) {
position: absolute;
z-index: 1;
left: 112.5%;
width: 400px;
top: 50%;
text-align: left;
transform: translate3d(-50%, -50%, 0);
}
}
// Even photos
&:nth-child(even) {
.house {
&__photo {
grid-column-start: 4;
}
&__info {
margin-left: auto;
text-align: right;
}
&__index {
@include bp (sm) {
right: auto;
left: -12%;
text-align: right;
}
}
}
}
}