-
Azadpour, Elmera authoredAzadpour, Elmera authored
NarrativeIntro.vue 2.30 KiB
<template>
<section id="narrativeIntro">
<div id="grid-container" class= "text-container">
<div id="text2" >
<p v-html="introText.paragraph1"></p>
</div>
<img id="image1" src="@/assets/images/water_security_less-stylized.png" class="img" alt="Stylized city-scape image with buildings in background and lush green grass surrounding pond in foreground."/>
<img id="image2" src="@/assets/images/water_insecurity_less-stylized.png" class="img" alt="Stylized image with an orange hue displaying a home surrounded by sagebrush, barren land, and a nearby road."/>
<div id="text3">
<p v-html="introText.paragraph2"></p>
</div>
</div>
<div id="text4" class="text-container">
<p v-html="introText.paragraph3"></p>
</div>
<div id="text5" class="text-container">
<p v-html="introText.paragraph4"></p>
</div>
</section>
</template>
<script setup>
import text from './../assets/text/text.js';
const introText = text.components.introNarrative;
</script>
<style scoped>
.text-container {
margin-bottom: 20px;
}
#grid-container {
display: grid;
vertical-align: middle;
gap: 10px;
grid-template-columns: 50% 50%;
grid-template-areas:
"text2 image1"
"image2 text3";
box-sizing: border-box;
}
#text2 {
grid-area: text2;
}
#text3 {
grid-area: text3;
padding: 0rem 1rem 0rem 1rem;
}
#image1 {
grid-area: image1;
}
#image2 {
grid-area: image2;
}
#image1,
#image2 {
width: 100%;
}
@media screen and (max-width: 700px) {
#grid-container {
grid-template-columns: 1fr;
grid-template-areas:
"image1"
"text2"
"image2"
"text3";
}
}
</style>
<style lang="scss">
.tooltip-span {
position: relative;
cursor: pointer;
display: inline-block;
border-bottom: 1px dotted rgba(54, 54, 54, 0.8);
z-index: 10;
}
.tooltiptext {
visibility: hidden;
width: 200px;
background-color: #555;
color: #fff;
text-align: center;
border-radius: 6px;
padding: 5px;
position: absolute;
z-index: 1;
// bottom: 100%;
// left: 50%;
// transform: translateX(-50%);
margin-left: -170px;
margin-top: 2rem;
opacity: 0;
transition: opacity 0.3s;
}
.social-vulnerability {
width: 500px;
margin-left: -170px;
}
.tooltip:hover .tooltiptext {
visibility: visible;
opacity: 1;
}
</style>