Add image enlargement

This commit is contained in:
2021-11-10 23:15:13 +01:00
parent a6d96dbdc2
commit 9ab6b65570
6 changed files with 126 additions and 9 deletions
+67
View File
@@ -209,6 +209,73 @@ figure {
&.inline {
display: inline-table;
}
&.enlargable {
cursor: pointer;
}
.enlarged_image {
display: none;
}
&.enlarged .enlarged_image {
cursor: initial;
position: fixed;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
left: 0;
top: 0;
min-width: 100vw;
max-width: 100vw;
width: 100vw;
min-height: 100vh;
max-height: 100vh;
height: 100vh;
margin: 0;
padding: 0;
z-index: 10000;
background: #2c2c2cdd;
&::after {
content: "×";
display: block;
height: 2rem;
width: 2rem;
line-height: 2rem;
text-align: center;
position: absolute;
top: 1rem;
right: 1rem;
color: $dark-color;
font-size: 3rem;
cursor: pointer;
}
picture {
max-width: 80%;
width: 80%;
height: 80%;
object-fit: contain;
border-radius: 12px;
display: flex;
align-items: center;
justify-content: center;
img {
width: 100%;
height: 100%;
object-fit: contain;
}
}
.caption {
background: #c2c2c2;
padding: 1rem 2rem;
border-radius: 8px;
}
}
}
code {