Skip to content
This repository was archived by the owner on Feb 11, 2022. It is now read-only.
Open
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
Binary file added .DS_Store
Binary file not shown.
2,691 changes: 2,690 additions & 1 deletion package-lock.json

Large diffs are not rendered by default.

7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,13 @@
},
"homepage": "https://github.com/LeoBadeaux/majorityrules#readme",
"dependencies": {
"dollars-to-cents": "^1.0.3",
"ejs": "^3.1.6",
"express": "^4.17.1",
"nodemon": "^2.0.12"
"fs": "^0.0.1-security",
"node-media-server": "^2.3.8",
"nodemon": "^2.0.12",
"ws": "^8.5.0",
"wss": "^3.3.4"
}
}
11 changes: 11 additions & 0 deletions private/adminConfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"applicationInfo": {
"name": "Majority Rules",
"icon": "/assets/majorityrules2-512_x_512.png"
},
"gameConfig": {
"maxPrizeCents": 0,
"maxPrizePoints": 1000,
"prizeQuestion": false
}
}
20 changes: 20 additions & 0 deletions private/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"applicationName": "Majority Rules",
"applicationInfo": {
"name": "Majority Rules",
"icon": "/assets/majorityrules2-512_x_512.png"
},
"debug": {
"enabled": true,
"changeApiUrl": true
},
"schedule": {
"bgAnimation": true,
"invite": {
"enabled": true,
"btnText": "Invite for Extra Lives"
}
},
"liveGame": {},
"notification": {}
}
9 changes: 9 additions & 0 deletions private/leaderboard.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"data": [
{
"username": "Alan",
"totalWinningsCents": 500,
"totalWins": 1
}
]
}
1 change: 1 addition & 0 deletions private/me.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
19 changes: 19 additions & 0 deletions private/schedule.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"isActive": true,
"gameType": "mjrules",
"isTestGame": false,
"isWinnerTakeAll": false,
"startTime": "2022-02-13T20:00:00.000Z",
"prizeCents": 10000,
"prizePoints": 0,
"currency": "USD",
"display": {
"title": "Majority Rules",
"titleColor": "#FFD700",
"logo": "/assets/logo.svg"
},
"live": {
"flv": "https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8",
"socketUrl": ""
}
}
Binary file added public/.DS_Store
Binary file not shown.
Binary file added public/assets/.DS_Store
Binary file not shown.
1 change: 1 addition & 0 deletions public/assets/live-games/live-viewer.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/live-games/logo-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/live-games/logo-norm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/live-games/logo-sports-trans50.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/live-games/logo-sports.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
50 changes: 50 additions & 0 deletions public/css/debug.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
.liveGameView{
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 100%;
height: 100%;
background-color: rgb(0, 89, 255);
border-radius: 0px;
/*animation: debugPanelActive .5s;*/
display: none;
}

.liveGameView .gameIcon {
width: 12%;
display: block;
margin: auto;
margin-top: 10%;
float: right;
margin-right: 10px;
}

.liveGameView .viewCount {
width: 12%;
display: block;
margin: auto;
margin-top: 12%;
float: left;
margin-left: 10px;
color: white;
font-weight: bolder;
}

@keyframes debugPanelActive {
0% {
transform: translate(-50%, 50%);
}
100% {
transform: translate(-50%, -50%);
}
}

@keyframes debugPanelInactive {
0% {
transform: translate(-50%, -50%);
}
100% {
transform: translate(-50%, 50%);
}
}
145 changes: 145 additions & 0 deletions public/css/liveGame.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
.liveGameView video {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
top: 0%;
left: 0%;
z-index: -1;
}

.questionWindow{
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 100%;
height: 100%;
background-color: rgb(255, 136, 0);
animation: debugPanelActive .5s;
display: none;
z-index: -1;
}

.questionWindow .questionText {
color: white;
font-family: 'Roboto', sans-serif;
font-size: 20px;
width: 80%;
position: absolute;
top: 28%;
left: 50%;
transform: translate(-50%, 0px);
text-align: center;
}

/*Question Countdown*/
.questionWindow .countdown {
background-color: rgb(255, 255, 255);
position: absolute;
width: 100%;
/*bottom: 95%;*/
float: top;
left: 50%;
transform: translate(-50%, 0px);
margin-right: 20px;
border-radius: 50px;
margin-bottom: 10px;
color: rgb(0, 0, 0);
padding: 5px 0px 0px 0px;
text-align: center;
font-size: 15pt;
font-family: 'Roboto', sans-serif;
display: none;
animation: countdownTimer 10s;
z-index: 0;
}

/*Question Info*/
.questionWindow .questionInfo .questionCount {
color: white;
font-family: 'Roboto', sans-serif;
font-size: 10pt;
width: 100%;
position: absolute;
top: 25%;
left: 50%;
transform: translate(-50%, 0px);
text-align: center;
}

/*Show Toast*/
.toastWindow {
left: 50%;
height: 20%;
bottom: 30px;
border-radius: 5px;
transform: translate(-50%, 0);
background: white;
width: 80%;
position: absolute;
display: none;
animation: toastReveal .5s;
}

.toastWindow .toastText {
color: black;
font-family: 'Roboto', sans-serif;
font-size: 20px;
width: 80%;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
text-align: center;
}

/*Toast Animation*/

@keyframes toastReveal {
0% {
bottom: -180px;
}
100% {
bottom: 30px;
}
}

@keyframes toastRemove {
0% {
bottom: 30px;
}
100% {
bottom: -180px;
}
}

/*Debug Panel Animations*/

@keyframes debugPanelActive {
0% {
transform: translate(-50%, 50%);
}
100% {
transform: translate(-50%, -50%);
}
}

@keyframes debugPanelInactive {
0% {
transform: translate(-50%, -50%);
}
100% {
transform: translate(-50%, 50%);
}
}

@keyframes countdownTimer {
0% {
left: 50%;
}
100% {
left: -50%;
}
}
Loading