Skip to content

Commit

Permalink
refactor: ♻️ remove swiper component and add page instead
Browse files Browse the repository at this point in the history
  • Loading branch information
NadeigeC committed May 23, 2023
1 parent 4176283 commit 98c4f47
Show file tree
Hide file tree
Showing 7 changed files with 80 additions and 208 deletions.
40 changes: 0 additions & 40 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
"axios": "^1.4.0",
"pinia": "^2.1.0",
"stylelint-config-recommended-vue": "^1.4.0",
"swiper": "^9.3.2",
"vite": "^4.3.7",
"vue": "^3.3.2",
"vue-router": "^4.2.0"
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/HeaderMain.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function onClickOnLogo () {
function onClickOnInfo (event) {
event.stopPropagation()
router.push({ name: 'Home' })
router.push({ name: 'HomePage' })
}
</script>
Expand All @@ -43,7 +43,7 @@ function onClickOnInfo (event) {
@click="onClickOnLogo"
>
<span
v-if="route.name !== 'Home'"
v-if="route.name !== 'HomePage'"
class="information fr-icon-info-line"
aria-hidden="true"
@click="onClickOnInfo"
Expand Down
153 changes: 0 additions & 153 deletions frontend/src/components/OnboardingSwiper.vue

This file was deleted.

6 changes: 3 additions & 3 deletions frontend/src/router/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { clearLocalStorage } from '@/utils/storage-utils.js'
import { useResultStore } from '@/stores/result.js'
import { useStepsStore } from '@/stores/steps.js'

const Home = () => import('@/views/Home.vue')
const HomePage = () => import('@/views/HomePage.vue')
const Start = () => import('@/views/Start.vue')
const Instructions = () => import('@/views/Instructions.vue')
const Result = () => import('@/views/Result.vue')
Expand All @@ -25,8 +25,8 @@ const SelectAmmo = () => import('@/views/GuideFactice/SelectAmmo.vue')
const routes = [
{
path: '/',
name: 'Home',
component: Home,
name: 'HomePage',
component: HomePage,
meta: {
displayHeader: true,
},
Expand Down
9 changes: 0 additions & 9 deletions frontend/src/views/Home.vue

This file was deleted.

75 changes: 75 additions & 0 deletions frontend/src/views/HomePage.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
<template>
<div class="text-center relative top-1/6 <md:top-4">
<div>
<img
src="@/assets/basegun_green.png"
alt=""
class="homepage-logo"
>
<div class="homepage-content">
<ul class="homepage-ul fr-text--sm">
<li class="mb-2">
Basegun est une application <span class="homepage-green-highlight">prototype</span> en cours de développement par le Ministère de l’Intérieur et des Outre-Mer.
</li>
<li class="mb-2">
A ce jour, Basegun <span class="homepage-green-highlight">permet</span> d'identifier uniquement des <span class="homepage-green-highlight">armes à feu létales</span> et des<span class="homepage-green-highlight"> armes factices type airsoft</span>.
</li>
<li class="mb-2">
Basegun propose également de les <span class="homepage-green-highlight">mettre en sécurité</span> grâce à des <span class="homepage-green-highlight">tutoriels personnalisés</span>.
</li>
</ul>
</div>
<router-link
v-slot="{navigate}"
:to="{name:'Start'}"
>
<button
id="agree-button"
class="fr-btn fr-btn--sm"
@click="navigate()"
>
J'ai compris
</button>
</router-link>
</div>
</div>
</template>

<style scoped>
.homepage {
width: 100%;
height: 100%;
position: static;
}
.homepage-logo {
width: 40%;
}
.homepage-content {
width: 75%;
margin: 1rem auto;
text-align: center;
}
.homepage-ul {
list-style-position: inside;
text-indent: -1em;
padding-left: 1em;
display: inline-block;
text-align: left;
max-width: 700px;
margin-bottom: 12px !important;
}
.homepage-green-highlight {
font-weight: bold;
color: #00c7c8;
}
#agree-button {
display: block;
margin: 0 auto;
}
</style>

0 comments on commit 98c4f47

Please sign in to comment.