Skip to content

Commit 6a2e76f

Browse files
author
Josh Sauder
committed
Initial commit
0 parents  commit 6a2e76f

14 files changed

+538
-0
lines changed

.firebaserc

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"projects": {
3+
"default": "dm-comm"
4+
}
5+
}

.idea/DM Communication.iml

+13
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/jsLibraryMappings.xml

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

+8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/watcherTasks.xml

+24
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

database.rules.json

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"rules": {
3+
".read": "true",
4+
".write": "true"
5+
}
6+
}

firebase.json

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"database": {
3+
"rules": "database.rules.json"
4+
},
5+
"hosting": {
6+
"public": "public"
7+
}
8+
}

package.json

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"name": "dm-communication",
3+
"version": "1.0.0",
4+
"description": "Website to help players communicate actions quickly to their DM",
5+
"main": "index.js",
6+
"scripts": {
7+
"test": "echo \"Error: no test specified\" && exit 1"
8+
},
9+
"author": "Joshua Sauder",
10+
"license": "ISC",
11+
"dependencies": {
12+
"material-design-lite": "^1.3.0"
13+
}
14+
}

public/404.html

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1">
6+
<title>Page Not Found</title>
7+
8+
<style media="screen">
9+
body { background: #ECEFF1; color: rgba(0,0,0,0.87); font-family: Roboto, Helvetica, Arial, sans-serif; margin: 0; padding: 0; }
10+
#message { background: white; max-width: 360px; margin: 100px auto 16px; padding: 32px 24px 16px; border-radius: 3px; }
11+
#message h3 { color: #888; font-weight: normal; font-size: 16px; margin: 16px 0 12px; }
12+
#message h2 { color: #ffa100; font-weight: bold; font-size: 16px; margin: 0 0 8px; }
13+
#message h1 { font-size: 22px; font-weight: 300; color: rgba(0,0,0,0.6); margin: 0 0 16px;}
14+
#message p { line-height: 140%; margin: 16px 0 24px; font-size: 14px; }
15+
#message a { display: block; text-align: center; background: #039be5; text-transform: uppercase; text-decoration: none; color: white; padding: 16px; border-radius: 4px; }
16+
#message, #message a { box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24); }
17+
#load { color: rgba(0,0,0,0.4); text-align: center; font-size: 13px; }
18+
@media (max-width: 600px) {
19+
body, #message { margin-top: 0; background: white; box-shadow: none; }
20+
body { border-top: 16px solid #ffa100; }
21+
}
22+
</style>
23+
</head>
24+
<body>
25+
<div id="message">
26+
<h2>404</h2>
27+
<h1>Page Not Found</h1>
28+
<p>The specified file was not found on this website. Please check the URL for mistakes and try again.</p>
29+
<h3>Why am I seeing this?</h3>
30+
<p>This page was generated by the Firebase Command-Line Interface. To modify it, edit the <code>404.html</code> file in your project's configured <code>public</code> directory.</p>
31+
</div>
32+
</body>
33+
</html>

public/index.css

+90
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
body {
2+
background: #ECEFF1;
3+
color: rgba(0, 0, 0, 0.87);
4+
font-family: Roboto, Helvetica, Arial, sans-serif;
5+
margin: 0;
6+
padding: 0;
7+
}
8+
9+
#load {
10+
color: rgba(0, 0, 0, 0.4);
11+
text-align: center;
12+
font-size: 13px;
13+
vertical-align: bottom;
14+
}
15+
16+
@media (max-width: 600px) {
17+
body, #message {
18+
margin-top: 0;
19+
background: white;
20+
box-shadow: none;
21+
}
22+
23+
body {
24+
border-top: 16px solid #ffa100;
25+
}
26+
}
27+
28+
#toolbar {
29+
display: inline-block;
30+
width: 100%;
31+
}
32+
33+
#title-status {
34+
margin: 5px;
35+
float: left;
36+
}
37+
38+
#sign-out {
39+
margin: 5px;
40+
float: right;
41+
}
42+
43+
#name {
44+
width: 100%
45+
}
46+
47+
#roll {
48+
width: 100%
49+
}
50+
51+
#dm_q_wrapper {
52+
width: 100%;
53+
text-align: center;
54+
height: 100%;
55+
}
56+
57+
#dm_q {
58+
width: 100%;
59+
display: inline-block;
60+
text-align: center;
61+
}
62+
63+
#dm_no {
64+
margin: 10px;
65+
}
66+
67+
#dm_yes {
68+
margin: 10px;
69+
}
70+
71+
#room_code_wrapper {
72+
width: 100%;
73+
text-align: center;
74+
}
75+
76+
#room_code {
77+
text-align: center;
78+
}
79+
80+
#room_code_input_wrapper {
81+
text-align: center;
82+
}
83+
84+
#submissions {
85+
text-align: center;
86+
}
87+
88+
.mdl-layout-title > #sign-in-status {
89+
font-size: 0.8em;
90+
}

public/index.html

+135
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1">
6+
<title>DM Comm</title>
7+
8+
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Roboto:300,400,500,700" type="text/css">
9+
<!--JQuery-->
10+
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"
11+
integrity="sha256-k2WSCIexGzOj3Euiig+TlR8gA0EmPjuc79OEeY5L45g="
12+
crossorigin="anonymous"></script>
13+
14+
<!--Material Design Lite-->
15+
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
16+
<link rel="stylesheet" href="https://code.getmdl.io/1.3.0/material.indigo-pink.min.css">
17+
<script defer src="https://code.getmdl.io/1.3.0/material.min.js"></script>
18+
19+
<!--Firebase UI-->
20+
<link type="text/css" rel="stylesheet" href="https://cdn.firebase.com/libs/firebaseui/2.1.1/firebaseui.css"/>
21+
22+
<!--Main sstylesheet-->
23+
<link rel="stylesheet" href="index.css"/>
24+
</head>
25+
<body>
26+
<!-- Always shows a header, even in smaller screens. -->
27+
<div class="mdl-layout mdl-js-layout mdl-layout--fixed-header">
28+
<header class="mdl-layout__header">
29+
<div class="mdl-layout__header-row">
30+
<!-- Title -->
31+
<span class="mdl-layout-title">DM Comm.</span>
32+
<!-- Add spacer, to align navigation to the right -->
33+
<div class="mdl-layout-spacer">
34+
<span id="room_code"></span>
35+
</div>
36+
<!-- Navigation. We hide it in small screens. -->
37+
<nav class="mdl-navigation mdl-layout--large-screen-only">
38+
<button id="sign-out"
39+
class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--primary"
40+
onclick="signOut()"></button>
41+
</nav>
42+
</div>
43+
</header>
44+
<div class="mdl-layout__drawer">
45+
<div class="mdl-layout-title">
46+
<span>DM Comm.</span>
47+
<span id="sign-in-status"></span>
48+
</div>
49+
<nav class="mdl-navigation">
50+
<a class="mdl-navigation__link" href="">Character</a>
51+
</nav>
52+
</div>
53+
<main class="mdl-layout__content">
54+
<div class="page-content">
55+
<!-- Your content goes here -->
56+
57+
<div id="firebaseui-auth-container"></div>
58+
<div id="dm_q_wrapper" style="display: none">
59+
<h3>Are you the DM?</h3>
60+
<div id="dm_q">
61+
<button id="dm_no"
62+
class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--accent"
63+
onclick="switchViews(false)">
64+
NO
65+
</button>
66+
<button id="dm_yes"
67+
class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--accent"
68+
onclick="switchViews(true)">
69+
YES
70+
</button>
71+
</div>
72+
73+
</div>
74+
75+
<div id="room_code_input_wrapper" style="display: none">
76+
<form action="#">
77+
<div class="mdl-textfield mdl-js-textfield">
78+
<input class="mdl-textfield__input" type="number" pattern="-?[0-9]*(\.[0-9]+)?"
79+
id="room_code_input">
80+
<label class="mdl-textfield__label" for="room_code_input">Room code...</label>
81+
<span class="mdl-textfield__error">Input is not a number!</span>
82+
</div>
83+
</form>
84+
<button class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--accent"
85+
onclick="enterRoom()">
86+
Submit
87+
</button>
88+
</div>
89+
90+
<div id="submissions" style="display: none">
91+
<form action="#">
92+
<div class="mdl-textfield mdl-js-textfield">
93+
<input class="mdl-textfield__input" type="text" id="name">
94+
<label class="mdl-textfield__label" for="name">Name...</label>
95+
</div>
96+
</form>
97+
98+
<form action="#">
99+
<div class="mdl-textfield mdl-js-textfield">
100+
<input class="mdl-textfield__input" type="number" pattern="-?[0-9]*(\.[0-9]+)?" id="roll">
101+
<label class="mdl-textfield__label" for="roll">Roll value...</label>
102+
<span class="mdl-textfield__error">Input is not a number!</span>
103+
</div>
104+
</form>
105+
106+
<button class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--accent"
107+
onclick="writeValue()">
108+
Submit
109+
</button>
110+
<ul class="mdl-list" id="roll_values" style="display: none"></ul>
111+
</div>
112+
113+
<p id="load">Firebase SDK Loading&hellip;</p>
114+
</div>
115+
</main>
116+
</div>
117+
118+
<!--Firebase-->
119+
<script src="https://www.gstatic.com/firebasejs/4.1.2/firebase.js"></script>
120+
<!--Firebase core-->
121+
<script src="https://www.gstatic.com/firebasejs/4.1.1/firebase-app.js"></script>
122+
<!--Firebase database-->
123+
<script src="https://www.gstatic.com/firebasejs/4.1.1/firebase-database.js"></script>
124+
<!--Firebase auth-->
125+
<script src="https://www.gstatic.com/firebasejs/4.1.1/firebase-auth.js"></script>
126+
127+
<!-- initialize the SDK after all desired features are loaded -->
128+
<script src="init.js"></script>
129+
130+
<!--Firebase UI-->
131+
<script src="https://cdn.firebase.com/libs/firebaseui/2.1.1/firebaseui.js"></script>
132+
<!--Main page logic-->
133+
<script src="index.js"></script>
134+
</body>
135+
</html>

0 commit comments

Comments
 (0)