Commit 67ca3ad1 authored by Lucas Détré's avatar Lucas Détré Committed by David Foucher

add new pages scenarios and schema

parent be2e68ca
Pipeline #2931 passed with stage
in 1 minute and 45 seconds
......@@ -7,6 +7,7 @@
<router-view name="financements"/>
<router-view name="simulateur"/>
<router-view name="scenarios"/>
<router-view name="schema"/>
<router-view name="outils"/>
</div>
</div>
......
......@@ -46,7 +46,6 @@
</span>
</router-link>
</li>
<!--
<li class="nav-item">
<router-link to="/scenarios" name="scenarios" class="nav-link">
<svg class="nav-icon">
......@@ -56,7 +55,17 @@
Scénarios
</span>
</router-link>
</li>-->
</li>
<li class="nav-item">
<router-link to="/schema" name="schema" class="nav-link">
<svg class="nav-icon">
<use xlink:href="#schema_icon" />
</svg>
<span class="nav-label">
Schéma
</span>
</router-link>
</li>
<li class="nav-item">
<router-link to="/outils" name="outils" target="_blank" class="nav-link">
<svg class="nav-icon">
......@@ -91,10 +100,13 @@
<path d="M17,14.0002 L3,14.0002 C2.45,14.0002 2,13.5502 2,13.0002 L2,5.0002 C2,4.4502 2.45,4.0002 3,4.0002 L17,4.0002 C17.55,4.0002 18,4.4502 18,5.0002 L18,13.0002 C18,13.5502 17.55,14.0002 17,14.0002 M18,2.0002 L10,2.0002 L8.59,0.5902 C8.21,0.2102 7.7,0.0002 7.17,0.0002 L2,0.0002 C0.9,0.0002 0.01,0.9002 0.01,2.0002 L0,14.0002 C0,15.1002 0.9,16.0002 2,16.0002 L18,16.0002 C19.1,16.0002 20,15.1002 20,14.0002 L20,4.0002 C20,2.9002 19.1,2.0002 18,2.0002"></path>
</symbol>
<symbol id="schema_icon" x="0px" y="0px" viewBox="0 0 24.92 24.92">
<path d="M20.226,14.389L13.65,10.53h3.672V0H6.791v10.529h3.822l-5.949,3.859H0.33V24.92h10.529V14.389h-4.03l5.227-3.404 l6.045,3.404h-4.042V24.92H24.59V14.389H20.226z M8.758,2.047h6.596v6.598H8.758V2.047z M8.894,16.436v6.598H2.297v-6.598H8.894z M22.623,23.033h-6.596v-6.598h6.596V23.033z"/>
</symbol>
<symbol id="outils_icon" width="23px" height="25px" viewBox="0 0 30 30">
<path fill="none" d="M0 0h24v24H0V0z"/><path d="M22.61 18.99l-9.08-9.08c.93-2.34.45-5.1-1.44-7C9.79.61 6.21.4 3.66 2.26L7.5 6.11 6.08 7.52 2.25 3.69C.39 6.23.6 9.82 2.9 12.11c1.86 1.86 4.57 2.35 6.89 1.48l9.11 9.11c.39.39 1.02.39 1.41 0l2.3-2.3c.4-.38.4-1.01 0-1.41zm-3 1.6l-9.46-9.46c-.61.45-1.29.72-2 .82-1.36.2-2.79-.21-3.83-1.25C3.37 9.76 2.93 8.5 3 7.26l3.09 3.09 4.24-4.24-3.09-3.09c1.24-.07 2.49.37 3.44 1.31 1.08 1.08 1.49 2.57 1.24 3.96-.12.71-.42 1.37-.88 1.96l9.45 9.45-.88.89z"/>
</symbol>
</svg>
</div>
</div>
......
<template>
<div id="Scenarios">
<div class="container">
<div class="row">
<div class="col-md-6">
<ul>
<li v-for="filter in filterList" :key="filter.id">
<a href="#" :class="{selected: filters[filter].selected}" :title="filter" @click="selectToggle(filters[filter])">
{{ filter }}
</a>
</li>
</ul>
<div v-if="nbSelected">
<ul>
<li v-for="scenario in activeScenario" :key="scenario.id">
<h4>
{{ scenario.name }}
<a :href="'https://framagit.org/ybon/trefle/tree/master/'+scenario.filename+'#L'+scenario.line" target=_blank>
<i class=icon>edit</i>
</a>
</h4>
</li>
</ul>
</div>
</div>
<div class="col-md-6">
<div v-if="!nbSelected">
<p>Sélectionner au moins une catégorie dans le menu.</p>
<div id="scenarios-main-div">
<div v-if="!this.isLoading">
<div class="container ml-5 mr-2">
<div class="row">
<div :class="classCollapsedMenu">
<div class="mb-3 pull-right">
<button @click="collapsed = !collapsed" type="button" class="btn main-button mb-5">
<span v-show="collapsed"><span class="chevron-toggle">&#8594;</span> Ouvrir le panneau</span>
<span v-show="!collapsed"><span class="chevron-toggle">&#8592;</span> Fermer le panneau</span>
</button>
</div>
<div v-show="!collapsed">
<h2 class="mb-5">Scénarios</h2>
<ul>
<li v-for="(filter, id) in filterList" :key="id">
<a href="#" :class="{selected: filters[filter].selected}" @click="setFilter(filters[filter]);">
{{ filter.charAt(0).toUpperCase() + filter.slice(1) }}
</a>
</li>
</ul>
</div>
</div>
<div v-show="!collapsed" :class="classCollapsedSeparator">
<hr class="referentiel-vertical-separator">
</div>
<div :class="classCollapsedContent">
<div v-if="this.show">
<ul>
<li v-for="(scenario, id) in this.activeScenarios" :key="id">
<h4>
{{ scenario.name.toUpperCase() }}
<!--<a :href="'https://framagit.org/ybon/trefle/tree/master/'+scenario.filename+'#L'+scenario.line" target=_blank>
<i class=icon>edit</i>
</a>-->
</h4>
<pre v-html="transform(scenario.raw)"/>
<br><br>
</li>
</ul>
</div>
<div v-else>
<h2>Sélectionnez une catégorie dans le menu.</h2>
</div>
</div>
</div>
</div>
</div>
<div v-else class="text-center loading-gif">
<img src="./../assets/images/loading.gif" alt="loading...">
</div>
</div>