diff --git a/src/EventHub.Web/EventHubWebModule.cs b/src/EventHub.Web/EventHubWebModule.cs index e8e10d2..8cb4e06 100644 --- a/src/EventHub.Web/EventHubWebModule.cs +++ b/src/EventHub.Web/EventHubWebModule.cs @@ -134,6 +134,7 @@ namespace EventHub.Web options.Conventions.AuthorizePage("/Events/Edit"); options.Conventions.AuthorizePage("/Organizations/New"); options.Conventions.AuthorizePage("/Organizations/Edit"); + options.Conventions.AuthorizePage("/Pricing"); }); } diff --git a/src/EventHub.Web/Pages/Pricing.cshtml b/src/EventHub.Web/Pages/Pricing.cshtml new file mode 100644 index 0000000..edda5e7 --- /dev/null +++ b/src/EventHub.Web/Pages/Pricing.cshtml @@ -0,0 +1,130 @@ +@page +@using EventHub.Localization +@using EventHub.Organizations +@using Microsoft.AspNetCore.Mvc.Localization +@using Microsoft.Extensions.Options +@model EventHub.Web.Pages.Pricing +@inject IOptionsSnapshot> OrganizationPlanInfoOptionsSnapshot +@inject IHtmlLocalizer L + +@section styles { + +} + +
+
+ +

+ Pricing plans +

+
+ Choose the best plan that fits your needs +
+ +
+ +
+
+
Normal
+
+
+ $ + 0 + / year +
+
+

1 Organization

+

2 Events

+

No ads

+
+
+
+ Default +
+
+ + @*TODO: Multiple plans are not supported at this time.*@ + @foreach (var plan in OrganizationPlanInfoOptionsSnapshot.Value.Where(x => x.IsActive)) + { +
+
+
@plan.PlanType
+
+
+ $ + @plan.Price + / year +
+
+

1 Organization

+

2 Events

+

No ads

+
+
+
+ + @if (Model.Organization.IsPremium) + { + Current Plan + } + else + { + Buy Now + } +
+
+ } +
+ +

Frequently Asked Questions

+ +
+
+ +
Dapibus ac facilisis in?
+

+ Lorem ipsum dolor sit amet, ius virtute suscipit te. Ius prima euismod consequat eu. +

+ +
Cras justo odio?
+

+ Etiam vivendo eu sea, purto ponderum mediocritatem at pro. +

+ +
Porta ac consectetur ac?
+

+ Iuvaret deleniti vulputate nec ne, id vix lucilius legendos deseruisse. +

+ +
Ne ornatus albucius ius?
+

+ Lorem ipsum dolor sit amet, mea in pertinax hendrerit gloriatur. +

+ +
+
+ +
Ne ornatus albucius ius?
+

+ Lorem ipsum dolor sit amet, mea in pertinax hendrerit gloriatur. +

+ +
Quo insolens intellegam dissentiet at?
+

+ Ex fugit legimus fuisset per. Ex quidam option diceret ius. +

+ +
Ad his assum delenit blandit?
+

+ Ne ornatus albucius ius, nostrum dignissim repudiandae an usu. +

+ +
Dapibus ac facilisis in?
+

+ Lorem ipsum dolor sit amet, ius virtute suscipit te. Ius prima euismod consequat eu. +

+ +
+
+
+
\ No newline at end of file diff --git a/src/EventHub.Web/Pages/Pricing.cshtml.cs b/src/EventHub.Web/Pages/Pricing.cshtml.cs new file mode 100644 index 0000000..c7b47f0 --- /dev/null +++ b/src/EventHub.Web/Pages/Pricing.cshtml.cs @@ -0,0 +1,37 @@ +using System.Threading.Tasks; +using EventHub.Organizations; +using Microsoft.AspNetCore.Mvc; +using Volo.Abp.Authorization; + +namespace EventHub.Web.Pages +{ + public class Pricing : EventHubPageModel + { + [BindProperty(SupportsGet = true)] + public string OrganizationName { get; set; } + + public OrganizationProfileDto Organization { get; private set; } + + private readonly IOrganizationAppService _organizationAppService; + + public Pricing(IOrganizationAppService organizationAppService) + { + _organizationAppService = organizationAppService; + } + + public async Task OnGetAsync() + { + Organization = await _organizationAppService.GetProfileAsync(OrganizationName); + + if (CurrentUser.UserName != Organization.OwnerUserName) + { + throw new AbpAuthorizationException(); + } + } + + public async Task OnPostAsync() + { + + } + } +} \ No newline at end of file diff --git a/src/EventHub.Web/Pages/Pricing.css b/src/EventHub.Web/Pages/Pricing.css new file mode 100644 index 0000000..c92dad1 --- /dev/null +++ b/src/EventHub.Web/Pages/Pricing.css @@ -0,0 +1,41 @@ +.pricing-table{ + margin: 0; + font-size: .894rem; + font-weight: 400; + line-height: 1.47; + color: #4E5155; + text-align: left; +} + +.display-3 { + font-size: 3rem; + font-weight: 300; + line-height: 1.1; +} + +.font-weight-bold { + font-weight: 700 !important; +} + +.row-bordered>.col::after, .row-bordered>[class^="col-"]::after, .row-bordered>[class*=" col-"]::after, .row-bordered>[class^="col "]::after, .row-bordered>[class*=" col "]::after, .row-bordered>[class$=" col"]::after, .row-bordered>[class="col"]::after { + content: ""; + position: absolute; + top: 0; + bottom: 0; + left: -1px; + display: block; + width: 0; + border-left: 1px solid rgba(24,28,33,0.06); +} + + .ui-bordered { + border: 1px solid rgba(24,28,33,0.06); +} + +.row-bordered { + overflow: hidden; +} + +html:not([dir=rtl]) .mb-4, html:not([dir=rtl]) .my-4 { + margin-bottom: 1.5rem !important; +} \ No newline at end of file