Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpenQuizz
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
10
Issues
10
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Weber Rodolphe
OpenQuizz
Commits
bac81109
Commit
bac81109
authored
May 27, 2021
by
Jérémie Passerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ajout de la variante du menu
parent
e12ea175
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
272 additions
and
32 deletions
+272
-32
Contenu.vue
src/Contenu.vue
+9
-3
Index.vue
src/Index.vue
+32
-11
Login.vue
src/Login.vue
+13
-8
Maj.vue
src/Maj.vue
+15
-0
Menu.vue
src/Menu.vue
+88
-0
Profil.vue
src/Profil.vue
+15
-0
Tags.vue
src/Tags.vue
+15
-0
Choix_Mode_Variante.vue
src/components/Choix_Mode_Variante.vue
+55
-0
Volet_Base.vue
src/components/Volet_Base.vue
+22
-5
Volet_Contenu.vue
src/components/Volet_Contenu.vue
+8
-5
No files found.
src/
App
.vue
→
src/
Contenu
.vue
View file @
bac81109
<
template
>
<
template
>
<div
id=
"app"
>
<div
id=
"app"
>
<Volet
_Base
/>
<Volet
_Base
@
choix_variante=
"choixVariante"
/>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
Volet_Base
from
"@/components/Volet_Base"
;
import
Volet_Base
from
"@/components/Volet_Base"
;
export
default
{
export
default
{
name
:
'
App
'
,
name
:
'
Contenu
'
,
components
:
{
components
:
{
Volet_Base
Volet_Base
},
},
methods
:
{
choixVariante
:
function
(
event
)
{
this
.
$emit
(
"choix_variante"
,
{
variante
:
event
.
variante
})
}
}
}
}
</
script
>
</
script
>
...
...
src/Index.vue
View file @
bac81109
<
template
>
<
template
>
<div>
<div>
<Login
v-show=
"!userLogged
"
@
user_logged=
"setLogged"
></Login>
<Login
v-show=
"etat === 'unlogged'
"
@
user_logged=
"setLogged"
></Login>
<App
v-show=
"userLogged"
></App>
<Menu
v-show=
"etat !== 'unlogged'"
v-bind:etat=
"etat"
v-bind:variante=
"variante"
@
menu_choisi=
"changerPage"
></Menu>
<Contenu
v-show=
"etat === 'Contenu'"
@
choix_variante=
"choixVariante"
></Contenu>
<Maj
v-show=
"etat === 'Mises à jour'"
></Maj>
<Profil
v-show=
"etat === 'Profil'"
></Profil>
<Tags
v-show=
"etat === 'Tags'"
></Tags>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
Login
from
"@/Login"
;
import
Login
from
"@/Login"
;
import
App
from
"@/App"
;
import
Contenu
from
"@/Contenu"
;
import
Menu
from
"@/Menu"
;
import
Maj
from
"@/Maj"
;
import
Profil
from
"@/Profil"
;
import
Tags
from
"@/Tags"
;
export
default
{
export
default
{
name
:
"Index.vue"
,
name
:
"Index.vue"
,
data
:
function
()
{
data
:
function
()
{
return
{
return
{
userLogged
:
false
etat
:
"unlogged"
,
variante
:
false
}
}
},
},
methods
:
{
methods
:
{
setLogged
:
function
()
{
setLogged
:
function
()
{
//this.$cookies.set("isLogged", true)
//this.$cookies.set("isLogged", true)
this
.
userLogged
=
true
this
.
etat
=
"Contenu"
},
changerPage
:
function
(
event
)
{
if
(
event
.
choix
===
"Deconnexion"
)
this
.
etat
=
"unlogged"
else
this
.
etat
=
event
.
choix
},
choixVariante
:
function
(
event
)
{
this
.
variante
=
event
.
variante
}
}
},
},
created
()
{
//this.userLogged = this.$cookies.get("isLogged")
},
components
:{
components
:{
Login
,
Login
,
App
Contenu
,
Menu
,
Maj
,
Profil
,
Tags
}
}
}
}
</
script
>
</
script
>
...
...
src/Login.vue
View file @
bac81109
<
template
>
<
template
>
<div>
<div
id=
"loginForm"
>
<form>
<label
for=
"identifiant"
>
Identifiant
</label>
<label
for=
"identifiant"
>
Identifiant
</label>
<br>
<br>
<input
type=
"text"
id=
"identifiant"
placeholder=
"identifiant"
v-model=
"login"
required=
"required"
>
<input
type=
"text"
id=
"identifiant"
placeholder=
"identifiant"
v-model=
"login"
>
<br>
<br>
<br>
<br>
<label
for=
"motdepasse"
>
Mot de Passe
</label>
<label
for=
"motdepasse"
>
Mot de Passe
</label>
<br>
<br>
<input
type=
"password"
id=
"motdepasse"
placeholder=
"mot de passe"
v-model=
"password"
required=
"required"
>
<input
type=
"password"
id=
"motdepasse"
placeholder=
"mot de passe"
v-model=
"password"
>
<br>
<br>
<br>
<br>
<button
value=
"connexion"
@
click
.
prevent=
"logIn"
/
>
<button
@
click
.
prevent=
"logIn"
>
Connexion
</button
>
</form>
</div>
</div>
</
template
>
</
template
>
...
@@ -42,16 +40,23 @@ export default {
...
@@ -42,16 +40,23 @@ export default {
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
f
orm
{
#loginF
orm
{
width
:
1000px
;
width
:
1000px
;
text-align
:
center
;
text-align
:
center
;
align-content
:
center
;
align-content
:
center
;
margin
:
20%
auto
0
;
margin
:
20%
auto
0
;
}
}
input
.text
,
input
.password
{
input
{
width
:
350px
;
width
:
350px
;
text-align
:
center
;
text-align
:
center
;
}
}
button
{
height
:
20px
;
width
:
auto
;
text-align
:
center
;
}
</
style
>
</
style
>
\ No newline at end of file
src/Maj.vue
0 → 100644
View file @
bac81109
<
template
>
<div>
Maj
</div>
</
template
>
<
script
>
export
default
{
name
:
"Maj"
}
</
script
>
<
style
scoped
>
</
style
>
\ No newline at end of file
src/Menu.vue
0 → 100644
View file @
bac81109
<
template
>
<div
id=
"menuHaut"
>
<Choix
_Mode_Variante
class=
"menuVariante"
v-show=
"variante"
></Choix
_Mode_Variante
>
<div
class=
"circle"
v-on:click=
"isAffiche = !isAffiche"
v-bind:style=
"[!variante ?
{'margin-left': '95%'} : {'margin-left': '36.75%'}]">
Auteur 1
</div>
<div
class=
"menu"
v-show=
"isAffiche"
>
<div
class=
"sous_menu"
v-on:click=
"choixMenuAnnexe"
>
Profil
</div>
<div
v-if=
"etat !== 'Mises à jour'"
class=
"sous_menu"
v-on:click=
"choixMenuAnnexe"
>
Mises à jour
</div>
<div
v-else
class=
"sous_menu"
v-on:click=
"choixMenuAnnexe"
>
Contenu
</div>
<div
class=
"sous_menu"
v-on:click=
"choixMenuAnnexe"
>
Tags
</div>
<div
class=
"sous_menu"
v-on:click=
"choixMenuAnnexe"
>
Deconnexion
</div>
</div>
</div>
</
template
>
<
script
>
import
Choix_Mode_Variante
from
"@/components/Choix_Mode_Variante"
;
export
default
{
name
:
"Menu"
,
data
:
function
()
{
return
{
isAffiche
:
false
,
}
},
props
:
[
'etat'
,
'variante'
],
methods
:
{
choixMenuAnnexe
:
function
(
e
)
{
this
.
$emit
(
"menu_choisi"
,
{
choix
:
e
.
target
.
innerText
})
}
},
components
:{
Choix_Mode_Variante
}
}
</
script
>
<
style
scoped
>
#menuHaut
{
display
:
flex
;
}
.circle
{
background
:
gold
;
border
:
1px
solid
yellow
;
margin-top
:
1%
;
border-radius
:
50%
;
display
:
flex
;
/* or inline-flex */
align-items
:
center
;
justify-content
:
center
;
height
:
75px
;
width
:
75px
;
}
.menuVariante
{
margin-top
:
1%
;
margin-left
:
45%
;
z-index
:
1
;
}
.menu
{
height
:
150px
;
width
:
100px
;
background
:
white
;
border
:
thin
solid
black
;
margin-top
:
1px
;
margin-left
:
93.5%
;
position
:
absolute
;
display
:
flex
;
flex-direction
:
column
;
text-align
:
center
;
vertical-align
:
middle
;
z-index
:
1
;
}
.sous_menu
{
flex-basis
:
25%
;
border
:
thin
solid
black
;
line-height
:
36px
;
}
</
style
>
\ No newline at end of file
src/Profil.vue
0 → 100644
View file @
bac81109
<
template
>
<div>
Profil
</div>
</
template
>
<
script
>
export
default
{
name
:
"Profil"
}
</
script
>
<
style
scoped
>
</
style
>
\ No newline at end of file
src/Tags.vue
0 → 100644
View file @
bac81109
<
template
>
<div>
Tags
</div>
</
template
>
<
script
>
export
default
{
name
:
"Tags"
}
</
script
>
<
style
scoped
>
</
style
>
\ No newline at end of file
src/components/Choix_Mode_Variante.vue
0 → 100644
View file @
bac81109
<
template
>
<div>
<div
id =
"choixDuMode"
class=
"contenusPersos"
v-on:click=
"changerChoix"
>
<div
id =
"contenusPanier"
v-bind:class=
"
{'clicked': contenuPanier, 'nonClicked': !contenuPanier}">
<p>
Panier
</p>
</div>
<div
id =
"contenusBanque"
v-bind:class=
"
{'clicked': !contenuPanier, 'nonClicked': contenuPanier}">
<p>
Banque
</p>
</div>
</div>
</div>
</
template
>
<
script
>
export
default
{
name
:
"Choix_Mode_Variante"
,
data
:
function
()
{
return
{
contenuPanier
:
true
,
}
},
methods
:
{
changerChoix
:
function
()
{
this
.
contenuPanier
=
!
this
.
contenuPanier
this
.
$emit
(
"mode_choisi"
,
{
mode
:
this
.
contenuPanier
})
},
}
}
</
script
>
<
style
scoped
>
#choixDuMode
{
border
:
1px
solid
black
;
width
:
250px
;
display
:
flex
;
}
#contenusPanier
,
#contenusBanque
{
width
:
125px
;
text-align
:
center
;
}
.nonClicked
{
outline
:
1px
solid
black
;
}
.clicked
{
outline
:
5px
solid
yellow
;
}
</
style
>
\ No newline at end of file
src/components/Volet_Base.vue
View file @
bac81109
<
template
>
<
template
>
<div>
<button
id=
"changerVariante"
v-on:click=
"changerVariante"
>
changer
</button>
<div
id=
"ensemble"
>
<div
id=
"ensemble"
>
<button
id=
"boutonVolet"
v-on:click=
"desactiverVolet"
></button>
<button
id=
"boutonVolet"
v-on:click=
"desactiverVolet"
></button>
<div
class=
"full"
id=
"volet"
v-show=
"isActif"
>
<div
class=
"full"
id=
"volet"
v-show=
"isActif"
>
<Volet
_Menu
v-bind:mode-choisi =
"modeChoisi"
@
filtre_choisi=
"passerFiltre"
/>
<Volet
_Menu
v-bind:mode-choisi =
"modeChoisi"
@
filtre_choisi=
"passerFiltre"
/>
<Volet
_C
hoix
@
mode_choisi=
"ajusterMode"
v-bind:filtre_choisi=
"filtre_choisi
"
/>
<Volet
_C
ontenu
@
mode_choisi=
"ajusterMode"
v-bind:filtre_choisi=
"filtre_choisi"
v-bind:variante=
"variante
"
/>
</div>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
$
from
'jquery'
import
$
from
'jquery'
import
'jquery-ui-bundle'
import
'jquery-ui-bundle'
import
Volet_Menu
from
"@/components/Volet_Menu"
;
import
Volet_Menu
from
"@/components/Volet_Menu"
;
import
Volet_C
hoix
from
"@/components/Volet_Contenu"
;
import
Volet_C
ontenu
from
"@/components/Volet_Contenu"
;
export
default
{
export
default
{
name
:
"Volet_Base"
,
name
:
"Volet_Base"
,
components
:
{
components
:
{
Volet_Menu
,
Volet_Menu
,
Volet_C
hoix
Volet_C
ontenu
},
},
data
:
function
()
{
data
:
function
()
{
return
{
return
{
isActif
:
true
,
isActif
:
true
,
modeChoisi
:
"Panier"
,
modeChoisi
:
"Panier"
,
filtre_choisi
:
""
filtre_choisi
:
""
,
variante
:
false
}
}
},
},
mounted
()
{
mounted
()
{
...
@@ -44,6 +50,13 @@ export default {
...
@@ -44,6 +50,13 @@ export default {
},
},
passerFiltre
:
function
(
event
){
passerFiltre
:
function
(
event
){
this
.
filtre_choisi
=
event
.
filtre
this
.
filtre_choisi
=
event
.
filtre
},
changerVariante
:
function
(){
this
.
variante
=
!
this
.
variante
this
.
$emit
(
"choix_variante"
,
{
variante
:
this
.
variante
})
}
}
}
}
}
}
...
@@ -61,9 +74,13 @@ export default {
...
@@ -61,9 +74,13 @@ export default {
}
}
#boutonVolet
{
#boutonVolet
{
margin-top
:
130
px
;
margin-top
:
75
px
;
margin-left
:
10px
;
margin-left
:
10px
;
}
}
#changerVariante
{
width
:
auto
;
}
</
style
>
</
style
>
\ No newline at end of file
src/components/Volet_Contenu.vue
View file @
bac81109
<
template
>
<
template
>
<div
id=
"contenu"
>
<div
id=
"contenu"
>
<div
id =
"detailFiltre"
>
<div
id =
"detailFiltre"
>
<Detail
_Filtre
v-bind:nouveau_filtre=
"nouveau_filtre"
/>
<Detail
_Filtre
v-bind:nouveau_filtre=
"nouveau_filtre"
/>
</div>
</div>
<div
id =
"detailContenu"
>
<div
id =
"detailContenu"
>
<Detail
_Contenu
v-bind:filtre_choisi=
"filtre_choisi"
@
creer_filtre=
"creer_filtre"
/>
<Detail
_Contenu
v-bind:filtre_choisi=
"filtre_choisi"
@
creer_filtre=
"creer_filtre"
/>
</div>
</div>
<Choix
_Mode
@
mode_choisi=
"ajusterMode"
/>
<Choix
_Mode
v-show=
"!variante"
@
mode_choisi=
"ajusterMode"
/>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
...
@@ -16,13 +19,13 @@ import Choix_Mode from "@/components/Choix_Mode";
...
@@ -16,13 +19,13 @@ import Choix_Mode from "@/components/Choix_Mode";
import
Detail_Filtre
from
"@/components/Detail_Filtre"
;
import
Detail_Filtre
from
"@/components/Detail_Filtre"
;
import
Detail_Contenu
from
"@/components/Detail_Contenu"
;
import
Detail_Contenu
from
"@/components/Detail_Contenu"
;
export
default
{
export
default
{
name
:
"Volet_C
hoix
"
,
name
:
"Volet_C
ontenu
"
,
components
:
{
components
:
{
Choix_Mode
,
Choix_Mode
,
Detail_Filtre
,
Detail_Filtre
,
Detail_Contenu
Detail_Contenu
,
},
},
props
:
[
'filtre_choisi'
],
props
:
[
'filtre_choisi'
,
'variante'
],
methods
:
{
methods
:
{
ajusterMode
:
function
(
event
)
{
ajusterMode
:
function
(
event
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment