destruct0

Index

Sep 5th, 2012
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 2.17 KB | None | 0 0
  1. @using PizzaVikiMVC4
  2. @model ProductsNavigationMenusAndPhoneOrders
  3.  
  4. @{
  5.     Layout = "~/Views/Shared/_LayoutPizzas.cshtml";    
  6. }
  7.  
  8. @section Menu{
  9.     <nav>
  10.         <section>
  11.             <article id="menu">
  12.                 <ul>
  13.                     <li>
  14.                         <a href="/Home/Index/" title="Начало" id="Home" target="_self">Начало</a>
  15.                     </li>
  16.                     <li>
  17.                         <a href="/Home/Index/" target="_self">Меню</a>
  18.                         <ul>
  19.                             @foreach (var navMenu in Model.NavigationMenus)
  20.                             {
  21.                                 <li><a href="@navMenu.Link" title="@navMenu.Title" id="pici" target="_self">@navMenu.Text</a></li>
  22.                             }
  23.                         </ul>
  24.                     </li>
  25.                     <li>
  26.                         <a href="/Contacts/Contacts/" title="Контакти" id="Contacts" target="_self">Контакти</a>
  27.                     </li>
  28.                 </ul>
  29.             </article>
  30.         </section>
  31.     </nav>
  32. }
  33.  
  34.  
  35.     <article>                          
  36.         <table>
  37.             @{const int PizzasOnRow = 3;}
  38.             @{int currentPizzaIndex = 0;}
  39.            
  40.             @while (currentPizzaIndex < Model.Products.Count)
  41.            {
  42.                
  43.                 <tr>
  44.                     @for (int i = 0; i < PizzasOnRow; i++)
  45.                    {                    
  46.                         <td>
  47.                             <fieldset style="background: url('@Model.Products[currentPizzaIndex].BackgroundImagePath')">
  48.                                 <legend>
  49.                                     @Model.Products[currentPizzaIndex].Name
  50.                                 </legend>
  51.                                 <div class="product_ingredients">
  52.                                     @Model.Products[currentPizzaIndex].Ingredients
  53.                                 </div>
  54.                             </fieldset>
  55.                         </td>
  56.                    
  57.                         currentPizzaIndex++;
  58.  
  59.                         if (currentPizzaIndex >= Model.Products.Count)
  60.                         {
  61.                             return;
  62.                         }
  63.                     }
  64.                 </tr>
  65.             }
  66.         </table>                       
  67.     </article>
  68.  
  69. @section Footer
  70. {
  71.     <footer class="clear">
  72.         <div class="footertext">
  73.             <b><i>&copy; 2012 Пицария Вики</i></b>
  74.         </div>
  75.     </footer>
  76. }
Advertisement
Add Comment
Please, Sign In to add comment