-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0480ff8
commit 447db91
Showing
531 changed files
with
9,264 additions
and
0 deletions.
There are no files selected for viewing
60 changes: 60 additions & 0 deletions
60
website/PureBlazor.com/PureBlazor.com.Client/ContactForm.razor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
@inject ILogger<Index> Logger | ||
@inject IJSRuntime JS | ||
@* @inject ServerClient ServerClient *@ | ||
|
||
<EditForm FormName="Newsletter" Model="@Model" OnSubmit="@OnPostAsync" class="sm:max-w-xl lg:mx-0"> | ||
<DataAnnotationsValidator /> | ||
<ValidationSummary /> | ||
@if (MessageSent) | ||
{ | ||
<p class="text-gray-300 mt-sm-4 mt-3">You're in - we will let you know when we launch.</p> | ||
} | ||
else | ||
{ | ||
<div class="sm:flex"> | ||
<div class="min-w-0 flex-1"> | ||
<label for="email" class="sr-only">Email address</label> | ||
<input id="email" type="email" @bind-value="Model!.EmailAddress" placeholder="Enter your email" class="block w-full rounded-md border-0 px-4 py-3 text-base text-gray-900 placeholder-gray-500 focus:outline-none focus:ring-2 focus:ring-cyan-400 focus:ring-offset-2 focus:ring-offset-gray-900 bg-white"> | ||
</div> | ||
<div class="mt-3 sm:ml-3 sm:mt-0"> | ||
<button disabled="@Loading" type="submit" class="block w-full rounded-md bg-gradient-to-r from-brand-600 to-brand-500 px-4 py-3 font-medium text-white shadow hover:from-brand-700 hover:to-brand-600 focus:outline-none focus:ring-2 focus:ring-brand-400 focus:ring-offset-2 focus:ring-offset-gray-900">@(Loading ? "Loading..." : "Join")</button> | ||
</div> | ||
</div> | ||
<p class="mt-3 text-sm text-gray-300 sm:mt-4">We have a no spam policy. You'll only get the really important emails.</p> | ||
} | ||
</EditForm> | ||
|
||
@code { | ||
[SupplyParameterFromForm] | ||
public NewsletterForm? Model { get; set; } | ||
protected override void OnInitialized() => Model ??= new(); | ||
|
||
public bool MessageSent { get; set; } | ||
public bool Loading { get; set; } | ||
public async Task OnPostAsync() | ||
{ | ||
Loading = true; | ||
await SendEmail(); | ||
MessageSent = true; | ||
Loading = false; | ||
|
||
try | ||
{ | ||
await JS.InvokeVoidAsync("trackNewsletter"); | ||
} | ||
catch (Exception ex) | ||
{ | ||
Logger.LogWarning(ex, "Failed to send tracking for newsletter"); | ||
} | ||
} | ||
|
||
private async Task SendEmail() | ||
{ | ||
if (Model == null) | ||
{ | ||
return; | ||
} | ||
|
||
//await ServerClient.AddToNewsletter(Model); | ||
} | ||
} |
417 changes: 417 additions & 0 deletions
417
website/PureBlazor.com/PureBlazor.com.Client/Editor/Razor.cs
Large diffs are not rendered by default.
Oops, something went wrong.
87 changes: 87 additions & 0 deletions
87
website/PureBlazor.com/PureBlazor.com.Client/Editor/RazorScopes.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
namespace PureBlazor.com.Client.Editor; | ||
|
||
public static class RazorScopes | ||
{ | ||
public const string RazorDirective = ScopeName.HtmlTagDelimiter;//"razor.directive"; | ||
public const string BlazorComponent = "blazor.component"; | ||
public const string RazorSyntax = "razor.syntax"; | ||
public const string HtmlTagDelimiter = "html.tag.delimiter"; | ||
public const string HtmlElementName = "html.element.name"; | ||
public const string HtmlAttributeName = "html.attribute.name"; | ||
public const string HtmlAttributeValue = "html.attribute.value"; | ||
public const string HtmlOperator = "html.operator"; | ||
public const string HtmlEntity = "html.entity"; | ||
public const string HtmlComment = "html.comment"; | ||
public const string LanguagePrefix = "language.prefix"; | ||
public const string RazorCodeBlock = "razor.code.block"; | ||
} | ||
|
||
public class ScopeName | ||
{ | ||
public const string ClassName = "Class Name"; | ||
public const string Comment = "Comment"; | ||
public const string CssPropertyName = "CSS Property Name"; | ||
public const string CssPropertyValue = "CSS Property Value"; | ||
public const string CssSelector = "CSS Selector"; | ||
public const string HtmlAttributeName = "HTML Attribute ScopeName"; | ||
public const string HtmlAttributeValue = "HTML Attribute Value"; | ||
public const string HtmlComment = "HTML Comment"; | ||
public const string HtmlElementName = "HTML Element ScopeName"; | ||
public const string HtmlEntity = "HTML Entity"; | ||
public const string HtmlOperator = "HTML Operator"; | ||
public const string HtmlServerSideScript = "HTML Server-Side Script"; | ||
public const string HtmlTagDelimiter = "Html Tag Delimiter"; | ||
public const string JsonKey = "Json Key"; | ||
public const string JsonString = "Json String"; | ||
public const string JsonNumber = "Json Number"; | ||
public const string JsonConst = "Json Const"; | ||
public const string Keyword = "Keyword"; | ||
public const string LanguagePrefix = "&"; | ||
public const string PlainText = "Plain Text"; | ||
public const string PowerShellAttribute = "PowerShell Attribute"; | ||
public const string PowerShellOperator = "PowerShell Operator"; | ||
public const string PowerShellType = "PowerShell Type"; | ||
public const string PowerShellVariable = "PowerShell Variable"; | ||
public const string PowerShellCommand = "PowerShell Command"; | ||
public const string PowerShellParameter = "PowerShell Parameter"; | ||
public const string PreprocessorKeyword = "Preprocessor Keyword"; | ||
public const string SqlSystemFunction = "SQL System Function"; | ||
public const string String = "String"; | ||
public const string StringCSharpVerbatim = "String (C# @ Verbatim)"; | ||
public const string XmlAttribute = "XML Attribute"; | ||
public const string XmlAttributeQuotes = "XML Attribute Quotes"; | ||
public const string XmlAttributeValue = "XML Attribute Value"; | ||
public const string XmlCDataSection = "XML CData Section"; | ||
public const string XmlComment = "XML Comment"; | ||
public const string XmlDelimiter = "XML Delimiter"; | ||
public const string XmlDocComment = "XML Doc Comment"; | ||
public const string XmlDocTag = "XML Doc Tag"; | ||
public const string XmlName = "XML Name"; | ||
public const string Type = "Type"; | ||
public const string TypeVariable = "Type Variable"; | ||
public const string NameSpace = "Name Space"; | ||
public const string Constructor = "Constructor"; | ||
public const string Predefined = "Predefined"; | ||
public const string PseudoKeyword = "Pseudo Keyword"; | ||
public const string StringEscape = "String Escape"; | ||
public const string ControlKeyword = "Control Keyword"; | ||
public const string Number = "Number"; | ||
public const string Operator = "Operator"; | ||
public const string Delimiter = "Delimiter"; | ||
public const string MarkdownHeader = "Markdown Header"; | ||
public const string MarkdownCode = "Markdown Code"; | ||
public const string MarkdownListItem = "Markdown List Item"; | ||
public const string MarkdownEmph = "Markdown Emphasized"; | ||
public const string MarkdownBold = "Markdown Bold"; | ||
public const string BuiltinFunction = "Built In Function"; | ||
public const string BuiltinValue = "Built In Value"; | ||
public const string Attribute = "Attribute"; | ||
public const string SpecialCharacter = "Special Character"; | ||
public const string Intrinsic = "Intrinsic"; | ||
public const string Brackets = "Brackets"; | ||
public const string Continuation = "Continuation"; | ||
|
||
public const string MethodName = "Method Name"; | ||
public const string MethodCall = "Method Call"; | ||
public const string MethodParameter = "Method Parameter"; | ||
} |
6 changes: 6 additions & 0 deletions
6
website/PureBlazor.com/PureBlazor.com.Client/Editor/RazorStyleDictionary.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
namespace PureBlazor.com.Client.Editor; | ||
|
||
public class RazorStyleDictionary : StyleDictionary | ||
{ | ||
|
||
} |
Oops, something went wrong.