diff --git a/website/PureBlazor.com/PureBlazor.com.Client/ContactForm.razor b/website/PureBlazor.com/PureBlazor.com.Client/ContactForm.razor new file mode 100644 index 0000000..4a6322f --- /dev/null +++ b/website/PureBlazor.com/PureBlazor.com.Client/ContactForm.razor @@ -0,0 +1,60 @@ +@inject ILogger Logger +@inject IJSRuntime JS +@* @inject ServerClient ServerClient *@ + + + + + @if (MessageSent) + { +

You're in - we will let you know when we launch.

+ } + else + { +
+
+ + +
+
+ +
+
+

We have a no spam policy. You'll only get the really important emails.

+ } +
+ +@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); + } +} diff --git a/website/PureBlazor.com/PureBlazor.com.Client/Editor/Razor.cs b/website/PureBlazor.com/PureBlazor.com.Client/Editor/Razor.cs new file mode 100644 index 0000000..812c642 --- /dev/null +++ b/website/PureBlazor.com/PureBlazor.com.Client/Editor/Razor.cs @@ -0,0 +1,417 @@ +using System.Text.RegularExpressions; + +namespace PureBlazor.com.Client.Editor; +public static class LanguageId +{ + public const string Asax = "asax"; + public const string Ashx = "ashx"; + public const string Aspx = "aspx"; + public const string AspxCs = "aspx(c#)"; + public const string CSharp = "c#"; + public const string FSharp = "f#"; + public const string Html = "html"; + public const string JavaScript = "javascript"; + public const string Json = "json"; + public const string PowerShell = "powershell"; + public const string Sql = "sql"; + public const string Xml = "xml"; + public const string Markdown = "markdown"; + public const string Razor = "razor"; +} +public class CSharp : ILanguage +{ + public string Id => LanguageId.CSharp; + + public string Name => "C#"; + + public string CssClassName => "csharp"; + + public string FirstLinePattern => null; + + public IList Rules => new List + { + // new LanguageRule( + // @"//.*?$", + // new Dictionary { { 0, RazorScopes.HtmlComment } }), + // new LanguageRule( + // @"/\*.*?\*/", + // new Dictionary { { 0, RazorScopes.HtmlComment } }), + // new LanguageRule( + // @"'[^\n]*?'", + // new Dictionary { { 0, RazorScopes.HtmlAttributeValue } }), + // new LanguageRule( + // @"(?s)"".*?""", + // new Dictionary { { 0, RazorScopes.HtmlAttributeValue } }), + // new LanguageRule( + // @"\b([0-9]+(\.[0-9]+)?|0x[a-f0-9]+)\b", + // new Dictionary { { 0, RazorScopes.HtmlEntity } }), + // new LanguageRule( + // @"\b(bool|byte|char|decimal|double|float|int|long|sbyte|short|uint|ulong|ushort|void|object|string|class|enum|struct|public|private|internal|protected|static|readonly|sealed|const|event|explicit|extern|implicit|in|out|override|virtual|abstract|interface|new|operator|partial|unsafe|fixed|volatile)\b", + // new Dictionary { { 0, RazorScopes.RazorDirective } }), + new LanguageRule( + @"/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+/", + new Dictionary + { + { 0, ScopeName.Comment }, + }), + new LanguageRule( + @"(///)(?:\s*?(<[/a-zA-Z0-9\s""=]+>))*([^\r\n]*)", + new Dictionary + { + { 1, ScopeName.XmlDocTag }, + { 2, ScopeName.XmlDocTag }, + { 3, ScopeName.XmlDocComment }, + }), + new LanguageRule( + @"(//.*?)\r?$", + new Dictionary + { + { 1, ScopeName.Comment } + }), + new LanguageRule( + @"'[^\n]*?(? + { + { 0, ScopeName.String } + }), + new LanguageRule( + @"(?s)@""(?:""""|.)*?""(?!"")", + new Dictionary + { + { 0, ScopeName.StringCSharpVerbatim } + }), + new LanguageRule( + @"(?s)(""[^\n]*?(? + { + { 0, ScopeName.String } + }), + new LanguageRule( + @"\[(assembly|module|type|return|param|method|field|property|event):[^\]""]*(""[^\n]*?(? + { + { 1, ScopeName.Keyword }, + { 2, ScopeName.String } + }), + new LanguageRule( + @"^\s*(\#define|\#elif|\#else|\#endif|\#endregion|\#error|\#if|\#line|\#pragma|\#region|\#undef|\#warning).*?$", + new Dictionary + { + { 1, ScopeName.PreprocessorKeyword } + }), + new LanguageRule( + @"\b(abstract|as|ascending|base|bool|break|by|byte|case|catch|char|checked|class|const|continue|decimal|default|delegate|descending|do|double|dynamic|else|enum|equals|event|explicit|extern|false|finally|fixed|float|for|foreach|from|get|goto|group|if|implicit|in|int|into|interface|internal|is|join|let|lock|long|namespace|new|null|object|on|operator|orderby|out|override|params|partial|private|protected|public|readonly|ref|return|sbyte|sealed|select|set|short|sizeof|stackalloc|static|string|struct|switch|this|throw|true|try|typeof|uint|ulong|unchecked|unsafe|ushort|using|var|virtual|void|volatile|where|while|yield|async|await|warning|disable)\b", + new Dictionary + { + { 1, ScopeName.Keyword } + }), + new LanguageRule( + @"\b[0-9]{1,}\b", + new Dictionary + { + { 0, ScopeName.Number } + }), + + // return types + new LanguageRule( + @"\b(\w+)\s+(?=\w+\s*\()", + new Dictionary { { 0, ScopeName.Type } }), + new LanguageRule( + @"\b(\w+)\s+(?=\w+\s*\{)", + new Dictionary { { 0, ScopeName.Type } }), + + // method names + new LanguageRule( + @"(?<=\b\w+\s+)\w+(?=\s*\()", + new Dictionary { { 0, ScopeName.MethodName } }), + + // method type parameters + new LanguageRule( + @"(?<=\()\b\w+(?=\s+\w)", + new Dictionary { { 0, ScopeName.MethodParameter } }), + + new LanguageRule( + @"(?<=\.)\b\w+(?=\s*\()", + new Dictionary { { 0, ScopeName.MethodCall } }), + }; + + public bool HasAlias(string lang) + { + switch (lang.ToLower()) + { + case "cs": + case "csharp": + return true; + default: + return false; + } + } + + public override string ToString() => Name; +} +public class CaptureRule +{ + public int Index { get; set; } + public string Scope { get; set; } + public LanguageRule Rule { get; set; } +} + +/// +/// Defines how ColorCode will parse the source code of a given language. +/// +public interface ILanguage +{ + /// + /// Gets the identifier of the language (e.g., csharp). + /// + string Id { get; } + + /// + /// Gets the first line pattern (regex) to use when determining if the language matches a source text. + /// + string FirstLinePattern { get; } + + /// + /// Gets the "friendly" name of the language (e.g., C#). + /// + string Name { get; } + + /// + /// Gets the collection of language rules in the language. + /// + IList Rules { get; } + + /// + /// Get the CSS class name to use for a language + /// + string CssClassName { get; } + + /// + /// Returns true if the specified string is an alias for the language + /// + bool HasAlias(string lang); +} + +public class Razor : ILanguage + { + public string Id + { + get { return LanguageId.Razor; } + } + + public string Name + { + get { return "razor"; } + } + + public string CssClassName + { + get { return "razor"; } + } + + public string FirstLinePattern + { + get + { + return null; + } + } + + public IList Rules + { + get + { + return new List + { + new LanguageRule( + @"@([A-Za-z_][A-Za-z0-9_]*)(\s+)?", + new Dictionary + { + { 0, RazorScopes.RazorDirective }, + }), + new LanguageRule( + @"<([A-Za-z_][A-Za-z0-9_]*)(\s+)?", + new Dictionary + { + { 0, RazorScopes.BlazorComponent }, + }), + new LanguageRule( + @"@([A-Za-z_][A-Za-z0-9_]*)(\s+)?", + new Dictionary + { + { 0, RazorScopes.RazorSyntax }, + }), + new LanguageRule( + @"\", + new Dictionary + { + { 0, RazorScopes.HtmlComment }, + }), + new LanguageRule( + @"(?i)()", + new Dictionary + { + { 1, RazorScopes.HtmlTagDelimiter }, + { 2, RazorScopes.HtmlElementName }, + { 3, RazorScopes.HtmlAttributeName }, + { 4, RazorScopes.HtmlAttributeValue }, + { 5, RazorScopes.HtmlTagDelimiter } + }), + new LanguageRule( + @"(?xis)(<) + (script) + (?: + [\s\n]+([a-z0-9-_]+)[\s\n]*(=)[\s\n]*([^\s\n""']+?) + |[\s\n]+([a-z0-9-_]+)[\s\n]*(=)[\s\n]*(""[^\n]+?"") + |[\s\n]+([a-z0-9-_]+)[\s\n]*(=)[\s\n]*('[^\n]+?') + |[\s\n]+([a-z0-9-_]+) )* + [\s\n]* + (>) + (.*?) + ()", + new Dictionary + { + { 1, RazorScopes.HtmlTagDelimiter }, + { 2, RazorScopes.HtmlElementName }, + { 3, RazorScopes.HtmlAttributeName }, + { 4, RazorScopes.HtmlOperator }, + { 5, RazorScopes.HtmlAttributeValue }, + { 6, RazorScopes.HtmlAttributeName }, + { 7, RazorScopes.HtmlOperator }, + { 8, RazorScopes.HtmlAttributeValue }, + { 9, RazorScopes.HtmlAttributeName }, + { 10, RazorScopes.HtmlOperator }, + { 11, RazorScopes.HtmlAttributeValue }, + { 12, RazorScopes.HtmlAttributeName }, + { 13, RazorScopes.HtmlTagDelimiter }, + { 14, string.Format("{0}{1}", RazorScopes.LanguagePrefix, LanguageId.JavaScript) }, + { 15, RazorScopes.HtmlTagDelimiter }, + { 16, RazorScopes.HtmlElementName }, + { 17, RazorScopes.HtmlTagDelimiter }, + }), + new LanguageRule( + @"(?xis)()", + new Dictionary + { + { 1, RazorScopes.HtmlTagDelimiter }, + { 2, RazorScopes.HtmlElementName }, + { 3, RazorScopes.HtmlTagDelimiter }, + { 4, RazorScopes.HtmlElementName }, + { 5, RazorScopes.HtmlAttributeName }, + { 6, RazorScopes.HtmlOperator }, + { 7, RazorScopes.HtmlAttributeValue }, + { 8, RazorScopes.HtmlAttributeName }, + { 9, RazorScopes.HtmlOperator }, + { 10, RazorScopes.HtmlAttributeValue }, + { 11, RazorScopes.HtmlAttributeName }, + { 12, RazorScopes.HtmlOperator }, + { 13, RazorScopes.HtmlAttributeValue }, + { 14, RazorScopes.HtmlAttributeName }, + { 15, RazorScopes.HtmlTagDelimiter } + }), + new LanguageRule( + @"(?i)&\#?[a-z0-9]+?;", + new Dictionary + { + { 0, RazorScopes.HtmlEntity } + }), + + // new LanguageRule( + // @"(?s)@code\s*\{.*?\}", + // new Dictionary + // { + // { 0, RazorScopes.RazorCodeBlock }, + // }, + // matches => + // { + // var csharpRules = csharp.Rules.SelectMany(rule => + // rule.Captures.Select(capture => new CaptureRule + // { + // Index = capture.Key, + // Scope = capture.Value, + // Rule = rule + // })).ToList(); + // + // foreach (Match match in matches) + // { + // foreach (var captureRule in csharpRules) + // { + // var capture = match.Captures[captureRule.Index]; + // if (capture.Length > 0) + // { + // captureRule.Rule.Captures[captureRule.Index] = RazorScopes.RazorCodeBlock + "." + captureRule.Scope; + // } + // } + // } + // }) + }; + } + } + + public bool HasAlias(string lang) + { + switch (lang.ToLower()) + { + case "htm": + return true; + + default: + return false; + } + } + + public override string ToString() + { + return Name; + } + } + +/// +/// Defines a single rule for a language. For instance a language rule might define string literals for a given language. +/// +public class LanguageRule +{ + /// + /// Initializes a new instance of the class. + /// + /// The regular expression that defines what the language rule matches and captures. + /// The scope indices and names of the regular expression's captures. + public LanguageRule(string regex, + IDictionary captures, Action matchesAction = null) + { + ArgumentException.ThrowIfNullOrEmpty(regex); + ArgumentNullException.ThrowIfNull(captures); + if (captures.Count == 0) + { + throw new ArgumentException("captures is empty"); + } + + Regex = regex; + Captures = captures; + this.MatchesAction = matchesAction; + + } + + /// + /// Gets the regular expression that defines what the language rule matches and captures. + /// + /// The regular expression that defines what the language rule matches and captures. + public string Regex { get; private set; } + /// + /// Gets the scope indices and names of the regular expression's captures. + /// + /// The scope indices and names of the regular expression's captures. + public IDictionary Captures { get; private set; } + + public Action MatchesAction { get; private set; } + +} diff --git a/website/PureBlazor.com/PureBlazor.com.Client/Editor/RazorScopes.cs b/website/PureBlazor.com/PureBlazor.com.Client/Editor/RazorScopes.cs new file mode 100644 index 0000000..059289e --- /dev/null +++ b/website/PureBlazor.com/PureBlazor.com.Client/Editor/RazorScopes.cs @@ -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"; + } diff --git a/website/PureBlazor.com/PureBlazor.com.Client/Editor/RazorStyleDictionary.cs b/website/PureBlazor.com/PureBlazor.com.Client/Editor/RazorStyleDictionary.cs new file mode 100644 index 0000000..617b469 --- /dev/null +++ b/website/PureBlazor.com/PureBlazor.com.Client/Editor/RazorStyleDictionary.cs @@ -0,0 +1,6 @@ +namespace PureBlazor.com.Client.Editor; + +public class RazorStyleDictionary : StyleDictionary +{ + +} diff --git a/website/PureBlazor.com/PureBlazor.com.Client/Editor/TailwindStyleDictionary.cs b/website/PureBlazor.com/PureBlazor.com.Client/Editor/TailwindStyleDictionary.cs new file mode 100644 index 0000000..d76f157 --- /dev/null +++ b/website/PureBlazor.com/PureBlazor.com.Client/Editor/TailwindStyleDictionary.cs @@ -0,0 +1,335 @@ +using System.Collections.ObjectModel; + +namespace PureBlazor.com.Client.Editor; + +public partial class TailwindStyleDictionary : KeyedCollection +{ + /// + /// When implemented in a derived class, extracts the key from the specified element. + /// + /// The element from which to extract the key. + /// The key for the specified element. + protected override string GetKeyForItem(Style item) + { + return item.ScopeName; + } + /// + /// A theme with Light Colors. + /// + public static StyleDictionary DefaultLight + { + get + { + return new StyleDictionary + { + new(ScopeName.PlainText) + { + // Foreground = Black, + // Background = White, + ReferenceName = "plainText" + }, + new(ScopeName.HtmlServerSideScript) + { + // Background = Yellow, + ReferenceName = "htmlServerSideScript" + }, + new(ScopeName.HtmlComment) + { + // Foreground = Green, + ReferenceName = "htmlComment" + }, + new(ScopeName.HtmlTagDelimiter) + { + // Foreground = Blue, + ReferenceName = "text-blue-700" + }, + new(ScopeName.HtmlElementName) + { + // Foreground = DullRed, + ReferenceName = "htmlElementName" + }, + new(ScopeName.HtmlAttributeName) + { + // Foreground = Red, + ReferenceName = "htmlAttributeName" + }, + new(ScopeName.HtmlAttributeValue) + { + // Foreground = Blue, + ReferenceName = "htmlAttributeValue" + }, + new(ScopeName.HtmlOperator) + { + // Foreground = Blue, + ReferenceName = "htmlOperator" + }, + new(ScopeName.Comment) + { + // Foreground = Green, + ReferenceName = "comment" + }, + new(ScopeName.XmlDocTag) + { + // Foreground = Gray, + ReferenceName = "xmlDocTag" + }, + new(ScopeName.XmlDocComment) + { + // Foreground = Green, + ReferenceName = "xmlDocComment" + }, + new(ScopeName.String) + { + // Foreground = DullRed, + ReferenceName = "text-amber-800 string" + }, + new(ScopeName.StringCSharpVerbatim) + { + // Foreground = DullRed, + ReferenceName = "stringCSharpVerbatim" + }, + new(ScopeName.Keyword) + { + // Foreground = Blue, + ReferenceName = "text-blue-700 keyword" + }, + new(ScopeName.PreprocessorKeyword) + { + // Foreground = Blue, + ReferenceName = "preprocessorKeyword" + }, + new(ScopeName.HtmlEntity) + { + // Foreground = Red, + ReferenceName = "htmlEntity" + }, + new(ScopeName.JsonKey) + { + // Foreground = DarkOrange, + ReferenceName = "jsonKey" + }, + new(ScopeName.JsonString) + { + // Foreground = DarkCyan, + ReferenceName = "jsonString" + }, + new(ScopeName.JsonNumber) + { + // Foreground = BrightGreen, + ReferenceName = "jsonNumber" + }, + new(ScopeName.JsonConst) + { + // Foreground = BrightPurple, + ReferenceName = "jsonConst" + }, + new(ScopeName.XmlAttribute) + { + // Foreground = Red, + ReferenceName = "xmlAttribute" + }, + new(ScopeName.XmlAttributeQuotes) + { + // Foreground = Black, + ReferenceName = "xmlAttributeQuotes" + }, + new(ScopeName.XmlAttributeValue) + { + // Foreground = Blue, + ReferenceName = "xmlAttributeValue" + }, + new(ScopeName.XmlCDataSection) + { + // Foreground = Gray, + ReferenceName = "xmlCDataSection" + }, + new(ScopeName.XmlComment) + { + // Foreground = Green, + ReferenceName = "xmlComment" + }, + new(ScopeName.XmlDelimiter) + { + // Foreground = Blue, + ReferenceName = "xmlDelimiter" + }, + new(ScopeName.XmlName) + { + // Foreground = DullRed, + ReferenceName = "xmlName" + }, + new(ScopeName.ClassName) + { + // Foreground = MediumTurqoise, + ReferenceName = "className" + }, + new(ScopeName.CssSelector) + { + // Foreground = DullRed, + ReferenceName = "cssSelector" + }, + new(ScopeName.CssPropertyName) + { + // Foreground = Red, + ReferenceName = "cssPropertyName" + }, + new(ScopeName.CssPropertyValue) + { + // Foreground = Blue, + ReferenceName = "cssPropertyValue" + }, + new(ScopeName.SqlSystemFunction) + { + // Foreground = Magenta, + ReferenceName = "sqlSystemFunction" + }, + new(ScopeName.PowerShellAttribute) + { + // Foreground = PowderBlue, + ReferenceName = "powershellAttribute" + }, + new(ScopeName.PowerShellOperator) + { + // Foreground = Gray, + ReferenceName = "powershellOperator" + }, + new(ScopeName.PowerShellType) + { + // Foreground = Teal, + ReferenceName = "powershellType" + }, + new(ScopeName.PowerShellVariable) + { + // Foreground = OrangeRed, + ReferenceName = "powershellVariable" + }, + new(ScopeName.PowerShellCommand) + { + // Foreground = Navy, + ReferenceName = "powershellCommand" + }, + new(ScopeName.PowerShellParameter) + { + // Foreground = Gray, + ReferenceName = "powershellParameter" + }, + + new(ScopeName.Type) + { + // Foreground = Teal, + ReferenceName = "text-sky-700 type" + }, + new(ScopeName.TypeVariable) + { + // Foreground = Teal, + Italic = true, + ReferenceName = "typeVariable" + }, + new(ScopeName.NameSpace) + { + // Foreground = Navy, + ReferenceName = "namespace" + }, + new(ScopeName.Constructor) + { + // Foreground = Purple, + ReferenceName = "constructor" + }, + new(ScopeName.Predefined) + { + // Foreground = Navy, + ReferenceName = "predefined" + }, + new(ScopeName.PseudoKeyword) + { + // Foreground = Navy, + ReferenceName = "pseudoKeyword" + }, + new(ScopeName.StringEscape) + { + // Foreground = Gray, + ReferenceName = "stringEscape" + }, + new(ScopeName.ControlKeyword) + { + // Foreground = Blue, + ReferenceName = "controlKeyword" + }, + new(ScopeName.Number) + { + ReferenceName = "number" + }, + new(ScopeName.Operator) + { + ReferenceName = "operator" + }, + new(ScopeName.Delimiter) + { + ReferenceName = "delimiter" + }, + + new(ScopeName.MarkdownHeader) + { + // Foreground = Blue, + Bold = true, + ReferenceName = "markdownHeader" + }, + new(ScopeName.MarkdownCode) + { + // Foreground = Teal, + ReferenceName = "markdownCode" + }, + new(ScopeName.MarkdownListItem) + { + Bold = true, + ReferenceName = "markdownListItem" + }, + new(ScopeName.MarkdownEmph) + { + Italic = true, + ReferenceName = "italic" + }, + new(ScopeName.MarkdownBold) + { + Bold = true, + ReferenceName = "bold" + }, + + new(ScopeName.BuiltinFunction) + { + // Foreground = OliveDrab, + Bold = true, + ReferenceName = "builtinFunction" + }, + new(ScopeName.BuiltinValue) + { + // Foreground = DarkOliveGreen, + Bold = true, + ReferenceName = "builtinValue" + }, + new(ScopeName.Attribute) + { + // Foreground = DarkCyan, + Italic = true, + ReferenceName = "attribute" + }, + new(ScopeName.SpecialCharacter) + { + ReferenceName = "specialChar" + }, + new(ScopeName.MethodName) + { + ReferenceName = "methodName" + }, + new(ScopeName.MethodCall) + { + ReferenceName = "methodCall" + }, + new(ScopeName.MethodParameter) + { + ReferenceName = "text-sky-700 methodParameter" + }, + }; + } + } +} diff --git a/website/PureBlazor.com/PureBlazor.com.Client/IconCheck.razor b/website/PureBlazor.com/PureBlazor.com.Client/IconCheck.razor new file mode 100644 index 0000000..d0b44f9 --- /dev/null +++ b/website/PureBlazor.com/PureBlazor.com.Client/IconCheck.razor @@ -0,0 +1,3 @@ + + + diff --git a/website/PureBlazor.com/PureBlazor.com.Client/Layout/BlogLayout.razor b/website/PureBlazor.com/PureBlazor.com.Client/Layout/BlogLayout.razor new file mode 100644 index 0000000..f651f83 --- /dev/null +++ b/website/PureBlazor.com/PureBlazor.com.Client/Layout/BlogLayout.razor @@ -0,0 +1,23 @@ +@inherits LayoutComponentBase + +
+
+
+ + PureBlazor CMS + +
+
+
+
+ @Body +
+
+
+
+ +
+ An unhandled error has occurred. + Reload + 🗙 +
diff --git a/website/PureBlazor.com/PureBlazor.com.Client/Layout/BlogLayout.razor.css b/website/PureBlazor.com/PureBlazor.com.Client/Layout/BlogLayout.razor.css new file mode 100644 index 0000000..21307a8 --- /dev/null +++ b/website/PureBlazor.com/PureBlazor.com.Client/Layout/BlogLayout.razor.css @@ -0,0 +1,20 @@ + + +#blazor-error-ui { + background: lightyellow; + bottom: 0; + box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2); + display: none; + left: 0; + padding: 0.6rem 1.25rem 0.7rem 1.25rem; + position: fixed; + width: 100%; + z-index: 1000; +} + + #blazor-error-ui .dismiss { + cursor: pointer; + position: absolute; + right: 0.75rem; + top: 0.5rem; + } diff --git a/website/PureBlazor.com/PureBlazor.com.Client/Layout/DocsLayout.razor b/website/PureBlazor.com/PureBlazor.com.Client/Layout/DocsLayout.razor new file mode 100644 index 0000000..6fa91e9 --- /dev/null +++ b/website/PureBlazor.com/PureBlazor.com.Client/Layout/DocsLayout.razor @@ -0,0 +1,68 @@ +@inherits LayoutComponentBase +@inject NavigationManager Nav +@inject IElementUtils ElementUtils +@inject ILogger Log + + +
+ + + + pureblazor logo + + + +
+ +
+
+ +
+ +
+ @Body +
+
+