From 0f2629f0603b3c8f5dddf0747da6916dbf479dc4 Mon Sep 17 00:00:00 2001 From: Michael Date: Thu, 23 Mar 2017 18:08:20 -0400 Subject: Profile work. --- Project-Unite/Views/Profiles/ViewProfile.cshtml | 27 +++++++++++++++++++++++++ Project-Unite/Views/Shared/_Layout.cshtml | 9 ++++++++- 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 Project-Unite/Views/Profiles/ViewProfile.cshtml (limited to 'Project-Unite/Views') diff --git a/Project-Unite/Views/Profiles/ViewProfile.cshtml b/Project-Unite/Views/Profiles/ViewProfile.cshtml new file mode 100644 index 0000000..94ca858 --- /dev/null +++ b/Project-Unite/Views/Profiles/ViewProfile.cshtml @@ -0,0 +1,27 @@ +@model Project_Unite.Models.ApplicationUser +@{ + ViewBag.Title = Model.DisplayName; + ViewBag.Banner = Model.BannerUrl; +} + +
+

+ @if (string.IsNullOrWhiteSpace(Model.FullName)) + { @Model.DisplayName } + else + { + @Model.FullName (@Model.DisplayName)} +

+
+ +
+
+

User stats

+
    +
  • @Model.Codepoints Codepoints
  • +
  • Joined at: @Model.JoinedAt
  • +
  • Posts: @Model.PostCount
  • +
  • Topics: @Model.TopicCount
  • +
+
+
\ No newline at end of file diff --git a/Project-Unite/Views/Shared/_Layout.cshtml b/Project-Unite/Views/Shared/_Layout.cshtml index 932593f..6530022 100644 --- a/Project-Unite/Views/Shared/_Layout.cshtml +++ b/Project-Unite/Views/Shared/_Layout.cshtml @@ -12,7 +12,14 @@ @Scripts.Render("~/bundles/modernizr") - +@{ + string style = ""; + if(ViewBag.Model != null) + { + style = "background-image: url(\"" + ViewBag.Model + "\") cover;"; + } +} + @Scripts.Render("~/Scripts/highlight.js")