Browse Source

Set the name of the GetTitle method in the CoverImageHelper class to GetContentOfImage

pull/41/head
Berkan Sasmaz 5 years ago
parent
commit
f4d41a1090
  1. 7
      src/EventHub.Web/Helpers/CoverImageHelper.cs
  2. 2
      src/EventHub.Web/Pages/Events/Components/EventsArea/_eventListSection.cshtml
  3. 4
      src/EventHub.Web/Pages/Index.cshtml
  4. 2
      src/EventHub.Web/Pages/Organizations/Components/OrganizationsArea/_organizationListSection.cshtml

7
src/EventHub.Web/Helpers/CoverImageHelper.cs

@ -1,5 +1,6 @@
using System;
using System.Linq;
using System.Text;
using Volo.Abp;
namespace EventHub.Web.Helpers
@ -20,11 +21,11 @@ namespace EventHub.Web.Helpers
return ImageColors[total % ImageColors.Length];
}
public static string GetTitle(string title)
public static string GetContentOfImage(string content)
{
title = Check.NotNullOrWhiteSpace(title, nameof(title));
content = Check.NotNullOrWhiteSpace(content, nameof(content));
return title.ToUpper();
return content.ToUpper();
}
}
}

2
src/EventHub.Web/Pages/Events/Components/EventsArea/_eventListSection.cshtml

@ -10,7 +10,7 @@
@if (eventDto.CoverImageContent is null)
{
<div class="rounded list-span text-center" style="background: @(CoverImageHelper.GetRandomColor(eventDto.Title))">
<span>@CoverImageHelper.GetTitle(eventDto.Title).TruncateWithPostfix(40)</span>
<span>@CoverImageHelper.GetContentOfImage(eventDto.Title).TruncateWithPostfix(30)</span>
</div>
}
else

4
src/EventHub.Web/Pages/Index.cshtml

@ -122,7 +122,7 @@
@if (Model.OnlineEvents[i].CoverImageContent is null)
{
<div class="rounded carousel-list-span text-center" style="background: @(CoverImageHelper.GetRandomColor(@Model.OnlineEvents[i].Title))">
<small>@CoverImageHelper.GetTitle(Model.OnlineEvents[i].Title).TruncateWithPostfix(30)</small>
<small>@CoverImageHelper.GetContentOfImage(Model.OnlineEvents[i].Title).TruncateWithPostfix(30)</small>
</div>
}
else
@ -152,7 +152,7 @@
@if (Model.OnlineEvents[i + 1].CoverImageContent is null)
{
<div class="rounded carousel-list-span text-center" style="background: @(CoverImageHelper.GetRandomColor(@Model.OnlineEvents[i + 1].Title))">
<small>@CoverImageHelper.GetTitle(Model.OnlineEvents[i + 1].Title).TruncateWithPostfix(30)</small>
<small>@CoverImageHelper.GetContentOfImage(Model.OnlineEvents[i + 1].Title).TruncateWithPostfix(30)</small>
</div>
}
else

2
src/EventHub.Web/Pages/Organizations/Components/OrganizationsArea/_organizationListSection.cshtml

@ -8,7 +8,7 @@
@if (organization.ProfilePictureContent == null)
{
<div class="rounded list-span text-center" style="background: @(CoverImageHelper.GetRandomColor(organization.Name))">
<span>@CoverImageHelper.GetTitle(organization.Name).TruncateWithPostfix(40)</span>
<span>@CoverImageHelper.GetContentOfImage(organization.Name).TruncateWithPostfix(40)</span>
</div>
}
else

Loading…
Cancel
Save