Skip to content
Snippets Groups Projects
VizTitle.vue 1.2 KiB
Newer Older
  <header id="grid-container">
Cee Nell's avatar
Cee Nell committed
    <div id="title-container" :class="{ mobile: mobileView }">
Cee Nell's avatar
Cee Nell committed
        :class="{ mobile: mobileView }"
        src="@/assets/images/hero_img_cutout_less-stylized_feather.png"
        alt="Social vulnerability and water insecurity"
Cee Nell's avatar
Cee Nell committed
      />
Cee Nell's avatar
Cee Nell committed
        <h1>Unequal access to water</h1>
        <h3>
Cee Nell's avatar
Cee Nell committed
          How societal factors shape exposure to water-related hazards, likelihood to suffer harm, and ability to cope and recover from losses
Cee Nell's avatar
Cee Nell committed
        </h3>
    </div>
  </header>
</template>

Cee Nell's avatar
Cee Nell committed
<script setup>
import { ref } from 'vue';
import { isMobile } from 'mobile-device-detect';
Cee Nell's avatar
Cee Nell committed
const mobileView = ref(isMobile);
<style lang="scss" scoped>
#grid-container {
  display: grid;
Cee Nell's avatar
Cee Nell committed
  padding: 0px 0;
Cee Nell's avatar
Cee Nell committed
  grid-template-columns: 1fr;
  grid-template-areas: 
    "title"
    "intro";
  width: 100vw;
  justify-content: center;
  margin: auto;
  @media screen and (max-width: 600px) {
Cee Nell's avatar
Cee Nell committed
    padding: 0 0 20px;
    grid-template-columns: 100%;
Cee Nell's avatar
Cee Nell committed
    grid-template-rows: max-content max-content;
Cee Nell's avatar
Cee Nell committed

#title-container {
  grid-area: title;
Cee Nell's avatar
Cee Nell committed
  text-align: center;
Cee Nell's avatar
Cee Nell committed
  width: 100vw;
  max-width: 100%;
  margin: auto;