Skip to content
Snippets Groups Projects
App.vue 4.29 KiB
Newer Older
Florent Lavelle's avatar
Florent Lavelle committed
  <div>
DESPRES Damien's avatar
DESPRES Damien committed
    <script
      type="application/javascript"
      :src="
        baseUrl +
          'resources/leaflet-control-geocoder-1.13.0/Control.Geocoder.js'
DESPRES Damien's avatar
DESPRES Damien committed
      "
Florent Lavelle's avatar
Florent Lavelle committed
    
    <AppHeader />
Florent Lavelle's avatar
Florent Lavelle committed
    <div id="content">
      <transition name="fadeDownUp">
        <div
          v-if="messages && messages.length > 0"
          class="row over-content"
        >
          <div class="fourteen wide column">
Florent Lavelle's avatar
Florent Lavelle committed
              v-for="(message, index) in messages"
              :key="'message-' + index"
              :class="['ui', message.level ? message.level : 'info', 'message']"
Florent Lavelle's avatar
Florent Lavelle committed
              <i
                class="close icon"
                @click="DISCARD_MESSAGE(message)"
              />
              <div class="header">
                <i class="info circle icon" />
                Informations
Florent Lavelle's avatar
Florent Lavelle committed
              <ul class="list">
                {{
                  message.comment
                }}
              </ul>
Florent Lavelle's avatar
Florent Lavelle committed
      </transition>

Florent Lavelle's avatar
Florent Lavelle committed
        :class="{ active: loader.isLoading }"
        class="ui inverted dimmer"
Florent Lavelle's avatar
Florent Lavelle committed
        <div class="ui text loader">
          {{ loader.message }}
Florent Lavelle's avatar
Florent Lavelle committed
      <!-- //* Les views sont injectées ici -->
      <router-view class="page" />
    </div>

    <AppFooter />
import { mapMutations, mapState } from 'vuex';
Florent Lavelle's avatar
Florent Lavelle committed
import AppHeader from '@/components/AppHeader';
import AppFooter from '@/components/AppFooter';

  name: 'App',
Florent Lavelle's avatar
Florent Lavelle committed
  components: {
    AppHeader,
    AppFooter,
DESPRES Damien's avatar
DESPRES Damien committed
      baseUrl: this.$store.state.configuration.BASE_URL,
      width: window.innerWidth > 0 ? window.innerWidth : screen.width,
    ...mapState([
Timothee P's avatar
Timothee P committed
      'user',
      'USER_LEVEL_PROJECTS',
      'configuration',
      'messages',
      'loader',
Florent Lavelle's avatar
Florent Lavelle committed
    ...mapState('projects', [
Florent Lavelle's avatar
Florent Lavelle committed
    ])
  created() {
    window.addEventListener('mousedown', this.clickOutsideMenu);
  },

  beforeDestroy() {
    window.removeEventListener('mousedown', this.clickOutsideMenu);
  },

    ...mapMutations(['DISCARD_MESSAGE']),
      if (e.target.closest && !e.target.closest('#menu-dropdown'))
        this.menuIsOpen = false;
    },
  },
};
</script>

<style>
@import "./assets/styles/base.css";
@import "./assets/resources/semantic-ui-2.4.2/semantic.min.css";

.vertical {
  flex-direction: column;
  justify-content: center;
}
Florent Lavelle's avatar
Florent Lavelle committed
<<<<<<< HEAD
@media screen and (min-width: 560px) {
Florent Lavelle's avatar
Florent Lavelle committed
=======
/* keep above loader */
#menu-dropdown {
  z-index: 1001;
}

Florent Lavelle's avatar
Florent Lavelle committed
@media screen and (max-width: 985px) {
  .abstract{
    display: none !important;
  }
}

@media screen and (min-width: 590px) {
Florent Lavelle's avatar
Florent Lavelle committed
>>>>>>> develop
  .mobile {
    display: none !important;
  }
Florent Lavelle's avatar
Florent Lavelle committed
  #app-header {
    min-width: 560px;
  }
  .menu.container {
    width: auto !important;
  }
  .push-right-desktop {
    margin-left: auto;
  }
}
Florent Lavelle's avatar
Florent Lavelle committed
@media screen and (max-width: 590px) {
  .desktop {
    display: none !important;
  }
    left: -70px !important; /* should be the same than belows */
  .menu.container a.header {
    width: 70px;
  }
  .menu.container a.header > img {
    margin: 0;
  }
  #menu-dropdown {
    width: calc(100vw - 70px);
    justify-content: space-between;
  }
  #menu-dropdown > span {
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
  }
.ui.grid > .row.over-content {
  position: absolute;
  z-index: 99;
  opacity: 0.95;
Timothee P's avatar
Timothee P committed
.fadeDownUp-enter-active {
  animation: fadeInDown .5s;
}
Timothee P's avatar
Timothee P committed
.fadeDownUp-leave-active {
  animation: fadeOutUp .5s;
}
@keyframes fadeOutUp {
  0% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translate3d(0, -100%, 0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translate3d(0, -100%, 0);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.ui.message > .close.icon {
  cursor: pointer;
  position: absolute;
  margin: 0em;
  top: 0.78575em;
  right: 0.5em;
  opacity: 0.7;
  -webkit-transition: opacity 0.1s ease;
  transition: opacity 0.1s ease;
}

Florent Lavelle's avatar
Florent Lavelle committed