Skip to content

Commit

Permalink
Added inline calendly pages
Browse files Browse the repository at this point in the history
  • Loading branch information
tsIgov committed Feb 1, 2024
1 parent 01131f4 commit d6952cb
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Byteology.Website/Company/ContactsPage.razor
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
@using Byteology.Website.Inquiry
@using Byteology.Website.Layout

<Metadata Title="Contacts"
<Metadata Title="Schedule a Meeting"
Description="Don't hesitate to schedule a meeting at your convenience, specifying your preferred time and duration."
Keywords="@(new string[] { "contacts", "contact us" })" />
Keywords="@(new string[] { "schedule", "meeting" })" />

<DefaultInquiryComponent />
10 changes: 10 additions & 0 deletions src/Byteology.Website/Company/ScheduleMeeting.razor
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
@page "/schedule-meeting/{link}"

@layout BasicLayout

<Metadata Title="Schedule a Meeting"
Description="Don't hesitate to schedule a meeting at your convenience, specifying your preferred time and duration."
Keywords="@(new string[] { "schedule", "meeting" })" />


<div id="calendly-embed" class="w-full h-[50rem]"></div>
19 changes: 19 additions & 0 deletions src/Byteology.Website/Company/ScheduleMeeting.razor.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
namespace Byteology.Website.Company;

using Microsoft.JSInterop;

public partial class ScheduleMeeting : ComponentBase
{
[Inject]
private IJSRuntime _jsRuntimeAsync { get; set; } = default!;
private IJSInProcessRuntime _jsRuntime => (IJSInProcessRuntime)_jsRuntimeAsync;

[Parameter]
public string Link { get; set; } = null!;

protected override void OnAfterRender(bool firstRender)
{
string link = $"https://calendly.com/tsvetan-igov/{Link}?background_color=090326&text_color=ffffff&primary_color=573ce2";
_jsRuntime.InvokeVoid("initCalendly", link);
}
}
1 change: 1 addition & 0 deletions src/Byteology.Website/wwwroot/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<div id="app"></div>
<script src="js/layout.js"></script>
<script src="js/articles.js"></script>
<script src="js/calendly.js"></script>
<script src="_framework/blazor.webassembly.js"></script>
<script src="https://assets.calendly.com/assets/external/widget.js" type="text/javascript" async></script>
</body>
Expand Down
6 changes: 6 additions & 0 deletions src/Byteology.Website/wwwroot/js/calendly.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
window.initCalendly = (link) => {
Calendly.initInlineWidget({
url: "https://calendly.com/tsvetan-igov/" + link + "?background_color=090326&text_color=ffffff&primary_color=573ce2",
parentElement: document.getElementById('calendly-embed')
});
}

0 comments on commit d6952cb

Please sign in to comment.