The next generation of the Teknik Services. Written in ASP.NET. https://www.teknik.io/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Index.cshtml 10KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255
  1. @model Teknik.Areas.Home.ViewModels.HomeViewModel
  2. @using Teknik.Areas.Blog.Models
  3. @using Teknik.Areas.Podcast.Models
  4. @using Teknik.Helpers
  5. @{
  6. string logoPath = "/Images/logo-blue.svg";
  7. // If we are using a CDN, let's replace it
  8. if (Model.Config.UseCdn)
  9. {
  10. if (!string.IsNullOrEmpty(Model.Config.CdnHost))
  11. {
  12. logoPath = Model.Config.CdnHost.TrimEnd('/') + logoPath;
  13. }
  14. }
  15. }
  16. @Styles.Render("~/Content/home")
  17. <div class="container">
  18. <div class="row">
  19. <img src="@logoPath" class="img-responsive center-block" alt="Teknik">
  20. </div>
  21. <br />
  22. <div class="row text-center">
  23. <h2>
  24. We provide these services to help those who try to innovate.
  25. </h2>
  26. </div>
  27. </div>
  28. <br />
  29. <div class="container">
  30. <div class="row">
  31. <a href="@Url.SubRouteUrl("upload", "Upload.Index")">
  32. <div class="col-md-3 text-center">
  33. <br />
  34. <i class="fa fa-lock fa-5x"></i>
  35. <div class="caption">
  36. <h3>Encrypted File Uploads</h3>
  37. </div>
  38. </div>
  39. </a>
  40. <a href="@Url.SubRouteUrl("paste", "Paste.Index")">
  41. <div class="col-md-3 text-center">
  42. <br />
  43. <i class="fa fa-code fa-5x"></i>
  44. <div class="caption">
  45. <h3>Clean Pastebin</h3>
  46. </div>
  47. </div>
  48. </a>
  49. <a href="@Url.SubRouteUrl("podcast", "Podcast.Index")">
  50. <div class="col-md-3 text-center">
  51. <br />
  52. <i class="fa fa-microphone fa-5x"></i>
  53. <div class="caption">
  54. <h3>Technical Podcasts</h3>
  55. </div>
  56. </div>
  57. </a>
  58. <a href="@Url.SubRouteUrl("help", "Help.Mumble")">
  59. <div class="col-md-3 text-center">
  60. <br />
  61. <i class="fa fa-comments fa-5x"></i>
  62. <div class="caption">
  63. <h3>Mumble Server</h3>
  64. </div>
  65. </div>
  66. </a>
  67. </div>
  68. </div>
  69. <br />
  70. <br />
  71. <br />
  72. <div class="container">
  73. <div class="row">
  74. <div class="col-sm-12">
  75. <div class="panel panel-default">
  76. <div class="panel-heading text-center">
  77. <h2><a href="@Url.SubRouteUrl("user", "User.Register")">Sign Up</a> for free and get access to these features and more!</h2>
  78. </div>
  79. <br />
  80. <div class="panel-body">
  81. <a href="@Url.SubRouteUrl("help", "Help.Mail")">
  82. <div class="col-md-3 text-center">
  83. <br />
  84. <i class="fa fa-at fa-5x"></i>
  85. <div class="caption">
  86. <h3>Free Email</h3>
  87. </div>
  88. </div>
  89. </a>
  90. <a href="@Url.SubRouteUrl("git", "Git.Index")">
  91. <div class="col-md-3 text-center">
  92. <br />
  93. <i class="fa fa-git fa-5x"></i>
  94. <div class="caption">
  95. <h3>Unlimited Git Repositories</h3>
  96. </div>
  97. </div>
  98. </a>
  99. <a href="@Url.SubRouteUrl("blog", "Blog.Blog")">
  100. <div class="col-md-3 text-center">
  101. <br />
  102. <i class="fa fa-book fa-5x"></i>
  103. <div class="caption">
  104. <h3>Personal Blog</h3>
  105. </div>
  106. </div>
  107. </a>
  108. <a href="@Url.SubRouteUrl("user", "User.Index")">
  109. <div class="col-md-3 text-center">
  110. <br />
  111. <i class="fa fa-sitemap fa-5x"></i>
  112. <div class="caption">
  113. <h3>Service Logs</h3>
  114. </div>
  115. </div>
  116. </a>
  117. </div>
  118. </div>
  119. </div>
  120. </div>
  121. </div>
  122. <br />
  123. <br />
  124. <div class="container">
  125. <!-- Display Site News -->
  126. <div class="col-sm-4">
  127. <div class="panel panel-default">
  128. <div class="panel-heading">
  129. <h3 class="panel-title text-center">Recent News</h3>
  130. </div>
  131. <div class="panel-body">
  132. <ul class="list-group">
  133. @if (Model.SitePosts.Any())
  134. {
  135. foreach (BlogPost post in Model.SitePosts)
  136. {
  137. <li class="list-group-item">
  138. <div class="row">
  139. <div class="col-sm-12">
  140. <div class="blog-post-sm">
  141. <h2 class="blog-post-title-sm text-left">
  142. <a href="@Url.SubRouteUrl("blog", "Blog.Post", new { username = post.Blog.User.Username, id = post.BlogPostId })" id="title_@post.BlogPostId">@Html.Markdown(post.Title)</a>
  143. </h2>
  144. <p class="blog-post-meta-sm text-left text-muted">
  145. Posted on <time datetime="@post.DatePosted.ToString("o")">@post.DatePosted.ToString("MMMM dd, yyyy")</time>
  146. </p>
  147. </div>
  148. </div>
  149. </div>
  150. </li>
  151. }
  152. }
  153. else
  154. {
  155. <li class="list-group-item">
  156. <div class="row">
  157. <div class="col-sm-12 text-center">
  158. <h4>No News Available</h4>
  159. </div>
  160. </div>
  161. </li>
  162. }
  163. </ul>
  164. </div>
  165. </div>
  166. </div>
  167. <!-- Display Recent Podcasts -->
  168. <div class="col-sm-4">
  169. <div class="panel panel-default">
  170. <div class="panel-heading">
  171. <h3 class="panel-title text-center">Recent Podcasts</h3>
  172. </div>
  173. <div class="panel-body">
  174. <ul class="list-group">
  175. @if (Model.Podcasts.Any())
  176. {
  177. foreach (Podcast podcast in Model.Podcasts)
  178. {
  179. <li class="list-group-item">
  180. <div class="row">
  181. <div class="col-sm-12">
  182. <div class="blog-post-sm">
  183. <h2 class="blog-post-title-sm text-left">
  184. <a href="@Url.SubRouteUrl("podcast", "Podcast.View", new { episode = podcast.Episode })" id="title_@podcast.PodcastId">@Html.Markdown(podcast.Title)</a>
  185. </h2>
  186. <p class="blog-post-meta-sm text-left text-muted">
  187. Posted on <time datetime="@podcast.DatePosted.ToString("o")">@podcast.DatePosted.ToString("MMMM dd, yyyy")</time>
  188. </p>
  189. </div>
  190. </div>
  191. </div>
  192. </li>
  193. }
  194. }
  195. else
  196. {
  197. <li class="list-group-item">
  198. <div class="row">
  199. <div class="col-sm-12 text-center">
  200. <h4>No Podcasts Available</h4>
  201. </div>
  202. </div>
  203. </li>
  204. }
  205. </ul>
  206. </div>
  207. </div>
  208. </div>
  209. <!-- Display Recent Blog Posts -->
  210. <div class="col-sm-4">
  211. <div class="panel panel-default">
  212. <div class="panel-heading">
  213. <h3 class="panel-title text-center">Recent Blog Posts</h3>
  214. </div>
  215. <div class="panel-body">
  216. <ul class="list-group">
  217. @if (Model.BlogPosts.Any())
  218. {
  219. foreach (BlogPost post in Model.BlogPosts)
  220. {
  221. <li class="list-group-item">
  222. <div class="row">
  223. <div class="col-sm-12">
  224. <div class="blog-post-sm">
  225. <h2 class="blog-post-title-sm text-left"><a href="@Url.SubRouteUrl("blog", "Blog.Post", new { username = post.Blog.User.Username, id = post.BlogPostId })" id="title_@post.BlogPostId">@Html.Markdown(post.Title)</a>
  226. </h2>
  227. <p class="blog-post-meta-sm text-left text-muted">
  228. Posted on <time datetime="@post.DatePosted.ToString("o")">@post.DatePosted.ToString("MMMM dd, yyyy")</time> by <a href="@Url.SubRouteUrl("user", "User.Index", new { username = post.Blog.User.Username })">@post.Blog.User.Username</a>
  229. </p>
  230. </div>
  231. </div>
  232. </div>
  233. </li>
  234. }
  235. }
  236. else
  237. {
  238. <li class="list-group-item">
  239. <div class="row">
  240. <div class="col-sm-12 text-center">
  241. <h4>No Posts Available</h4>
  242. </div>
  243. </div>
  244. </li>
  245. }
  246. </ul>
  247. </div>
  248. </div>
  249. </div>
  250. </div>