Advertisement
Guest User

Untitled

a guest
Oct 4th, 2015
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.66 KB | None | 0 0
  1. @model EpiServerProject.Models.Blocks.CarouselBlock
  2. <style type="text/css">
  3. .container{
  4. margin-top:10px;
  5. padding-top:10px;
  6.  
  7. }
  8. .container>.carousel{
  9. background:#ffffff;
  10. width: 100% !important;
  11. /* Shows as a border around the carousel */
  12.  
  13. }
  14.  
  15. .carousel-inner > .item > img,
  16. .carousel-inner > .item > a > img {
  17. width: 80% !important;
  18. height: 40% !important;
  19. background:#ffffff;
  20. margin: auto;
  21. }
  22.  
  23.  
  24. .btn {
  25. margin-top:30px;
  26. margin-bottom:10px;
  27. border: 0 none;
  28. border-radius:0;
  29. font-size:20px;
  30. font-weight: 200;
  31. letter-spacing: 1px;
  32. text-transform: uppercase;
  33. }
  34.  
  35.  
  36. .btn-primary {
  37. background: #32ADD6;
  38. color: #ffffff;
  39. }
  40.  
  41. .row{
  42. background:#000000;
  43. }
  44. </style>
  45.  
  46. <div class="container">
  47. <div id="myCarousel" class="carousel slide" data-ride="carousel">
  48. @{
  49. var contentLoader = EPiServer.ServiceLocation.ServiceLocator.Current.GetInstance<EPiServer.IContentLoader>();
  50. }
  51. <!-- Wrapper for carousel items -->
  52. <div class="carousel-inner" role="listbox">
  53. @foreach (var item in Model.Images.Items)
  54. {
  55. var image = contentLoader.Get<EpiServerProject.Models.Media.ImageFile>(item.ContentLink);
  56. if (Model.Images.Items.IndexOf(item)==0)
  57. {
  58. <div class="item active">
  59. <img src="@Url.ContentUrl(image.ContentLink)" alt="@image.Name">
  60. </div>
  61. }
  62. else
  63. {
  64. <div class="item">
  65. <img src="@Url.ContentUrl(image.ContentLink)" alt="@image.Name">
  66. </div>
  67.  
  68. }
  69.  
  70. }
  71. </div>
  72. <!-- Left and right controls -->
  73. <a class="left carousel-control" href="#myCarousel" role="button" data-slide="prev">
  74. <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
  75. </a>
  76. <a class="right carousel-control" href="#myCarousel" role="button" data-slide="next">
  77. <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
  78. </a>
  79. </div>
  80. </div>
  81.  
  82. <div class="row">
  83. <div class="col-md-3 col-md-offset-2">
  84. <button type="button" class="btn btn-primary">STEEL CASTINGS</button>
  85. </div>
  86. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement