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

April fools': Wanted mode #97

Closed
wants to merge 15 commits into from
Binary file added assets/img/cool-simple-backgrounds.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 6 additions & 2 deletions src/assets/javascripts/views/OnCallViews.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,14 @@ export class OnCallView extends React.Component {
);
}

// Only show aprilfools when in normal state: no accident and schedule found
const aprilfools = state === 'normal';

return (
<div className={`schedule state_${state}`}>
<div className={`schedule state_${state} ${aprilfools ? 'aprilfools' : ''}`}>
{ /* Header */ }
<OnCallScheduleRowView filled>
<span>ON CALL</span>
<span className="title">{`${!aprilfools ? 'ON CALL' : 'WANTED'}`}</span>
<OnCallStatusIndicatorView error={error} isFetching={isFetching} />
</OnCallScheduleRowView>

Expand All @@ -89,6 +92,7 @@ export class OnCallView extends React.Component {
{ /* User info */ }
<OnCallScheduleRowView equalSpacing>
<OnCallUserInfoView userInfo={userInfo} />
{aprilfools && <div className="huge_reward">HUGE REWARD!</div>}
</OnCallScheduleRowView>

{ /* Status row */ }
Expand Down
52 changes: 52 additions & 0 deletions src/assets/stylesheets/application.scss
Original file line number Diff line number Diff line change
Expand Up @@ -181,3 +181,55 @@ a {
&.filled_row { color: $textGrey; }
.schedule { margin: 0; width: 98%; }
}

.schedule.aprilfools {
// Img source: undetermined
// Appears to be a generic wallpaper.
background-image: url("/assets/img/cool-simple-backgrounds.jpg");
background-size: 100%;
border: 2px solid #000;

.schedule_name, .user_name { font-family: 'Fredericka the Great', cursive; }
.status_row, .huge_reward, .title { font-family: 'Rye', cursive; }

.schedule_row {
border-bottom: none;
&:nth-child(2) {
border-bottom: 1px solid #00887b;
}
}

.schedule_name {
&::before {
content: "FOR ";
}
}

.huge_reward {
font-size: 3vw;
color: #C9404D;
position: absolute;
margin-top: 4%;
margin-left: -30%;
transform: rotate(20deg);
}

.title {
color: #C9404D;
font-size: 46px;
text-shadow: 0 0 3px #f0bc87;
}

.filled_row {
// Img source: https://www.wildtextures.com/wp-content/uploads/wildtextures_seamless-green-wooden-facade-480x367.jpg
// ToU: https://www.wildtextures.com/terms-of-use/
// All textures at wildtextures.com are completely free for both, personal and commercial use.
background-image: url('/assets/img/wildtextures_seamless-green-wooden-facade-480x367.jpg');
background-size: 32% 400%;
}

.theme-grafana & {
a { color: $textBlack; }
&.filled_row { color: $textBlack; }
}
}
2 changes: 1 addition & 1 deletion src/views/layout.html.j2
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<title>{{title}} | PagerBeauty</title>
<link rel="stylesheet" href="{{assetsPath}}/bundle.css">
<link href="https://fonts.googleapis.com/css?family=Roboto+Mono" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Roboto+Mono|Fredericka+the+Great|Rye" rel="stylesheet">
</head>
<body>
{% block content %}Content{% endblock %}
Expand Down