Skip to content

Commit

Permalink
Merge pull request #17 from aligent/feature/IDAHOBIT_clean
Browse files Browse the repository at this point in the history
Feature/idahobit
  • Loading branch information
thilinaaligent authored May 16, 2024
2 parents e477569 + b29aef1 commit 0cebaab
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "pert-with-wings",
"private": true,
"version": "1.4",
"version": "1.4.3",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
18 changes: 18 additions & 0 deletions src/components/PertModal/PertModal.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -230,3 +230,21 @@
filter: grayscale(1);
opacity: 0.5;
}

.openPertModalButton.IDAHOBIT {
--width: 100px;
--angle:120deg;
background: repeating-linear-gradient(var(--angle), rgb(255, 140, 0), rgb(255, 171, 0), rgb(45, 181, 125), rgb(0, 184, 217), rgb(135, 119, 217), rgb(255, 86, 35), rgb(255, 140, 0) var(--width));
background-size: calc(var(--width)/sin(var(--angle))) 100%;
}

.openPertModalButton.IDAHOBIT:hover {
animation: IDAHOBITanimation 2s linear infinite;
background-position: unset;
}

@keyframes IDAHOBITanimation {
0% {
background-position: calc(var(--width)/sin(var(--angle))) 0;
}
}
6 changes: 5 additions & 1 deletion src/components/PertModal/PertModal.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import classnames from 'classnames';
import {
CSSProperties,
FC,
Expand Down Expand Up @@ -27,6 +28,7 @@ import { PertContext } from '@/context/pertContext';
import {
IS_JIRA,
VALIDATE_HOUR_MINUTES,
getIsIDAHOBIT,
getRandomTranslation,
getTicketNo,
handleMouseOver,
Expand Down Expand Up @@ -164,7 +166,9 @@ const PertModal: FC = () => {
<>
<button
id={`pert-button-${IS_JIRA ? 'jira' : 'azure'}`}
className={classes.openPertModalButton}
className={classnames(classes.openPertModalButton, {
[classes.IDAHOBIT]: getIsIDAHOBIT(),
})}
onClick={handleOpen}
onMouseOver={handleMouseOver}
>
Expand Down
7 changes: 6 additions & 1 deletion src/utils/get-eggs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,10 @@ const isAprilFoolsDay = () => {

export const isPirateDay = () => {
const now = new Date();
return now.getMonth() == 8 && (now.getDate() == 19 || now.getDate() == 15);
return now.getMonth() == 8 && now.getDate() == 19;
};

export const getIsIDAHOBIT = () => {
const now = new Date();
return now.getMonth() == 4 && now.getDate() == 17;
};

0 comments on commit 0cebaab

Please sign in to comment.