HTML preprocessors can make writing HTML more powerful or convenient. For instance, Markdown is designed to be easier to write and read for text documents and you could write a loop in Pug.
In CodePen, whatever you write in the HTML editor is what goes within the <body>
tags in a basic HTML5 template. So you don't have access to higher-up elements like the <html>
tag. If you want to add classes there that can affect the whole document, this is the place to do it.
In CodePen, whatever you write in the HTML editor is what goes within the <body>
tags in a basic HTML5 template. If you need things in the <head>
of the document, put that code here.
The resource you are linking to is using the 'http' protocol, which may not work when the browser is using https.
CSS preprocessors help make authoring CSS easier. All of them offer things like variables and mixins to provide convenient abstractions.
It's a common practice to apply CSS to a page that styles elements such that they are consistent across all browsers. We offer two of the most popular choices: normalize.css and a reset. Or, choose Neither and nothing will be applied.
To get the best cross-browser support, it is a common practice to apply vendor prefixes to CSS properties and values that require them to work. For instance -webkit-
or -moz-
.
We offer two popular choices: Autoprefixer (which processes your CSS server-side) and -prefix-free (which applies prefixes via a script, client-side).
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.
You can apply CSS to your Pen from any stylesheet on the web. Just put a URL to it here and we'll apply it, in the order you have them, before the CSS in the Pen itself.
If the stylesheet you link to has the file extension of a preprocessor, we'll attempt to process it before applying.
You can also link to another Pen here, and we'll pull the CSS from that Pen and include it. If it's using a matching preprocessor, we'll combine the code before preprocessing, so you can use the linked Pen as a true dependency.
JavaScript preprocessors can help make authoring JavaScript easier and more convenient.
Babel includes JSX processing.
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.
You can apply a script from anywhere on the web to your Pen. Just put a URL to it here and we'll add it, in the order you have them, before the JavaScript in the Pen itself.
If the script you link to has the file extension of a preprocessor, we'll attempt to process it before applying.
You can also link to another Pen here, and we'll pull the JavaScript from that Pen and include it. If it's using a matching preprocessor, we'll combine the code before preprocessing, so you can use the linked Pen as a true dependency.
Search for and use JavaScript packages from npm here. By selecting a package, an import
statement will be added to the top of the JavaScript editor for this package.
Using packages here is powered by Skypack, which makes packages from npm not only available on a CDN, but prepares them for native JavaScript ES6 import
usage.
All packages are different, so refer to their docs for how they work.
If you're using React / ReactDOM, make sure to turn on Babel for the JSX processing.
If active, Pens will autosave every 30 seconds after being saved once.
If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.
If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.
Visit your global Editor Settings.
<!--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 ⭐ ⭐ ⭐ ⭐ ⭐</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 ⭐⭐⭐⭐⭐</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 ⭐ Not so good --> 5 ⭐ 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 }} ⭐</dd>
<dl class="row"></dl>
<dt class="col-sm-5">Math Lesson:</dt>
<dd class="col-sm-7">{{ reviewMathRate }} ⭐</dd>
<dl class="row"></dl>
<dt class="col-sm-5">Science Lesson:</dt>
<dd class="col-sm-7"> {{ reviewScienceRate }} ⭐</dd>
<dt class="col-sm-5">Instrucional Design Lesson:</dt>
<dd class="col-sm-7"> {{ reviewDesignRate }} ⭐</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>
.responsive {
width: 100%;
height: auto;
}
body {
font-family: 'Raleway', sans-serif;
}
td {class="align-middle"}
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
})
},
}
});
Also see: Tab Triggers