Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                 <!--5013 Jennifer Cunningham-Lozano final project 

How's your day! app

Project: app for students to submit their daily rank of the days lessons. 
Goal: provide district with feedback on virtual classroom lesson from the student level. Feedback on class assingment and social behavior (how they feel that day)
Reports: Disctrict can report on subject, grade level and date range. 
tech: Bootstrap, Vue.js (v-model, methods (set(), get(), clear form ="", disable button) vue star-rating component, firebase (collection=reviews, document(autoid), fields)

-->

<link rel="stylesheet" href="https://unpkg.com/vue-rate-it/dist/cdn/star-rating.min.js">

 <div id="app">

   <!--Top Section header message -->
   <div class="media">
     <img class="align-self-start mr-4" src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/3705392/hows-your-day.png" alt="How's your day?" style="width:200px;height:200px;">
     <div class="media-body">
       <h4 class="mt-4"><b>Student Daily Feedback Link</b></h4>
       <p>It's finally the end of the school day one more activity to complete before we go out to play.</p>
       <h4 class="mt-2"><b>Submit your rating &#x2B50; &#x2B50; &#x2B50; &#x2B50; &#x2B50;</i></b></h4>
       <p>All of your teachers are looking forward to your feedback on today's lessons you completed. We value your input to keep us creating and updating our lesson plans to achieve a 5*STAR* rating. </p>
       <h4 class="mt-4"><b>Thanks!</b></h4>
       <p><i>Happy Land School District</i></p>
     </div>
   </div>
   <!--END - Top Section header message -->
   
  <hr>

   <!--Bootstrap container - form  -->
   <div class="container mt-4">
     <form @submit.prevent>
       
       <!-- SELECT DATE  -->
       <div class="form-group">
         <h3>Today's Date</h3>
         <input v-model="dateInput" type="date" class="form-control custom-select" required>
       </div>

       <!-- SELECT GRADE  -->
       <div>
         <select v-model="gradeInput" class="form-control custom-select" placeholder="x" required>
           <option value="" selected disabled>select your grade</option>
           <option value="First grade">1st Grade </option>
           <option value="Second grade">2nd Grade </option>
           <option value="Third grade">3rd Grade </option>
           <option value="Fourth grade">4th Grade </option>
           <option value="Fifth grade">5th Grade </option>
           <option value="Six grade">MS-6th Grade</option>
           <option value="Seventh grade">MS-7th Grade</option>
           <option value="Eigth grade">MS-8th Grade</option>
           <option value="Ninth grade">HS-Freshman</option>
           <option value="Tenth grade">HS-Sophmore</option>
           <option value="Elventh grade">HS-Junior </option>
           <option value="Twelth grade">HS-Senior</option>
         </select>
       </div>
       <br>

       <!-- FORM HEADER RATING SECTION-->
       <div class="form-group">
         <table class="table table-striped">
           <thead>
             <tr>
               <th>Subject</th>
               <th>Lesson Rating &#x2B50;&#x2B50;&#x2B50;&#x2B50;&#x2B50;</th>
             </tr>
           </thead>
           <!-- SELECT  ENGLISH - RATING -->
           <tbody>
             <tr class="english">
               <td class="align-middle"><h5>English</h5></td>
               <td>
                <star-rating @rating-selected="englishRateInput = $event" :rating="englishRateInput">                     </star-rating>
             </tr>
             <!-- SELECT  MATH - RATING -->
             <tr class="math">
               <td class="align-middle"><h5>Math</h5></td>
               <td>
                 <star-rating @rating-selected="mathRateInput = $event" :rating="mathRateInput">
                 </star-rating>
               </td>
             </tr>
             <!-- SELECT  SCIENCE - RATING -->
           <tbody>
             <tr class="science">
               <td class="align-middle"><h5>Science</h5></td>
               <td>
                 <star-rating @rating-selected="scienceRateInput = $event" :rating="scienceRateInput">                    </star-rating>
               </td>
             </tr>
             <!-- SELECT  DESIGN - RATING -->
             <tr class="design">
               <td class="align-middle"><h5>Instructional Design</h5></td>
                 <td>
                 <star-rating @rating-selected="designRateInput = $event" :rating="designRateInput">                      </star-rating>
               </td>
             </tr>
           </tbody>
         </table>
         <br>
         <!-- SELECT FEELING RATING  -->
         <div>
           <p class="mb-0">
             <h4><i>How was your day today?</i></h4>
           1 &#x2B50; Not so good --> 5 &#x2B50; Amazing!
           </p>
              <td>
                 <star-rating @rating-selected="feelingRateInput = $event" :rating="feelingRateInput">                    </star-rating>
               </td>
         </div>
         <br>

         <!-- SUBMIT BUTTON -->
         <td><button :disabled="btnDisable" @click="submitData" class="btn btn-info">SUBMIT</button></td>
       </div>
       <hr>
     </form>
    
    <!-- RECAP SECTION OF FORM FOR STUDENT TO VIEW-->
     <div class="alert alert-success">
       <p><h4><b>Here is what you told us:</b></h4></p>
       <p>Submitted: <b>{{ reviewDate }}</b></p>
         <dl class="row">
         <dt class="col-sm-5">Grade Level:</dt>
         <dd class="col-sm-7">{{ reviewGrade }}</dd>
         <dl class="row"></dl>
         <dt class="col-sm-5">English Lesson:</dt>
         <dd class="col-sm-7">{{ reviewEnglishRate }} &#x2B50;</dd>
         <dl class="row"></dl>
         <dt class="col-sm-5">Math Lesson:</dt>
         <dd class="col-sm-7">{{ reviewMathRate }} &#x2B50;</dd>
         <dl class="row"></dl>
         <dt class="col-sm-5">Science Lesson:</dt>
         <dd class="col-sm-7"> {{ reviewScienceRate }} &#x2B50;</dd>
         <dt class="col-sm-5">Instrucional Design Lesson:</dt>
         <dd class="col-sm-7"> {{ reviewDesignRate }} &#x2B50;</dd>
       </dl>
     </div>
   </div>
 </div>

 <!-- END FORM  -->

 <!-- IMAGE - THANK YOU -->
 <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/3705392/banner-clip-thank-you-6.png" class="responsive" alt="Thank you!">

 <!-- FIREBASE DATABASE INFORMAITON-->

 <!-- The core Firebase JS SDK is always required and must be listed first -->
 <script src="https://www.gstatic.com/firebasejs/7.10.0/firebase-app.js"></script>

 <!-- Add SDKs for Firebase Firestore-->
 <script src="https://www.gstatic.com/firebasejs/7.10.0/firebase-firestore.js"></script>

 <script>
   // Your web app's Firebase configuration
   const firebaseConfig = {
     apiKey: "AIzaSyCwAr28kKVDxdOXeKekO4VmjdpV7YzIXdg",
     authDomain: "jmclozano-d56b9.firebaseapp.com",
     databaseURL: "https://jmclozano-d56b9.firebaseio.com",
     projectId: "jmclozano-d56b9",
     storageBucket: "jmclozano-d56b9.appspot.com",
     messagingSenderId: "882657097571",
     appId: "1:882657097571:web:4b52f057f06f653b978556",
     measurementId: "G-STV25E3SMG"
   };
   // Initialize Firebase
   firebase.initializeApp(firebaseConfig);
 </script>
              
            
!

CSS

              
                .responsive {
  width: 100%;
  height: auto;
}
body {
  font-family: 'Raleway', sans-serif;
}

td {class="align-middle"}

              
            
!

JS

              
                let db = firebase.firestore();
let reviewsRef = db.collection("reviews");

let app = new Vue({
  el: "#app",
  data: {
    dateInput: "",
    gradeInput: "",
    englishRateInput: "",
    mathRateInput: "",
    scienceRateInput:"",
    designRateInput:"",
    feelingRateInput:"",
    reviewDate: "",
    reviewGrade: "",
    reviewEnglishRate: "",
    reviewMathRate: "",
    reviewScienceRate: "",
    reviewDesignRate:"",
    btnDisable: false //when changed to true button is disabled
  },
  
  methods: {
    submitData() {
      var id = reviewsRef.doc().id
      reviewsRef.doc(id).set({
        date: this.dateInput,
        grade: this.gradeInput,
        english: this.englishRateInput,
        math: this.mathRateInput,
        science: this.scienceRateInput,
        design: this.designRateInput,
        feeling: this.feelingRateInput,
      }) 
        this.dateInput = "",
        this.gradeInput = "",
        this.englishRateInput = "",
        this.mathRateInput = "",
        this.scienceRateInput = "",
        this.designRateInput ="",
        this.feelingRateInput ="",
        this.btnDisable = true
     
      reviewsRef.doc(id).get().then(doc => {
        this.reviewDate = doc.data().date 
        this.reviewGrade = doc.data().grade
        this.reviewEnglishRate = doc.data().english
        this.reviewMathRate = doc.data().math
        this.reviewScienceRate = doc.data().science
        this.reviewDesignRate = doc.data().design
      })
    },
  }
});

              
            
!
999px

Console