<template lang="pug">
#home(style="{backgroundColor: 'white'}")
  .page-area
    //- colophon.colophon
    .content
      .main
        .top
          p Investigations of "what-if scenarios" simulated by&nbsp;
            a(href="https://covid-sim.info/", target="_blank")
              b MATSim-Episim
            | &nbsp;in collaboration between&nbsp;
            a(href="https://www.casus.science/", target="_blank")
              b CASUS&nbsp;
            | &nbsp;and&nbsp;
            a(href="https://www.vsp.tu-berlin.de", target="_blank")
              b TU Berlin

        h2 Simulations of COVID-19 spreading in Dresden

        .viz-cards
          .one-viz(v-for="viz in modelruns" :key="viz.url")
            router-link(:to="viz.url")
              viz-card(:viz="viz")

</template>

<script lang="ts">
import { Vue, Component, Watch, Prop } from 'vue-property-decorator'
import Colophon from '@/components/Colophon.vue'
import ReportViewer from '@/components/ReportViewer.vue'
import VizCard from '@/components/VizCard.vue'

import reports from '@/assets/reports'
import allCalculators from '@/assets/calculators'

@Component({ components: { Colophon, ReportViewer, VizCard }, props: {} })
export default class VueComponent extends Vue {
  private readme = require('@/assets/index.md')
  private readmeBottom = require('@/assets/index-bottom.md')

  private latestReport = reports[0]

  private rCalculators = allCalculators

  private modelruns: any[] = [
    {
      url: '/Dresden/BA5-Winter-Masks',
      date: 'Released: 29 October 2022',
      title: 'Face Masks',
      subtitle: 'Mask mandate activities and compliance',
    },
    {
      url: '/Dresden/Omicron-BA5',
      date: 'Released: 10 September 2022',
      title: 'Omicron BA.5',
      subtitle: 'Infectiousness and import of Omicron BA.5 variant',
    },
  ]

/*
  private visualizations: any[] = [
    {
      url: '/v3?day=5',
      title: 'Infection Traces',
      subtitle: 'Animation of infection spreading through the population.',
    },
    {
      url: '/timelapse',
      title: '90 Day Time Lapse',
      subtitle: 'Home locations of residents, colored by their infection status through time.',
    },
  ]
*/
}
</script>

<style scoped lang="scss">
@import '@/styles.scss';

#home {
  background-color: $paleBackground;
}

.content {
  flex: 1;
  padding: 2rem 3rem 8rem 3rem;
  display: flex;
  width: 100%;
}

.banner {
  display: flex;
  flex-direction: column;
  padding: 4rem 3rem 1rem 3rem;
  background-color: #1e1f2c;
  color: white;
  background: url(../assets/images/banner.jpg);
  background-repeat: no-repeat;
  background-size: cover;
}

.banner h2 {
  margin-bottom: 0rem;
  font-size: 1.6rem;
  background-color: #1e1f2c;
  line-height: 1.6rem;
  margin-right: auto;
  color: white;
  //text-shadow: 0px 0px 2px white,0px 0px 2px white,0px 0px 2px white,0px 0px 2px white,0px 0px 2px white,0px 0px 2px white,;
}

.banner h3 {
  font-size: 1.3rem;
  font-weight: normal;
  margin-bottom: 0;
  line-height: 1.4rem;
  padding-bottom: 0.25rem;
  background-color: #1e1f2c;
  width: max-content;
}

a {
  font-size: 1.1rem;
  color: #00499c;
}

.readme {
  margin-top: 1rem;
  margin-bottom: 3rem;
  flex: 1;
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
  line-height: 1.3rem;
}

.main h2 {
  margin-top: 3rem;
  font-weight: normal;
  color: $bannerHighlight;
}

.viz-cards {
  padding-bottom: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 2rem;
}

.one-viz {
  margin-bottom: 1rem;
}

.preamble {
  display: flex;
}

.top {
  margin-top: 1rem;
}

.colophon {
  padding: 2rem 2rem 1rem 5rem;
  text-align: right;
  font-size: 0.85rem;
  background-color: white;
}

.main {
  max-width: 64rem;
}

.main .top a {
  font-size: 0.9rem;
}

.page-area {
  display: flex;
  flex-direction: row-reverse;
}

.headline {
  font-size: 2rem;
  line-height: 2.7rem;
  padding: 1rem 0;
  color: $themeColor;
}

.box {
  display: flex;
  flex-direction: column;
}

.box:hover {
  box-shadow: 0px 4px 8px 5px #00000022;
  transition: all 150ms linear;
}

.box h5 {
  margin-bottom: 0;
}

.latest-updates {
  display: grid;
  grid-template-rows: auto;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
}

@media only screen and (max-width: 1000px) {
  .latest-updates {
    grid-template-rows: auto auto auto;
    grid-template-columns: 1fr;
  }
}

@media only screen and (max-width: 800px) {
  .colophon {
    padding: 2rem 1rem 1rem 1rem;
  }
}

@media only screen and (max-width: 640px) {
  .banner {
    padding: 2rem 1rem;
  }

  .content {
    padding: 2rem 1rem 8rem 1rem;
    flex-direction: column-reverse;
  }

  .colophon {
    display: none;
  }

  .headline {
    padding: 0rem 0rem 1rem 0rem;
    font-size: 1.5rem;
    line-height: 1.8rem;
  }
}
</style>
