Skip to content
Snippets Groups Projects
App.vue 4.66 KiB
Newer Older
  • Learn to ignore specific revisions
  • Cee Nell's avatar
    Cee Nell committed
    <template>
    
    Cee Nell's avatar
    Cee Nell committed
      <div class="app-container">
    
    Cee Nell's avatar
    Cee Nell committed
        <WindowSize v-if="typeOfEnv === '-test build-'" />
        <HeaderUSWDSBanner v-if="typeOfEnv !== '-test build-'" />
        <HeaderUSGS />
    
        <WorkInProgressWarning v-if="typeOfEnv !== ''" />
    
    Cee Nell's avatar
    Cee Nell committed
        <RouterView />
    
        <PreFooterCodeLinks />
    
    Cee Nell's avatar
    Cee Nell committed
        <FooterUSGS />
      </div>
    </template>
    
    <script setup>
      import { onMounted } from "vue";
      import { RouterView } from 'vue-router'
      import WindowSize from "./components/WindowSize.vue";
      import HeaderUSWDSBanner from "./components/HeaderUSWDSBanner.vue";
      import HeaderUSGS from './components/HeaderUSGS.vue';
      import WorkInProgressWarning from "./components/WorkInProgressWarning.vue";
    
      import PreFooterCodeLinks from "@/components/PreFooterCodeLinks.vue";
    
    Cee Nell's avatar
    Cee Nell committed
      import FooterUSGS from './components/FooterUSGS.vue';
      import { useWindowSizeStore } from './stores/WindowSizeStore';
    
      const windowSizeStore = useWindowSizeStore();
      const typeOfEnv = import.meta.env.VITE_APP_TIER;
    
      // Declare behavior on mounted
      // functions called here
      onMounted(() => {
        // Add window size tracking by adding a listener
        window.addEventListener('resize', handleResize);
        handleResize();
      });
    
      // Functions
      function handleResize() {
        // store the window size values in the Pinia state
        windowSizeStore.windowWidth = window.innerWidth;
        windowSizeStore.windowHeight = window.innerHeight;
      }
    </script>
    
    
    <style lang="scss">
    
    /* Fonts */
    @import url('https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@200;300;400;500;600;700;800&display=swap');
    $SourceSans: 'Source Sans Pro', sans-serif;
    
    Cee Nell's avatar
    Cee Nell committed
    @import url('https://fonts.googleapis.com/css2?family=Dosis:wght@200..800&family=Inter+Tight:ital,wght@0,100..900;1,100..900&display=swap');
    $Dosis: 'Inter Tight', sans-serif;
    
    
    html {
      /* Make base font-size 100% of browser font-size */
      font-size: 100%;
    }
    
    Cee Nell's avatar
    Cee Nell committed
    FooterUSGS {
      margin-top: auto;
    }
    .app-container {
      display: flex;
      flex-direction: column;
      min-height: 100vh;
    }
    
    
    @media (prefers-reduced-motion: no-preference) {
      html {
        scroll-behavior: smooth; 
      }
    }
    
    img {
      /* For responsive images that adjust & adapt */
      height: auto;
      max-width: 100%;
      user-select: none;
    }
    
    button {
      color: inherit; 
    }
    
    a, button {
      touch-action: manipulation; /* Element doesn't want double-tap on mobile to zoom */
    }
    
    iframe, video {
      /* Make iframes & videos fit the parent container by default */
      height: 100%;
      width: 100%
    }
    
    body {
    
    Cee Nell's avatar
    Cee Nell committed
      height: 100%;
    
    Hayley Corson-Dosch's avatar
    Hayley Corson-Dosch committed
      background-color: var(--color-background);
    
    Cee Nell's avatar
    Cee Nell committed
      margin: 0;
      padding: 0;
    
    Cee Nell's avatar
    Cee Nell committed
      line-height: 1.35;
    
    Cee Nell's avatar
    Cee Nell committed
      font-size: 1.75rem;
      font-weight: 400;
      -webkit-font-smoothing: antialiased;
      -moz-osx-font-smoothing: grayscale;
      width: 100%;
    
    Cee Nell's avatar
    Cee Nell committed
      @media screen and (max-width: 750px) {
    
    Cee Nell's avatar
    Cee Nell committed
        font-size: 1.6rem;
    
    Cee Nell's avatar
    Cee Nell committed
    }
    
    Cee Nell's avatar
    Cee Nell committed
      font-size: 9rem;
    
    Cee Nell's avatar
    Cee Nell committed
      font-weight: 700;
    
    Cee Nell's avatar
    Cee Nell committed
      font-family: $Dosis;
    
      line-height: 1;
    
    Cee Nell's avatar
    Cee Nell committed
      padding-top: 0.25em;
    
      text-align: left;
    
    Cee Nell's avatar
    Cee Nell committed
      //text-shadow: 2px 2px 2px rgba(0,0,0,.1);
    
    Hayley Corson-Dosch's avatar
    Hayley Corson-Dosch committed
      color: var(--color-text);
    
    Cee Nell's avatar
    Cee Nell committed
      @media screen and (max-width: 750px) {
    
    Cee Nell's avatar
    Cee Nell committed
        font-size: 4.0rem;
    
      }
    }
    h2{
      font-weight: 700;
      text-align: left;
      font-family: $SourceSans;
    
    Cee Nell's avatar
    Cee Nell committed
      font-size: 4.5rem;
    
      margin-top: 5px;
      line-height: 1.2;
    
    Hayley Corson-Dosch's avatar
    Hayley Corson-Dosch committed
      color: var(--color-text);
    
    Cee Nell's avatar
    Cee Nell committed
      @media screen and (max-width: 750px) {
    
        font-size: 4rem;
        line-height: 1.1;
      }
    }
    h3{
    
    Cee Nell's avatar
    Cee Nell committed
      font-size: 3rem;
    
    Cee Nell's avatar
    Cee Nell committed
      padding-top: 0.5em;
    
      padding-bottom: .25em;
    
    Cee Nell's avatar
    Cee Nell committed
      font-family: $Dosis;
    
    Cee Nell's avatar
    Cee Nell committed
      font-weight: 600;
    
    Hayley Corson-Dosch's avatar
    Hayley Corson-Dosch committed
      color: var(--color-text);
    
    Cee Nell's avatar
    Cee Nell committed
      @media screen and (max-width: 750px) {
    
    Cee Nell's avatar
    Cee Nell committed
          font-size: 2.25rem;
    
      }  
    }
    h4{
      font-size: 2.5rem;
      padding-top: 0em;
      padding-bottom: .25em;
      font-family: $SourceSans;
      font-weight: 600;
    
    Hayley Corson-Dosch's avatar
    Hayley Corson-Dosch committed
      color: var(--color-text);
    
    Cee Nell's avatar
    Cee Nell committed
      @media screen and (max-width: 750px) {
    
        font-size: 1.8rem;
      }  
    }
    p, text {
      // padding: 1em 0 0 0; 
      font-family: $SourceSans;
    
    Hayley Corson-Dosch's avatar
    Hayley Corson-Dosch committed
      color: var(--color-text);
    
    }
    a:link {
    
    Hayley Corson-Dosch's avatar
    Hayley Corson-Dosch committed
      color: var(--color-link);
    
    }
    a:visited {
    
    Hayley Corson-Dosch's avatar
    Hayley Corson-Dosch committed
      color: var(--color-link);
    
    }
    a:hover {
    
    Hayley Corson-Dosch's avatar
    Hayley Corson-Dosch committed
      color: var(--color-link);
    
    }
    a:active {
    
    Hayley Corson-Dosch's avatar
    Hayley Corson-Dosch committed
      color: var(--color-link);
    
    
    // general layout
    .text-container {
        min-width: 30vw;
        max-width: 70rem;
        margin: 0 auto 0 auto;
        padding: 1rem 1rem 1rem 0rem;   
        left:0;
        @media screen and (max-width: 600px) {
          max-width: 95vw;
          padding: 0.5rem;
        }  
    
    .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;
      margin-left: -170px;
      margin-top: 2rem;
      opacity: 0;
      transition: opacity 0.3s;
    }
    .tooltip-group:hover .tooltiptext {
      visibility: visible;
      opacity: 1;
    }
    
    Cee Nell's avatar
    Cee Nell committed
    </style>