From 63a5fe7906716a98d9b51a3bb30f23f45114ef83 Mon Sep 17 00:00:00 2001 From: Michael Foiani Date: Fri, 27 Jul 2018 01:05:50 -0400 Subject: Created dedicated tutoring page and styled it a little. --- src/components/mao-tutoring.js | 234 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 234 insertions(+) create mode 100644 src/components/mao-tutoring.js (limited to 'src/components/mao-tutoring.js') diff --git a/src/components/mao-tutoring.js b/src/components/mao-tutoring.js new file mode 100644 index 0000000..c4d2911 --- /dev/null +++ b/src/components/mao-tutoring.js @@ -0,0 +1,234 @@ +/** +@license +Copyright (c) 2018 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +*/ + +import { html } from '@polymer/lit-element'; +import { PageViewElement } from './page-view-element.js'; +import { connect } from 'pwa-helpers/connect-mixin.js'; + +// This element is connected to the Redux store. +import { store } from '../store.js'; + +//These are the actions needed by this element. +import { signIn, signOut } from '../actions/firebase.js'; + +// We are lazy loading its reducer. +import firebase from '../reducers/firebase.js'; + +store.addReducers({ + firebase +}); + +// 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-input/paper-input.js'; +import '@polymer/paper-button/paper-button.js'; + +class MaoTutoring extends connect(store)(PageViewElement) { + _render(props) { + return html` + ${SharedStyles} + ${ButtonSharedStyles} + + + +
+
+ +
+

Tutoring

+
+ + + + + + + +
+ +
+
+

Welcome ${props.authMessage}

+

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam ac nisi orci. Maecenas sollicitudin diam in diam efficitur cursus. Morbi sollicitudin in justo tincidunt placerat. Integer tincidunt elementum nisi, eu ornare dolor lacinia eget. Fusce pulvinar massa eget odio placerat, commodo molestie ipsum tempus. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Suspendisse porttitor id purus eu cursus. Suspendisse arcu nulla, mattis vel hendrerit et, malesuada a elit. Nam at diam ornare, aliquet est sed, malesuada metus. Cras nec enim vel nibh tincidunt euismod ut et enim. Etiam pharetra eros in sodales iaculis. Duis sagittis urna et cursus mollis. Cras tempor rutrum est. Praesent sollicitudin ligula at laoreet placerat. Praesent tortor dui, semper in sapien non, pharetra luctus turpis.

+ + +
+
+ +
+ `; + } + + static get properties() { return { + // This is the data from the store. + signedIn: Boolean, + authMessage: String, + hours: Number, + + loginFieldsOpened: Boolean + }} + + _stateChanged(state) { + this.hours = state.firebase.hours; + this.signedIn = state.firebase.initialized; + this.authMessage = state.firebase.authMessage; + + this.loginFieldsOpened = false; + } + + logIn() { + const email = this.shadowRoot.getElementById('emailField') .value + + '@communityschoolnaples.org'; + const password = this.shadowRoot.getElementById('passwordField') .value; + + store.dispatch(signIn(email,password)); + } + + toggleloginFields() { + this.loginFieldsOpened = !this.loginFieldsOpened; + + this.shadowRoot.getElementById('tutoring-grid').style = 'grid-template-areas: "title" "card1" "card2";'; + } + +} + +window.customElements.define('mao-tutoring', MaoTutoring); -- cgit v1.2.3-70-g09d2