templates/index.html.twig line 1

Open in your IDE?
  1. {% extends 'base.html.twig' %}
  2. {% block title %}CookNChefs{% endblock %}
  3. {% block body %}
  4.     {% if (1==0) %}
  5.         <table class="table table-striped">
  6.             <thead>
  7.                 <tr>
  8.                     <th>Article Title</th>
  9.                     <th>Actions</th>
  10.                 </tr>
  11.             </thead>
  12.             <tbody>
  13.                 <tr>
  14.                     <td>Hello</td>
  15.                     <td>Hi</td>
  16.                 </tr>
  17.             </tbody>
  18.         </table>
  19.     {% else %}
  20.         
  21.     <head>
  22.         <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
  23.         <!--<script src="http://code.jquery.com/jquery-1.7.2.min.js"></script>-->
  24.         <!--
  25.         <script src="http://code.jquery.com/ui/1.8.21/jquery-ui.min.js"></script>
  26.         <script src="https://raw.githubusercontent.com/furf/jquery-ui-touch-punch/master/jquery.ui.touch-punch.min.js"></script>
  27.         <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
  28.         <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js"></script>
  29.         <script src="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>
  30.         <script src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui-touch-punch/0.2.3/jquery.ui.touch-punch.min.js"></script>
  31.         -->
  32.         <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
  33.         <script src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script>
  34.         <script src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui-touch-punch/0.2.2/jquery.ui.touch-punch.min.js"></script>
  35.         <script src="CookpotHelper.js?v=3.0"></script>
  36.         <link rel="stylesheet" type="text/css" href="css/Layout.css">
  37.         <link rel="stylesheet" type="text/css" href="Home.css?v=2.6">
  38.         <meta name="viewport" content="width=device-width, initial-scale=1">
  39.         <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
  40.         <!--
  41.         <link rel="stylesheet" type="text/css" href="Bootstrap/css/bootstrap.css" >
  42.         <script src="Bootstrap/js/bootstrap.js" > </script>
  43.         -->
  44.         
  45.         <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
  46.         
  47.         <script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
  48.         <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script>
  49.         
  50.         
  51.         <!--
  52.         <script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script>
  53.         <script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
  54.         <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script>
  55.         -->
  56.         <style>
  57.             .main-body {
  58.                 margin:0px;
  59.                 height:2000px;
  60.                 background-color:#fcf2e6;
  61.             }
  62.             .container {
  63.                 padding-top: 250px;
  64.             }
  65.         </style>
  66.         <script>
  67.             /*
  68.             $(function() {
  69.                 $('#draggable').draggable();
  70.             });
  71.             */
  72.         /*
  73.         $( function() {
  74.             $( "#div1" ).droppable({
  75.                 drop: function( event, ui ) {
  76.                     $( this )
  77.                         .addClass( "isDropped" )
  78.                         .html( "Dropped!" );
  79.                     }
  80.                 });
  81.             });
  82.         });
  83.         */
  84.         $( function() {
  85.             //$( "#draggable" ).draggable();
  86.             $( ".droppable-area" ).droppable({
  87.             /*
  88.             drop: function( event, ui ) {
  89.                 $( this )
  90.                 .addClass( "ui-state-highlight" )
  91.                 .find( "p" )
  92.                     .html( "Dropped!" );
  93.             }
  94.             */
  95.             });
  96.         } );
  97.         </script>
  98.         
  99.     </head>
  100.     <body class="main-body">
  101.         <!--Header-->
  102.         <?php
  103.             include_once("Header.php");
  104.         ?>
  105.         <!--
  106.         <nav class="navbar navbar-expand-lg navbar-light bg-light">
  107.             <div class="collapse navbar-collapse" id="navbarText">
  108.                 <ul class="navbar-nav mr-auto">
  109.                 <li class="nav-item active">
  110.                     <a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a>
  111.                 </li>
  112.                 <li class="nav-item">
  113.                     <a class="nav-link" href="#">Features</a>
  114.                 </li>
  115.                 <li class="nav-item">
  116.                     <a class="nav-link" href="#">Pricing</a>
  117.                 </li>
  118.                 </ul>
  119.                 <span class="navbar-text">
  120.                 Navbar text with an inline element
  121.                 </span>
  122.             </div>
  123.         </nav>
  124.         -->
  125.         
  126.         {% include('header.html.twig') %}
  127.         
  128.         <div class="entire-panel">
  129.             <div class="panel-row">
  130.                 <div class="col-sm-6 col-md-6">
  131.                     <recipes-panel></recipes-panel>
  132.                 </div>
  133.                 <div class="col-sm-6 col-md-6">
  134.                     <cook-pot></cook-pot>
  135.                 </div>
  136.             </div>
  137.         </div>
  138.         <!--Footer-->
  139.         <?php
  140.             include_once("Footer.php");
  141.         ?>
  142.         
  143.         <script>
  144.             /*
  145.             function allowDrop(ev) {
  146.                 console.log("allow drop", ev);
  147.                 ev.preventDefault();
  148.             }
  149.             function drag(ev) {
  150.                 console.log("drag", ev);
  151.                 ev.dataTransfer.setData("text", ev.target.id);
  152.             }
  153.             function drop(ev) {
  154.                 console.log("drop", ev);
  155.                 ev.preventDefault();
  156.                 //var data = ev.dataTransfer.getData("text");
  157.                 //console.log(data);
  158.                 console.log("drop event");
  159.                 console.log(ev);
  160.                 console.log(ev.toElement.id);
  161.                 var data = ev.toElement.id;
  162.                 console.log(data);
  163.                 if(ev.target.tagName == "IMG") {
  164.                     console.log("image");
  165.                     console.log(document.getElementById(data));
  166.                     ev.target.parentNode.appendChild(document.getElementById(data));
  167.                 } else {
  168.                     console.log("else case");
  169.                     var myData = document.getElementById(data);
  170.                     console.log(myData);
  171.                     console.log(myData.style);
  172.                     //myData.style = "";
  173.                     myData.style.left = "";
  174.                     myData.style.top = "";
  175.                     console.log(myData.style);
  176.                     ev.target.appendChild(document.getElementById(data));
  177.                 }
  178.                 document.getElementById("hiddenIngredients").value = "something";
  179.                 var evt = new Event('change');
  180.                 document.getElementById("hiddenIngredients").dispatchEvent(evt)
  181.             }
  182.             */
  183.             
  184.             /*
  185.             function dropToGroup(ev) {
  186.                 ev.preventDefault();
  187.                 var data = ev.dataTransfer.getData("text");
  188.                 console.log(data);
  189.                 console.log(document.getElementById(data));
  190.                 ev.target.appendChild(document.getElementById(data));
  191.                 document.getElementById("hiddenIngredients").value = "something";
  192.                 var evt = new Event('change');
  193.                 document.getElementById("hiddenIngredients").dispatchEvent(evt)
  194.             }
  195.             */
  196.         </script>
  197.     </body>
  198.     {% endif %}
  199. {% endblock %}