From 2f6d48fae1c856f46ecc7f5ac8d41ae160255608 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timoth=C3=A9e=20Poussard?= <tpoussard@neogeo.fr>
Date: Mon, 27 Sep 2021 16:14:30 +0200
Subject: [PATCH] fix create project buttons alignment

---
 src/views/Index.vue | 53 +++++++++++++++++++++++++--------------------
 1 file changed, 30 insertions(+), 23 deletions(-)

diff --git a/src/views/Index.vue b/src/views/Index.vue
index 6e7a4e95..f1f3aead 100644
--- a/src/views/Index.vue
+++ b/src/views/Index.vue
@@ -14,27 +14,29 @@
 
     <h4 id="les_projets" class="ui horizontal divider header">PROJETS</h4>
     <!-- //todo : v-if can_create_project  -->
-    <router-link
-      v-if="user"
-      :to="{ name: 'project_create', params: { action: 'create' } }"
-      class="ui green basic button"
-    >
-      <i class="plus icon"></i> Créer un nouveau projet
-    </router-link>
-    <!-- //todo : v-if can_create_project  -->
-    <router-link
-      v-if="user"
-      :to="{
-        name: 'project_type_list',
-      }"
-      class="ui blue basic button right floated"
-    >
-      <i class="copy icon"></i> Accéder à la liste des modèles de projets
-    </router-link>
+    <div class="flex">
+      <router-link
+        v-if="user"
+        :to="{ name: 'project_create', params: { action: 'create' } }"
+        class="ui green basic button"
+      >
+        <i class="plus icon"></i> Créer un nouveau projet
+      </router-link>
+      <!-- //todo : v-if can_create_project  -->
+      <router-link
+        v-if="user"
+        :to="{
+          name: 'project_type_list',
+        }"
+        class="ui blue basic button"
+      >
+        <i class="copy icon"></i> Accéder à la liste des modèles de projets
+      </router-link>
+    </div>
+
     <div v-if="projects" class="ui divided items">
       <div v-for="project in projects" class="item" :key="project.slug">
         <div class="ui tiny image">
-          <!-- // ? récupérer l'image sur serveur front (et non back) ? -->
           <img
             :src="
               !project.thumbnail
@@ -108,19 +110,17 @@
 <script>
 import { mapState } from "vuex";
 
-
 export default {
   name: "Index",
   computed: {
     ...mapState(["projects", "user", "USER_LEVEL_PROJECTS"]),
-    //LOGO_PATH: () => require(configuration.VUE_APP_LOGO_PATH),
     APPLICATION_NAME: function () {
       return this.$store.state.configuration.VUE_APP_APPLICATION_NAME;
     },
-    APPLICATION_ABSTRACT:function () {
+    APPLICATION_ABSTRACT: function () {
       return this.$store.state.configuration.VUE_APP_APPLICATION_ABSTRACT;
     },
-    DJANGO_BASE_URL:function () {
+    DJANGO_BASE_URL: function () {
       return this.$store.state.configuration.VUE_APP_DJANGO_BASE;
     },
   },
@@ -138,4 +138,11 @@ export default {
     }
   },
 };
-</script>
\ No newline at end of file
+</script>
+
+<style scoped>
+.flex {
+  display: flex;
+  justify-content: space-between;
+}
+</style>
\ No newline at end of file
-- 
GitLab