@page @model ConferenceModel @using System.Net @using static ConferenceModel @{ int tagFormat; switch (Request.Query["c"]) { case "36c3": tagFormat = 2; break; case "35c3": case "34c3": tagFormat = 1; break; case "33c3": tagFormat = 0; break; default: Response.Redirect("/"); return; } c3stream.UpdateCookie(Request, Response, $"/Conference?c={Request.Query["c"]}&"); ViewData["Title"] = Request.Query["c"]; var wc = new WebClient(); var jsonpath = System.IO.Path.Combine(c3stream.DataPath, Request.Query["c"] + ".json"); var json = System.IO.File.Exists(jsonpath) ? System.IO.File.ReadAllText(jsonpath) : wc.DownloadString($"https://api.media.ccc.de/public/conferences/{Request.Query["c"]}"); var conference = Conference.FromJson(json); wc.Dispose(); }
Event | @Html.Raw(Request.Query["orderby"] == "published" ? $"Published" : $"Date") | Category | Title | Speaker(s) | Lang | Actions | ||
---|---|---|---|---|---|---|---|---|
@Html.Raw(eventName) | @(Request.Query["orderby"] == "published" ? talk.ReleaseDate?.Date.ToShortDateString() : talk.Date?.Date.ToShortDateString()) | @category | @if (isWatched) {@talk.Title | } else if (isMarked) {@talk.Title | } else {@talk.Title | }@talk.Persons.Aggregate((s, s1) => $"{s}, {s1}") | @talk.OriginalLanguage |