feat: add ability to display images as polaroid
This commit is contained in:
parent
ae6c1f3eab
commit
3e803c1fde
1 changed files with 33 additions and 18 deletions
|
@ -1,15 +1,23 @@
|
||||||
<template>
|
<template>
|
||||||
<figure class="figure">
|
<figure class="figure">
|
||||||
<slot name="img"></slot>
|
<div
|
||||||
<figcaption class="figure__meta">
|
class="figure__border"
|
||||||
<slot name="caption"></slot>
|
:class="{ 'figure__border--polaroid': polaroidBorder }"
|
||||||
<slot name="copyright"></slot>
|
>
|
||||||
</figcaption>
|
<slot name="img"></slot>
|
||||||
|
<figcaption class="figure__meta">
|
||||||
|
<slot name="caption"></slot> <slot name="copyright"></slot>
|
||||||
|
</figcaption>
|
||||||
|
</div>
|
||||||
</figure>
|
</figure>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {};
|
export default {
|
||||||
|
props: {
|
||||||
|
polaroidBorder: Boolean,
|
||||||
|
},
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
@ -20,6 +28,25 @@ export default {};
|
||||||
margin: 1em auto;
|
margin: 1em auto;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
||||||
|
&__border {
|
||||||
|
&--polaroid {
|
||||||
|
margin: 1em auto;
|
||||||
|
padding: 1em;
|
||||||
|
background-color: #eee;
|
||||||
|
box-shadow: inset 0 0 1em rgba(#000, 0.7), 0 0 1em rgba(#000, 0.7);
|
||||||
|
|
||||||
|
.figure__meta {
|
||||||
|
margin: 0.5em 0;
|
||||||
|
font-family: "Permanent Marker", fantasy;
|
||||||
|
color: $copy-color-darkgrey;
|
||||||
|
|
||||||
|
* {
|
||||||
|
color: inherit;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
img {
|
img {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
object-fit: contain;
|
object-fit: contain;
|
||||||
|
@ -30,18 +57,6 @@ export default {};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
label,
|
|
||||||
a {
|
|
||||||
font-size: 0.8em;
|
|
||||||
font-style: italic;
|
|
||||||
color: $copy-color;
|
|
||||||
}
|
|
||||||
|
|
||||||
label:after {
|
|
||||||
display: inline;
|
|
||||||
content: " ";
|
|
||||||
}
|
|
||||||
|
|
||||||
a:before {
|
a:before {
|
||||||
display: inline;
|
display: inline;
|
||||||
content: "©";
|
content: "©";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue