Пример #1
0
        async void UpdateBlogpost()
        {
            Octokit.RepositoryContent latest;

            try {
                latest = await Github.LatestBlogpost();
            } catch {
                BlogpostBody.Text = "Failed to fetch blogpost data from GitHub.";
                return;
            }

            BlogpostBody.Text = $"{latest.Content.Replace("\r", "").Split('\n').First().Replace("# ", "").Replace("#", "")}\n" +
                                $" published {DateTimeOffset.FromUnixTimeSeconds(Convert.ToInt64(Path.GetFileNameWithoutExtension(latest.Name))).Humanize()}";

            BlogpostLink.Opacity          = 1;
            BlogpostLink.IsHitTestVisible = true;
        }
Пример #2
0
 async void Blogpost(object sender, PointerReleasedEventArgs e)
 => App.URL($"https://apollo.mat1jaczyyy.com/post/{Path.GetFileNameWithoutExtension((await Github.LatestBlogpost()).Name)}");