|
| 1 | +@using PetrSvihlik.Com.Models.ContentTypes |
| 2 | +@using PetrSvihlik.Com.Models.ViewModels |
| 3 | +@model ProjectsViewModel |
| 4 | +@{ |
| 5 | + ViewData["SiteMetadata"] = Model.Metadata; |
| 6 | + ViewData["Author"] = Model.Author; |
| 7 | + ViewBag.Title = $"Projects - {Model.Metadata.Title}"; |
| 8 | + ViewBag.PageType = "page"; |
| 9 | +} |
| 10 | +@await Html.PartialAsync("Shared/Sidebar/_Sidebar", Model.Sidebar) |
| 11 | +<div class="content"> |
| 12 | + <div class="content__inner"> |
| 13 | + <div class="page"> |
| 14 | + <h1 class="page__title">Projects</h1> |
| 15 | + <div class="page__body"> |
| 16 | + <div class="projects"> |
| 17 | + @foreach (var project in Model.Projects) |
| 18 | + { |
| 19 | + <div class="project-tile"> |
| 20 | + <div class="project-tile__header"> |
| 21 | + @if (!string.IsNullOrEmpty(project.Logo)) |
| 22 | + { |
| 23 | + <img src="@project.Logo" alt="@project.Title logo" class="project-tile__logo"> |
| 24 | + } |
| 25 | + <div> |
| 26 | + <h2 class="project-tile__name"> |
| 27 | + <a href="@project.GitHubUrl" target="_blank" rel="noopener noreferrer">@project.Title</a> |
| 28 | + </h2> |
| 29 | + <p class="project-tile__description">@project.Description</p> |
| 30 | + </div> |
| 31 | + </div> |
| 32 | + @if (!string.IsNullOrEmpty(project.ContentHtml)) |
| 33 | + { |
| 34 | + <div class="project-tile__highlights"> |
| 35 | + @Html.Raw(project.ContentHtml) |
| 36 | + </div> |
| 37 | + } |
| 38 | + @if (!string.IsNullOrEmpty(project.Repo)) |
| 39 | + { |
| 40 | + <div class="project-tile__actions"> |
| 41 | + <a class="github-button" href="@project.GitHubUrl" data-icon="octicon-star" data-size="large" aria-label="Star @project.Repo on GitHub">Star</a> |
| 42 | + <a class="github-button" href="@project.GitHubUrl/fork" data-icon="octicon-repo-forked" data-size="large" aria-label="Fork @project.Repo on GitHub">Fork</a> |
| 43 | + <a href="@project.GitHubUrl" class="project-tile__link" target="_blank" rel="noopener noreferrer">View on GitHub →</a> |
| 44 | + </div> |
| 45 | + } |
| 46 | + </div> |
| 47 | + } |
| 48 | + </div> |
| 49 | + <script async defer src="https://buttons.github.io/buttons.js"></script> |
| 50 | + </div> |
| 51 | + </div> |
| 52 | + </div> |
| 53 | +</div> |
0 commit comments