diff --git a/client/src/app/app.routes.ts b/client/src/app/app.routes.ts index 0c8fa7d094a39eb3b23a00723ab84be7e83a12e2..bbce67960352d9e332d99f54e345b7ad9db32ddc 100644 --- a/client/src/app/app.routes.ts +++ b/client/src/app/app.routes.ts @@ -1,10 +1,14 @@ import { Routes } from '@angular/router'; -import { authGuard } from '@app/guards/auth.guard'; import { MainPageComponent } from '@app/pages/main-page/main-page.component'; +import { authGuard } from '@app/guards/auth.guard'; export const routes: Routes = [ { path: '', redirectTo: '/home', pathMatch: 'full' }, { path: 'home', component: MainPageComponent }, + { + path: 'create', + loadComponent: async () => (await import('@app/pages/create-game-page/create-game.component')).CreateGameComponent, + }, { path: 'game', loadComponent: async () => (await import('@app/pages/game-page/game-page.component')).GamePageComponent }, { path: 'material', loadComponent: async () => (await import('@app/pages/material-page/material-page.component')).MaterialPageComponent }, { diff --git a/client/src/app/components/available-games/available-games.component.html b/client/src/app/components/available-games/available-games.component.html new file mode 100644 index 0000000000000000000000000000000000000000..442be790f941c40a7e9a53bf87850d1c10638147 --- /dev/null +++ b/client/src/app/components/available-games/available-games.component.html @@ -0,0 +1,8 @@ +<section id="available-games"> + <p class="section-title">Jeux disponibles</p> + <div class="available-games-container"> + <button *ngFor="let game of availableGames; let i = index" class="game-button" (click)="onButtonClick(i)" mat-raised-button> + {{ availableGames[i].title }} + </button> + </div> +</section> diff --git a/client/src/app/components/available-games/available-games.component.scss b/client/src/app/components/available-games/available-games.component.scss new file mode 100644 index 0000000000000000000000000000000000000000..833660f531344ebf0f2728efff7c5c54cbace125 --- /dev/null +++ b/client/src/app/components/available-games/available-games.component.scss @@ -0,0 +1,55 @@ +@import 'src/vars.scss'; +#available-games-container { + height: 100%; + width: 100%; + overflow: auto; +} +.available-games-container { + height: 80%; + margin-left: 10%; + overflow: auto; +} + +.section-title { + margin-left: 5%; + color: $text-primary-dark; + font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif; + font-size: 20px; + font-style: normal; +} +.game-button { + flex-shrink: 0; + width: 90%; + height: 50px; + margin-left: auto; + margin-right: auto; + margin-bottom: 10px; + border-radius: 15px; + border: none; + box-shadow: + 0 1px 3px rgba(0, 0, 0, 0.12), + 0 1px 2px rgba(0, 0, 0, 0.24); + color: $text-primary-dark; + font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif; + font-size: 15px; + font-style: normal; +} + +.game-button:hover { + background-color: #aaaaaa; +} + +::-webkit-scrollbar-track { + -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3); + border-radius: 10px; +} + +::-webkit-scrollbar { + width: 12px; +} + +::-webkit-scrollbar-thumb { + border-radius: 10px; + -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3); + background-color: #727272; +} diff --git a/client/src/app/components/available-games/available-games.component.spec.ts b/client/src/app/components/available-games/available-games.component.spec.ts new file mode 100644 index 0000000000000000000000000000000000000000..cfcea3c522057995a6e1a58b89ca124befad61ea --- /dev/null +++ b/client/src/app/components/available-games/available-games.component.spec.ts @@ -0,0 +1,21 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { AvailableGamesComponent } from './available-games.component'; + +describe('AvailableGamesComponent', () => { + let component: AvailableGamesComponent; + let fixture: ComponentFixture<AvailableGamesComponent>; + + beforeEach(() => { + TestBed.configureTestingModule({ + imports: [AvailableGamesComponent], + }); + fixture = TestBed.createComponent(AvailableGamesComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/client/src/app/components/available-games/available-games.component.ts b/client/src/app/components/available-games/available-games.component.ts new file mode 100644 index 0000000000000000000000000000000000000000..4f636098274eac33f44393aff82aef3a83c5feb7 --- /dev/null +++ b/client/src/app/components/available-games/available-games.component.ts @@ -0,0 +1,21 @@ +import { Component, EventEmitter, Output, Input } from '@angular/core'; +import { CommonModule, NgFor } from '@angular/common'; +import { CreateQuiz } from '@common/quiz'; + +@Component({ + selector: 'app-available-games', + standalone: true, + imports: [CommonModule, NgFor], + templateUrl: './available-games.component.html', + styleUrls: ['./available-games.component.scss'], +}) +export class AvailableGamesComponent { + @Input() selectedGame: number = 0; + @Input() availableGames!: CreateQuiz[]; + @Output() selectedGameChange = new EventEmitter<number>(); + + onButtonClick(index: number) { + this.selectedGame = index; + this.selectedGameChange.emit(this.selectedGame); + } +} diff --git a/client/src/app/components/game-preview/game-preview.component.html b/client/src/app/components/game-preview/game-preview.component.html new file mode 100644 index 0000000000000000000000000000000000000000..478553a06950f8261f5cd3347d4248f7934ff9d8 --- /dev/null +++ b/client/src/app/components/game-preview/game-preview.component.html @@ -0,0 +1,27 @@ +<div *ngIf="quiz" id="game-preview-container"> + <div class="title-section">{{ quiz.title }}</div> + <div class="game-description">{{ quiz.description }}</div> + <div class="time-section"> + <span class="timer-logo"><img src="assets/timer-logo.svg" /></span> + <span class="question-duration">{{ quiz.duration }} secondes</span> + </div> + <div class="line"></div> + + <div class="question-container"> + <div *ngFor="let question of quiz.questions; let i = index" class="question"> + <span>{{ i + 1 }}. {{ question.text }}</span> + <span class="question-logo"> + <img *ngIf="isQCM(this.question.type)" src="assets/qcm-logo.svg" /> + <img *ngIf="!isQCM(this.question.type)" src="assets/qrl-logo.svg" /> + </span> + </div> + </div> + <div class="line"></div> + <div class="game-preview-buttons"> + <button mat-raised-button class="test-button">Tester le jeu</button> + <button mat-raised-button class="start-button">Créer une partie</button> + </div> +</div> +<div *ngIf="!quiz" id="game-preview-container"> + <div class ="no-game-text ">Aucun Jeu Séléctionné</div> +</div> diff --git a/client/src/app/components/game-preview/game-preview.component.scss b/client/src/app/components/game-preview/game-preview.component.scss new file mode 100644 index 0000000000000000000000000000000000000000..47a5d73809bab726afc5c52242511630a5d05845 --- /dev/null +++ b/client/src/app/components/game-preview/game-preview.component.scss @@ -0,0 +1,121 @@ +@import 'src/vars.scss'; +#game-preview-container { + position: flex; + flex-direction: column; + height: 100%; + width: 100%; + border-radius: 30px; + background-color: $text-primary-light; + box-shadow: 0 0 10px 0 $text-primary-dark; + padding-top: 5%; + justify-content: center; +} + +.no-game-text { + color: $text-primary-dark; + font-size: 30px; + text-align: center; + margin-top: 10%; + font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif; +} +.title-section, +.game-description { + margin-left: 7%; + color: $text-primary-dark; + font-style: normal; + word-wrap: break-word; + font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif; +} + +.title-section { + font-size: 20px; +} + +.game-description { + font-size: 16px; +} +.time-section, +.question { + display: flex; + align-items: center; + margin-left: 20px; +} + +.line { + width: 96%; + margin-bottom: 20px; + border-top: 1.5px solid #a7a7a7; + margin-left: auto; + margin-right: auto; +} + +.question-container { + display: flex; + flex-direction: column; + width: 90%; + height: 60%; + margin-left: auto; + margin-right: auto; + overflow: auto; +} +.game-preview-buttons { + width: 90%; + display: flex; + flex-direction: row; + margin: auto; + justify-content: space-between; +} +.question { + justify-content: space-between; +} +.question-logo { + top: 0; + right: 0; + transform: scale(0.6); +} + +.timer-logo { + transform: scale(0.8); +} + +.test-button, +.start-button { + width: 45%; + height: 40px; + border-radius: 10px; + border: none; + border-width: 1.5px; + border-style: solid; + font-size: 20px; + border-color: $primary-color; + font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif; +} + +.start-button { + color: $text-primary-light; + background-color: $primary-color; +} + +.test-button { + color: $primary-color; + background-color: $text-primary-light; +} + +.line:last-of-type { + top: -40%; +} + +::-webkit-scrollbar-track { + -webkit-box-shadow: inset 0 0 6px $text-primary-dark; + border-radius: 10px; +} + +::-webkit-scrollbar { + width: 12px; +} + +::-webkit-scrollbar-thumb { + border-radius: 10px; + -webkit-box-shadow: inset 0 0 6px $text-primary-dark; + background-color: $bg-secondary; +} diff --git a/client/src/app/components/game-preview/game-preview.component.ts b/client/src/app/components/game-preview/game-preview.component.ts new file mode 100644 index 0000000000000000000000000000000000000000..8a649eda947a15cfc1cddbca36cc18a6fb8b30d1 --- /dev/null +++ b/client/src/app/components/game-preview/game-preview.component.ts @@ -0,0 +1,19 @@ +import { Component, Input } from '@angular/core'; +import { CommonModule, NgIf } from '@angular/common'; +import { CreateQuiz } from '@common/quiz'; +import { QuestionType } from '@common/question'; + +@Component({ + selector: 'app-game-preview', + standalone: true, + imports: [CommonModule, NgIf], + templateUrl: './game-preview.component.html', + styleUrls: ['./game-preview.component.scss'], +}) +export class GamePreviewComponent { + @Input() quiz!: CreateQuiz; + + isQCM(type: QuestionType): boolean { + return type === QuestionType.Qcm; + } +} diff --git a/client/src/app/pages/create-game-page/create-game.component.html b/client/src/app/pages/create-game-page/create-game.component.html new file mode 100644 index 0000000000000000000000000000000000000000..d601a53aa59e06d6cabf1fdc62dcc9608ea01c32 --- /dev/null +++ b/client/src/app/pages/create-game-page/create-game.component.html @@ -0,0 +1,4 @@ +<div id="create-game-container"> + <app-available-games id="available-games" [(selectedGame)]="selectedGame" [availableGames]="games"></app-available-games> + <app-game-preview id="selected-game" [quiz]="games[selectedGame]"></app-game-preview> +</div> diff --git a/client/src/app/pages/create-game-page/create-game.component.scss b/client/src/app/pages/create-game-page/create-game.component.scss new file mode 100644 index 0000000000000000000000000000000000000000..47c2e408f0d5454d94a0501947c85dc53343c9ab --- /dev/null +++ b/client/src/app/pages/create-game-page/create-game.component.scss @@ -0,0 +1,38 @@ +@import 'src/vars.scss'; +#create-game-container { + display: flex; + flex-direction: row; + justify-content: space-between; + overflow: hidden; +} +#available-games, #selected-game { + margin: 5%; + width: 40%; + height: 500px; +} + +#available-games { + position: relative; + display: flex; + flex-direction: column; + background-color: $text-primary-light; + box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.5); + padding: 10px; + border-radius: 30px; + +} + +::-webkit-scrollbar-track { + -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3); + border-radius: 10px; +} + +::-webkit-scrollbar { + width: 12px; +} + +::-webkit-scrollbar-thumb { + border-radius: 10px; + -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3); + background-color: #727272; +} diff --git a/client/src/app/pages/create-game-page/create-game.component.spec.ts b/client/src/app/pages/create-game-page/create-game.component.spec.ts new file mode 100644 index 0000000000000000000000000000000000000000..17fa17cb73fd1b92253f261570c8d339dd6eaeaf --- /dev/null +++ b/client/src/app/pages/create-game-page/create-game.component.spec.ts @@ -0,0 +1,21 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { CreateGameComponent } from './create-game.component'; + +describe('CreateGameComponent', () => { + let component: CreateGameComponent; + let fixture: ComponentFixture<CreateGameComponent>; + + beforeEach(() => { + TestBed.configureTestingModule({ + imports: [CreateGameComponent], + }); + fixture = TestBed.createComponent(CreateGameComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/client/src/app/pages/create-game-page/create-game.component.ts b/client/src/app/pages/create-game-page/create-game.component.ts new file mode 100644 index 0000000000000000000000000000000000000000..81884596f2ec58636d29be105693773b003a6fd9 --- /dev/null +++ b/client/src/app/pages/create-game-page/create-game.component.ts @@ -0,0 +1,20 @@ +import { Component, Input } from '@angular/core'; +import { CommonModule, NgFor } from '@angular/common'; +import { RouterLink } from '@angular/router'; +import { GamePreviewComponent } from '@app/components/game-preview/game-preview.component'; +import { AvailableGamesComponent } from '@app/components/available-games/available-games.component'; +import { CreateQuiz } from '@common/quiz'; +import { gameListStub } from '@common/stubs/gameList'; + +@Component({ + selector: 'app-create-game', + standalone: true, + imports: [RouterLink, CommonModule, NgFor, GamePreviewComponent, AvailableGamesComponent], + templateUrl: './create-game.component.html', + styleUrls: ['./create-game.component.scss'], +}) +export class CreateGameComponent { + @Input() selectedGame!: number; + + games: CreateQuiz[] = gameListStub; +} diff --git a/client/src/assets/qcm-logo.svg b/client/src/assets/qcm-logo.svg new file mode 100644 index 0000000000000000000000000000000000000000..b9721860d90bb70f16c680beb2c79f65d12098a9 --- /dev/null +++ b/client/src/assets/qcm-logo.svg @@ -0,0 +1,10 @@ +<svg xmlns="http://www.w3.org/2000/svg" width="49" height="39" viewBox="0 0 49 39" fill="none"> +<g clip-path="url(#clip0_409_317)"> +<path d="M6.50765 19.081C-0.153293 32.3501 0.0687384 31.7179 0.0687384 32.9062C0.000100113 36.2653 4.38304 38.9999 9.79983 38.9999C15.2166 38.9999 19.5998 36.2669 19.5998 32.9747C19.5998 31.7468 19.7051 32.3081 13.0828 19.1495C11.7369 16.3997 7.87046 16.3845 6.50765 19.081ZM4.28427 31.6874L9.79524 20.7872L15.3192 31.6874H4.28427ZM42.4844 9.33097C41.1353 6.64592 37.272 6.63678 35.913 9.33097C29.2521 22.6001 29.4021 21.9679 29.4021 23.1562C29.4021 26.5169 33.7853 29.1814 39.2021 29.1814C44.6189 29.1814 48.9332 26.4491 48.9332 23.1562C48.9309 21.9298 49.107 22.4935 42.4844 9.33097ZM33.6184 21.9374L39.134 11.0372L44.6526 21.9374H33.6184ZM37.9059 34.1249H26.9498V11.6771C28.5446 10.9826 29.7612 9.62576 30.3017 7.96217L39.9716 4.75457C41.2555 4.32846 41.9492 2.94777 41.5204 1.67113C41.0934 0.396776 39.712 -0.298673 38.4212 0.130175L29.7467 3.00642C28.6794 1.21715 26.7385 0.00449112 24.496 0.00449112C21.1135 0.00449112 18.4399 2.73297 18.4399 6.09824C18.4399 6.32378 18.4827 6.53783 18.5066 6.75697L9.02655 9.87941C7.7403 10.306 7.04741 11.6847 7.4754 12.9568C7.81755 13.9782 8.77313 14.6234 9.79983 14.6234C10.0559 14.6234 10.318 14.5839 10.5754 14.4982L20.9626 11.0525C21.2995 11.2962 21.5981 11.5095 22.0498 11.6771V37.7812C22.0498 38.4515 22.6011 38.9999 23.2748 38.9999H40.3559C41.0326 38.9999 41.5809 38.4542 41.5809 37.8497C41.5809 35.7626 40.0037 34.1249 37.9059 34.1249Z" fill="#FFB833"/> +</g> +<defs> +<clipPath id="clip0_409_317"> +<rect width="49" height="39" fill="white"/> +</clipPath> +</defs> +</svg> diff --git a/client/src/assets/qrl-logo.svg b/client/src/assets/qrl-logo.svg new file mode 100644 index 0000000000000000000000000000000000000000..08a0e62491ac802d5ee46c308a96e2f1bccb86e8 --- /dev/null +++ b/client/src/assets/qrl-logo.svg @@ -0,0 +1,3 @@ +<svg xmlns="http://www.w3.org/2000/svg" width="49" height="44" viewBox="0 0 49 44" fill="none"> +<path d="M43.5556 38.111H5.44444C2.43724 38.111 0 35.6738 0 32.6666V10.8888C0 7.88158 2.43724 5.44434 5.44444 5.44434H43.5556C46.5628 5.44434 49 7.88158 49 10.8888V32.6666C49 35.6695 46.5585 38.111 43.5556 38.111ZM10.8889 15.3124V11.9096C10.8889 11.3482 10.4295 10.8888 9.86806 10.8888H6.46528C5.90212 10.8888 5.44444 11.3482 5.44444 11.9096V15.3124C5.44444 15.8738 5.90212 16.3332 6.46528 16.3332H9.86806C10.4295 16.3332 10.8889 15.8738 10.8889 15.3124ZM19.0556 15.3124V11.9096C19.0556 11.3482 18.5962 10.8888 18.0347 10.8888H14.6319C14.0705 10.8888 13.6111 11.3482 13.6111 11.9096V15.3124C13.6111 15.8738 14.0705 16.3332 14.6319 16.3332H18.0347C18.5962 16.3332 19.0556 15.8738 19.0556 15.3124ZM27.2222 15.3124V11.9096C27.2222 11.3482 26.7628 10.8888 26.2014 10.8888H22.7986C22.2372 10.8888 21.7778 11.3482 21.7778 11.9096V15.3124C21.7778 15.8738 22.2372 16.3332 22.7986 16.3332H26.2014C26.7628 16.3332 27.2222 15.8738 27.2222 15.3124ZM35.3889 15.3124V11.9096C35.3889 11.3482 34.9295 10.8888 34.3681 10.8888H30.9653C30.4038 10.8888 29.9444 11.3482 29.9444 11.9096V15.3124C29.9444 15.8738 30.4038 16.3332 30.9653 16.3332H34.3681C34.9295 16.3332 35.3889 15.8738 35.3889 15.3124ZM43.5556 15.3124V11.9096C43.5556 11.3482 43.0962 10.8888 42.5347 10.8888H39.1319C38.5705 10.8888 38.1111 11.3482 38.1111 11.9096V15.3124C38.1111 15.8738 38.5705 16.3332 39.1319 16.3332H42.5347C43.0962 16.3332 43.5556 15.8738 43.5556 15.3124ZM10.8889 23.4791V20.0763C10.8889 19.5148 10.4295 19.0554 9.86806 19.0554H6.46528C5.90212 19.0554 5.44444 19.5148 5.44444 20.0763V23.4791C5.44444 24.0405 5.90212 24.4999 6.46528 24.4999H9.86806C10.4295 24.4999 10.8889 24.0405 10.8889 23.4791ZM19.0556 23.4791V20.0763C19.0556 19.5148 18.5962 19.0554 18.0347 19.0554H14.6319C14.0705 19.0554 13.6111 19.5148 13.6111 20.0763V23.4791C13.6111 24.0405 14.0705 24.4999 14.6319 24.4999H18.0347C18.5962 24.4999 19.0556 24.0405 19.0556 23.4791ZM27.2222 23.4791V20.0763C27.2222 19.5148 26.7628 19.0554 26.2014 19.0554H22.7986C22.2372 19.0554 21.7778 19.5148 21.7778 20.0763V23.4791C21.7778 24.0405 22.2372 24.4999 22.7986 24.4999H26.2014C26.7628 24.4999 27.2222 24.0405 27.2222 23.4791ZM35.3889 23.4791V20.0763C35.3889 19.5148 34.9295 19.0554 34.3681 19.0554H30.9653C30.4038 19.0554 29.9444 19.5148 29.9444 20.0763V23.4791C29.9444 24.0405 30.4038 24.4999 30.9653 24.4999H34.3681C34.9295 24.4999 35.3889 24.0405 35.3889 23.4791ZM43.5556 23.4791V20.0763C43.5556 19.5148 43.0962 19.0554 42.5347 19.0554H39.1319C38.5705 19.0554 38.1111 19.5148 38.1111 20.0763V23.4791C38.1111 24.0405 38.5705 24.4999 39.1319 24.4999H42.5347C43.0962 24.4999 43.5556 24.0405 43.5556 23.4791ZM10.8889 31.6457V28.2429C10.8889 27.6815 10.4295 27.2221 9.86806 27.2221H6.46528C5.90212 27.2221 5.44444 27.6815 5.44444 28.2429V31.6457C5.44444 32.2072 5.90212 32.6666 6.46528 32.6666H9.86806C10.4295 32.6666 10.8889 32.2072 10.8889 31.6457ZM35.3889 31.6457V28.2429C35.3889 27.6815 34.9295 27.2221 34.3681 27.2221H14.6319C14.0705 27.2221 13.6111 27.6815 13.6111 28.2429V31.6457C13.6111 32.2072 14.0705 32.6666 14.6319 32.6666H34.3681C34.9295 32.6666 35.3889 32.2072 35.3889 31.6457ZM43.5556 31.6457V28.2429C43.5556 27.6815 43.0962 27.2221 42.5347 27.2221H39.1319C38.5705 27.2221 38.1111 27.6815 38.1111 28.2429V31.6457C38.1111 32.2072 38.5705 32.6666 39.1319 32.6666H42.5347C43.0962 32.6666 43.5556 32.2072 43.5556 31.6457Z" fill="#E05DCB"/> +</svg> diff --git a/client/src/assets/timer-logo.svg b/client/src/assets/timer-logo.svg new file mode 100644 index 0000000000000000000000000000000000000000..a121a409d53608d5947ca9908f706f60b5ace43c --- /dev/null +++ b/client/src/assets/timer-logo.svg @@ -0,0 +1,3 @@ +<svg xmlns="http://www.w3.org/2000/svg" width="41" height="39" viewBox="0 0 41 39" fill="none"> +<path d="M20.5 6.70313C17.4591 6.70313 14.4865 7.56087 11.9581 9.16788C9.42971 10.7749 7.45906 13.059 6.29536 15.7314C5.13166 18.4038 4.82719 21.3444 5.42043 24.1813C6.01368 27.0183 7.47801 29.6242 9.62824 31.6696C11.7785 33.7149 14.518 35.1078 17.5005 35.6721C20.483 36.2364 23.5744 35.9468 26.3838 34.8399C29.1932 33.7329 31.5944 31.8584 33.2839 29.4533C34.9733 27.0483 35.875 24.2207 35.875 21.3281C35.8703 17.4507 34.249 13.7333 31.3666 10.9916C28.4843 8.24983 24.5763 6.70756 20.5 6.70313ZM20.5 32.2969C18.2193 32.2969 15.9899 31.6536 14.0936 30.4483C12.1973 29.243 10.7193 27.53 9.84652 25.5257C8.97375 23.5214 8.74539 21.316 9.19033 19.1882C9.63526 17.0605 10.7335 15.1061 12.3462 13.572C13.9589 12.038 16.0135 10.9934 18.2504 10.5701C20.4872 10.1469 22.8058 10.3641 24.9128 11.1943C27.0199 12.0245 28.8208 13.4304 30.0879 15.2342C31.355 17.038 32.0313 19.1587 32.0313 21.3281C32.0279 24.2362 30.8119 27.0243 28.6501 29.0806C26.4883 31.137 23.5572 32.2937 20.5 32.2969ZM26.3441 15.1597C26.5233 15.3296 26.6654 15.5314 26.7624 15.7536C26.8594 15.9758 26.9094 16.214 26.9094 16.4546C26.9094 16.6953 26.8594 16.9335 26.7624 17.1557C26.6654 17.3779 26.5233 17.5797 26.3441 17.7496L21.8597 22.0152C21.4987 22.3586 21.009 22.5516 20.4984 22.5516C19.9878 22.5516 19.4981 22.3586 19.1371 22.0152C18.776 21.6718 18.5732 21.206 18.5732 20.7203C18.5732 20.2346 18.776 19.7688 19.1371 19.4254L23.6215 15.1597C23.8 14.9893 24.0122 14.8541 24.2458 14.7618C24.4794 14.6695 24.7298 14.622 24.9828 14.622C25.2357 14.622 25.4862 14.6695 25.7198 14.7618C25.9534 14.8541 26.1656 14.9893 26.3441 15.1597ZM14.7344 2.4375C14.7344 1.95265 14.9369 1.48766 15.2973 1.14482C15.6577 0.80198 16.1465 0.609375 16.6563 0.609375H24.3438C24.8535 0.609375 25.3423 0.80198 25.7027 1.14482C26.0631 1.48766 26.2656 1.95265 26.2656 2.4375C26.2656 2.92235 26.0631 3.38734 25.7027 3.73018C25.3423 4.07302 24.8535 4.26563 24.3438 4.26563H16.6563C16.1465 4.26563 15.6577 4.07302 15.2973 3.73018C14.9369 3.38734 14.7344 2.92235 14.7344 2.4375Z" fill="#848484"/> +</svg> diff --git a/common/stubs/gameList.ts b/common/stubs/gameList.ts new file mode 100644 index 0000000000000000000000000000000000000000..c96e303cc58cf251ddee4c9781d7024f025c1bc9 --- /dev/null +++ b/common/stubs/gameList.ts @@ -0,0 +1,7 @@ +import {quizStub, quizStub2, quizStub3} from './quiz'; + +export const gameListStub = [ + quizStub, + quizStub2, + quizStub3, +]; diff --git a/common/stubs/question.ts b/common/stubs/question.ts index 3050d47463d94bc74eb571132bbc3f38d319ddbf..815a7b723847adccf27bb61441e3db269d664995 100644 --- a/common/stubs/question.ts +++ b/common/stubs/question.ts @@ -21,3 +21,9 @@ export const questionStub2: CreateQuestion = { { isCorrect: false, text: '0xC9' }, ], }; + +export const questionStub3: CreateQuestion = { + type: QuestionType.Qrl, + text: 'Pourquoi MongoDB est la pire création de l univers?', + points: 10, +}; diff --git a/common/stubs/quiz.ts b/common/stubs/quiz.ts index aa2aea0e03a70753bc423e85d97dd9089c641002..8c81203069b41078854ec0bb797ed5ca2ef7b5c0 100644 --- a/common/stubs/quiz.ts +++ b/common/stubs/quiz.ts @@ -1,5 +1,5 @@ import { CreateQuiz } from '../quiz'; -import { questionStub, questionStub2 } from './question'; +import { questionStub, questionStub2 ,questionStub3} from './question'; export const quizStub: CreateQuiz = { title: 'La vérité vraie', @@ -8,3 +8,20 @@ export const quizStub: CreateQuiz = { lastModification: new Date(), questions: [questionStub, questionStub2], }; + +export const quizStub2: CreateQuiz = { + title: 'LOG2990-Révision', + description: 'Révision pour le cours de LOG2990', + duration: 20, + lastModification: new Date(), + questions: [questionStub2], +}; + +export const quizStub3: CreateQuiz = { + title: 'INF1900-Révision', + description: 'Révision pour le cours de INF1900', + duration: 10, + lastModification: new Date(), + questions: [questionStub, questionStub2, questionStub3], +}; +