Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added rainbows during pride month #117

Closed
wants to merge 4 commits into from
Closed
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
10 changes: 10 additions & 0 deletions src/components/Activity.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,19 @@ export default class Activity extends Component {
if (props.participant_counter != null)
participants = ` (${props.participant_counter})`;

let day = new Date();
let pride = day.getMonth() == 5;

let className = "activity";
if (props.active) {
className += " active";
if (pride) {
className += " activeRainbow";
}
}

if (pride) {
className += " rainbow";
Comment on lines +67 to +79
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add some comments on what the effects are of applying the classnames? We know, and the code reads fine, but it might help for other people to say something like "If we are in pride month, the activities should gain some rainbow effects or other pride related thigns."

}

return (
Expand Down
18 changes: 18 additions & 0 deletions src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,20 @@ body {
position: fixed;
}

.rainbow {
animation: rainbow 5s infinite;
}

@keyframes rainbow{
0%{color: #ff0000;}
10%{color: #ffa600;}
30%{color: #ffff00;}
50%{color: #00ff00;}
70%{color: #00bfff;}
90%{color: #ff00ff;}
100%{color: #ff0000;}
}

.full-advertisement,
.full-advertisement > .poster {
position: absolute;
Expand Down Expand Up @@ -99,6 +113,10 @@ body {
background: #161616;
}

.activity.activeRainbow {
background-image: linear-gradient(to left, hsl(0, 0%, 15%), hsl(0, 100%, 10%), hsl(300, 100%, 10%), hsl(195, 100%, 10%), hsl(120, 100%, 10%), hsl(60, 100%, 10%), hsl(39, 100%, 10%), hsl(0, 100%, 10%), hsl(0, 0%, 15%) );
}

.boardTextSection,
.quoteSection {
display: flex;
Expand Down