Advertisement
Guest User

Untitled

a guest
Aug 1st, 2017
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 1.10 KB | None | 0 0
  1. // _Layout.cshtml
  2.  
  3.  
  4. <!DOCTYPE html>
  5. <html>
  6. <head>
  7.     <title>@ViewBag.Title</title>
  8.     <link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" />
  9.     <script src="@Url.Content("~/Scripts/jquery-1.4.4.min.js")" type="text/javascript"></script>
  10. </head>
  11.  
  12. <body>
  13.     <div id="page">
  14.         <div id="sidebar">
  15.             @Html.Partial("_Sidebar")
  16.         </div>
  17.         <div id="content">
  18.             @RenderBody()
  19.         </div>
  20.     </div>
  21. </body>
  22. </html>
  23.  
  24.  
  25. // Index.cshtml
  26.  
  27.  
  28. @model IEnumerable<pBlog.Models.ImageGroup>
  29.  
  30. @{
  31.     ViewBag.Title = "pBlog Index";
  32. }
  33.  
  34. @foreach (var item in Model)
  35. {
  36. <div class="post clearfix">
  37.     <div class="date">
  38.         <span class="month">@string.Format("{0:MMM}", item.Time)</span>
  39.         <span class="day">@item.Time.Day</span>
  40.         <span class="year">@item.Time.Year</span>
  41.     </div>
  42.     @foreach (var image in item.Images)
  43.     {
  44.     <a title="@image.Caption" href="@Url.Action("Details", new { id = image.Id })">
  45.         <img class="thumbnail" alt="@image.Caption" src="@image.Path" />
  46.     </a>
  47.     }
  48. </div>
  49. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement