aboutsummaryrefslogtreecommitdiff
path: root/src/components
diff options
context:
space:
mode:
Diffstat (limited to 'src/components')
-rw-r--r--src/components/mao-competitions.js99
-rw-r--r--src/components/mao-home.js36
2 files changed, 85 insertions, 50 deletions
diff --git a/src/components/mao-competitions.js b/src/components/mao-competitions.js
index 9dedca6..935b72a 100644
--- a/src/components/mao-competitions.js
+++ b/src/components/mao-competitions.js
@@ -45,12 +45,13 @@ class MaoCompetitions extends connect(store)(PageViewElement) {
"title"
"test1"
"test2"
- "test3";
+ "test3"
+ "test4"
+ "test5";
}
.amcComp {
grid-area: test1;
-
}
.fmlComp {
@@ -61,6 +62,14 @@ class MaoCompetitions extends connect(store)(PageViewElement) {
grid-area: test3;
}
+ .mathconComp {
+ grid-area: test4;
+ }
+
+ .madnessComp{
+ grid-area: test5;
+ }
+
.regional-competition-grid {
display: grid;
grid-gap: 10px;
@@ -124,8 +133,9 @@ class MaoCompetitions extends connect(store)(PageViewElement) {
@media (min-width: 460px) {
.non-mao-test-grid {
grid-template-areas:
- "title title title"
- "test1 test2 test3";
+ "title title title title title title"
+ "test1 test1 test2 test2 test3 test3"
+ "test4 test4 test4 test5 test5 test5";
}
.regional-competition-grid {
@@ -165,19 +175,9 @@ class MaoCompetitions extends connect(store)(PageViewElement) {
<div class="card-actions" hidden="${!props.signedIn}">
<paper-button
- class = "info"
- hidden = "${props.registeredComps.includes('nationals')}"
- on-tap = "${() => this.registerNationals()}"
raised
- disabled = "${!props.signedIn}">
- ${props.signedIn ? "Register" : "Sign In to Register"}
- </paper-button>
-
- <paper-button
- class = "success"
- hidden = "${!props.registeredComps.includes('nationals')}"
disabled>
- Already Registered
+ Not Open For Registration
</paper-button>
</div>
@@ -200,19 +200,9 @@ class MaoCompetitions extends connect(store)(PageViewElement) {
<div class="card-actions" hidden="${!props.signedIn}">
<paper-button
- class = "info"
- hidden = "${props.registeredComps.includes('states')}"
- on-tap = "${() => this.registerStates()}"
raised
- disabled = "${!props.signedIn}">
- ${props.signedIn ? "Register" : "Sign In to Register"}
- </paper-button>
-
- <paper-button
- class = "success"
- hidden = "${!props.registeredComps.includes('states')}"
disabled>
- Already Registered
+ Not Open for Registration
</paper-button>
</div>
@@ -226,6 +216,7 @@ class MaoCompetitions extends connect(store)(PageViewElement) {
<div class="title">
<h2 class="underline">Regionals</h2>
+ <p>To be elgible for the state or national competiton, one must participate in at least 3 regional competitons.</p>
</div>
<div class="regional-comp1">
@@ -285,7 +276,7 @@ class MaoCompetitions extends connect(store)(PageViewElement) {
id="mar2-competition-element"
name="March2"
day=" 16th"
- information="This competition is rough."
+ information="This competition is rough. We may not participate depending on interest."
location="American Hertiage-Boca, Delray Beach"
signedIn="${props.signedIn}"
isRegistered="${props.registeredComps.includes('March2')}"
@@ -303,7 +294,8 @@ class MaoCompetitions extends connect(store)(PageViewElement) {
<div class="title">
<h2 class="underline">Non-MAO Tests</h2>
- <p>All students must register and complete two of the tests to be qualified for national and/or state competitions.</p>
+ <p>All students must register and complete two of the tests to be qualified for national and/or state competitions</p>
+ <p>For members of the Mu Alpha Theta Honors Society, they must take at least one of these tests.</p>
</div>
<test-element
@@ -342,7 +334,7 @@ class MaoCompetitions extends connect(store)(PageViewElement) {
isRegistered="${props.registeredComps.includes('fml')}"
on-register-comp="${() => store.dispatch(registerComp('fml'))}">
</test-element>
-
+
<test-element
id="logs-test-element"
@@ -356,6 +348,37 @@ class MaoCompetitions extends connect(store)(PageViewElement) {
signedIn="${props.signedIn}"
isRegistered="${props.registeredComps.includes('logs')}"
on-register-comp="${() => store.dispatch(registerComp('logs'))}">
+ </test-element>
+
+ <test-element
+ id="mathcon-test-element"
+
+ class="mathconComp"
+ image="https://pbs.twimg.com/profile_images/892471656928616448/GqQyw9j6_400x400.jpg"
+ elevation="0"
+
+ name = "mathcon"
+ information = "The MathCon test has only one part, which varies in difficulty depending on your grade."
+ dates = ${["To Be Determined"]}
+ signedIn="${props.signedIn}"
+ isRegistered="${props.registeredComps.includes('mathcon')}"
+ on-register-comp="${() => store.dispatch(registerComp('mathcon'))}">
+ </test-element>
+
+ <test-element
+ id="madnessComp-test-element"
+
+ class="madnessComp"
+ image="https://campomath.weebly.com/uploads/6/1/7/6/61761943/arete-labs.png"
+ elevation="0"
+
+ name = "madness"
+ information = "Math Madness is an online competition where CSN faces other schools. Most of these problems base from AMC or other competitions."
+ dates = ${["Compete weekly on an undetermined date after school."]}
+ signedIn="${props.signedIn}"
+ isRegistered="${props.registeredComps.includes('mathcon')}"
+ on-register-comp="${() => store.dispatch(registerComp('mathcon'))}">
+ </test-element>
</div>
</section>
@@ -364,10 +387,7 @@ class MaoCompetitions extends connect(store)(PageViewElement) {
static get properties() { return {
// This is the data from the store.
registeredComps : Array,
- signedIn : Boolean,
-
- nationalRegistered : Boolean,
- statesRegistered : Boolean
+ signedIn : Boolean
}}
@@ -375,19 +395,6 @@ class MaoCompetitions extends connect(store)(PageViewElement) {
_stateChanged(state) {
this.signedIn = state.firebaseAuth .signedIn;
this.registeredComps = state.firebaseFirestore .registeredComps;
- //console.log(this.registeredComps);
- }
-
- registerNationals() {
- if(confirm('Are you sure you want to register for nationals?')) {
- store.dispatch(registerComp('nationals'));
- }
- }
-
- registerStates() {
- if(confirm('Are you sure you want to register for states?')) {
- store.dispatch(registerComp('states'));
- }
}
}
diff --git a/src/components/mao-home.js b/src/components/mao-home.js
index 9f8daf4..7f43aa8 100644
--- a/src/components/mao-home.js
+++ b/src/components/mao-home.js
@@ -13,23 +13,36 @@ import { PageViewElement } from './page-view-element.js';
// These are the shared styles needed by this element.
import { SharedStyles } from './shared-styles.js';
+import { ButtonSharedStyles } from './button-shared-styles.js';
// Import paper elements
import '@polymer/paper-card/paper-card.js';
+import '@polymer/paper-button/paper-button.js';
class MaoHome extends PageViewElement {
_render(props) {
return html`
${SharedStyles}
+ ${ButtonSharedStyles}
<style>
paper-card {
width: 100%;
+ display: block;
+ }
+
+ .welcomeCard {
+ margin-top: 5px;
+ text-align: center;
+ }
+
+ .info {
+ font-weight: bold;
}
.home-grid {
display: grid;
- grid-gap: 1px;
+ grid-gap: 5px;
grid-template-columns: 1fr;
}
@@ -37,6 +50,7 @@ class MaoHome extends PageViewElement {
.home-grid {
grid-template-columns: 1fr 1fr;
}
+ }
</style>
<section class="img-section">
@@ -68,7 +82,7 @@ class MaoHome extends PageViewElement {
Meeting Dates
</h2>
<p>
- We will meet once a week on an undecided date.
+ We will meet once a week on <strong>D Day Flex</strong>.
</p>
</div>
@@ -76,13 +90,27 @@ class MaoHome extends PageViewElement {
<div>
<h3>Upcoming Dates</h3>
<ul>
- <li>Club Presentations:\tSeptember 5th</li>
- <li>Club Fair (Sign Up!):\tSeptember 6th</li>
+ <li>First Meeting:\tSeptember 12th</li>
</ul>
</div>
</div>
</paper-card>
</div>
+
+ <paper-card elevation=0 class='welcomeCard'>
+ <div class="card-content">
+ <h2 class="underline">
+ Welcome Letter
+ </h2>
+ <p>
+ Welcome Letters mark the beginning of each MAO year. Please read it and show it to your parents.
+ </p>
+ </div>
+ <div class="card-actions">
+ <a href="/#" target="_blank"><paper-button class="info" raised>Welcome Letter</paper-button></a>
+ </div>
+ </paper-card>
+
</section>
`;
}