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 includes JSX processing.

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


Add Packages

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.


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 >

  <div ng-app="recipeBoxApp" ng-controller="recipeBoxCtrl">

    <h4 class="pull-right"><a href="" target="_blank">Watch tutorial</a></h4>
 <div class="container">
  <!-- Row is devided in the list of recipes and add a new one -->
  <div class="row">
   <!-- Left - list with edit/delete-->
   <div class="col-xs-8">
    <ul class="collapsible" data-collapsible="accordion">
     <li ng-repeat="recipe in recipeList | filter track by $index">
      <div class="collapsible-header">{{recipe.title}}</div>
      <div class="collapsible-body">
       <div class="recipeBtn">
        <button ng-click="editRecipe($index)">Edit</button>
        <button ng-click="deleteRecipe($index)">Delete</button>

   <!-- Right - add recipe -->
   <div class="col-xs-4">
    <div class="card">
     <div class="card-content">
      New recipe
      <form ng-submit="addRecipe()">
       <div class="input-field">
        <input type="text" ng-model="newRecipe" placeholder="Name">
       <div class="input-field">
        <input type="text" ng-model="newIngredients" placeholder="Ingredients (Seperate by commas)">
       <button type="submit">Add</button>
   </div> <!-- column -->
  </div> <!-- row -->
    <!-- Footer-->
		<div class="row">
			<div class="col-xs-12">
				<div class="tableFooter">
				  <!-- for footer -->
      <div class="col-xs-6">
      <h5><a href="" target="_blank">Eleftheria</a> | <a href="" target="_blank">Projects</a> | <a href="" target="_blank"> Coding videos </a></h5>
      <!-- social media -->
      <div class="col-xs-6 text-primary">
        <a href="" target="_blank">
     <img class="footerSvg"src="" 
      style="text-align:center" alt="twitter"> 
         <a href="" target="_blank">
     <img class="footerSvg" src="" 
      style="text-align:center" alt="github"> 
        <a href="" target="_blank">
     <img class="footerSvg" src="" 
       style="text-align:center" alt="youtube"> 
    <!-- end footer -->
    <!-- end of Footer -->
 </div> <!--container -->
</div> <!-- app -->



  box-sizing: border-box;
  background: url( center no-repeat;
  background-size: cover;
  min-height: 100vh; //vertical height
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  font-family: Arial;
*, *:before, *:after {box-sizing: inherit;}

  background-color: rgba(130,138,117,0.7);
  color: black;

.recipeBtn {
 padding-top: 20px;

  background: black;
  border-radius: 50%;
  color: white;
  font-size: 1.2em;
  button{color: black}

h5, h4{background-color: lightblue}

  margin-top: 150px;
  width: 32px;


                var app = angular.module('recipeBoxApp', [])
 .controller('recipeBoxCtrl', function($scope) {
  // Create the initial recipe list from local storage. 
 $scope.saved = localStorage.getItem('_msecrist_recipebox');
  // If localstorage has a value for my key, grab that. If not, create a new local storage item.
	$scope.recipeList = (localStorage.getItem('_msecrist_recipebox')!==null) ? JSON.parse($scope.saved) : [{
   title: "Pizza",
   ingredients: "Cheese, Ham, Tomato"
  }, {
   title: "Ice-cream",
   ingredients: "Milk, Chocolate, Sugar"
  }, {
   title: "Cheesecake",
   ingredients: "Milk, cream, buscuits, sugar"
  }, {
   title: "Cake",
   ingredients: "Milk, eggs, vanilla, chocolate"
  // This could probably be in a function on its own, with how many times its called. But its just one line so I didn't bother.
	localStorage.setItem('_msecrist_recipebox', JSON.stringify($scope.recipeList));

  //Allow a user to add a recipe.
  $scope.addRecipe = function() {
   if ($scope.newRecipe != null && $scope.newIngredients != null) {
    //Push the recipe to the array of recipes, and then save that to localstorage.
     title: $scope.newRecipe,
     ingredients: $scope.newIngredients
    localStorage.setItem('_msecrist_recipebox', JSON.stringify($scope.recipeList));
    $scope.newRecipe = null;
    $scope.newIngredients = null;

  //Allow a user to delete a recipe.
  $scope.deleteRecipe = function(index) {
   //Show confirm alert box, and when user confirms, it cuts the recipe out of the array and then updates localstorage.
   if (confirm("This recipe is going to be deleted")) {
    $scope.recipeList.splice(index, 1)
    localStorage.setItem('_msecrist_recipebox', JSON.stringify($scope.recipeList));
  //Edit a recipe
  $scope.editRecipe = function(index) {
   //Grab the recipe by the index of the array and then display the recipe's ingredients in a prompt.
   //That allows the user to change ingredients. If they hit cancel, it returns a null response, so check for that.
   var ingredients = $scope.recipeList[index].ingredients
   var result = prompt("Edit the ingredients: ", ingredients)
   if(result != null){
    $scope.recipeList[index].ingredients = result;
    localStorage.setItem('_msecrist_recipebox', JSON.stringify($scope.recipeList));


//jQuery for Collapsible area