diff --git a/apollo-frontend/src/app/card/card.component.html b/apollo-frontend/src/app/card/card.component.html index 6a6d689..a5c77f4 100644 --- a/apollo-frontend/src/app/card/card.component.html +++ b/apollo-frontend/src/app/card/card.component.html @@ -1,7 +1,21 @@
-
+
+
+ + + + + + + +
diff --git a/apollo-frontend/src/app/card/card.component.scss b/apollo-frontend/src/app/card/card.component.scss index 3414c46..83ea678 100644 --- a/apollo-frontend/src/app/card/card.component.scss +++ b/apollo-frontend/src/app/card/card.component.scss @@ -44,6 +44,25 @@ background-image: url('/assets/icons/risk-skull.svg'); background-color: red; } + position: relative; + &.endangered:hover { + &::after { + position: absolute; + opacity: 0.99999; + bottom: 0; + content: 'Череп на червен фон означава, че следната карта е на застрашен вид'; + background-color: white; + max-width: 100px; + z-index: 9999999; + } + } + &.recycle { + background-color: green; + fill: white; + display: flex; + justify-content: center; + align-items: center; + } } } .info { diff --git a/apollo-frontend/src/app/dashboard-cards/dashboard-cards.component.ts b/apollo-frontend/src/app/dashboard-cards/dashboard-cards.component.ts index 4bfd1ff..f500c80 100644 --- a/apollo-frontend/src/app/dashboard-cards/dashboard-cards.component.ts +++ b/apollo-frontend/src/app/dashboard-cards/dashboard-cards.component.ts @@ -11,6 +11,7 @@ export class DashboardCardsComponent implements OnInit { constructor( private userdata: UserdataService, + private db: DbService, ) { } ngOnInit(): void { diff --git a/apollo-frontend/src/app/db.service.ts b/apollo-frontend/src/app/db.service.ts index 14a3a64..4b61398 100644 --- a/apollo-frontend/src/app/db.service.ts +++ b/apollo-frontend/src/app/db.service.ts @@ -17,7 +17,7 @@ export interface Card { info: CardParagraph[]; imageUrl: string; name: string; - types: Array<"endangered" | "normal">; + types: Array<"endangered" | "normal" | "recycle">; } export interface Answer { choises: string[]; diff --git a/apollo-frontend/src/app/minigame-biotrivia/minigame-biotrivia.component.html b/apollo-frontend/src/app/minigame-biotrivia/minigame-biotrivia.component.html index a6a236b..e824847 100644 --- a/apollo-frontend/src/app/minigame-biotrivia/minigame-biotrivia.component.html +++ b/apollo-frontend/src/app/minigame-biotrivia/minigame-biotrivia.component.html @@ -15,9 +15,8 @@
-
-
+
{{currQuestion.question}}
diff --git a/apollo-frontend/src/app/minigame-biotrivia/minigame-biotrivia.component.scss b/apollo-frontend/src/app/minigame-biotrivia/minigame-biotrivia.component.scss index fbb1313..4837209 100644 --- a/apollo-frontend/src/app/minigame-biotrivia/minigame-biotrivia.component.scss +++ b/apollo-frontend/src/app/minigame-biotrivia/minigame-biotrivia.component.scss @@ -70,7 +70,6 @@ gap: .5em; margin: 1em 0; .photo { - flex: 0 0 150px; height: 150px; background-size: cover; background-position: center; diff --git a/apollo-frontend/src/app/minigame-conveyor-recycling/minigame-conveyor-recycling.component.ts b/apollo-frontend/src/app/minigame-conveyor-recycling/minigame-conveyor-recycling.component.ts index 72d7862..e92d8c2 100644 --- a/apollo-frontend/src/app/minigame-conveyor-recycling/minigame-conveyor-recycling.component.ts +++ b/apollo-frontend/src/app/minigame-conveyor-recycling/minigame-conveyor-recycling.component.ts @@ -140,7 +140,8 @@ export class MinigameConveyorRecyclingComponent implements AfterViewInit, OnInit throwOutSounds: HTMLAudioElement[] = []; backgroundMusic: HTMLAudioElement; - trashSpeed = 1000; + trashSpeed = 200; + nextTrasgSpeedDecrease = 55; simulationSpeed = 10; friction = 5; gravitation = 9; @@ -156,13 +157,7 @@ export class MinigameConveyorRecyclingComponent implements AfterViewInit, OnInit milliseconds = 0; won = false; - wonCard: Card = { - imageUrl: '', - info: [], - name: 'test', - types: ['endangered'], - }; - + wonCard: Card = null; timeMax = 1; time = 0; @@ -295,6 +290,10 @@ export class MinigameConveyorRecyclingComponent implements AfterViewInit, OnInit const pointX = (trash.el.rect.left + trash.el.rect.right) / 2; const pointY = trash.el.rect.bottom; + this.trashSpeed -= this.nextTrasgSpeedDecrease; + this.milliseconds = 0; + this.nextTrasgSpeedDecrease = Math.round(this.nextTrasgSpeedDecrease / 2); + if (newPos.bin.acceptedTypes.includes(trash.el.type)) { this.points++; this.showPoint(1, pointX, pointY); @@ -354,7 +353,7 @@ export class MinigameConveyorRecyclingComponent implements AfterViewInit, OnInit this.conveyor.speed = 2; this.mainLoopID = setInterval(() => { if (!this.suspended) { - if (this.milliseconds % (this.simulationSpeed * 100) === 0) { + if (this.milliseconds % (this.simulationSpeed * this.trashSpeed) === 0) { this.spawnTrash(); } @@ -431,8 +430,11 @@ export class MinigameConveyorRecyclingComponent implements AfterViewInit, OnInit restart(): void { this.points = 0; + this.mistakes = 0; this.ended = false; this.backgroundMusic.currentTime = 0; + this.trashSpeed = 200; + this.nextTrasgSpeedDecrease = 50; this.time = 0; this.trashes.forEach(v => v.el.element.remove()); this.trashes = []; diff --git a/apollo-frontend/src/app/mock.card_types.ts b/apollo-frontend/src/app/mock.card_types.ts index 7d6aecb..4e665ab 100644 --- a/apollo-frontend/src/app/mock.card_types.ts +++ b/apollo-frontend/src/app/mock.card_types.ts @@ -553,4 +553,88 @@ export const mock_card_types: Saved[] = [ ], }, }, + { + id: "34", + el: { + name: "Кенчета", + types: ['recycle'], + imageUrl: "/assets/images/cards/tincan.png", + info: [ + { + heading: "До луната и обратно... 20 пъти", + content: "Американците изхвърлят всяка година кутиики от сода или бутилки, които са достатъчни да стигнат до Луната и да се върнат около 20 пъти.", + }, + ], + }, + }, + { + id: "35", + el: { + name: "Тоалетна хартия", + types: ['recycle'], + imageUrl: "/assets/images/cards/toilet-paper.jpg", + info: [ + { + heading: "Тоалетна-o-ception", + content: "27,000 дървета се отсичат всеки ден за направата на тоалетна хартия.", + }, + ], + }, + }, + { + id: "36", + el: { + name: "Хартия", + types: ['recycle'], + imageUrl: "/assets/images/cards/image_19.jpg", + info: [ + { + heading: "Интересно", + content: "1 тон рециклирана хартия спасява около 13 дървета и 32 000 литра вода.", + }, + ], + }, + }, + { + id: "37", + el: { + name: "Пластмаса", + types: ['recycle'], + imageUrl: "/assets/images/cards/image_20.jpg", + info: [ + { + heading: "Интересно", + content: "На сметището пластмасата се разпада 400 години.", + }, + ], + }, + }, + { + id: "38", + el: { + name: "Пластмаса", + types: ['recycle'], + imageUrl: "/assets/images/cards/image_21.jpg", + info: [ + { + heading: "Интересно", + content: "Спестената енергия от рециклирането на 1 пластмасова бутилка ще захрани компютър за 25 минути.", + }, + ], + }, + }, + { + id: "39", + el: { + name: "Стъкло", + types: ['recycle'], + imageUrl: "/assets/images/cards/image_22.jpg", + info: [ + { + heading: "Интересно", + content: "1 рециклирана стъклена бутилка спестява електричеството, нужно на телевизора ви да работи 1.5 часа.", + }, + ], + }, + }, ]; diff --git a/apollo-frontend/src/app/mock.questions.ts b/apollo-frontend/src/app/mock.questions.ts index 881cda9..cddc792 100644 --- a/apollo-frontend/src/app/mock.questions.ts +++ b/apollo-frontend/src/app/mock.questions.ts @@ -253,4 +253,62 @@ export const mock_questions: Saved[] = [ } } }, + { + id: '16', + el: { + category: 'plants', + photoUrlsAbove: [ + '/assets/images/questions/izcheznali-1.png', + '/assets/images/questions/izcheznali-2.png', + '/assets/images/questions/izcheznali-3.png', + ], + question: 'Кое от тези растения е изчезнало в България?', + answer: { + choises: [ + 'Еделвайс', + 'Източна тинтява', + 'Бардуче', + ], + correctChoise: 'Източна тинтява', + } + } + }, + { + id: '17', + el: { + category: 'plants', + photoUrlsAbove: [ + '/assets/images/questions/nartsisova-susunka.png', + '/assets/images/questions/damsko-surce.png', + ], + question: 'Кое от тези растения е защитено?', + answer: { + choises: [ + 'Нарцисоцветна съсънка', + 'Дамско сърце', + ], + correctChoise: 'Нарцисоцветна съсънка', + } + } + }, + { + id: '18', + el: { + category: 'plants', + photoUrlsAbove: [ + '/assets/images/questions/grebenat-na-petela.png', + '/assets/images/questions/cveteto-prilep.png', + '/assets/images/questions/liliq-kobra.png', + ], + question: 'Кое от тези растения се среща в България?', + answer: { + choises: [ + 'Гребенът на петела', + 'Цветето лилия', + 'Лилия кобра', + ], + correctChoise: 'Гребенът на петела', + } + } + }, ]; diff --git a/apollo-frontend/src/assets/icons/recycling.svg b/apollo-frontend/src/assets/icons/recycling.svg new file mode 100644 index 0000000..59f8147 --- /dev/null +++ b/apollo-frontend/src/assets/icons/recycling.svg @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/apollo-frontend/src/assets/images/cards/image_19.jpg b/apollo-frontend/src/assets/images/cards/image_19.jpg new file mode 100644 index 0000000..3d6142e Binary files /dev/null and b/apollo-frontend/src/assets/images/cards/image_19.jpg differ diff --git a/apollo-frontend/src/assets/images/cards/image_20.jpg b/apollo-frontend/src/assets/images/cards/image_20.jpg new file mode 100644 index 0000000..76762b7 Binary files /dev/null and b/apollo-frontend/src/assets/images/cards/image_20.jpg differ diff --git a/apollo-frontend/src/assets/images/cards/image_21.jpg b/apollo-frontend/src/assets/images/cards/image_21.jpg new file mode 100644 index 0000000..1de22f1 Binary files /dev/null and b/apollo-frontend/src/assets/images/cards/image_21.jpg differ diff --git a/apollo-frontend/src/assets/images/cards/image_22.jpg b/apollo-frontend/src/assets/images/cards/image_22.jpg new file mode 100644 index 0000000..dd47df5 Binary files /dev/null and b/apollo-frontend/src/assets/images/cards/image_22.jpg differ diff --git a/apollo-frontend/src/assets/images/cards/tincan.png b/apollo-frontend/src/assets/images/cards/tincan.png new file mode 100644 index 0000000..ea5de7a Binary files /dev/null and b/apollo-frontend/src/assets/images/cards/tincan.png differ diff --git a/apollo-frontend/src/assets/images/cards/toilet-paper.jpg b/apollo-frontend/src/assets/images/cards/toilet-paper.jpg new file mode 100644 index 0000000..5c5336c Binary files /dev/null and b/apollo-frontend/src/assets/images/cards/toilet-paper.jpg differ diff --git a/apollo-frontend/src/assets/images/questions/cveteto-prilep.png b/apollo-frontend/src/assets/images/questions/cveteto-prilep.png new file mode 100644 index 0000000..b42aad5 Binary files /dev/null and b/apollo-frontend/src/assets/images/questions/cveteto-prilep.png differ diff --git a/apollo-frontend/src/assets/images/questions/damsko-surce.png b/apollo-frontend/src/assets/images/questions/damsko-surce.png new file mode 100644 index 0000000..4ece7db Binary files /dev/null and b/apollo-frontend/src/assets/images/questions/damsko-surce.png differ diff --git a/apollo-frontend/src/assets/images/questions/grebenat-na-petela.png b/apollo-frontend/src/assets/images/questions/grebenat-na-petela.png new file mode 100644 index 0000000..6627e3a Binary files /dev/null and b/apollo-frontend/src/assets/images/questions/grebenat-na-petela.png differ diff --git a/apollo-frontend/src/assets/images/questions/izcheznali-1.png b/apollo-frontend/src/assets/images/questions/izcheznali-1.png new file mode 100644 index 0000000..1c95b13 Binary files /dev/null and b/apollo-frontend/src/assets/images/questions/izcheznali-1.png differ diff --git a/apollo-frontend/src/assets/images/questions/izcheznali-2.png b/apollo-frontend/src/assets/images/questions/izcheznali-2.png new file mode 100644 index 0000000..de49960 Binary files /dev/null and b/apollo-frontend/src/assets/images/questions/izcheznali-2.png differ diff --git a/apollo-frontend/src/assets/images/questions/izcheznali-3.png b/apollo-frontend/src/assets/images/questions/izcheznali-3.png new file mode 100644 index 0000000..736b5a3 Binary files /dev/null and b/apollo-frontend/src/assets/images/questions/izcheznali-3.png differ diff --git a/apollo-frontend/src/assets/images/questions/liliq-kobra.png b/apollo-frontend/src/assets/images/questions/liliq-kobra.png new file mode 100644 index 0000000..3f314d9 Binary files /dev/null and b/apollo-frontend/src/assets/images/questions/liliq-kobra.png differ diff --git a/apollo-frontend/src/assets/images/questions/nartsisova-susunka.png b/apollo-frontend/src/assets/images/questions/nartsisova-susunka.png new file mode 100644 index 0000000..f0a3e55 Binary files /dev/null and b/apollo-frontend/src/assets/images/questions/nartsisova-susunka.png differ diff --git a/apollo-frontend/src/assets/images/questions/pqsuchna-liliq.png b/apollo-frontend/src/assets/images/questions/pqsuchna-liliq.png new file mode 100644 index 0000000..a75b659 Binary files /dev/null and b/apollo-frontend/src/assets/images/questions/pqsuchna-liliq.png differ diff --git a/apollo-frontend/src/styles.scss b/apollo-frontend/src/styles.scss index 185cb5d..b5a0996 100644 --- a/apollo-frontend/src/styles.scss +++ b/apollo-frontend/src/styles.scss @@ -41,4 +41,5 @@ $my-color-palette: igx-palette($primary: $company-color, background-color: #f8f8f855; backdrop-filter: blur(10px); box-shadow: #0004 3px 3px 5px; + z-index: -1 ; } \ No newline at end of file