From d0b6ac576bd7145a6960cd60dbb7aea76e1d88e3 Mon Sep 17 00:00:00 2001 From: Mohammad Hossein Rastegarinia Date: Tue, 16 Jan 2024 13:48:36 +0330 Subject: [PATCH 1/4] feat(websites): add samples for Butil Keyboard methods in Platform website #6587 (#6588) --- .../Pages/Butil/Butil06KeyboardPage.razor | 47 ++++++++++++++++++- 1 file changed, 45 insertions(+), 2 deletions(-) diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil06KeyboardPage.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil06KeyboardPage.razor index 8ed3588aa3..63c1f247cf 100644 --- a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil06KeyboardPage.razor +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil06KeyboardPage.razor @@ -1,5 +1,6 @@ @page "/butil/keyboard" @inherits AppComponentBase +@inject Bit.Butil.Keyboard keyboard Methods
- Add: Adds a handler to a keyboard key combination. + Add, Remove: Adds/Removes a handler to a keyboard key combination.

- Remove: Removes a handler from a keyboard key combination. + + + + +
+                                @exampleCode1
+                            
+
+ +
+
Press Ctrl+F to focus on search box
+
+ +
+
+
+
+
+ +@code { + private BitSearchBox searchBox = default!; + + protected override async Task OnInitAsync() + { + await keyboard.Add(ButilKeyCodes.KeyF, () => _ = searchBox.FocusInput(), ButilModifiers.Ctrl); + } + + private string exampleCode1 = +@"@inject Bit.Butil.Document document + +
Press Ctrl+F to focus on search box
+ + + +@code { + private BitSearchBox searchBox = default!; + + protected override async Task OnInitAsync() + { + await keyboard.Add(ButilKeyCodes.KeyF, () => _ = searchBox.FocusInput(), ButilModifiers.Ctrl); + } +}"; +} \ No newline at end of file From d72e8d0d55ad6c95c6251b0bcf36c7fd718b657f Mon Sep 17 00:00:00 2001 From: Mohammad Hossein Rastegarinia Date: Tue, 16 Jan 2024 14:57:01 +0330 Subject: [PATCH 2/4] feat(websites): add samples for Butil Console methods in Platform website #6589 (#6590) --- .../Pages/Butil/Butil07ConsolePage.razor | 702 +++++++++++++++++- 1 file changed, 690 insertions(+), 12 deletions(-) diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil07ConsolePage.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil07ConsolePage.razor index 62115e8495..463d0c2911 100644 --- a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil07ConsolePage.razor +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil07ConsolePage.razor @@ -1,5 +1,6 @@ @page "/butil/console" @inherits AppComponentBase +@inject Bit.Butil.Console console @@ -34,91 +35,768 @@ Assert: Log a message and stack trace to console if the first argument is false (MDN).

- - Clear: Clear the console - (MDN). + + + + +
+                                @exampleCode1
+                            
+
+ +
+ +
+
Open the DevTools console and start clicking on the button
+
+ Assert +
+
+
+
+


Count: Log the number of times this line has been called with the given label (MDN).

+ + + + +
+                                @exampleCode2
+                            
+
+ +
+ +
+
Open the DevTools console and start clicking on the button
+
+ Count +
+
+
+
+
+

CountReset: Resets the value of the counter with the given label (MDN).

+ + + + +
+                                @exampleCode3
+                            
+
+ +
+ +
+
Open the DevTools console and start clicking on the button
+
+ CountReset +
+
+
+
+
+

Debug: Outputs a message to the console with the log level debug (MDN).

+ + + + +
+                                @exampleCode4
+                            
+
+ +
+ +
+
Open the DevTools console and start clicking on the button
+
+ Debug +
+
+
+
+
+

Dir: Displays an interactive listing of the properties of a specified JavaScript object (MDN).

+ + + + +
+                                @exampleCode5
+                            
+
+ +
+ +
+
Open the DevTools console and start clicking on the button
+
+ Dir +
+
+
+
+
+

Dirxml: Displays an XML/HTML Element representation of the specified object if possible or the JavaScript Object view if it is not possible (MDN).

+ + + + +
+                                @exampleCode6
+                            
+
+ +
+ +
+
Open the DevTools console and start clicking on the button
+
+ Dirxml +
+
+
+
+
+

Error: Outputs an error message. You may use string substitution and additional arguments with this method (MDN).

+ + + + +
+                                @exampleCode7
+                            
+
+ +
+ +
+
Open the DevTools console and start clicking on the button
+
+ Error +
+
+
+
+
+

Group: Creates a new inline group, indenting all following output by another level. To move back out a level, call console.groupEnd() (MDN).

+ + + + +
+                                @exampleCode8
+                            
+
+ +
+
Open the DevTools console and start clicking on the button
+
+ Create group logs +
+
+
+
+
+

GroupCollapsed: Creates a new inline group, indenting all following output by another level. However, unlike console.group() this starts with the inline group collapsed requiring the use of a disclosure button to expand it. To move back out a level, call console.groupEnd() (MDN).

+ + + + +
+                                @exampleCode8
+                            
+
+ +
+
Open the DevTools console and start clicking on the button
+
+ Create group logs +
+
+
+
+
+

GroupEnd: Exits the current inline group (MDN).

+ + + + +
+                                @exampleCode8
+                            
+
+ +
+
Open the DevTools console and start clicking on the button
+
+ Create group logs +
+
+
+
+
+

Info: Informative logging of information. You may use string substitution and additional arguments with this method (MDN).

+ + + + +
+                                @exampleCode9
+                            
+
+ +
+ +
+
Open the DevTools console and start clicking on the button
+
+ Info +
+
+
+
+
+

Log: For general output of logging information. You may use string substitution and additional arguments with this method (MDN).

+ + + + +
+                                @exampleCode10
+                            
+
+ +
+ +
+
Open the DevTools console and start clicking on the button
+
+ Log +
+
+
+
+
+

- Log: For general output of logging information. You may use string substitution and additional arguments with this method - (MDN). + Warn: Outputs a warning message + (MDN). +

+ + + + +
+                                @exampleCode11
+                            
+
+ +
+ +
+
Open the DevTools console and start clicking on the button
+
+ Warn +
+
+
+
+
+

+ + Table: Displays tabular data as a table + (MDN). +

+ + + + +
+                                @exampleCode12
+                            
+
+ +
+ +
+
Open the DevTools console and start clicking on the button
+
+ Table +
+
+
+
+


Profile: Starts the browser's built-in profiler (for example, the Firefox performance tool). You can specify an optional name for the profile (MDN).

+ + + + +
+                                @exampleCode13
+                            
+
+ +
+ +
+
Open the DevTools console and start clicking on the button
+
+ Profile +
+
+
+
+
+

ProfileEnd: Stops the profiler. You can see the resulting profile in the browser's performance tool (for example, the Firefox performance tool) (MDN).

+ + + + +
+                                @exampleCode14
+                            
+
+ +
+ +
+
Open the DevTools console and start clicking on the button
+
+ ProfileEnd +
+
+
+
+
+

Time: Starts a timer with a name specified as an input parameter. Up to 10,000 simultaneous timers can run on a given page (MDN).

- - TimeEnd: Stops the specified timer and logs the elapsed time in milliseconds since it started - (MDN). + + + + +
+                                @exampleCode15
+                            
+
+ +
+ +
+
Open the DevTools console and start clicking on the button
+
+ Time +
+
+
+
+


TimeLog: Logs the value of the specified timer to the console (MDN).

+ + + + +
+                                @exampleCode16
+                            
+
+ +
+ +
+
Open the DevTools console and start clicking on the button
+
+ TimeLog +
+
+
+
+
+

+ + TimeEnd: Stops the specified timer and logs the elapsed time in milliseconds since it started + (MDN). +

+ + + + +
+                                @exampleCode17
+                            
+
+ +
+ +
+
Open the DevTools console and start clicking on the button
+
+ TimeEnd +
+
+
+
+
+

TimeStamp: Adds a marker to the browser performance tool's timeline (MDN).

+ + + + +
+                                @exampleCode18
+                            
+
+ +
+ +
+
Open the DevTools console and start clicking on the button
+
+ TimeStamp +
+
+
+
+
+

Trace: Outputs a stack trace (MDN).

+ + + + +
+                                @exampleCode19
+                            
+
+ +
+ +
+
Open the DevTools console and start clicking on the button
+
+ Trace +
+
+
+
+
+

- Warn: Outputs a warning message - (MDN). + Clear: Clear the console + (MDN). +

+ + + + +
+                                @exampleCode20
+                            
+
+ +
+
Open the DevTools console and start clicking on the button
+
+ Clear +
+
+
+
+
+ +@code { + private string value = "Test"; + + private async Task CreateGroupLogs() + { + await console.Log("This is the outer level"); + await console.Group(); + await console.Log("Level 2"); + await console.Group(); + await console.Log("Level 3"); + await console.Warn("More of level 3"); + await console.GroupCollapsed(); + await console.Log("Back to level 2"); + await console.GroupEnd(); + await console.Log("Back to the outer level"); + } + + private string exampleCode1 = +@"@inject Bit.Butil.Console console + + + + console.Assert(false, ""This is a test assert:"", value))"">Assert + +@code { + private string value = ""Test""; +}"; + private string exampleCode2 = +@"@inject Bit.Butil.Console console + + + + console.Count(value))"">Count + +@code { + private string value = ""Test""; +}"; + private string exampleCode3 = +@"@inject Bit.Butil.Console console + + + + console.CountReset(value))"">CountReset + +@code { + private string value = ""Test""; +}"; + private string exampleCode4 = +@"@inject Bit.Butil.Console console + + + + console.Debug(value))"">Debug + +@code { + private string value = ""Test""; +}"; + private string exampleCode5 = +@"@inject Bit.Butil.Console console + + + + console.Dir(value))"">Dir + +@code { + private string value = ""Test""; +}"; + private string exampleCode6 = +@"@inject Bit.Butil.Console console + + + + console.Dirxml(value))"">Dirxml + +@code { + private string value = ""Test""; +}"; + private string exampleCode7 = +@"@inject Bit.Butil.Console console + + + + console.Error(""This is a test error:"", value))"">Error + +@code { + private string value = ""Test""; +}"; + private string exampleCode8 = +@"@inject Bit.Butil.Console console + +Create group logs + +@code { + private async Task CreateGroupLogs() + { + await console.Log(""This is the outer level""); + await console.Group(); + await console.Log(""Level 2""); + await console.Group(); + await console.Log(""Level 3""); + await console.Warn(""More of level 3""); + await console.GroupCollapsed(); + await console.Log(""Back to level 2""); + await console.GroupEnd(); + await console.Log(""Back to the outer level""); + } +}"; + private string exampleCode9 = +@"@inject Bit.Butil.Console console + + + + console.Info(""This is a test info:"", value))"">Info + +@code { + private string value = ""Test""; +}"; + private string exampleCode10 = +@"@inject Bit.Butil.Console console + + + + console.Log(""This is a test log:"", value))"">Log + +@code { + private string value = ""Test""; +}"; + private string exampleCode11 = +@"@inject Bit.Butil.Console console + + + + console.Warn(""This is a test warn:"", value))"">Warn + +@code { + private string value = ""Test""; +}"; + private string exampleCode12 = +@"@inject Bit.Butil.Console console + + + + console.Table(new {Name = ""Value"", Value = value }))"">Table + +@code { + private string value = ""Test""; +}"; + private string exampleCode13 = +@"@inject Bit.Butil.Console console + + + + console.Profile(value))"">Profile + +@code { + private string value = ""Test""; +}"; + private string exampleCode14 = +@"@inject Bit.Butil.Console console + + + + console.ProfileEnd(value))"">ProfileEnd + +@code { + private string value = ""Test""; +}"; + private string exampleCode15 = +@"@inject Bit.Butil.Console console + + + + console.Time(value))"">Time + +@code { + private string value = ""Test""; +}"; + private string exampleCode16 = +@"@inject Bit.Butil.Console console + + + + console.TimeLog(value))"">TimeLog + +@code { + private string value = ""Test""; +}"; + private string exampleCode17 = +@"@inject Bit.Butil.Console console + + + + console.TimeEnd(value))"">TimeEnd + +@code { + private string value = ""Test""; +}"; + private string exampleCode18 = +@"@inject Bit.Butil.Console console + + + + console.TimeStamp(value))"">TimeStamp + +@code { + private string value = ""Test""; +}"; + private string exampleCode19 = +@"@inject Bit.Butil.Console console + + + + console.Trace(value))"">Trace + +@code { + private string value = ""Test""; +}"; + private string exampleCode20 = +@"@inject Bit.Butil.Console console + + console.Clear(value))"">Clear"; +} \ No newline at end of file From 59c42e4bdfa2f64f6a196e13c41bfd59f958fd53 Mon Sep 17 00:00:00 2001 From: Saleh Yusefnejad Date: Tue, 16 Jan 2024 16:13:52 +0330 Subject: [PATCH 3/4] feat(websites): improve Window docs of the Butil in the Platform website #6593 (#6594) --- .../Pages/Butil/Butil04WindowPage.razor | 312 +++++++----------- .../Pages/Butil/Butil04WindowPage.razor.cs | 134 ++++++++ 2 files changed, 257 insertions(+), 189 deletions(-) create mode 100644 src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil04WindowPage.razor.cs diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil04WindowPage.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil04WindowPage.razor index 000722627f..2493b0b19f 100644 --- a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil04WindowPage.razor +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil04WindowPage.razor @@ -30,39 +30,82 @@
Methods +
- AddBeforeUnload, RemoveBeforeUnload: The beforeunload event is fired when the current window, + AddBeforeUnload, RemoveBeforeUnload:
+ The beforeunload event is fired when the current window, contained document, and associated resources are about to be unloaded. The main use case for this event is to trigger a browser-generated confirmation dialog that asks users to confirm if they really want to leave the page when they try to close or reload it, or navigate somewhere else. This is intended to help prevent loss of unsaved data (MDN). -

+


- AddEventListener, RemoveEventListener: Sets up a function that will be called whenever the specified event is delivered to the window + AddEventListener, RemoveEventListener:
+ Sets up a function that will be called whenever the specified event is delivered to the window (MDN). -

+


- GetInnerHeight: Gets the height of the content area of the browser window in px including, if rendered, the horizontal scrollbar + GetInnerHeight:
+ Gets the height of the content area of the browser window in px including, if rendered, the horizontal scrollbar (MDN).

+ + + + +
+                                @getOriginExampleCode
+                            
+
+ +
+ GetInnerHeight +
InnerHeight is: @innerHeight
+
+
+
+
+

- GetInnerWidth: Gets the width of the content area of the browser window in px including, if rendered, the vertical scrollbar + GetInnerWidth:
+ Gets the width of the content area of the browser window in px including, if rendered, the vertical scrollbar (MDN).

+ + + + +
+                                @getOriginExampleCode
+                            
+
+ +
+ GetInnerWidth +
InnerWidth is: @innerWidth
+
+
+
+
+

- IsSecureContext: Returns a boolean indicating whether the current context is secure (true) or not (false) + IsSecureContext:
+ Returns a boolean indicating whether the current context is secure (true) or not (false) (MDN). -

+


- GetLocationBar: Returns the locationbar object. For privacy and interoperability reasons, the value of the visible property is now false if this Window is a popup, and true otherwise + GetLocationBar:
+ Returns the locationbar object. For privacy and interoperability reasons, the value of the visible property is now false if this Window is a popup, and true otherwise (MDN). -

+


- SetName, GetName: Gets/Sets the name of the window's browsing context + SetName, GetName:
+ Gets/Sets the name of the window's browsing context (MDN). -

+


- GetOrigin: Returns the global object's origin, serialized as a string + GetOrigin:
+ Returns the global object's origin, serialized as a string (MDN).

@@ -70,7 +113,7 @@
-                                @exampleCode1
+                                @getOriginExampleCode
                             
@@ -83,7 +126,8 @@


- GetOuterHeight: Gets the height of the outside of the browser window in px + GetOuterHeight:
+ Gets the height of the outside of the browser window in px (MDN).

@@ -91,7 +135,7 @@
-                                @exampleCode2
+                                @getOuterHeightExampleCode
                             
@@ -104,7 +148,8 @@


- GetOuterWidth: Gets the width of the outside of the browser window in px + GetOuterWidth:
+ Gets the width of the outside of the browser window in px (MDN).

@@ -112,7 +157,7 @@
-                                @exampleCode3
+                                @getOuterWidthExampleCode
                             
@@ -125,23 +170,28 @@


- GetScreenX: Returns the horizontal distance in px from the left border of the user's browser viewport to the left side of the screen + GetScreenX:
+ Returns the horizontal distance in px from the left border of the user's browser viewport to the left side of the screen (MDN). -

+


- GetScreenY: Returns the vertical distance in px from the top border of the user's browser viewport to the top side of the screen + GetScreenY:
+ Returns the vertical distance in px from the top border of the user's browser viewport to the top side of the screen (MDN). -

+


- GetScrollX: Returns the number of pixels that the document has already been scrolled horizontally + GetScrollX:
+ Returns the number of pixels that the document has already been scrolled horizontally (MDN). -

+


- GetScrollY: Returns the number of pixels that the document has already been scrolled vertically + GetScrollY:
+ Returns the number of pixels that the document has already been scrolled vertically (MDN). -

+


- Btoa: Creates a base-64 encoded ASCII string from a string of binary data + Btoa:
+ Creates a base-64 encoded ASCII string from a string of binary data (MDN).

@@ -149,7 +199,7 @@
-                                @exampleCode4
+                                @btoaExampleCode
                             
@@ -164,7 +214,8 @@


- Atob: Decodes a string of data which has been encoded using base-64 encoding + Atob:
+ Decodes a string of data which has been encoded using base-64 encoding (MDN).

@@ -172,7 +223,7 @@
-                                @exampleCode5
+                                @atobExampleCode
                             
@@ -187,7 +238,8 @@


- Alert: Displays an alert dialog + Alert:
+ Displays an alert dialog (MDN).

@@ -195,7 +247,7 @@
-                                @exampleCode6
+                                @alertExampleCode
                             
@@ -207,15 +259,18 @@


- Blur: Sets focus away from the window + Blur:
+ Sets focus away from the window (MDN). -

+


- Close: Closes the current window + Close:
+ Closes the current window (MDN). -

+


- Confirm: Displays a dialog with a message that the user needs to respond to + Confirm:
+ Displays a dialog with a message that the user needs to respond to (MDN).

@@ -223,7 +278,7 @@
-                                @exampleCode7
+                                @confirmExampleCode
                             
@@ -235,177 +290,56 @@


- Find: Searches for a given string in a window + Find:
+ Searches for a given string in a window (MDN). -

+


- Focus: Sets focus on the current window + Focus:
+ Sets focus on the current window (MDN). -

+


- GetSelection: Returns the selection text representing the selected item(s) + GetSelection:
+ Returns the selection text representing the selected item(s) (MDN). -

+


- MatchMedia: Returns a MediaQueryList object representing the specified media query string + MatchMedia:
+ Returns a MediaQueryList object representing the specified media query string (MDN). -

+


- Open: Opens a new window + Open:
+ Opens a new window (MDN). -

+


- Print: Opens the Print Dialog to print the current document + Print:
+ Opens the Print Dialog to print the current document (MDN). -

+


- Prompt: Returns the text entered by the user in a prompt dialog + Prompt:
+ Returns the text entered by the user in a prompt dialog (MDN). -

+


- Scroll: Scrolls the window to a particular place in the document + Scroll:
+ Scrolls the window to a particular place in the document (MDN). -

+


- ScrollBy: Scrolls the document in the window by the given amount + ScrollBy:
+ Scrolls the document in the window by the given amount (MDN). -

+


- Stop: This method stops window loading + Stop:
+ This method stops window loading (MDN).
- - -@code { - private string? origin; - - private float outerHeight; - - private float outerWidth; - - private string? btoaText; - private string? btoaValue; - - private string? atobText; - private string? atobValue; - - - private async Task GetOrigin() - { - origin = await window.GetOrigin(); - } - - private async Task GetOuterHeight() - { - outerHeight = await window.GetOuterHeight(); - } - - private async Task GetOuterWidth() - { - outerWidth = await window.GetOuterWidth(); - } - - private async Task EncodeData() - { - btoaText = await window.Btoa(btoaValue!); - } - - private async Task DecodeData() - { - atobText = await window.Atob(atobValue!); - } - - private string exampleCode1 = -@"@inject Bit.Butil.Window window - -GetOrigin - -
Origin is: @origin
- -@code { - private string? origin; - - private async Task GetOrigin() - { - origin = await window.GetOrigin(); - } -}"; - private string exampleCode2 = -@"@inject Bit.Butil.Window window - -GetOuterHeight - -
OuterHeight is: @outerHeight
- -@code { - private float outerHeight; - - private async Task GetOuterHeight() - { - outerHeight = await window.GetOuterHeight(); - } -}"; - private string exampleCode3 = -@"@inject Bit.Butil.Window window - -GetOuterWidth - -
OuterWidth is: @outerWidth
- -@code { - private float outerWidth; - - private async Task GetOuterWidth() - { - outerWidth = await window.GetOuterWidth(); - } -}"; - private string exampleCode4 = -@"@inject Bit.Butil.Window window - - - -EncodeData - -
Encoded data is: @btoaText
- -@code { - private string? btoaText; - private string? btoaValue; - - private async Task EncodeData() - { - btoaText = await window.Btoa(btoaValue!); - } -}"; - private string exampleCode5 = -@"@inject Bit.Butil.Window window - - - -DecodeData - -
Decoded data is: @atobText
- -@code { - private string? atobText; - private string? atobValue; - - private async Task DecodeData() - { - atobText = await window.Atob(atobValue!); - } -}"; - private string exampleCode6 = -@"@inject Bit.Butil.Window window - - window.Alert(""Alert from C#""))"">ShowAlert"; - private string exampleCode7 = -@"@inject Bit.Butil.Window window - - window.Confirm(""Confirm from C#""))"">ShowConfirm"; - -} \ No newline at end of file + \ No newline at end of file diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil04WindowPage.razor.cs b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil04WindowPage.razor.cs new file mode 100644 index 0000000000..3be43aa0d9 --- /dev/null +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil04WindowPage.razor.cs @@ -0,0 +1,134 @@ +namespace Bit.Websites.Platform.Client.Pages.Butil; + +public partial class Butil04WindowPage +{ + private float innerHeight; + + private float innerWidth; + + private string? origin; + + private float outerHeight; + + private float outerWidth; + + private string? btoaText; + private string? btoaValue; + + private string? atobText; + private string? atobValue; + + + private async Task GetInnerHeight() => innerHeight = await window.GetInnerHeight(); + + private async Task GetInnerWidth() => innerWidth = await window.GetInnerWidth(); + + private async Task GetOrigin() => origin = await window.GetOrigin(); + + private async Task GetOuterHeight() => outerHeight = await window.GetOuterHeight(); + + private async Task GetOuterWidth() => outerWidth = await window.GetOuterWidth(); + + private async Task EncodeData() => btoaText = await window.Btoa(btoaValue!); + + private async Task DecodeData() => atobText = await window.Atob(atobValue!); + + private string getInnerHeightExampleCode = + @"@inject Bit.Butil.Window window + +GetInnerHeight + +
InnerHeight is: @innerHeight
+ +@code { + private string? innerHeight; + + private async Task GetInnerHeight() => innerHeight = await window.GetInnerHeight(); +}"; + private string getInnerWidthExampleCode = +@"@inject Bit.Butil.Window window + +GetInnerWidth + +
InnerWidth is: @innerWidth
+ +@code { + private string? innerWidth; + + private async Task GetInnerWidth() => innerWidth = await window.GetInnerWidth(); +}"; + private string getOriginExampleCode = + @"@inject Bit.Butil.Window window + +GetOrigin + +
Origin is: @origin
+ +@code { + private string? origin; + + private async Task GetOrigin() => origin = await window.GetOrigin(); +}"; + private string getOuterHeightExampleCode = + @"@inject Bit.Butil.Window window + +GetOuterHeight + +
OuterHeight is: @outerHeight
+ +@code { + private float outerHeight; + + private async Task GetOuterHeight() => outerHeight = await window.GetOuterHeight(); +}"; + private string getOuterWidthExampleCode = + @"@inject Bit.Butil.Window window + +GetOuterWidth + +
OuterWidth is: @outerWidth
+ +@code { + private float outerWidth; + + private async Task GetOuterWidth() => outerWidth = await window.GetOuterWidth(); +}"; + private string btoaExampleCode = + @"@inject Bit.Butil.Window window + + + +EncodeData + +
Encoded data is: @btoaText
+ +@code { + private string? btoaText; + private string? btoaValue; + + private async Task EncodeData() => btoaText = await window.Btoa(btoaValue!); +}"; + private string atobExampleCode = + @"@inject Bit.Butil.Window window + + + +DecodeData + +
Decoded data is: @atobText
+ +@code { + private string? atobText; + private string? atobValue; + + private async Task DecodeData() => atobText = await window.Atob(atobValue!); +}"; + private string alertExampleCode = + @"@inject Bit.Butil.Window window + + window.Alert(""Alert from C#""))"">ShowAlert"; + private string confirmExampleCode = + @"@inject Bit.Butil.Window window + + window.Confirm(""Confirm from C#""))"">ShowConfirm"; +} From 196eeb82ce0a1b1100f3bd565a3f4adff5778304 Mon Sep 17 00:00:00 2001 From: Saleh Yusefnejad Date: Tue, 16 Jan 2024 16:51:39 +0330 Subject: [PATCH 4/4] feat(websites): improve docs overview of the Platform website #6595 (#6596) --- .../Pages/Besql/Besql01OverviewPage.razor | 5 + .../Pages/Bswup/Bswup01OverviewPage.razor | 5 + .../Pages/Butil/Butil01OverviewPage.razor | 5 + .../Templates/Templates01OverviewPage.razor | 69 ++----- .../Templates01OverviewPage.razor.scss | 178 +---------------- .../Templates/Templates02SamplesPage.razor | 72 +++++++ .../Templates02SamplesPage.razor.scss | 188 ++++++++++++++++++ ...lates03DevelopmentPrerequisitesPage.razor} | 0 ...03DevelopmentPrerequisitesPage.razor.scss} | 0 ...zor => Templates04CreateProjectPage.razor} | 0 ...> Templates04CreateProjectPage.razor.scss} | 0 ... => Templates05ProjectStructurePage.razor} | 0 ...emplates05ProjectStructurePage.razor.scss} | 0 ...ge.razor => Templates06DatabasePage.razor} | 0 ...css => Templates06DatabasePage.razor.scss} | 0 ...RunPage.razor => Templates07RunPage.razor} | 0 ...zor.scss => Templates07RunPage.razor.scss} | 0 ...e.razor => Templates08AppModelsPage.razor} | 0 ...ss => Templates08AppModelsPage.razor.scss} | 0 ...or => Templates09DeploymentTypePage.razor} | 0 ... Templates09DeploymentTypePage.razor.scss} | 0 ...or => Templates10CacheMechanismPage.razor} | 0 ... Templates10CacheMechanismPage.razor.scss} | 0 ...Page.razor => Templates11DevOpsPage.razor} | 0 ....scss => Templates11DevOpsPage.razor.scss} | 0 ... Templates12PlatformIntegrationPage.razor} | 0 ...lates12PlatformIntegrationPage.razor.scss} | 0 ...ge.razor => Templates13SettingsPage.razor} | 0 ...css => Templates13SettingsPage.razor.scss} | 0 ...=> Templates14ExceptionHandlingPage.razor} | 0 ...mplates14ExceptionHandlingPage.razor.scss} | 0 ...r => Templates15MultilingualismPage.razor} | 0 ...Templates15MultilingualismPage.razor.scss} | 0 .../Shared/MainLayout.razor.cs | 1 + .../compilerconfig.json | 57 +++--- 35 files changed, 329 insertions(+), 251 deletions(-) create mode 100644 src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates02SamplesPage.razor create mode 100644 src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates02SamplesPage.razor.scss rename src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/{Templates02DevelopmentPrerequisitesPage.razor => Templates03DevelopmentPrerequisitesPage.razor} (100%) rename src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/{Templates02DevelopmentPrerequisitesPage.razor.scss => Templates03DevelopmentPrerequisitesPage.razor.scss} (100%) rename src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/{Templates03CreateProjectPage.razor => Templates04CreateProjectPage.razor} (100%) rename src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/{Templates03CreateProjectPage.razor.scss => Templates04CreateProjectPage.razor.scss} (100%) rename src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/{Templates04ProjectStructurePage.razor => Templates05ProjectStructurePage.razor} (100%) rename src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/{Templates04ProjectStructurePage.razor.scss => Templates05ProjectStructurePage.razor.scss} (100%) rename src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/{Templates05DatabasePage.razor => Templates06DatabasePage.razor} (100%) rename src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/{Templates05DatabasePage.razor.scss => Templates06DatabasePage.razor.scss} (100%) rename src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/{Templates06RunPage.razor => Templates07RunPage.razor} (100%) rename src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/{Templates06RunPage.razor.scss => Templates07RunPage.razor.scss} (100%) rename src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/{Templates07AppModelsPage.razor => Templates08AppModelsPage.razor} (100%) rename src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/{Templates07AppModelsPage.razor.scss => Templates08AppModelsPage.razor.scss} (100%) rename src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/{Templates08DeploymentTypePage.razor => Templates09DeploymentTypePage.razor} (100%) rename src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/{Templates08DeploymentTypePage.razor.scss => Templates09DeploymentTypePage.razor.scss} (100%) rename src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/{Templates09CacheMechanismPage.razor => Templates10CacheMechanismPage.razor} (100%) rename src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/{Templates09CacheMechanismPage.razor.scss => Templates10CacheMechanismPage.razor.scss} (100%) rename src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/{Templates10DevOpsPage.razor => Templates11DevOpsPage.razor} (100%) rename src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/{Templates10DevOpsPage.razor.scss => Templates11DevOpsPage.razor.scss} (100%) rename src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/{Templates11PlatformIntegrationPage.razor => Templates12PlatformIntegrationPage.razor} (100%) rename src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/{Templates11PlatformIntegrationPage.razor.scss => Templates12PlatformIntegrationPage.razor.scss} (100%) rename src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/{Templates12SettingsPage.razor => Templates13SettingsPage.razor} (100%) rename src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/{Templates12SettingsPage.razor.scss => Templates13SettingsPage.razor.scss} (100%) rename src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/{Templates13ExceptionHandlingPage.razor => Templates14ExceptionHandlingPage.razor} (100%) rename src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/{Templates13ExceptionHandlingPage.razor.scss => Templates14ExceptionHandlingPage.razor.scss} (100%) rename src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/{Templates14MultilingualismPage.razor => Templates15MultilingualismPage.razor} (100%) rename src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/{Templates14MultilingualismPage.razor.scss => Templates15MultilingualismPage.razor.scss} (100%) diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Besql/Besql01OverviewPage.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Besql/Besql01OverviewPage.razor index 7cf3a6aa9d..06c50573b3 100644 --- a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Besql/Besql01OverviewPage.razor +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Besql/Besql01OverviewPage.razor @@ -11,6 +11,11 @@ Blazor Entity Framework Sqlite utilities + Dreaming of an offline web application capable of saving data and syncing later? +
+ Enter Besql, your solution to incorporating EF core & sqlite in your browser. + It's a crucial aid for achieving this objective seamlessly. +
bit Besql facilitates the use of Entity Framework and sqlite in web browsers with Blazor WebAssembly.
diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Bswup/Bswup01OverviewPage.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Bswup/Bswup01OverviewPage.razor index df7fc7e6a5..ebf8cd1d09 100644 --- a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Bswup/Bswup01OverviewPage.razor +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Bswup/Bswup01OverviewPage.razor @@ -15,8 +15,13 @@ Service Worker when building PWAs with Blazor. It utilizes the Service Worker's events to handle Installing and Updating the app as fast and smooth as possible while minimizing the download size. +
+ This unique tool harnesses the power of Progressive Web Apps (PWA) within the innovative + new structure of dotnet 8. By amalgamating pre-rendering techniques reminiscent of renowned + platforms like GitHub, Reddit, and Facebook, Bswup ensures an exceptional user experience. +
diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil01OverviewPage.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil01OverviewPage.razor index 64e64354ff..0783b9a10e 100644 --- a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil01OverviewPage.razor +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil01OverviewPage.razor @@ -11,6 +11,11 @@ Blazor Utilities for JavaScript + Embracing Blazor because of your love for C#? +
+ Butil enables you to stay true to that sentiment by providing essential Browser APIs in C#, + eliminating the need to revert to JavaScript for any functionality. +
bit Butil helps C# developers to access the browser APIs that are only accessible through JavaScript in C#.
diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates01OverviewPage.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates01OverviewPage.razor index 46c821618c..9756785d14 100644 --- a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates01OverviewPage.razor +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates01OverviewPage.razor @@ -14,64 +14,33 @@ bit Boilerplate + If our efforts in providing modern tooling have piqued your interest, dive into the Bit Boilerplate project template. +
+ Experience all of our tools along with additional features such as ASP.NET Core Identity integration, + multilingualism, and other cool features that empowers you to develop unified Web, Android, iOS, Windows, + and macOS apps from a single codebase, while providing seamless integration with native platform features + and third-party Java, Kotlin, Swift, Objective-C, and JavaScript libraries. +

bit Boilerplate is a feature-rich project template for both Visual studio and the .NET CLI. It comes with a lot of features right out of the box that are required for a real world application. - Two distinct samples that further explain the features in action are included in the project template. +

+ Watch our YouTube playlist to get more familiar with bit Boilerplate project template + + here + :
-
-
-
- - AdminPanel sample -
-
- - - The AdminPanel sample is a project powered by bit Boilerplate that includes all the necessary parts to create a fully-featured cross-platform admin/management website/app. - -
+

- +
+
-
-

- Todo sample -
-
- - - The Todo sample is a project powered by Boilerplate that includes work packages and actions that you can apply to various cross-platform projects. - -
- - -
- + diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates01OverviewPage.razor.scss b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates01OverviewPage.razor.scss index df16fd7d31..8e7839faad 100644 --- a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates01OverviewPage.razor.scss +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates01OverviewPage.razor.scss @@ -5,184 +5,12 @@ .page-container { @include PageContainer; -} - -.page-flex-container { - width: 100%; display: flex; - flex-flow: row wrap; - box-sizing: border-box; -} - -.page-content-container { - margin: 0; - flex-grow: 0; - max-width: 66%; - flex-basis: 66%; - flex-direction: row; - box-sizing: border-box; - - &:last-child { - max-width: 34%; - flex-basis: 34%; - padding-left: rem2(48px); - } - - @include lt-xl { - flex-grow: 0; - max-width: 100%; - flex-basis: 100%; - - &:last-child { - padding-left: 0; - max-width: 100%; - flex-basis: 100%; - padding-top: rem2(32px); - } - } -} - -.image-container { - position: relative; - padding: 50% 0 0 0; - margin-bottom: 1rem; - - .template-img { - top: 0; - width: 100%; - height: 100%; - color: #f5f5f5; - display: block; - position: absolute; - border-radius: rem2(8px); - background-color: #f5f5f5; - box-shadow: $bit-box-shadow-callout; - } - - .demo-btn-shadow { - top: 0; - left: 0; - right: 0; - bottom: 0; - opacity: 0; - display: flex; - position: absolute; - align-items: center; - justify-content: center; - border-radius: rem2(8px); - background-color: rgba(25, 118, 210, 0.6); - transition: opacity 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms; - } - - .demo-btn { - border: 0; - margin: 0; - outline: 0; - cursor: pointer; - font-weight: 500; - line-height: 1.2; - position: relative; - align-items: center; - display: inline-flex; - min-width: rem2(64px); - font-size: rem2(16px); - text-decoration: none; - box-sizing: border-box; - border-radius: rem2(4px); - justify-content: center; - padding: rem2(12px) rem2(16px); - transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms; - color: $White; - background-color: #1976d2; - - &:hover { - background-color: #0052cc; - } - } - - &:hover { - .demo-btn-shadow { - opacity: 1; - } - } -} - -.primary-btn { - border: 0; - outline: 0; - width: 100%; - cursor: pointer; - font-weight: 600; - line-height: 1.2; - position: relative; - align-items: center; - font-size: rem2(16px); - min-width: rem2(64px); - display: inline-flex; - text-decoration: none; - justify-content: center; - border-radius: rem2(4px); - margin-bottom: rem2(8px); - padding: rem2(12px) rem2(16px); - color: $White; - background-color: $B6Color; - - &:hover { - background-color: #0052cc; - } + flex-flow: column; } -.secondary-btn { - outline: 0; +.video-container { width: 100%; - cursor: pointer; - font-weight: 600; - line-height: 1.2; - position: relative; - align-items: center; - display: inline-flex; - font-size: rem2(16px); - min-width: rem2(64px); - text-decoration: none; - box-sizing: border-box; - border-radius: rem2(4px); - margin-bottom: rem2(8px); + display: flex; justify-content: center; - padding: rem2(12px) rem2(16px); - border: rem2(1px) solid #bdbdbd; - color: #1976d2; - background-color: $White; - - &:hover { - background-color: #eee; - } -} - -.btn-img { - width: rem2(18px); - height: rem2(18px); - margin-right: rem2(8px); - background-size: contain; - background-position: center; - background-repeat: no-repeat; -} - -.google-play { - background-image: url('/images/templates/google-play.svg'); -} - -.apple-store { - background-image: url('/images/templates/apple-store.svg'); -} - -.nuget { - background-image: url('/images/templates/nuget.svg'); -} - -.figma { - background-image: url('/images/templates/figma.svg'); -} - -::deep a { - color: $bit-color-primary-main; } diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates02SamplesPage.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates02SamplesPage.razor new file mode 100644 index 0000000000..d0e4f94d68 --- /dev/null +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates02SamplesPage.razor @@ -0,0 +1,72 @@ +@page "/templates/samples" +@inherits AppComponentBase + + + +
+ Boilerplate Samples + + + We published a few apps using our own bit Boilerplate project template in different platforms. +
+ Two distinct samples that further explain the features in action are included in the project template: +
+ +
+
+
+ + AdminPanel sample +
+
+ + + The AdminPanel sample is a project powered by bit Boilerplate that includes all the necessary parts to create a fully-featured cross-platform admin/management website/app. + +
+ + +
+ +
+
+
+ + Todo sample +
+
+ + + The Todo sample is a project powered by Boilerplate that includes work packages and actions that you can apply to various cross-platform projects. + +
+ + +
+
+ + diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates02SamplesPage.razor.scss b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates02SamplesPage.razor.scss new file mode 100644 index 0000000000..df16fd7d31 --- /dev/null +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates02SamplesPage.razor.scss @@ -0,0 +1,188 @@ +@import '../../Styles/abstracts/_colors.scss'; +@import '../../Styles/abstracts/_mixins.scss'; +@import '../../Styles/abstracts/_functions.scss'; +@import '../../Styles/abstracts/_media-queries.scss'; + +.page-container { + @include PageContainer; +} + +.page-flex-container { + width: 100%; + display: flex; + flex-flow: row wrap; + box-sizing: border-box; +} + +.page-content-container { + margin: 0; + flex-grow: 0; + max-width: 66%; + flex-basis: 66%; + flex-direction: row; + box-sizing: border-box; + + &:last-child { + max-width: 34%; + flex-basis: 34%; + padding-left: rem2(48px); + } + + @include lt-xl { + flex-grow: 0; + max-width: 100%; + flex-basis: 100%; + + &:last-child { + padding-left: 0; + max-width: 100%; + flex-basis: 100%; + padding-top: rem2(32px); + } + } +} + +.image-container { + position: relative; + padding: 50% 0 0 0; + margin-bottom: 1rem; + + .template-img { + top: 0; + width: 100%; + height: 100%; + color: #f5f5f5; + display: block; + position: absolute; + border-radius: rem2(8px); + background-color: #f5f5f5; + box-shadow: $bit-box-shadow-callout; + } + + .demo-btn-shadow { + top: 0; + left: 0; + right: 0; + bottom: 0; + opacity: 0; + display: flex; + position: absolute; + align-items: center; + justify-content: center; + border-radius: rem2(8px); + background-color: rgba(25, 118, 210, 0.6); + transition: opacity 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms; + } + + .demo-btn { + border: 0; + margin: 0; + outline: 0; + cursor: pointer; + font-weight: 500; + line-height: 1.2; + position: relative; + align-items: center; + display: inline-flex; + min-width: rem2(64px); + font-size: rem2(16px); + text-decoration: none; + box-sizing: border-box; + border-radius: rem2(4px); + justify-content: center; + padding: rem2(12px) rem2(16px); + transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms; + color: $White; + background-color: #1976d2; + + &:hover { + background-color: #0052cc; + } + } + + &:hover { + .demo-btn-shadow { + opacity: 1; + } + } +} + +.primary-btn { + border: 0; + outline: 0; + width: 100%; + cursor: pointer; + font-weight: 600; + line-height: 1.2; + position: relative; + align-items: center; + font-size: rem2(16px); + min-width: rem2(64px); + display: inline-flex; + text-decoration: none; + justify-content: center; + border-radius: rem2(4px); + margin-bottom: rem2(8px); + padding: rem2(12px) rem2(16px); + color: $White; + background-color: $B6Color; + + &:hover { + background-color: #0052cc; + } +} + +.secondary-btn { + outline: 0; + width: 100%; + cursor: pointer; + font-weight: 600; + line-height: 1.2; + position: relative; + align-items: center; + display: inline-flex; + font-size: rem2(16px); + min-width: rem2(64px); + text-decoration: none; + box-sizing: border-box; + border-radius: rem2(4px); + margin-bottom: rem2(8px); + justify-content: center; + padding: rem2(12px) rem2(16px); + border: rem2(1px) solid #bdbdbd; + color: #1976d2; + background-color: $White; + + &:hover { + background-color: #eee; + } +} + +.btn-img { + width: rem2(18px); + height: rem2(18px); + margin-right: rem2(8px); + background-size: contain; + background-position: center; + background-repeat: no-repeat; +} + +.google-play { + background-image: url('/images/templates/google-play.svg'); +} + +.apple-store { + background-image: url('/images/templates/apple-store.svg'); +} + +.nuget { + background-image: url('/images/templates/nuget.svg'); +} + +.figma { + background-image: url('/images/templates/figma.svg'); +} + +::deep a { + color: $bit-color-primary-main; +} diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates02DevelopmentPrerequisitesPage.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates03DevelopmentPrerequisitesPage.razor similarity index 100% rename from src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates02DevelopmentPrerequisitesPage.razor rename to src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates03DevelopmentPrerequisitesPage.razor diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates02DevelopmentPrerequisitesPage.razor.scss b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates03DevelopmentPrerequisitesPage.razor.scss similarity index 100% rename from src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates02DevelopmentPrerequisitesPage.razor.scss rename to src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates03DevelopmentPrerequisitesPage.razor.scss diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates03CreateProjectPage.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates04CreateProjectPage.razor similarity index 100% rename from src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates03CreateProjectPage.razor rename to src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates04CreateProjectPage.razor diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates03CreateProjectPage.razor.scss b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates04CreateProjectPage.razor.scss similarity index 100% rename from src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates03CreateProjectPage.razor.scss rename to src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates04CreateProjectPage.razor.scss diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates04ProjectStructurePage.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates05ProjectStructurePage.razor similarity index 100% rename from src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates04ProjectStructurePage.razor rename to src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates05ProjectStructurePage.razor diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates04ProjectStructurePage.razor.scss b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates05ProjectStructurePage.razor.scss similarity index 100% rename from src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates04ProjectStructurePage.razor.scss rename to src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates05ProjectStructurePage.razor.scss diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates05DatabasePage.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates06DatabasePage.razor similarity index 100% rename from src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates05DatabasePage.razor rename to src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates06DatabasePage.razor diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates05DatabasePage.razor.scss b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates06DatabasePage.razor.scss similarity index 100% rename from src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates05DatabasePage.razor.scss rename to src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates06DatabasePage.razor.scss diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates06RunPage.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates07RunPage.razor similarity index 100% rename from src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates06RunPage.razor rename to src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates07RunPage.razor diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates06RunPage.razor.scss b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates07RunPage.razor.scss similarity index 100% rename from src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates06RunPage.razor.scss rename to src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates07RunPage.razor.scss diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates07AppModelsPage.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates08AppModelsPage.razor similarity index 100% rename from src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates07AppModelsPage.razor rename to src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates08AppModelsPage.razor diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates07AppModelsPage.razor.scss b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates08AppModelsPage.razor.scss similarity index 100% rename from src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates07AppModelsPage.razor.scss rename to src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates08AppModelsPage.razor.scss diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates08DeploymentTypePage.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates09DeploymentTypePage.razor similarity index 100% rename from src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates08DeploymentTypePage.razor rename to src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates09DeploymentTypePage.razor diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates08DeploymentTypePage.razor.scss b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates09DeploymentTypePage.razor.scss similarity index 100% rename from src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates08DeploymentTypePage.razor.scss rename to src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates09DeploymentTypePage.razor.scss diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates09CacheMechanismPage.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates10CacheMechanismPage.razor similarity index 100% rename from src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates09CacheMechanismPage.razor rename to src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates10CacheMechanismPage.razor diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates09CacheMechanismPage.razor.scss b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates10CacheMechanismPage.razor.scss similarity index 100% rename from src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates09CacheMechanismPage.razor.scss rename to src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates10CacheMechanismPage.razor.scss diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates10DevOpsPage.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates11DevOpsPage.razor similarity index 100% rename from src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates10DevOpsPage.razor rename to src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates11DevOpsPage.razor diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates10DevOpsPage.razor.scss b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates11DevOpsPage.razor.scss similarity index 100% rename from src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates10DevOpsPage.razor.scss rename to src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates11DevOpsPage.razor.scss diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates11PlatformIntegrationPage.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates12PlatformIntegrationPage.razor similarity index 100% rename from src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates11PlatformIntegrationPage.razor rename to src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates12PlatformIntegrationPage.razor diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates11PlatformIntegrationPage.razor.scss b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates12PlatformIntegrationPage.razor.scss similarity index 100% rename from src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates11PlatformIntegrationPage.razor.scss rename to src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates12PlatformIntegrationPage.razor.scss diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates12SettingsPage.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates13SettingsPage.razor similarity index 100% rename from src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates12SettingsPage.razor rename to src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates13SettingsPage.razor diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates12SettingsPage.razor.scss b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates13SettingsPage.razor.scss similarity index 100% rename from src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates12SettingsPage.razor.scss rename to src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates13SettingsPage.razor.scss diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates13ExceptionHandlingPage.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates14ExceptionHandlingPage.razor similarity index 100% rename from src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates13ExceptionHandlingPage.razor rename to src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates14ExceptionHandlingPage.razor diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates13ExceptionHandlingPage.razor.scss b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates14ExceptionHandlingPage.razor.scss similarity index 100% rename from src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates13ExceptionHandlingPage.razor.scss rename to src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates14ExceptionHandlingPage.razor.scss diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates14MultilingualismPage.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates15MultilingualismPage.razor similarity index 100% rename from src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates14MultilingualismPage.razor rename to src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates15MultilingualismPage.razor diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates14MultilingualismPage.razor.scss b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates15MultilingualismPage.razor.scss similarity index 100% rename from src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates14MultilingualismPage.razor.scss rename to src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates15MultilingualismPage.razor.scss diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Shared/MainLayout.razor.cs b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Shared/MainLayout.razor.cs index 7e1eb52819..640b79b666 100644 --- a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Shared/MainLayout.razor.cs +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Shared/MainLayout.razor.cs @@ -18,6 +18,7 @@ public partial class MainLayout : IDisposable private readonly List templatesNavItems = [ new BitNavItem { Text = "Overview", Url = "/templates/overview", AdditionalUrls = new string[] { "/admin-panel/overview", "/todo-template/overview" } }, + new BitNavItem { Text = "Samples", Url = "/templates/samples" }, new BitNavItem { Text = "Development prerequisites", Url = "/templates/development-prerequisites", AdditionalUrls = new string[] { "/admin-panel/development-prerequisites", "/todo-template/development-prerequisites" } }, new BitNavItem { Text = "Create project", Url = "/templates/create-project", AdditionalUrls = new string[] { "/admin-panel/create-project", "/todo-template/create-project" } }, new BitNavItem { Text = "Project structure", Url = "/templates/project-structure", AdditionalUrls = new string[] { "/admin-panel/project-structure", "/todo-template/project-structure" } }, diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/compilerconfig.json b/src/Websites/Platform/src/Bit.Websites.Platform.Client/compilerconfig.json index c27f6eae7c..04fb89a410 100644 --- a/src/Websites/Platform/src/Bit.Websites.Platform.Client/compilerconfig.json +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/compilerconfig.json @@ -84,80 +84,85 @@ "options": { "sourceMap": false } }, { - "outputFile": "Pages/Templates/Templates02DevelopmentPrerequisitesPage.razor.css", - "inputFile": "Pages/Templates/Templates02DevelopmentPrerequisitesPage.razor.scss", + "outputFile": "Pages/Templates/Templates02SamplesPage.razor.css", + "inputFile": "Pages/Templates/Templates02SamplesPage.razor.scss", "minify": { "enabled": false }, "options": { "sourceMap": false } }, { - "outputFile": "Pages/Templates/Templates03CreateProjectPage.razor.css", - "inputFile": "Pages/Templates/Templates03CreateProjectPage.razor.scss", + "outputFile": "Pages/Templates/Templates03DevelopmentPrerequisitesPage.razor.css", + "inputFile": "Pages/Templates/Templates03DevelopmentPrerequisitesPage.razor.scss", "minify": { "enabled": false }, "options": { "sourceMap": false } }, { - "outputFile": "Pages/Templates/Templates04ProjectStructurePage.razor.css", - "inputFile": "Pages/Templates/Templates04ProjectStructurePage.razor.scss", + "outputFile": "Pages/Templates/Templates04CreateProjectPage.razor.css", + "inputFile": "Pages/Templates/Templates04CreateProjectPage.razor.scss", "minify": { "enabled": false }, "options": { "sourceMap": false } }, { - "outputFile": "Pages/Templates/Templates05DatabasePage.razor.css", - "inputFile": "Pages/Templates/Templates05DatabasePage.razor.scss", + "outputFile": "Pages/Templates/Templates05ProjectStructurePage.razor.css", + "inputFile": "Pages/Templates/Templates05ProjectStructurePage.razor.scss", + "minify": { "enabled": false }, + "options": { "sourceMap": false } + }, + { "outputFile": "Pages/Templates/Templates06DatabasePage.razor.css", + "inputFile": "Pages/Templates/Templates06DatabasePage.razor.scss", "minify": { "enabled": false }, "options": { "sourceMap": false } }, { - "outputFile": "Pages/Templates/Templates06RunPage.razor.css", - "inputFile": "Pages/Templates/Templates06RunPage.razor.scss", + "outputFile": "Pages/Templates/Templates07RunPage.razor.css", + "inputFile": "Pages/Templates/Templates07RunPage.razor.scss", "minify": { "enabled": false }, "options": { "sourceMap": false } }, { - "outputFile": "Pages/Templates/Templates07AppModelsPage.razor.css", - "inputFile": "Pages/Templates/Templates07AppModelsPage.razor.scss", + "outputFile": "Pages/Templates/Templates08AppModelsPage.razor.css", + "inputFile": "Pages/Templates/Templates08AppModelsPage.razor.scss", "minify": { "enabled": false }, "options": { "sourceMap": false } }, { - "outputFile": "Pages/Templates/Templates08DeploymentTypePage.razor.css", - "inputFile": "Pages/Templates/Templates08DeploymentTypePage.razor.scss", + "outputFile": "Pages/Templates/Templates09DeploymentTypePage.razor.css", + "inputFile": "Pages/Templates/Templates09DeploymentTypePage.razor.scss", "minify": { "enabled": false }, "options": { "sourceMap": false } }, { - "outputFile": "Pages/Templates/Templates09CacheMechanismPage.razor.css", - "inputFile": "Pages/Templates/Templates09CacheMechanismPage.razor.scss", + "outputFile": "Pages/Templates/Templates10CacheMechanismPage.razor.css", + "inputFile": "Pages/Templates/Templates10CacheMechanismPage.razor.scss", "minify": { "enabled": false }, "options": { "sourceMap": false } }, { - "outputFile": "Pages/Templates/Templates10DevOpsPage.razor.css", - "inputFile": "Pages/Templates/Templates10DevOpsPage.razor.scss", + "outputFile": "Pages/Templates/Templates11DevOpsPage.razor.css", + "inputFile": "Pages/Templates/Templates11DevOpsPage.razor.scss", "minify": { "enabled": false }, "options": { "sourceMap": false } }, { - "outputFile": "Pages/Templates/Templates11PlatformIntegrationPage.razor.css", - "inputFile": "Pages/Templates/Templates11PlatformIntegrationPage.razor.scss", + "outputFile": "Pages/Templates/Templates12PlatformIntegrationPage.razor.css", + "inputFile": "Pages/Templates/Templates12PlatformIntegrationPage.razor.scss", "minify": { "enabled": false }, "options": { "sourceMap": false } }, { - "outputFile": "Pages/Templates/Templates12SettingsPage.razor.css", - "inputFile": "Pages/Templates/Templates12SettingsPage.razor.scss", + "outputFile": "Pages/Templates/Templates13SettingsPage.razor.css", + "inputFile": "Pages/Templates/Templates13SettingsPage.razor.scss", "minify": { "enabled": false }, "options": { "sourceMap": false } }, { - "outputFile": "Pages/Templates/Templates13ExceptionHandlingPage.razor.css", - "inputFile": "Pages/Templates/Templates13ExceptionHandlingPage.razor.scss", + "outputFile": "Pages/Templates/Templates14ExceptionHandlingPage.razor.css", + "inputFile": "Pages/Templates/Templates14ExceptionHandlingPage.razor.scss", "minify": { "enabled": false }, "options": { "sourceMap": false } }, { - "outputFile": "Pages/Templates/Templates14MultilingualismPage.razor.css", - "inputFile": "Pages/Templates/Templates14MultilingualismPage.razor.scss", + "outputFile": "Pages/Templates/Templates15MultilingualismPage.razor.css", + "inputFile": "Pages/Templates/Templates15MultilingualismPage.razor.scss", "minify": { "enabled": false }, "options": { "sourceMap": false } },