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 12KB

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