Pen Settings



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


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


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.


                <div id="appRoot">
<!-- Start App -->

<div class="container">
  <div class="col-md-6 col-md-offset-3">
	  	<h3>{{ title.taskList }}</h3>
	   <ul class="list-group tasklistPane" >
			<li class="list-group-item" v-for="(task,index) in tasks" v-show="task.completed != true">
				<input type="checkbox" :id="'incompleted-task-id-' + index " v-model="task.completed"> <label :for="'incompleted-task-id-' + index ">{{task.description}}</label>
				<div class="btn-group pull-right">
					<button class="btn btn-success btn-xs" @click="editTaskIndex = index"><i class="fa fa-pencil" aria-hidden="true"></i></button>
					<button class="btn btn-danger btn-xs" @click="deleteTask(index)"><i class="fa fa-trash-o" aria-hidden="true"></i></button>
		   <li class="list-group-item" v-if="editTaskIndex < 0">
		   		<input type="text" class="form-control" placeholder="Type and hit enter" ref="newTask" @keyup.enter="addTask">
		   <li class="list-group-item" v-if="editTaskIndex > -1">
			   <div class="has-success">
			   		<input type="text" class="form-control" placeholder="Exit and hit enter" v-model="tasks[editTaskIndex].description" @keyup.enter="editTaskIndex = -1 , edited()" @keyup.enter="edited">


		<!-- Completed tasks -->
		<div v-if="completeTasks.length > 0">
			<h3>{{ title.completedTasks }}</h3>
		   <ul class="list-group" >
				<li class="list-group-item" v-for="(task,index) in completeTasks">
					<input type="checkbox" :id="'completed-task-id-' + index " v-model="task.completed"> <label :for="'completed-task-id-' + index ">{{task.description}}</label>

  </div><!-- .col-md-6.col-md-offset-3 -->
</div><!-- .container -->


<!-- End App -->
</div><!-- #appRoot -->


	background-color: #ECF0F1;
	min-height: 100vh;
		padding-top: 95px;	
// Stacked Paper Effect
// Source:
    /* The top layer shadow */
    0 1px 1px rgba(0,0,0,0.15),
    /* The second layer */
    0 10px 0 -5px #eee,
    /* The second layer shadow */
    0 10px 1px -4px rgba(0,0,0,0.15),
     /* The third layer */
    0 20px 0 -10px #eee,
    /* The third layer shadow */
    0 20px 1px -9px rgba(0,0,0,0.15);


                new Vue({
			taskList: 'Task List',
			completedTasks: 'Completed Tasks'
		tasks: [
			{ description: "Take out trash", completed: false },
			{ description: "Read newspaper", completed: false },
			{ description: "Practice guitar", completed: false },
			{ description: "Do the dishes", completed: false },
			{ description: "Walk the dog", completed: false },
			{ description: "Clean the bathroom", completed: false },
		editTaskIndex: -1
			this.tasks.push({description: this.$refs.newTask.value , completed: false});
			this.$refs.newTask.value = '';

			toastr.success('New task added to the task list !!!')

			toastr.error('Task deleted');
			toastr.success('Task updated !!!')
	computed: {
		// incompleteTasks: function(){
		// 	return this.tasks.filter( rayhan =>  !rayhan.completed );
		// },
		completeTasks: function(){
			return this.tasks.filter( task =>  task.completed );