From a517053bd16e82111e48b7ee762a6e42e1a2b367 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Sun, 25 Apr 2021 01:55:18 +0300 Subject: [PATCH] Improve the design --- .../Pages/Events/EventDateHelper.cs | 13 + src/EventHub.Web/Pages/Index.cshtml | 316 ++---------------- 2 files changed, 45 insertions(+), 284 deletions(-) diff --git a/src/EventHub.Web/Pages/Events/EventDateHelper.cs b/src/EventHub.Web/Pages/Events/EventDateHelper.cs index 5c4cb9b..891d780 100644 --- a/src/EventHub.Web/Pages/Events/EventDateHelper.cs +++ b/src/EventHub.Web/Pages/Events/EventDateHelper.cs @@ -1,5 +1,6 @@ using System; using System.Text; +using EventHub.Events; namespace EventHub.Web.Pages.Events { @@ -22,5 +23,17 @@ namespace EventHub.Web.Pages.Events return sb.ToString(); } + + public static string GetLocationInfo(EventInListDto eventItem) + { + if (eventItem.IsOnline) + { + return "online"; + } + else + { + return "???"; + } + } } } diff --git a/src/EventHub.Web/Pages/Index.cshtml b/src/EventHub.Web/Pages/Index.cshtml index 028edc8..8799230 100644 --- a/src/EventHub.Web/Pages/Index.cshtml +++ b/src/EventHub.Web/Pages/Index.cshtml @@ -81,262 +81,44 @@

Upcoming Events

-
-
-
- -
-
- -
-
- -
-
-
-
-
- ... -
-
-
-
-
- Mar - 9 -
-
-
-
-
Lorem Connected
- 7 pm - 9 pm | Ankara , Çankaya -

Some quick example text to build on the card title and make up the bulk of the card's content.

-
- Learn More -
-
-
-
-
-
-
-
- ... -
-
-
-
-
- Mar - 9 -
-
-
-
-
Chainlink Connected Smart Contracts Lorem Ipsum
- 7 pm - 9 pm | Ankara , Çankaya -

Some quick example text to build on th content.

-
- Learn More -
-
-
-
-
-
-
-
- ... -
-
-
-
-
- Mar - 9 -
-
-
-
-
Chainlink Connected Smart Contracts
- 7 pm - 9 pm | Ankara , Çankaya -

Some quick example text to build on the card title and make up the bud title and make up e card's content.

-
- Learn More -
-
-
-
-
-
-
-
- ... -
-
-
-
-
- Mar - 9 -
-
-
-
-
Lorem Connected
- 7 pm - 9 pm | Ankara , Çankaya -

Some quick example text to build on the card title and make up the bulk of the card's content.

-
- Learn More -
-
-
-
-
-
-
-
- ... -
-
-
-
-
- Mar - 9 -
-
-
-
-
Chainlink Connected Smart Contracts Lorem Ipsum
- 7 pm - 9 pm | Ankara , Çankaya -

Some quick example text to build on th content.

-
- Learn More -
-
-
-
-
-
-
-
- ... -
-
-
-
-
- Mar - 9 -
-
-
-
-
Chainlink Connected Smart Contracts
- 7 pm - 9 pm | Ankara , Çankaya -

Some quick example text to build on the card title and make up the bud title and make up e card's content.

-
- Learn More -
-
-
-
-
-
-
-
- ... -
-
-
-
-
- Mar - 9 -
-
-
-
-
Lorem Connected
- 7 pm - 9 pm | Ankara , Çankaya -

Some quick example text to build on the card title and make up the bulk of the card's content.

-
- Learn More -
-
-
-
-
-
-
-
- ... -
-
-
-
-
- Mar - 9 -
-
-
-
-
Chainlink Connected Smart Contracts Lorem Ipsum
- 7 pm - 9 pm | Ankara , Çankaya -

Some quick example text to build on th content.

-
- Learn More -
-
-
-
-
-
-
-
- ... -
-
-
-
-
- Mar - 9 -
-
-
-
-
Chainlink Connected Smart Contracts
- 7 pm - 9 pm | Ankara , Çankaya -

Some quick example text to build on the card title and make up the bud title and make up e card's content.

+ @foreach (var eventItem in Model.Events) + { +
+
+ @if (eventItem.CoverImageContent is null) + { + @eventItem.Title + } + else + { + @eventItem.Title + } +
+
+
+
+
+ @eventItem.StartTime.ToString("MMM") + @eventItem.StartTime.Day +
+
+
+
+
@eventItem.Title
+ @eventItem.StartTime.ToString("hh:mm") | @EventDateHelper.GetLocationInfo(eventItem) +

@eventItem.Description.TruncateWithPostfix(100)

+
+ Learn More +
+
- Learn More
-
-
-
+ }
@@ -501,38 +283,4 @@
-
- - -@* -

Upcoming Events

- - - @foreach (var eventItem in Model.Events) - { - - - @if (eventItem.CoverImageContent is null) - { - @eventItem.Title - } - else - { - @eventItem.Title - } - - @eventItem.Title - - @EventDateHelper.GetDateRangeText(eventItem.StartTime, eventItem.EndTime)
- @L["OrganizedBy"] @eventItem.OrganizationDisplayName -
- - @eventItem.Description.TruncateWithPostfix(100) - - @L["SeeEvent"] -
-
-
- } -
-*@ \ No newline at end of file +
\ No newline at end of file