diff --git a/src/EventHub.Domain.Shared/Web/EventHubExternalUrls.cs b/src/EventHub.Domain.Shared/Web/EventHubExternalUrls.cs
index 4df9730..e6d8c7a 100644
--- a/src/EventHub.Domain.Shared/Web/EventHubExternalUrls.cs
+++ b/src/EventHub.Domain.Shared/Web/EventHubExternalUrls.cs
@@ -8,6 +8,7 @@ namespace EventHub.Web
public const string EhAdmin = "https://localhost:44307";
public const string EhWww = "https://localhost:44308";
#else
+ // TODO: Change these production links
public const string EhAccount = "https://localhost:44313";
public const string EhApi = "https://localhost:44362";
public const string EhAdmin = "https://localhost:44307";
diff --git a/src/EventHub.Domain/Emailing/EmailTemplateDefinitionProvider.cs b/src/EventHub.Domain/Emailing/EmailTemplateDefinitionProvider.cs
index 77be90e..fc8842e 100644
--- a/src/EventHub.Domain/Emailing/EmailTemplateDefinitionProvider.cs
+++ b/src/EventHub.Domain/Emailing/EmailTemplateDefinitionProvider.cs
@@ -8,7 +8,18 @@ namespace EventHub.Emailing
{
context.Add(
new TemplateDefinition(
- EmailTemplates.EventRegistration
+ EmailTemplates.Layout,
+ isLayout: true
+ ).WithVirtualFilePath(
+ "/Emailing/Templates/Layout.tpl",
+ isInlineLocalized: true
+ )
+ );
+
+ context.Add(
+ new TemplateDefinition(
+ EmailTemplates.EventRegistration,
+ layout: EmailTemplates.Layout
).WithVirtualFilePath(
"/Emailing/Templates/EventRegistration.tpl",
isInlineLocalized: true
@@ -17,7 +28,8 @@ namespace EventHub.Emailing
context.Add(
new TemplateDefinition(
- EmailTemplates.EventReminder
+ EmailTemplates.EventReminder,
+ layout: EmailTemplates.Layout
).WithVirtualFilePath(
"/Emailing/Templates/EventReminder.tpl",
isInlineLocalized: true
@@ -26,7 +38,8 @@ namespace EventHub.Emailing
context.Add(
new TemplateDefinition(
- EmailTemplates.NewEventCreated
+ EmailTemplates.NewEventCreated,
+ layout: EmailTemplates.Layout
).WithVirtualFilePath(
"/Emailing/Templates/NewEventCreated.tpl",
isInlineLocalized: true
@@ -35,7 +48,8 @@ namespace EventHub.Emailing
context.Add(
new TemplateDefinition(
- EmailTemplates.EventTimingChanged)
+ EmailTemplates.EventTimingChanged,
+ layout: EmailTemplates.Layout)
.WithVirtualFilePath(
"/Emailing/Templates/EventTimingChanged.tpl",
isInlineLocalized: true
diff --git a/src/EventHub.Domain/Emailing/EmailTemplates.cs b/src/EventHub.Domain/Emailing/EmailTemplates.cs
index 7add2c5..be07d18 100644
--- a/src/EventHub.Domain/Emailing/EmailTemplates.cs
+++ b/src/EventHub.Domain/Emailing/EmailTemplates.cs
@@ -2,6 +2,8 @@ namespace EventHub.Emailing
{
public static class EmailTemplates
{
+ public const string Layout = "EventHub.Event.Layout";
+
public const string EventRegistration = "EventHub.Event.Registration";
public const string EventReminder = "EventHub.Event.Reminder";
diff --git a/src/EventHub.Domain/Emailing/EventHubEmailTemplateRenderingEngine.cs b/src/EventHub.Domain/Emailing/EventHubEmailTemplateRenderingEngine.cs
new file mode 100644
index 0000000..e36aeec
--- /dev/null
+++ b/src/EventHub.Domain/Emailing/EventHubEmailTemplateRenderingEngine.cs
@@ -0,0 +1,38 @@
+using System;
+using System.Collections.Generic;
+using System.Threading.Tasks;
+using EventHub.Web;
+using JetBrains.Annotations;
+using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Extensions.Localization;
+using Volo.Abp.DependencyInjection;
+using Volo.Abp.TextTemplating;
+
+namespace EventHub.Emailing
+{
+ [Dependency(ServiceLifetime.Transient, ReplaceServices = true)]
+ [ExposeServices(typeof(ITemplateRenderer), typeof(TemplateRenderer), typeof(EventHubEmailTemplateRenderingEngine))]
+ public class EventHubEmailTemplateRenderingEngine : TemplateRenderer
+ {
+ public EventHubEmailTemplateRenderingEngine(ITemplateContentProvider templateContentProvider, ITemplateDefinitionManager templateDefinitionManager, IStringLocalizerFactory stringLocalizerFactory) : base(templateContentProvider, templateDefinitionManager, stringLocalizerFactory)
+ {
+ }
+
+ public override async Task RenderAsync(
+ [NotNull] string templateName,
+ [CanBeNull] object model = null,
+ [CanBeNull] string cultureName = null,
+ [CanBeNull] Dictionary globalContext = null)
+ {
+ if (globalContext == null)
+ {
+ globalContext = new Dictionary();
+ }
+
+ globalContext["current_year"] = DateTime.Today.Year;
+ globalContext["app_url"] = EventHubExternalUrls.EhWww;
+
+ return await base.RenderAsync(templateName, model, cultureName, globalContext);
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/EventHub.Domain/Emailing/Templates/EventRegistration.tpl b/src/EventHub.Domain/Emailing/Templates/EventRegistration.tpl
index c126b4a..0122747 100644
--- a/src/EventHub.Domain/Emailing/Templates/EventRegistration.tpl
+++ b/src/EventHub.Domain/Emailing/Templates/EventRegistration.tpl
@@ -1,157 +1,43 @@
-
-
-
-
-
- Eventhub
-
-
-
-
-
-
-
-
-
-
-
- EventHub
-
-
-
-
-
- {{model.title}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- |
-
- Hi,
-
-
- Great news! You attended the "{{model.title}}" event.
-
-
-
-
-
- |
-
- Start Time
- {{model.start_time}}
- |
-
-
- End Time
- {{model.end_time}}
- |
-
-
-
-
-
- Event Details
-
-
-
-
- Thank you, EventHub
-
- |
-
-
-
-
- |
-
-
-
- |
-
-
-
-
- |
-
-
-
-
-
-
-
- |
-
- |
-
-
- |
-
- |
-
-
-
-
-
-
- |
-
-
-
-
-
-
\ No newline at end of file
+
+ {{model.title}}
+
+ Hi,
+
+ Great news! You attended the "{{model.title}}" event.
+
+
+
+
+
+
+ |
+
+
+ Start Time
+
+ {{model.start_time}}
+ |
+
+
+
+ End Time
+
+ {{model.end_time}}
+ |
+
+
+
+
+
+ Event
+ Details
+
+
+
\ No newline at end of file
diff --git a/src/EventHub.Domain/Emailing/Templates/EventReminder.tpl b/src/EventHub.Domain/Emailing/Templates/EventReminder.tpl
index 75f611e..6092a9e 100644
--- a/src/EventHub.Domain/Emailing/Templates/EventReminder.tpl
+++ b/src/EventHub.Domain/Emailing/Templates/EventReminder.tpl
@@ -1,157 +1,32 @@
-
-
-
-
-
- Eventhub
-
-
-
-
-
-
-
-
-
-
-
- EventHub
-
-
-
-
-
- {{model.title}} event will start soon
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- |
-
- Hi {{model.user_name}},
-
-
- The "{{model.title}}" event will start very soon.
-
-
-
-
-
- |
-
- Start Time
- {{model.start_time}}
- |
-
-
- End Time
- {{model.end_time}}
- |
-
-
-
-
-
- Event Details
-
-
-
-
- Thank you, EventHub
-
- |
-
-
-
-
- |
-
-
-
- |
-
-
-
-
- |
-
-
-
-
-
-
-
- |
-
- |
-
-
- |
-
- |
-
-
-
-
-
-
- |
-
-
-
-
-
-
\ No newline at end of file
+
+ {{model.title}}
+
+ Hi {{model.user_name}},
+
+ The "{{model.title}}" event will start very soon.
+
+
+
+
+
+
+ |
+
+ Start Time
+ {{model.start_time}}
+ |
+
+
+ End Time
+ {{model.end_time}}
+ |
+
+
+
+
+
+ Event Details
+
+
+
\ No newline at end of file
diff --git a/src/EventHub.Domain/Emailing/Templates/EventTimingChanged.tpl b/src/EventHub.Domain/Emailing/Templates/EventTimingChanged.tpl
index 871c34b..2b26aad 100644
--- a/src/EventHub.Domain/Emailing/Templates/EventTimingChanged.tpl
+++ b/src/EventHub.Domain/Emailing/Templates/EventTimingChanged.tpl
@@ -1,157 +1,32 @@
-
-
-
-
-
- Eventhub
-
-
-
-
-
-
-
-
-
-
-
- EventHub
-
-
-
-
-
- {{model.title}} event time has been changed!
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- |
-
- Hi {{model.user_name}},
-
-
- The "{{model.title}}" event time just rescheduled.
-
-
-
-
-
- |
-
- Start Time
- {{model.start_time}}
- |
-
-
- End Time
- {{model.end_time}}
- |
-
-
-
-
-
- Event Details
-
-
-
-
- Thank you, EventHub
-
- |
-
-
-
-
- |
-
-
-
- |
-
-
-
-
- |
-
-
-
-
-
-
-
- |
-
- |
-
-
- |
-
- |
-
-
-
-
-
-
- |
-
-
-
-
-
-
\ No newline at end of file
+
+ {{model.title}}
+
+ Hi {{model.user_name}},
+
+ The "{{model.title}}" event time just rescheduled.
+
+
+
+
+
+
+ |
+
+ Start Time
+ {{model.start_time}}
+ |
+
+
+ End Time
+ {{model.end_time}}
+ |
+
+
+
+
+
+ Event Details
+
+
+
\ No newline at end of file
diff --git a/src/EventHub.Domain/Emailing/Templates/Layout.tpl b/src/EventHub.Domain/Emailing/Templates/Layout.tpl
new file mode 100644
index 0000000..29667ee
--- /dev/null
+++ b/src/EventHub.Domain/Emailing/Templates/Layout.tpl
@@ -0,0 +1,140 @@
+
+
+
+
+
+
+ EventHub Email
+
+
+
+
+
+
+
+ |
+
+ |
+
+
+ |
+
+ |
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/EventHub.Domain/Emailing/Templates/NewEventCreated.tpl b/src/EventHub.Domain/Emailing/Templates/NewEventCreated.tpl
index d8bfd07..fc7be76 100644
--- a/src/EventHub.Domain/Emailing/Templates/NewEventCreated.tpl
+++ b/src/EventHub.Domain/Emailing/Templates/NewEventCreated.tpl
@@ -1,157 +1,32 @@
-
-
-
-
-
- Eventhub
-
-
-
-
-
-
-
-
-
-
-
- EventHub
-
-
-
-
-
- There is a new event that may interest you
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- |
-
- Hi {{model.user_name}},
-
-
- A new event called "{{model.title}}" has been created.
-
-
-
-
-
- |
-
- Start Time
- {{model.start_time}}
- |
-
-
- End Time
- {{model.end_time}}
- |
-
-
-
-
-
- Event Details
-
-
-
-
- Thank you, EventHub
-
- |
-
-
-
-
- |
-
-
-
- |
-
-
-
-
- |
-
-
-
-
-
-
-
- |
-
- |
-
-
- |
-
- |
-
-
-
-
-
-
- |
-
-
-
-
-
-
\ No newline at end of file
+
+ {{model.title}}
+
+ Hi {{model.user_name}},
+
+ A new event called "{{model.title}}" has been created.
+
+
+
+
+
+
+ |
+
+ Start Time
+ {{model.start_time}}
+ |
+
+
+ End Time
+ {{model.end_time}}
+ |
+
+
+
+
+
+ Event Details
+
+
+
\ No newline at end of file
diff --git a/src/EventHub.IdentityServer/Pages/Account/Manage.cshtml b/src/EventHub.IdentityServer/Pages/Account/Manage.cshtml
new file mode 100644
index 0000000..2835b21
--- /dev/null
+++ b/src/EventHub.IdentityServer/Pages/Account/Manage.cshtml
@@ -0,0 +1,46 @@
+@page
+@using Microsoft.AspNetCore.Mvc.Localization
+@using Volo.Abp.Account.Localization
+@using Volo.Abp.Account.Web.Pages.Account
+@using Volo.Abp.AspNetCore.Mvc.UI.Theming
+@inject IThemeManager ThemeManager
+@inject IHtmlLocalizer L
+@model ManageModel
+@{
+ Layout = ThemeManager.CurrentTheme.GetApplicationLayout();
+}
+@section scripts {
+
+}
+
+ @if (!Model.ReturnUrl.IsNullOrWhiteSpace())
+ {
+
+
+
+ @L["ReturnToApplication"]
+
+
+
+ }
+
+
+
+
+
+ @foreach (var group in Model.ProfileManagementPageCreationContext.Groups)
+ {
+
+ @group.DisplayName
+
+ @await Component.InvokeAsync(group.ComponentType, new
+ {
+ parameter = group.Parameter
+ })
+
+ }
+
+
+
+
+
\ No newline at end of file
diff --git a/src/EventHub.IdentityServer/Pages/Index.cshtml b/src/EventHub.IdentityServer/Pages/Index.cshtml
index 282e062..16798a7 100644
--- a/src/EventHub.IdentityServer/Pages/Index.cshtml
+++ b/src/EventHub.IdentityServer/Pages/Index.cshtml
@@ -3,30 +3,35 @@
@using Volo.Abp.Users
@model IndexModel
@inject ICurrentUser CurrentUser
-@if (CurrentUser.IsAuthenticated)
-{
-
-
-
-
- Logout
-
-
- @CurrentUser.UserName
- @CurrentUser.Email
-
-
Roles
@CurrentUser.Roles.JoinAsString(", ")
- Claims
@Html.Raw(CurrentUser.GetAllClaims().Select(c => $"{c.Type}={c.Value}").JoinAsString("
"))
-
-
-
-
-}
+
-@if (!CurrentUser.IsAuthenticated)
-{
-
-}
\ No newline at end of file
+ @if (CurrentUser.IsAuthenticated)
+ {
+
+
+
+
+
+ Logout
+
+
+ @CurrentUser.UserName
+ @CurrentUser.Email
+
+
Roles
@CurrentUser.Roles.JoinAsString(", ")
+ Claims
@Html.Raw(CurrentUser.GetAllClaims().Select(c => $"{c.Type}={c.Value}").JoinAsString("
"))
+
+
+
+
+
+ }
+
+ @if (!CurrentUser.IsAuthenticated)
+ {
+
+ }
+
\ No newline at end of file
diff --git a/src/EventHub.IdentityServer/Pages/Index.cshtml.cs b/src/EventHub.IdentityServer/Pages/Index.cshtml.cs
index 1f015d1..c2ea3e4 100644
--- a/src/EventHub.IdentityServer/Pages/Index.cshtml.cs
+++ b/src/EventHub.IdentityServer/Pages/Index.cshtml.cs
@@ -1,11 +1,13 @@
+using Microsoft.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc.UI.RazorPages;
namespace EventHub.Pages
{
public class IndexModel : AbpPageModel
{
- public void OnGet()
+ public IActionResult OnGet()
{
+ return Redirect("/account/manage");
}
}
}
\ No newline at end of file
diff --git a/src/EventHub.Web.Theme/wwwroot/themes/eventhub/style.css b/src/EventHub.Web.Theme/wwwroot/themes/eventhub/style.css
index a459354..6572a86 100644
--- a/src/EventHub.Web.Theme/wwwroot/themes/eventhub/style.css
+++ b/src/EventHub.Web.Theme/wwwroot/themes/eventhub/style.css
@@ -1,3 +1,8 @@
+:root {
+ --primary: #00044A;
+ --blue: #00044A;
+}
+
body {
font-family: 'Poppins', sans-serif;
line-height: 1.5;
@@ -84,25 +89,31 @@ p {
margin-left: 12px;
transition: color 0.3s ease;
}
- .active .nav-link {
+ .navbar-expand-lg .navbar-nav .active .nav-link {
background-image: url(../../../../assets/underline.svg);
background-repeat: no-repeat;
background-size: inherit;
background-position: center 28px;
color: #df2751 !important;
}
- .nav-link:hover {
+ .navbar-expand-lg .navbar-nav .nav-link:hover {
color: #df2751 !important;
}
}
-
+
.btn {
border-radius: 10px !important;
font-weight: 600;
font-size: 14px;
- padding: 10px 20px;
+ padding: 10px 20px;
+}
+.btn-sm {
+ border-radius: 10px !important;
+ font-weight: 600;
+ font-size: 12px;
+ padding: 8px 16px;
}
.btn-primary {
background-color: #E8345D !important;
@@ -312,7 +323,17 @@ p {
}
.event-thumbnail {
width: 100%;
- height: 200px;
+ height: 220px;
+ background-position: center center;
+ background-repeat: no-repeat;
+ background-size: cover;
+}
+.event-thumbnail-left {
+ width: 100%;
+ height: 220px;
+ background-position: center center;
+ background-repeat: no-repeat;
+ background-size: cover;
}
.profile-content .form-control,
.profile-content .form-select {
@@ -431,7 +452,7 @@ p {
}
footer {
background: #00044A;
- padding: 3.5em 0 2em;
+ padding: 3em 0 3.5em 0;
}
.footer-logo {
color: white;
@@ -880,8 +901,7 @@ div.checkbox.switcher label, div.radio.switcher label {
font-size: 1.05em;
}
-.event .card {
- max-width: 330px;
+.event .card {
margin: 0 auto 34px;
}
diff --git a/src/EventHub.Web/Pages/Events/Components/EventsArea/_eventListSection.cshtml b/src/EventHub.Web/Pages/Events/Components/EventsArea/_eventListSection.cshtml
index 9c0e99a..20d23e6 100644
--- a/src/EventHub.Web/Pages/Events/Components/EventsArea/_eventListSection.cshtml
+++ b/src/EventHub.Web/Pages/Events/Components/EventsArea/_eventListSection.cshtml
@@ -9,11 +9,13 @@
@if (eventDto.CoverImageContent is null)
{
-

+
+
}
else
{
-

+
+
}
diff --git a/src/EventHub.Web/Pages/Events/Components/RegistrationArea/Default.cshtml b/src/EventHub.Web/Pages/Events/Components/RegistrationArea/Default.cshtml
index 622c406..19f7c6d 100644
--- a/src/EventHub.Web/Pages/Events/Components/RegistrationArea/Default.cshtml
+++ b/src/EventHub.Web/Pages/Events/Components/RegistrationArea/Default.cshtml
@@ -3,36 +3,38 @@
@inject IHtmlLocalizer
L
@model EventHub.Web.Pages.Events.Components.RegistrationArea.RegistrationAreaViewComponent.RegistrationAreaViewComponentModel
- @if (Model.IsLoggedIn)
+ @if (Model.IsLoggedIn)
+ {
+ if (Model.IsRegistered)
{
- if (Model.IsRegistered)
- {
-
- }else if (Model.IsPastEvent)
- {
-
- }
- else
- {
-
- }
+
@L["YouAttendedThisEvent"].Value
+
+ }
+ else if (Model.IsPastEvent)
+ {
+
}
else
{
-
@L["LoginToRegister"]
+
}
+ }
+ else
+ {
+
@L["LoginToRegister"]
+ }
diff --git a/src/EventHub.Web/Pages/Events/Detail.cshtml b/src/EventHub.Web/Pages/Events/Detail.cshtml
index ec4066c..e574919 100644
--- a/src/EventHub.Web/Pages/Events/Detail.cshtml
+++ b/src/EventHub.Web/Pages/Events/Detail.cshtml
@@ -52,11 +52,11 @@
@if (Model.Event.CoverImageContent == null)
{
-

+

}
else
{
-

+

}
diff --git a/src/EventHub.Web/Pages/Events/Index.cshtml b/src/EventHub.Web/Pages/Events/Index.cshtml
index ac83167..93ea27f 100644
--- a/src/EventHub.Web/Pages/Events/Index.cshtml
+++ b/src/EventHub.Web/Pages/Events/Index.cshtml
@@ -39,11 +39,9 @@