diff --git a/src/EventHub.Web/Helpers/CoverImageHelper.cs b/src/EventHub.Web/Helpers/CoverImageHelper.cs deleted file mode 100644 index b600439..0000000 --- a/src/EventHub.Web/Helpers/CoverImageHelper.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System; -using System.Linq; -using System.Text; -using Volo.Abp; - -namespace EventHub.Web.Helpers -{ - public class CoverImageHelper - { - private static readonly string[] ImageColors = - { - "linear-gradient(135deg, #41003d 0%, #a10097 100%)", - "linear-gradient(135deg, #163e4b 0%, #297791 100%)", - "linear-gradient(135deg, #660040 0%, #aa006b 100%)", - "linear-gradient(135deg, #240d88 0%, #571fff 100%)", - }; - - public static string GetRandomColor(string articleTitle) - { - long total = articleTitle.Truncate(32).ToCharArray().Sum(c => c); - return ImageColors[total % ImageColors.Length]; - } - - public static string GetContentOfImage(string content) - { - content = Check.NotNullOrWhiteSpace(content, nameof(content)); - - return content.ToUpper(); - } - } -} \ No newline at end of file diff --git a/src/EventHub.Web/Pages/Events/Components/EventsArea/_eventListSection.cshtml b/src/EventHub.Web/Pages/Events/Components/EventsArea/_eventListSection.cshtml index f33630f..e5edbf3 100644 --- a/src/EventHub.Web/Pages/Events/Components/EventsArea/_eventListSection.cshtml +++ b/src/EventHub.Web/Pages/Events/Components/EventsArea/_eventListSection.cshtml @@ -9,13 +9,11 @@
@if (eventDto.CoverImageContent is null) { -
- @CoverImageHelper.GetContentOfImage(eventDto.Title).TruncateWithPostfix(30) -
+ @eventDto.Title } else { - @eventDto.Title + @eventDto.Title }
diff --git a/src/EventHub.Web/Pages/Events/Detail.cshtml b/src/EventHub.Web/Pages/Events/Detail.cshtml index 5967d60..ec4066c 100644 --- a/src/EventHub.Web/Pages/Events/Detail.cshtml +++ b/src/EventHub.Web/Pages/Events/Detail.cshtml @@ -52,15 +52,7 @@
@if (Model.Event.CoverImageContent == null) { -
- - @CoverImageHelper.GetContentOfImage(Model.Event.Title.TruncateWithPostfix(70)) -
- @CoverImageHelper.GetContentOfImage(Model.Event.OrganizationDisplayName.TruncateWithPostfix(80)) -
- @CoverImageHelper.GetContentOfImage(EventDateHelper.GetDateRangeText(Model.Event.StartTime, Model.Event.EndTime)) -
-
+ @Model.Event.Title } else { diff --git a/src/EventHub.Web/Pages/Index.cshtml b/src/EventHub.Web/Pages/Index.cshtml index 95935ee..94ef206 100644 --- a/src/EventHub.Web/Pages/Index.cshtml +++ b/src/EventHub.Web/Pages/Index.cshtml @@ -121,9 +121,7 @@
@if (Model.OnlineEvents[i].CoverImageContent is null) { - + } else { @@ -151,9 +149,7 @@
@if (Model.OnlineEvents[i + 1].CoverImageContent is null) { - + } else { diff --git a/src/EventHub.Web/Pages/Organizations/Components/OrganizationsArea/_organizationListSection.cshtml b/src/EventHub.Web/Pages/Organizations/Components/OrganizationsArea/_organizationListSection.cshtml index 6766bfd..7b94b4a 100644 --- a/src/EventHub.Web/Pages/Organizations/Components/OrganizationsArea/_organizationListSection.cshtml +++ b/src/EventHub.Web/Pages/Organizations/Components/OrganizationsArea/_organizationListSection.cshtml @@ -1,4 +1,3 @@ -@using EventHub.Web.Helpers @model List @foreach (var organization in Model) @@ -7,13 +6,11 @@
@if (organization.ProfilePictureContent == null) { -
- @CoverImageHelper.GetContentOfImage(organization.Name).TruncateWithPostfix(40) -
+ @organization.Name } else { - @organization.Name + @organization.Name }
diff --git a/src/EventHub.Web/Pages/Organizations/Profile.cshtml b/src/EventHub.Web/Pages/Organizations/Profile.cshtml index db26813..56a1452 100644 --- a/src/EventHub.Web/Pages/Organizations/Profile.cshtml +++ b/src/EventHub.Web/Pages/Organizations/Profile.cshtml @@ -1,8 +1,6 @@ @page "/organizations/{name}" @inject IHtmlLocalizer L @using EventHub.Localization -@using EventHub.Web.Helpers -@using EventHub.Web.Pages.Events @using EventHub.Web.Pages.Events.Components.EventsArea @using EventHub.Web.Pages.Organizations.Components.JoinArea @using EventHub.Web.Pages.Organizations.Components.MembersArea @@ -22,13 +20,7 @@
@if (Model.Organization.ProfilePictureContent == null) { -
- - @CoverImageHelper.GetContentOfImage(Model.Organization.DisplayName.TruncateWithPostfix(80)) -
- @CoverImageHelper.GetContentOfImage("EventHub") -
-
+ @Model.Organization.Name } else { diff --git a/src/EventHub.Web/wwwroot/assets/eh-event.png b/src/EventHub.Web/wwwroot/assets/eh-event.png new file mode 100644 index 0000000..b49547e Binary files /dev/null and b/src/EventHub.Web/wwwroot/assets/eh-event.png differ diff --git a/src/EventHub.Web/wwwroot/assets/eh-organization.png b/src/EventHub.Web/wwwroot/assets/eh-organization.png new file mode 100644 index 0000000..f5a2707 Binary files /dev/null and b/src/EventHub.Web/wwwroot/assets/eh-organization.png differ