Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
<div class="modal-content">
<div class="modal-body d-flex justify-content-center">
<img
class="img-fluid rounded img-thumbnail"
src="https://techinterview.fra1.cdn.digitaloceanspaces.com/images/wednesday-frogs/wednesday_frog_gentelmen.jpeg"
class="d-block img-fluid rounded img-thumbnail"
src="{{ frogToBeShown }}"
alt="Frog who notifies about wednesday"
title="It's Wednesday, my dudes"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,33 @@ import { Component } from "@angular/core";
styleUrls: ["./wednesday-frog.component.scss"],
})
export class WednesdayFrogComponent {

readonly frogs = [
"https://techinterview.fra1.cdn.digitaloceanspaces.com/images/wednesday-frogs/wednesday_frog_gentelmen.jpeg",
"https://techinterview.fra1.cdn.digitaloceanspaces.com/images/wednesday-frogs/wednesday_todo.jpg",
"https://techinterview.fra1.cdn.digitaloceanspaces.com/images/wednesday-frogs/wednesday_2.jpg",
"https://techinterview.fra1.cdn.digitaloceanspaces.com/images/wednesday-frogs/wednesday_3.jpg",
"https://techinterview.fra1.cdn.digitaloceanspaces.com/images/wednesday-frogs/wednesday_4.jpg",
"https://techinterview.fra1.cdn.digitaloceanspaces.com/images/wednesday-frogs/wednesday_5.jpg",
];

readonly littleFrogLink =
"https://techinterview.fra1.cdn.digitaloceanspaces.com/images/frog_600.png";
readonly bigFrogLink =
"https://techinterview.fra1.cdn.digitaloceanspaces.com/images/frog.png";

readonly showFrog;
frogToBeShown: string | null = null;

showModal = false;

constructor() {
const today = new Date();
this.showFrog = today.getDay() === 3;
this.showFrog = today.getDay() === 1;
}

openModal() {
this.frogToBeShown = this.frogs[Math.floor(Math.random() * this.frogs.length)];
this.showModal = true;
}

Expand Down