Skip to content
Merged
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
22 changes: 20 additions & 2 deletions src/views/Home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@
</article>
<img
class="lg:col-span-2 2xl:col-span-1 justify-self-center px-4"
src="/this_is_fine_summer.jpg"
alt="A twist on the well known 'this is fine' meme with a dog sitting at the beach with a drink."
:src="seasonalImage.src"
:alt="seasonalImage.alt"
>
</div>
</template>
Expand Down Expand Up @@ -173,6 +173,24 @@ export default defineComponent({
addingSemesterIsDisabled() {
return this.enrichedSemesters.length >= SemesterInfo.maxNumberOfAllowedSemesters;
},
seasonalImage() {
const currentMonth = new Date().getMonth() + 1;
if (currentMonth >= 6 && currentMonth <= 9) {
return {
src: '/this_is_fine_summer.jpg',
alt: "A twist on the well known 'this is fine' meme with a dog sitting at the beach with a drink."
};
} else if (currentMonth >= 12 || currentMonth <= 2) {
return {
src: '/this_is_fine_winter.jpg',
alt: "Alternative version of the well known 'this is fine' meme with a dog in a room full of snow."
};
}
return {
src: '/this_is_fine.jpg',
alt: "The well known 'this is fine' meme with a dog in a room full of fire."
};
}
},
watch: {
$route: {
Expand Down
Loading