From 55957c39a981f44a70a933239bd565a5b8bd0420 Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Fri, 17 Nov 2023 10:24:58 +0800 Subject: [PATCH] doc(Website): use web app template (#2386) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * refactor: 更新 App/Routes 组件 * chore: 更新 Program 文件 * refactor: 临时取消登录集成 * refactor: 增加 MVC 路由表 * chore: 更新路由配置 * chore: 合并工程 * refactor: 修改命名空间 * chore: 更新 nginx 配置文件 * chore: remove dist folder * doc: 更正单词拼写错误 * chore: 更新解决方案 * refactor: 更新命名空间 * chore: 更新命名空间 * chore: 更新命名空间 * chore: 整理命名空间 * chore: 更新命名空间 * chore: 更正脚本路径 * chore: 精简依赖 * refactor: 禁用授权 * refactor: 移除渲染方式 * refactor: 更改为服务器端渲染模式 * chore: 更新字典 * doc: 重构代码 * refactor: 增加 BootstrapBlazorRoot 组件 * doc: 更新 responsive 脚本 --------- Co-authored-by: zhangpeihang <948869991@qq.com> --- BootstrapBlazor.sln | 15 - BootstrapBlazor.slnf | 1 - dist/.gitattributes | 63 - dist/.nojekyll | 0 dist/.spa | 2 - dist/404.html | 40 - dist/gitee-pages/404.html | 72 - exclusion.dic | 5 + scripts/linux/nginx.conf | 13 + src/BootstrapBlazor.Server/AIChat/Chats.razor | 2 +- .../BootstrapBlazor.Server.csproj | 60 +- .../Components/AttributeTable.razor | 13 + .../Components/AttributeTable.razor.cs | 37 + .../Components/Components/BBLogo.razor | 1 + .../Components/Components/BBLogo.razor.css | 8 + .../Components/BlazorReconnector.razor | 78 + .../Components/Components/CSS.razor | 4 + .../Components/Components/CSS.razor.cs | 17 + .../Components/CalendarCrewCell.razor | 12 + .../Components/CalendarCrewCell.razor.cs | 56 + .../Components/CalendarCrewCell.razor.css | 3 + .../Components/CalendarCrewDialogBody.razor | 19 + .../CalendarCrewDialogBody.razor.cs | 32 + .../CalendarCrewDialogBody.razor.css | 35 + .../Components/Components/CommitItem.razor | 7 + .../Components/Components/CommitItem.razor.cs | 49 + .../Components/Components/ComponentCard.razor | 8 + .../Components/ComponentCard.razor.cs | 60 + .../Components/ComponentCategory.razor | 21 + .../Components/ComponentCategory.razor.cs | 55 + .../Components/ComponentCategory.razor.css | 46 + .../Components/ContextMenuList.razor | 16 + .../Components/Components/Counter.razor | 14 + .../Components/CultureChooser.razor | 13 + .../Components/CultureChooser.razor.cs | 98 + .../Components/CultureChooser.razor.css | 18 + .../Components/CustomerFilter.razor | 50 + .../Components/CustomerSelectDialog.razor | 8 + .../Components/CustomerSelectDialog.razor.cs | 50 + .../Components/DataDialogComponent.razor | 77 + .../Components/Components/DemoBlock.razor | 29 + .../Components/Components/DemoBlock.razor.cs | 75 + .../Components/Components/DemoBlock.razor.css | 116 + .../Components/Components/DemoComponent.razor | 6 + .../Components/Components/DemoTabItem.razor | 3 + .../Components/DemoTabItem.razor.cs | 29 + .../Components/DemoTabItemSetText.razor | 3 + .../Components/DemoTabItemSetText.razor.cs | 24 + .../Components/DemoTableEditTemplate.razor | 28 + .../Components/Components/DialogBodyFoo.razor | 1 + .../Components/DialogBodyFoo.razor.cs | 29 + .../Components/Components/DialogDemo.razor | 16 + .../Components/Components/DialogDemo.razor.cs | 26 + .../Components/DialogHeaderFoo.razor | 4 + .../Components/DialogHeaderFoo.razor.cs | 49 + .../Components/DialogSaveDetail.razor | 17 + .../Components/Components/ErrorCounter.razor | 14 + .../Components/Components/EventTable.razor | 17 + .../Components/Components/FetchData.razor | 47 + .../Components/Components/FooSearch.razor | 14 + .../Components/Components/FooSearch.razor.cs | 35 + .../Components/FormInlineSwitch.razor | 1 + .../Components/FormInlineSwitch.razor.cs | 61 + .../Components/Components/GlobalSearch.razor | 3 + .../Components/GlobalSearch.razor.cs | 57 + .../Components/Components/Header.razor | 44 + .../Components/Components/Header.razor.cs | 48 + .../Components/Components/Header.razor.css | 68 + .../Components/Components/Header.razor.js | 20 + .../Components/InstallContent.razor | 90 + .../Components/InstallContent.razor.cs | 67 + .../Components/Components/MethodTable.razor | 13 + .../Components/MethodTable.razor.cs | 38 + .../Components/Components/PackageTips.razor | 36 + .../Components/Components/Pre.razor | 21 + .../Components/Components/Pre.razor.cs | 191 + .../Components/Components/Pre.razor.css | 48 + .../Components/Components/Pre.razor.js | 88 + .../Components/Components/QQGroup.razor | 17 + .../Components/ResultDialogDemo.razor | 8 + .../Components/ResultDialogDemo.razor.cs | 37 + .../Components/ResultDialogDemo2.razor | 7 + .../Components/ResultDialogDemo2.razor.cs | 138 + .../Components/ShownCallbackDummy.razor | 36 + .../Components/Components/State.razor | 18 + .../Components/Components/State.razor.cs | 29 + .../Components/Components/SwalFooter.razor | 1 + .../Components/Components/ThemeChooser.razor | 18 + .../Components/ThemeChooser.razor.cs | 74 + .../Components/ThemeChooser.razor.css | 63 + .../Components/ThemeChooser.razor.js | 49 + .../Components/Components/Tips.razor | 28 + .../Components/Components/UpdateIntro.razor | 28 + .../Components/UpdateIntro.razor.cs | 35 + .../Components/UpdateIntro.razor.css | 68 + .../Components/UpdateIntro.razor.js | 56 + .../Components/Components/Video.razor | 42 + .../Components/WebSiteModuleComponentBase.cs | 21 + .../Components/Components/Widget.razor | 75 + .../Components/Components/WinButton.razor | 9 + .../Components/Components/Wwads.razor | 4 + .../Components/Components/Wwads.razor.cs | 25 + .../Components/Components/Wwads.razor.js | 15 + .../Components/Layout/BaseLayout.razor | 15 + .../Components/Layout/BaseLayout.razor.cs | 104 + .../Components/Layout/BaseLayout.razor.css | 49 + .../Components/Layout/ComponentLayout.razor | 50 + .../Layout/ComponentLayout.razor.cs | 155 + .../Layout/ComponentLayout.razor.css | 56 + .../Layout/ComponentLayout.razor.js | 18 + .../Components/Layout/DockLayout.razor | 6 + .../Components/Layout/DockLayout.razor.cs | 75 + .../Components/Layout/DockLayout.razor.css | 9 + .../Components/Layout/DockLayout.razor.js | 15 + .../Components/Layout/HomeLayout.razor | 204 + .../Components/Layout/HomeLayout.razor.css | 71 + .../Components/Layout/MainLayout.razor | 17 + .../Components/Layout/MainLayout.razor.cs | 75 + .../Components/Layout/MainLayout.razor.css | 100 + .../Components/Layout/NavMenu.razor | 23 + .../Components/Layout/NavMenu.razor.cs | 72 + .../Components/Layout/NavMenu.razor.css | 72 + .../Components/Layout/NavMenu.razor.js | 53 + .../Components/Layout/PageLayout.razor | 145 + .../Components/Layout/PageLayout.razor.cs | 86 + .../Components/Layout/PageLayout.razor.css | 310 + .../Components/Layout/PracticeLayout.razor | 17 + .../Layout/PracticeLayout.razor.css | 73 + .../Layout/PracticeLoginLayout.razor | 22 + .../Layout/PracticeLoginLayout.razor.css | 34 + .../Components/Layout/PracticeNavMenu.razor | 16 + .../Layout/PracticeNavMenu.razor.cs | 259 + .../Layout/PracticeNavMenu.razor.css | 43 + .../Components/Layout/PrintLayout.razor | 3 + .../Components/Pages/App.razor | 57 + .../Components/Pages/Breakpoints.razor | 58 + .../Components/Pages/Breakpoints.razor.css | 4 + .../Components/Pages/Coms.razor | 157 + .../Components/Pages/Coms.razor.cs | 23 + .../Components/Pages/Coms.razor.css | 26 + .../Components/Pages/Error.razor | 16 + .../Components/Pages/Golbalization.razor | 8 + .../Components/Pages/Index.razor | 161 + .../Components/Pages/Index.razor.cs | 30 + .../Components/Pages/Index.razor.css | 196 + .../Components/Pages/Index.razor.js | 79 + .../Components/Pages/Install.razor | 56 + .../Components/Pages/Install.razor.css | 28 + .../Components/Pages/Install_Maui.razor | 226 + .../Components/Pages/Install_Server.razor | 53 + .../Components/Pages/Install_wasm.razor | 46 + .../Components/Pages/Introduction.razor | 73 + .../Components/Pages/Introduction.razor.cs | 46 + .../Components/Pages/Layout.razor | 32 + .../Components/Pages/Layout.razor.cs | 77 + .../Components/Pages/Localization.razor | 362 + .../Components/Pages/Localization.razor.css | 11 + .../Components/Pages/Practice.razor | 10 + .../Components/Pages/Practice.razor.css | 26 + .../Components/Pages/Routes.razor | 7 + .../Components/Pages/Template.razor | 51 + .../Components/Pages/Template.razor.cs | 27 + .../Components/Pages/Theme.razor | 24 + .../Components/Samples/Ajaxs.razor | 34 + .../Components/Samples/Ajaxs.razor.cs | 87 + .../Components/Samples/Alerts.razor | 71 + .../Components/Samples/Alerts.razor.cs | 186 + .../Components/Samples/AnchorLinks.razor | 17 + .../Components/Samples/AnchorLinks.razor.cs | 51 + .../Components/Samples/Anchors.razor | 36 + .../Components/Samples/Anchors.razor.cs | 59 + .../Components/Samples/AutoCompletes.razor | 101 + .../Components/Samples/AutoCompletes.razor.cs | 174 + .../Components/Samples/AutoFills.razor | 69 + .../Components/Samples/AutoFills.razor.cs | 157 + .../Components/Samples/AutoRedirects.razor | 12 + .../Components/Samples/AutoRedirects.razor.cs | 60 + .../Components/Samples/Avatars.razor | 59 + .../Components/Samples/Avatars.razor.cs | 98 + .../Components/Samples/Badges.razor | 52 + .../Components/Samples/Badges.razor.cs | 51 + .../Components/Samples/Badges.razor.css | 21 + .../Components/Samples/BaiduOcr.razor | 136 + .../Components/Samples/BaiduOcr.razor.cs | 130 + .../Components/Samples/BarcodeReaders.razor | 36 + .../Samples/BarcodeReaders.razor.cs | 187 + .../Components/Samples/Blocks.razor | 73 + .../Components/Samples/Blocks.razor.cs | 108 + .../Components/Samples/Bluetooth.razor | 76 + .../Components/Samples/Bluetooth.razor.cs | 365 + .../Components/Samples/Bluetooth.razor.css | 11 + .../Components/Samples/Breadcrumbs.razor | 10 + .../Components/Samples/Breadcrumbs.razor.cs | 28 + .../Components/Samples/Buttons.razor | 159 + .../Components/Samples/Buttons.razor.cs | 197 + .../Components/Samples/Calendars.razor | 126 + .../Components/Samples/Calendars.razor.cs | 79 + .../Components/Samples/Calendars.razor.css | 36 + .../Components/Samples/Cameras.razor | 53 + .../Components/Samples/Cameras.razor.cs | 257 + .../Components/Samples/Captchas.razor | 24 + .../Components/Samples/Captchas.razor.cs | 170 + .../Components/Samples/Cards.razor | 225 + .../Components/Samples/Cards.razor.cs | 92 + .../Components/Samples/Carousels.razor | 210 + .../Components/Samples/Carousels.razor.cs | 91 + .../Components/Samples/Carousels.razor.css | 28 + .../Components/Samples/Cascaders.razor | 127 + .../Components/Samples/Cascaders.razor.cs | 150 + .../Components/Samples/Charts/Bar.razor | 49 + .../Components/Samples/Charts/Bar.razor.cs | 180 + .../Components/Samples/Charts/Bubble.razor | 25 + .../Components/Samples/Charts/Bubble.razor.cs | 104 + .../Components/Samples/Charts/Doughnut.razor | 27 + .../Samples/Charts/Doughnut.razor.cs | 99 + .../Components/Samples/Charts/Index.razor | 14 + .../Components/Samples/Charts/Index.razor.cs | 194 + .../Components/Samples/Charts/Line.razor | 60 + .../Components/Samples/Charts/Line.razor.cs | 281 + .../Components/Samples/Charts/Line.razor.js | 68 + .../Components/Samples/Charts/Pie.razor | 31 + .../Components/Samples/Charts/Pie.razor.cs | 105 + .../Components/Samples/Charts/Utility.cs | 90 + .../Components/Samples/CheckboxLists.razor | 115 + .../Components/Samples/CheckboxLists.razor.cs | 175 + .../Components/Samples/Checkboxs.razor | 145 + .../Components/Samples/Checkboxs.razor.cs | 123 + .../Components/Samples/CherryMarkdowns.razor | 37 + .../Samples/CherryMarkdowns.razor.cs | 119 + .../Components/Samples/Circles.razor | 60 + .../Components/Samples/Circles.razor.cs | 76 + .../Components/Samples/Circles.razor.css | 16 + .../Components/Samples/Client.razor | 81 + .../Components/Samples/Client.razor.cs | 27 + .../Components/Samples/Clipboards.razor | 19 + .../Components/Samples/Clipboards.razor.cs | 39 + .../Components/Samples/CodeEditors.razor | 38 + .../Components/Samples/CodeEditors.razor.cs | 148 + .../Components/Samples/Collapses.razor | 143 + .../Components/Samples/Collapses.razor.cs | 59 + .../Components/Samples/ColorPickers.razor | 37 + .../Components/Samples/ColorPickers.razor.cs | 41 + .../Components/Samples/Consoles.razor | 33 + .../Components/Samples/Consoles.razor.cs | 269 + .../Components/Samples/ContextMenus.razor | 55 + .../Components/Samples/ContextMenus.razor.cs | 34 + .../Components/Samples/CountButtons.razor | 16 + .../Components/Samples/CountButtons.razor.cs | 43 + .../Components/Samples/CountUps.razor | 109 + .../Components/Samples/CountUps.razor.cs | 219 + .../Components/Samples/CountUps.razor.css | 3 + .../Components/Samples/DateTimePickers.razor | 153 + .../Samples/DateTimePickers.razor.cs | 168 + .../Components/Samples/DateTimeRanges.razor | 89 + .../Samples/DateTimeRanges.razor.cs | 231 + .../Components/Samples/DialButtons.razor | 97 + .../Components/Samples/DialButtons.razor.cs | 54 + .../Components/Samples/DialButtons.razor.css | 22 + .../Components/Samples/Dialogs.razor | 194 + .../Components/Samples/Dialogs.razor.cs | 450 ++ .../Components/Samples/Dispatches.razor | 54 + .../Components/Samples/Dispatches.razor.cs | 17 + .../Components/Samples/Displays.razor | 136 + .../Components/Samples/Displays.razor.cs | 103 + .../Components/Samples/Dividers.razor | 72 + .../Components/Samples/Dividers.razor.cs | 54 + .../Samples/DockViews/BaseDockView.cs | 155 + .../Samples/DockViews/DockViewCol.razor | 48 + .../Samples/DockViews/DockViewComplex.razor | 53 + .../Samples/DockViews/DockViewLayout.razor | 94 + .../DockViews/DockViewLayout.razor.css | 14 + .../Samples/DockViews/DockViewLock.razor | 88 + .../Samples/DockViews/DockViewLock.razor.css | 4 + .../Samples/DockViews/DockViewNest.razor | 62 + .../Samples/DockViews/DockViewRow.razor | 48 + .../Samples/DockViews/DockViewStack.razor | 48 + .../Samples/DockViews/DockViewVisible.razor | 65 + .../DockViews/DockViewVisible.razor.css | 4 + .../Components/Samples/DockViews/Index.razor | 11 + .../Samples/DockViews/_Imports.razor | 1 + .../Components/Samples/Downloads.razor | 70 + .../Components/Samples/Downloads.razor.cs | 77 + .../Components/Samples/DragDrops.razor | 95 + .../Components/Samples/DragDrops.razor.cs | 168 + .../Components/Samples/Drawers.razor | 41 + .../Components/Samples/Drawers.razor.cs | 123 + .../Components/Samples/DropdownWidgets.razor | 87 + .../Samples/DropdownWidgets.razor.cs | 87 + .../Samples/DropdownWidgets.razor.css | 19 + .../Components/Samples/Dropdowns.razor | 176 + .../Components/Samples/Dropdowns.razor.cs | 262 + .../Components/Samples/EditDialogs.razor | 28 + .../Components/Samples/EditDialogs.razor.cs | 213 + .../Components/Samples/EditorForms.razor | 128 + .../Components/Samples/EditorForms.razor.cs | 191 + .../Components/Samples/Editors.razor | 75 + .../Components/Samples/Editors.razor.cs | 164 + .../Components/Samples/Empties.razor | 31 + .../Components/Samples/Empties.razor.cs | 67 + .../Components/Samples/EyeDroppers.razor | 24 + .../Components/Samples/EyeDroppers.razor.cs | 22 + .../Components/Samples/FAIcons.razor | 25 + .../Components/Samples/FAIcons.razor.cs | 45 + .../Components/Samples/FileIcons.razor | 121 + .../Components/Samples/FileIcons.razor.cs | 43 + .../Components/Samples/FileIcons.razor.css | 9 + .../Components/Samples/FileViewers.razor | 41 + .../Components/Samples/FileViewers.razor.cs | 169 + .../Components/Samples/FloatingLabels.razor | 82 + .../Samples/FloatingLabels.razor.cs | 106 + .../Components/Samples/Footers.razor | 63 + .../Components/Samples/Footers.razor.cs | 47 + .../Components/Samples/FullScreens.razor | 21 + .../Components/Samples/Gantts.razor | 18 + .../Components/Samples/Gantts.razor.cs | 198 + .../Components/Samples/Geolocations.razor | 64 + .../Components/Samples/Geolocations.razor.cs | 83 + .../Components/Samples/GlobalException.razor | 71 + .../Samples/GlobalException.razor.cs | 65 + .../Components/Samples/GoTops.razor | 23 + .../Components/Samples/GoTops.razor.cs | 23 + .../Components/Samples/GroupBoxes.razor | 15 + .../Components/Samples/GroupBoxes.razor.cs | 23 + .../Components/Samples/Handwrittens.razor | 13 + .../Components/Samples/Handwrittens.razor.cs | 52 + .../Components/Samples/Html2Pdfs.razor | 83 + .../Components/Samples/HtmlRenderers.razor | 16 + .../Components/Samples/HtmlRenderers.razor.cs | 22 + .../Components/Samples/ImageViewers.razor | 123 + .../Components/Samples/ImageViewers.razor.cs | 108 + .../Components/Samples/ImageViewers.razor.css | 42 + .../Components/Samples/InputGroups.razor | 204 + .../Components/Samples/InputGroups.razor.cs | 65 + .../Components/Samples/InputNumbers.razor | 210 + .../Components/Samples/InputNumbers.razor.cs | 105 + .../Components/Samples/InputNumbers.razor.css | 7 + .../Components/Samples/Inputs.razor | 212 + .../Components/Samples/Inputs.razor.cs | 195 + .../Components/Samples/Ips.razor | 7 + .../Components/Samples/Ips.razor.cs | 13 + .../Samples/JSRuntimeExtensions.razor | 62 + .../Samples/JSRuntimeExtensions.razor.cs | 128 + .../Samples/JSRuntimeExtensions.razor.css | 15 + .../Components/Samples/Labels.razor | 222 + .../Components/Samples/Labels.razor.cs | 36 + .../Components/Samples/LayoutDemo.razor | 31 + .../Components/Samples/LayoutPages.razor | 68 + .../Components/Samples/LayoutPages.razor.cs | 121 + .../Components/Samples/LayoutPages.razor.css | 24 + .../Components/Samples/LayoutPages1.razor | 5 + .../Components/Samples/Layouts.razor | 192 + .../Components/Samples/Layouts.razor.cs | 179 + .../Components/Samples/Layouts.razor.css | 68 + .../Components/Samples/Lights.razor | 83 + .../Components/Samples/Lights.razor.cs | 120 + .../Components/Samples/LinkButtons.razor | 89 + .../Components/Samples/LinkButtons.razor.cs | 91 + .../Components/Samples/ListGroups.razor | 46 + .../Components/Samples/ListGroups.razor.cs | 97 + .../Components/Samples/ListGroups.razor.css | 3 + .../Components/Samples/ListViews.razor | 111 + .../Components/Samples/ListViews.razor.cs | 151 + .../Components/Samples/ListViews.razor.css | 12 + .../Components/Samples/Live2DDisplays.razor | 100 + .../Samples/Live2DDisplays.razor.cs | 127 + .../Components/Samples/Locators.razor | 57 + .../Components/Samples/Locators.razor.cs | 38 + .../Components/Samples/Logouts.razor | 66 + .../Components/Samples/Logouts.razor.cs | 78 + .../Components/Samples/Markdowns.razor | 104 + .../Components/Samples/Markdowns.razor.cs | 129 + .../Components/Samples/Marquees.razor | 39 + .../Components/Samples/Marquees.razor.cs | 23 + .../Components/Samples/Marquees.razor.css | 7 + .../Components/Samples/Menus.razor | 124 + .../Components/Samples/Menus.razor.cs | 158 + .../Components/Samples/Menus.razor.css | 63 + .../Components/Samples/Messages.razor | 81 + .../Components/Samples/Messages.razor.cs | 142 + .../Samples/MindMaps/MindMaps.razor | 36 + .../Samples/MindMaps/MindMaps.razor.cs | 346 + .../Samples/MindMaps/MindMapsSamples.razor.cs | 300 + .../Components/Samples/Modals.razor | 275 + .../Components/Samples/Modals.razor.cs | 223 + .../Components/Samples/MouseFollowers.razor | 72 + .../Samples/MouseFollowers.razor.cs | 58 + .../Samples/MouseFollowers.razor.css | 14 + .../Components/Samples/MultiSelects.razor | 219 + .../Components/Samples/MultiSelects.razor.cs | 402 ++ .../Components/Samples/MultiSelects.razor.css | 11 + .../Components/Samples/Navigation.razor | 89 + .../Components/Samples/Navigation.razor.cs | 86 + .../Components/Samples/Notifications.razor | 51 + .../Components/Samples/Notifications.razor.cs | 119 + .../Samples/OnScreenKeyboards.razor | 118 + .../Samples/OnScreenKeyboards.razor.cs | 303 + .../Samples/OnScreenKeyboards.razor.css | 10 + .../Components/Samples/Paginations.razor | 57 + .../Components/Samples/Paginations.razor.cs | 170 + .../Components/Samples/PdfReaders.razor | 95 + .../Components/Samples/PdfReaders.razor.cs | 270 + .../Components/Samples/PopoverConfirms.razor | 146 + .../Samples/PopoverConfirms.razor.cs | 196 + .../Components/Samples/Popovers.razor | 65 + .../Components/Samples/Popovers.razor.cs | 51 + .../Components/Samples/Popovers.razor.css | 10 + .../Samples/Practices/Dashboard.razor | 160 + .../Samples/Practices/Dashboard.razor.cs | 104 + .../Samples/Practices/Dashboard.razor.css | 22 + .../Samples/Practices/DashboardData.cs | 124 + .../LoginAndRegister/Template6.razor | 24 + .../LoginAndRegister/Template6.razor.css | 16 + .../LoginAndRegister/Template7.razor | 24 + .../LoginAndRegister/Template7.razor.css | 3 + .../LoginAndRegister/Template8.razor | 26 + .../LoginAndRegister/Template8.razor.css | 16 + .../LoginAndRegister/Template9.razor | 42 + .../LoginAndRegister/Template9.razor.css | 51 + .../Samples/Practices/Waterfall.razor | 23 + .../Samples/Practices/Waterfall.razor.cs | 115 + .../Samples/Practices/Waterfall.razor.css | 51 + .../Samples/Practices/_Imports.razor | 1 + .../Components/Samples/Print.razor | 73 + .../Components/Samples/PrintView.razor | 20 + .../Components/Samples/PrintView.razor.cs | 28 + .../Components/Samples/PrintView.razor.css | 5 + .../Components/Samples/Progress.razor | 124 + .../Components/Samples/Progress.razor.cs | 67 + .../Components/Samples/PulseButtons.razor | 24 + .../Components/Samples/QRCodes.razor | 35 + .../Components/Samples/QRCodes.razor.cs | 122 + .../Components/Samples/QueryBuilders.razor | 56 + .../Components/Samples/QueryBuilders.razor.cs | 17 + .../Components/Samples/Radios.razor | 131 + .../Components/Samples/Radios.razor.cs | 183 + .../Components/Samples/Rates.razor | 73 + .../Components/Samples/Rates.razor.cs | 122 + .../Components/Samples/Reconnectors.razor | 271 + .../Components/Samples/Reconnectors.razor.cs | 41 + .../Components/Samples/Repeaters.razor | 69 + .../Components/Samples/Repeaters.razor.cs | 107 + .../Components/Samples/Responsives.razor | 14 + .../Components/Samples/Responsives.razor.cs | 32 + .../Components/Samples/RibbonTabs.razor | 54 + .../Components/Samples/RibbonTabs.razor.cs | 193 + .../Components/Samples/Rows.razor | 178 + .../Components/Samples/Rows.razor.cs | 112 + .../Components/Samples/Scrolls.razor | 19 + .../Components/Samples/Scrolls.razor.cs | 35 + .../Components/Samples/Scrolls.razor.css | 5 + .../Components/Samples/SearchDialogs.razor | 35 + .../Components/Samples/SearchDialogs.razor.cs | 181 + .../Components/Samples/Searches.razor | 67 + .../Components/Samples/Searches.razor.cs | 185 + .../Components/Samples/Segmenteds.razor | 73 + .../Components/Samples/Segmenteds.razor.cs | 147 + .../Components/Samples/SelectTrees.razor | 72 + .../Components/Samples/SelectTrees.razor.cs | 88 + .../Components/Samples/Selects.razor | 410 ++ .../Components/Samples/Selects.razor.cs | 356 + .../Components/Samples/Selects.razor.css | 62 + .../Samples/SignaturePadPageResponsive.razor | 68 + .../Components/Samples/SignaturePads.razor | 46 + .../Components/Samples/SignaturePads.razor.cs | 239 + .../Components/Samples/Skeletons.razor | 59 + .../Components/Samples/Skeletons.razor.cs | 59 + .../Components/Samples/Skeletons.razor.css | 7 + .../Components/Samples/SlideButtons.razor | 130 + .../Components/Samples/SlideButtons.razor.cs | 44 + .../Components/Samples/SlideButtons.razor.css | 43 + .../Components/Samples/Sliders.razor | 150 + .../Components/Samples/Sliders.razor.css | 3 + .../Components/Samples/Speeches/Index.razor | 52 + .../Samples/Speeches/Index.razor.cs | 158 + .../Samples/Speeches/Recognizers.razor | 24 + .../Samples/Speeches/Recognizers.razor.cs | 60 + .../Samples/Speeches/SpeechWaves.razor | 33 + .../Samples/Speeches/SpeechWaves.razor.cs | 60 + .../Samples/Speeches/Synthesizers.razor | 21 + .../Samples/Speeches/Synthesizers.razor.cs | 48 + .../Components/Samples/Spinners.razor | 93 + .../Components/Samples/Spinners.razor.cs | 51 + .../Components/Samples/Splits.razor | 75 + .../Components/Samples/Splits.razor.cs | 51 + .../Components/Samples/Splits.razor.css | 21 + .../Components/Samples/Splittings.razor | 53 + .../Components/Samples/Splittings.razor.cs | 57 + .../Components/Samples/Splittings.razor.css | 3 + .../Components/Samples/Stacks.razor | 76 + .../Components/Samples/Stacks.razor.cs | 85 + .../Components/Samples/Stacks.razor.css | 33 + .../Components/Samples/Steps.razor | 149 + .../Components/Samples/Steps.razor.cs | 162 + .../Components/Samples/Steps.razor.css | 11 + .../Components/Samples/SweetAlerts.razor | 154 + .../Components/Samples/SweetAlerts.razor.cs | 224 + .../Components/Samples/SwitchButtons.razor | 28 + .../Components/Samples/SwitchButtons.razor.cs | 69 + .../Components/Samples/Switches.razor | 124 + .../Components/Samples/Switches.razor.cs | 176 + .../Components/Samples/Table/Tables.razor | 99 + .../Components/Samples/Table/Tables.razor.cs | 1281 ++++ .../Samples/Table/TablesAutoRefresh.razor | 46 + .../Samples/Table/TablesAutoRefresh.razor.cs | 43 + .../Components/Samples/Table/TablesCell.razor | 44 + .../Samples/Table/TablesCell.razor.cs | 98 + .../Samples/Table/TablesCell.razor.css | 3 + .../Samples/Table/TablesColumn.razor | 176 + .../Samples/Table/TablesColumn.razor.cs | 97 + .../Samples/Table/TablesColumnDrag.razor | 28 + .../Samples/Table/TablesColumnDrag.razor.cs | 70 + .../Samples/Table/TablesColumnList.razor | 67 + .../Samples/Table/TablesColumnList.razor.cs | 91 + .../Samples/Table/TablesColumnResizing.razor | 60 + .../Table/TablesColumnResizing.razor.cs | 85 + .../Samples/Table/TablesColumnTemplate.razor | 91 + .../Table/TablesColumnTemplate.razor.cs | 61 + .../Samples/Table/TablesDetailRow.razor | 123 + .../Samples/Table/TablesDetailRow.razor.cs | 121 + .../Samples/Table/TablesDialog.razor | 49 + .../Samples/Table/TablesDialog.razor.cs | 120 + .../Samples/Table/TablesDynamic.razor | 51 + .../Samples/Table/TablesDynamic.razor.cs | 256 + .../Samples/Table/TablesDynamicExcel.razor | 111 + .../Samples/Table/TablesDynamicExcel.razor.cs | 119 + .../Samples/Table/TablesDynamicObject.razor | 43 + .../Table/TablesDynamicObject.razor.cs | 46 + .../Components/Samples/Table/TablesEdit.razor | 249 + .../Samples/Table/TablesEdit.razor.cs | 140 + .../Samples/Table/TablesExcel.razor | 120 + .../Samples/Table/TablesExcel.razor.cs | 97 + .../Samples/Table/TablesExport.razor | 95 + .../Samples/Table/TablesExport.razor.cs | 176 + .../Samples/Table/TablesFilter.razor | 192 + .../Samples/Table/TablesFilter.razor.cs | 127 + .../Samples/Table/TablesFixedColumn.razor | 120 + .../Samples/Table/TablesFixedColumn.razor.cs | 28 + .../Samples/Table/TablesFixedHeader.razor | 105 + .../Samples/Table/TablesFixedHeader.razor.cs | 43 + .../Samples/Table/TablesFooter.razor | 79 + .../Samples/Table/TablesFooter.razor.cs | 75 + .../Samples/Table/TablesFooter.razor.css | 14 + .../Samples/Table/TablesHeader.razor | 32 + .../Samples/Table/TablesHeader.razor.cs | 59 + .../Samples/Table/TablesLoading.razor | 47 + .../Samples/Table/TablesLoading.razor.cs | 152 + .../Samples/Table/TablesLookup.razor | 24 + .../Samples/Table/TablesLookup.razor.cs | 31 + .../Samples/Table/TablesNameDrop.razor | 1 + .../Samples/Table/TablesNameDrop.razor.cs | 27 + .../Samples/Table/TablesPages.razor | 32 + .../Samples/Table/TablesPages.razor.cs | 45 + .../Components/Samples/Table/TablesRow.razor | 140 + .../Samples/Table/TablesRow.razor.cs | 101 + .../Samples/Table/TablesRow.razor.css | 4 + .../Samples/Table/TablesSearch.razor | 148 + .../Samples/Table/TablesSearch.razor.cs | 174 + .../Samples/Table/TablesSelection.razor | 39 + .../Samples/Table/TablesSelection.razor.cs | 50 + .../Samples/Table/TablesToolbar.razor | 96 + .../Samples/Table/TablesToolbar.razor.cs | 110 + .../Samples/Table/TablesTracking.razor | 23 + .../Samples/Table/TablesTracking.razor.cs | 28 + .../Components/Samples/Table/TablesTree.razor | 90 + .../Samples/Table/TablesTree.razor.cs | 133 + .../Samples/Table/TablesVirtualization.razor | 43 + .../Table/TablesVirtualization.razor.cs | 40 + .../Table/TablesVirtualization.razor.css | 13 + .../Components/Samples/Table/TablesWrap.razor | 100 + .../Samples/Table/TablesWrap.razor.cs | 39 + .../Components/Samples/Tabs.razor | 442 ++ .../Components/Samples/Tabs.razor.cs | 348 + .../Components/Samples/Tabs.razor.css | 8 + .../Components/Samples/Tags.razor | 92 + .../Components/Samples/Tags.razor.cs | 83 + .../Components/Samples/TextAreas.razor | 67 + .../Components/Samples/TextAreas.razor.cs | 173 + .../Components/Samples/TextAreas.razor.css | 10 + .../Components/Samples/Timelines.razor | 47 + .../Components/Samples/Timelines.razor.cs | 263 + .../Components/Samples/Timers.razor | 20 + .../Components/Samples/Timers.razor.cs | 70 + .../Components/Samples/Titles.razor | 53 + .../Components/Samples/Titles.razor.cs | 12 + .../Components/Samples/Toasts.razor | 178 + .../Components/Samples/Toasts.razor.cs | 188 + .../Components/Samples/Toasts.razor.css | 8 + .../Components/Samples/Toggles.razor | 109 + .../Components/Samples/Toggles.razor.cs | 117 + .../Components/Samples/Tooltips.razor | 91 + .../Components/Samples/Tooltips.razor.cs | 37 + .../Components/Samples/Tooltips.razor.css | 10 + .../Components/Samples/Topologies.razor | 21 + .../Components/Samples/Topologies.razor.cs | 117 + .../Components/Samples/Topologies.razor.css | 7 + .../Components/Samples/Topologies.razor.js | 11 + .../Components/Samples/Transfers.razor | 100 + .../Components/Samples/Transfers.razor.cs | 222 + .../Components/Samples/Transitions.razor | 35 + .../Components/Samples/Transitions.razor.cs | 89 + .../Components/Samples/TreeViews.razor | 144 + .../Components/Samples/TreeViews.razor.cs | 338 + .../Components/Samples/Trees.razor | 132 + .../Components/Samples/Trees.razor.cs | 339 + .../Components/Samples/Uploads.razor | 189 + .../Components/Samples/Uploads.razor.cs | 478 ++ .../Components/Samples/ValidateForms.razor | 300 + .../Components/Samples/ValidateForms.razor.cs | 305 + .../Components/Samples/VideoPlayers.razor | 70 + .../Components/Samples/VideoPlayers.razor.cs | 138 + .../Components/Samples/WebSerials.razor | 153 + .../Components/Samples/WebSerials.razor.cs | 320 + .../Components/Samples/WebSpeechs.razor | 132 + .../Components/Samples/WebSpeechs.razor.cs | 251 + .../Components/Samples/WebSpeechs.razor.css | 3 + .../Components/Samples/_Imports.razor | 1 + .../Controllers/Api/CodeController.cs | 2 +- .../Controllers/Api/GiteeController.cs | 3 +- .../Controllers/Api/LoginController.cs | 2 +- .../Controllers/CultureController.cs | 1 + .../Data/AttributeItem.cs | 43 + .../Data/CalendarDemoDataHelper.cs | 62 + .../Data/CustomDynamicColumnsObjectData.cs | 54 + .../Data/CustomDynamicData.cs | 86 + src/BootstrapBlazor.Server/Data/EventItem.cs | 31 + src/BootstrapBlazor.Server/Data/Foo.cs | 206 + .../Data/FooSearchModel.cs | 86 + .../Data/GiteePushBody.cs | 118 + src/BootstrapBlazor.Server/Data/LoginModel.cs | 32 + src/BootstrapBlazor.Server/Data/Menus.cs | 301 + .../Data/MessageItem.cs | 16 + src/BootstrapBlazor.Server/Data/MethodItem.cs | 25 + .../Data/TreeDataFoo.cs | 62 + src/BootstrapBlazor.Server/Data/TreeFoo.cs | 70 + src/BootstrapBlazor.Server/Data/User.cs | 21 + .../Data/WeatherForecast.cs | 31 + .../Data/WebsiteOptions.cs | 143 + .../Extensions/CacheManagerExtensions.cs | 38 + .../Extensions/DispatchEntryExtensions.cs | 21 + .../Extensions/JSRuntimeExtensions.cs | 26 + .../Extensions/MenusLocalizerExtensions.cs | 1327 ++++ .../Extensions/ServicesExtensions.cs | 43 +- src/BootstrapBlazor.Server/Locales/en.json | 6024 +++++++++++++++++ src/BootstrapBlazor.Server/Locales/zh.json | 6024 +++++++++++++++++ src/BootstrapBlazor.Server/Pages/_Host.cshtml | 8 - .../Pages/_Layout.cshtml | 70 - src/BootstrapBlazor.Server/Program.cs | 27 +- .../Services/ClearUploadFilesService.cs | 1 - .../Services/CodeSnippetService.cs | 151 + .../Services/DashboardService.cs | 100 + .../Services/DemoLookupService.cs | 30 + .../Services/FanControllerDataService.cs | 116 + .../Services/MenuService.cs | 19 + .../MockAuthenticationStateProvider.cs | 74 + .../Services/MockDataTableDynamicService.cs | 187 + .../Services/PackageVersionService.cs | 76 + .../Services/TableDemoDataService.cs | 105 + .../Services/WeatherForecastService.cs | 29 + src/BootstrapBlazor.Server/_Imports.razor | 5 +- src/BootstrapBlazor.Server/docs.json | 250 + src/BootstrapBlazor.Server/menus.json | 33 + src/BootstrapBlazor.Server/topology.json | 205 + src/BootstrapBlazor.Server/versionconfig.json | 5 + .../Shared/BaseLayout.razor | 3 + src/BootstrapBlazor/BootstrapBlazor.csproj | 1 - .../wwwroot/modules/responsive.js | 5 +- 666 files changed, 67662 insertions(+), 312 deletions(-) delete mode 100644 dist/.gitattributes delete mode 100644 dist/.nojekyll delete mode 100644 dist/.spa delete mode 100644 dist/404.html delete mode 100644 dist/gitee-pages/404.html create mode 100644 src/BootstrapBlazor.Server/Components/Components/AttributeTable.razor create mode 100644 src/BootstrapBlazor.Server/Components/Components/AttributeTable.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Components/BBLogo.razor create mode 100644 src/BootstrapBlazor.Server/Components/Components/BBLogo.razor.css create mode 100644 src/BootstrapBlazor.Server/Components/Components/BlazorReconnector.razor create mode 100644 src/BootstrapBlazor.Server/Components/Components/CSS.razor create mode 100644 src/BootstrapBlazor.Server/Components/Components/CSS.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Components/CalendarCrewCell.razor create mode 100644 src/BootstrapBlazor.Server/Components/Components/CalendarCrewCell.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Components/CalendarCrewCell.razor.css create mode 100644 src/BootstrapBlazor.Server/Components/Components/CalendarCrewDialogBody.razor create mode 100644 src/BootstrapBlazor.Server/Components/Components/CalendarCrewDialogBody.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Components/CalendarCrewDialogBody.razor.css create mode 100644 src/BootstrapBlazor.Server/Components/Components/CommitItem.razor create mode 100644 src/BootstrapBlazor.Server/Components/Components/CommitItem.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Components/ComponentCard.razor create mode 100644 src/BootstrapBlazor.Server/Components/Components/ComponentCard.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Components/ComponentCategory.razor create mode 100644 src/BootstrapBlazor.Server/Components/Components/ComponentCategory.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Components/ComponentCategory.razor.css create mode 100644 src/BootstrapBlazor.Server/Components/Components/ContextMenuList.razor create mode 100644 src/BootstrapBlazor.Server/Components/Components/Counter.razor create mode 100644 src/BootstrapBlazor.Server/Components/Components/CultureChooser.razor create mode 100644 src/BootstrapBlazor.Server/Components/Components/CultureChooser.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Components/CultureChooser.razor.css create mode 100644 src/BootstrapBlazor.Server/Components/Components/CustomerFilter.razor create mode 100644 src/BootstrapBlazor.Server/Components/Components/CustomerSelectDialog.razor create mode 100644 src/BootstrapBlazor.Server/Components/Components/CustomerSelectDialog.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Components/DataDialogComponent.razor create mode 100644 src/BootstrapBlazor.Server/Components/Components/DemoBlock.razor create mode 100644 src/BootstrapBlazor.Server/Components/Components/DemoBlock.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Components/DemoBlock.razor.css create mode 100644 src/BootstrapBlazor.Server/Components/Components/DemoComponent.razor create mode 100644 src/BootstrapBlazor.Server/Components/Components/DemoTabItem.razor create mode 100644 src/BootstrapBlazor.Server/Components/Components/DemoTabItem.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Components/DemoTabItemSetText.razor create mode 100644 src/BootstrapBlazor.Server/Components/Components/DemoTabItemSetText.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Components/DemoTableEditTemplate.razor create mode 100644 src/BootstrapBlazor.Server/Components/Components/DialogBodyFoo.razor create mode 100644 src/BootstrapBlazor.Server/Components/Components/DialogBodyFoo.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Components/DialogDemo.razor create mode 100644 src/BootstrapBlazor.Server/Components/Components/DialogDemo.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Components/DialogHeaderFoo.razor create mode 100644 src/BootstrapBlazor.Server/Components/Components/DialogHeaderFoo.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Components/DialogSaveDetail.razor create mode 100644 src/BootstrapBlazor.Server/Components/Components/ErrorCounter.razor create mode 100644 src/BootstrapBlazor.Server/Components/Components/EventTable.razor create mode 100644 src/BootstrapBlazor.Server/Components/Components/FetchData.razor create mode 100644 src/BootstrapBlazor.Server/Components/Components/FooSearch.razor create mode 100644 src/BootstrapBlazor.Server/Components/Components/FooSearch.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Components/FormInlineSwitch.razor create mode 100644 src/BootstrapBlazor.Server/Components/Components/FormInlineSwitch.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Components/GlobalSearch.razor create mode 100644 src/BootstrapBlazor.Server/Components/Components/GlobalSearch.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Components/Header.razor create mode 100644 src/BootstrapBlazor.Server/Components/Components/Header.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Components/Header.razor.css create mode 100644 src/BootstrapBlazor.Server/Components/Components/Header.razor.js create mode 100644 src/BootstrapBlazor.Server/Components/Components/InstallContent.razor create mode 100644 src/BootstrapBlazor.Server/Components/Components/InstallContent.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Components/MethodTable.razor create mode 100644 src/BootstrapBlazor.Server/Components/Components/MethodTable.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Components/PackageTips.razor create mode 100644 src/BootstrapBlazor.Server/Components/Components/Pre.razor create mode 100644 src/BootstrapBlazor.Server/Components/Components/Pre.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Components/Pre.razor.css create mode 100644 src/BootstrapBlazor.Server/Components/Components/Pre.razor.js create mode 100644 src/BootstrapBlazor.Server/Components/Components/QQGroup.razor create mode 100644 src/BootstrapBlazor.Server/Components/Components/ResultDialogDemo.razor create mode 100644 src/BootstrapBlazor.Server/Components/Components/ResultDialogDemo.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Components/ResultDialogDemo2.razor create mode 100644 src/BootstrapBlazor.Server/Components/Components/ResultDialogDemo2.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Components/ShownCallbackDummy.razor create mode 100644 src/BootstrapBlazor.Server/Components/Components/State.razor create mode 100644 src/BootstrapBlazor.Server/Components/Components/State.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Components/SwalFooter.razor create mode 100644 src/BootstrapBlazor.Server/Components/Components/ThemeChooser.razor create mode 100644 src/BootstrapBlazor.Server/Components/Components/ThemeChooser.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Components/ThemeChooser.razor.css create mode 100644 src/BootstrapBlazor.Server/Components/Components/ThemeChooser.razor.js create mode 100644 src/BootstrapBlazor.Server/Components/Components/Tips.razor create mode 100644 src/BootstrapBlazor.Server/Components/Components/UpdateIntro.razor create mode 100644 src/BootstrapBlazor.Server/Components/Components/UpdateIntro.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Components/UpdateIntro.razor.css create mode 100644 src/BootstrapBlazor.Server/Components/Components/UpdateIntro.razor.js create mode 100644 src/BootstrapBlazor.Server/Components/Components/Video.razor create mode 100644 src/BootstrapBlazor.Server/Components/Components/WebSiteModuleComponentBase.cs create mode 100644 src/BootstrapBlazor.Server/Components/Components/Widget.razor create mode 100644 src/BootstrapBlazor.Server/Components/Components/WinButton.razor create mode 100644 src/BootstrapBlazor.Server/Components/Components/Wwads.razor create mode 100644 src/BootstrapBlazor.Server/Components/Components/Wwads.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Components/Wwads.razor.js create mode 100644 src/BootstrapBlazor.Server/Components/Layout/BaseLayout.razor create mode 100644 src/BootstrapBlazor.Server/Components/Layout/BaseLayout.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Layout/BaseLayout.razor.css create mode 100644 src/BootstrapBlazor.Server/Components/Layout/ComponentLayout.razor create mode 100644 src/BootstrapBlazor.Server/Components/Layout/ComponentLayout.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Layout/ComponentLayout.razor.css create mode 100644 src/BootstrapBlazor.Server/Components/Layout/ComponentLayout.razor.js create mode 100644 src/BootstrapBlazor.Server/Components/Layout/DockLayout.razor create mode 100644 src/BootstrapBlazor.Server/Components/Layout/DockLayout.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Layout/DockLayout.razor.css create mode 100644 src/BootstrapBlazor.Server/Components/Layout/DockLayout.razor.js create mode 100644 src/BootstrapBlazor.Server/Components/Layout/HomeLayout.razor create mode 100644 src/BootstrapBlazor.Server/Components/Layout/HomeLayout.razor.css create mode 100644 src/BootstrapBlazor.Server/Components/Layout/MainLayout.razor create mode 100644 src/BootstrapBlazor.Server/Components/Layout/MainLayout.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Layout/MainLayout.razor.css create mode 100644 src/BootstrapBlazor.Server/Components/Layout/NavMenu.razor create mode 100644 src/BootstrapBlazor.Server/Components/Layout/NavMenu.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Layout/NavMenu.razor.css create mode 100644 src/BootstrapBlazor.Server/Components/Layout/NavMenu.razor.js create mode 100644 src/BootstrapBlazor.Server/Components/Layout/PageLayout.razor create mode 100644 src/BootstrapBlazor.Server/Components/Layout/PageLayout.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Layout/PageLayout.razor.css create mode 100644 src/BootstrapBlazor.Server/Components/Layout/PracticeLayout.razor create mode 100644 src/BootstrapBlazor.Server/Components/Layout/PracticeLayout.razor.css create mode 100644 src/BootstrapBlazor.Server/Components/Layout/PracticeLoginLayout.razor create mode 100644 src/BootstrapBlazor.Server/Components/Layout/PracticeLoginLayout.razor.css create mode 100644 src/BootstrapBlazor.Server/Components/Layout/PracticeNavMenu.razor create mode 100644 src/BootstrapBlazor.Server/Components/Layout/PracticeNavMenu.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Layout/PracticeNavMenu.razor.css create mode 100644 src/BootstrapBlazor.Server/Components/Layout/PrintLayout.razor create mode 100644 src/BootstrapBlazor.Server/Components/Pages/App.razor create mode 100644 src/BootstrapBlazor.Server/Components/Pages/Breakpoints.razor create mode 100644 src/BootstrapBlazor.Server/Components/Pages/Breakpoints.razor.css create mode 100644 src/BootstrapBlazor.Server/Components/Pages/Coms.razor create mode 100644 src/BootstrapBlazor.Server/Components/Pages/Coms.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Pages/Coms.razor.css create mode 100644 src/BootstrapBlazor.Server/Components/Pages/Error.razor create mode 100644 src/BootstrapBlazor.Server/Components/Pages/Golbalization.razor create mode 100644 src/BootstrapBlazor.Server/Components/Pages/Index.razor create mode 100644 src/BootstrapBlazor.Server/Components/Pages/Index.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Pages/Index.razor.css create mode 100644 src/BootstrapBlazor.Server/Components/Pages/Index.razor.js create mode 100644 src/BootstrapBlazor.Server/Components/Pages/Install.razor create mode 100644 src/BootstrapBlazor.Server/Components/Pages/Install.razor.css create mode 100644 src/BootstrapBlazor.Server/Components/Pages/Install_Maui.razor create mode 100644 src/BootstrapBlazor.Server/Components/Pages/Install_Server.razor create mode 100644 src/BootstrapBlazor.Server/Components/Pages/Install_wasm.razor create mode 100644 src/BootstrapBlazor.Server/Components/Pages/Introduction.razor create mode 100644 src/BootstrapBlazor.Server/Components/Pages/Introduction.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Pages/Layout.razor create mode 100644 src/BootstrapBlazor.Server/Components/Pages/Layout.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Pages/Localization.razor create mode 100644 src/BootstrapBlazor.Server/Components/Pages/Localization.razor.css create mode 100644 src/BootstrapBlazor.Server/Components/Pages/Practice.razor create mode 100644 src/BootstrapBlazor.Server/Components/Pages/Practice.razor.css create mode 100644 src/BootstrapBlazor.Server/Components/Pages/Routes.razor create mode 100644 src/BootstrapBlazor.Server/Components/Pages/Template.razor create mode 100644 src/BootstrapBlazor.Server/Components/Pages/Template.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Pages/Theme.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Ajaxs.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Ajaxs.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Alerts.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Alerts.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/AnchorLinks.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/AnchorLinks.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Anchors.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Anchors.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/AutoCompletes.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/AutoCompletes.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/AutoFills.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/AutoFills.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/AutoRedirects.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/AutoRedirects.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Avatars.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Avatars.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Badges.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Badges.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Badges.razor.css create mode 100644 src/BootstrapBlazor.Server/Components/Samples/BaiduOcr.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/BaiduOcr.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/BarcodeReaders.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/BarcodeReaders.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Blocks.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Blocks.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Bluetooth.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Bluetooth.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Bluetooth.razor.css create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Breadcrumbs.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Breadcrumbs.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Buttons.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Buttons.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Calendars.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Calendars.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Calendars.razor.css create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Cameras.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Cameras.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Captchas.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Captchas.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Cards.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Cards.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Carousels.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Carousels.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Carousels.razor.css create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Cascaders.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Cascaders.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Charts/Bar.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Charts/Bar.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Charts/Bubble.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Charts/Bubble.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Charts/Doughnut.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Charts/Doughnut.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Charts/Index.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Charts/Index.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Charts/Line.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Charts/Line.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Charts/Line.razor.js create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Charts/Pie.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Charts/Pie.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Charts/Utility.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/CheckboxLists.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/CheckboxLists.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Checkboxs.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Checkboxs.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/CherryMarkdowns.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/CherryMarkdowns.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Circles.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Circles.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Circles.razor.css create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Client.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Client.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Clipboards.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Clipboards.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/CodeEditors.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/CodeEditors.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Collapses.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Collapses.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/ColorPickers.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/ColorPickers.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Consoles.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Consoles.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/ContextMenus.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/ContextMenus.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/CountButtons.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/CountButtons.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/CountUps.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/CountUps.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/CountUps.razor.css create mode 100644 src/BootstrapBlazor.Server/Components/Samples/DateTimePickers.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/DateTimePickers.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/DateTimeRanges.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/DateTimeRanges.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/DialButtons.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/DialButtons.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/DialButtons.razor.css create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Dialogs.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Dialogs.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Dispatches.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Dispatches.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Displays.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Displays.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Dividers.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Dividers.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/DockViews/BaseDockView.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/DockViews/DockViewCol.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/DockViews/DockViewComplex.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/DockViews/DockViewLayout.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/DockViews/DockViewLayout.razor.css create mode 100644 src/BootstrapBlazor.Server/Components/Samples/DockViews/DockViewLock.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/DockViews/DockViewLock.razor.css create mode 100644 src/BootstrapBlazor.Server/Components/Samples/DockViews/DockViewNest.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/DockViews/DockViewRow.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/DockViews/DockViewStack.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/DockViews/DockViewVisible.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/DockViews/DockViewVisible.razor.css create mode 100644 src/BootstrapBlazor.Server/Components/Samples/DockViews/Index.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/DockViews/_Imports.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Downloads.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Downloads.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/DragDrops.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/DragDrops.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Drawers.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Drawers.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/DropdownWidgets.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/DropdownWidgets.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/DropdownWidgets.razor.css create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Dropdowns.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Dropdowns.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/EditDialogs.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/EditDialogs.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/EditorForms.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/EditorForms.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Editors.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Editors.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Empties.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Empties.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/EyeDroppers.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/EyeDroppers.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/FAIcons.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/FAIcons.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/FileIcons.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/FileIcons.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/FileIcons.razor.css create mode 100644 src/BootstrapBlazor.Server/Components/Samples/FileViewers.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/FileViewers.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/FloatingLabels.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/FloatingLabels.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Footers.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Footers.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/FullScreens.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Gantts.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Gantts.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Geolocations.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Geolocations.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/GlobalException.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/GlobalException.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/GoTops.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/GoTops.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/GroupBoxes.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/GroupBoxes.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Handwrittens.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Handwrittens.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Html2Pdfs.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/HtmlRenderers.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/HtmlRenderers.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/ImageViewers.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/ImageViewers.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/ImageViewers.razor.css create mode 100644 src/BootstrapBlazor.Server/Components/Samples/InputGroups.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/InputGroups.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/InputNumbers.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/InputNumbers.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/InputNumbers.razor.css create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Inputs.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Inputs.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Ips.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Ips.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/JSRuntimeExtensions.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/JSRuntimeExtensions.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/JSRuntimeExtensions.razor.css create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Labels.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Labels.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/LayoutDemo.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/LayoutPages.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/LayoutPages.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/LayoutPages.razor.css create mode 100644 src/BootstrapBlazor.Server/Components/Samples/LayoutPages1.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Layouts.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Layouts.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Layouts.razor.css create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Lights.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Lights.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/LinkButtons.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/LinkButtons.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/ListGroups.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/ListGroups.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/ListGroups.razor.css create mode 100644 src/BootstrapBlazor.Server/Components/Samples/ListViews.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/ListViews.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/ListViews.razor.css create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Live2DDisplays.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Live2DDisplays.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Locators.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Locators.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Logouts.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Logouts.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Markdowns.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Markdowns.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Marquees.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Marquees.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Marquees.razor.css create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Menus.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Menus.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Menus.razor.css create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Messages.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Messages.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/MindMaps/MindMaps.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/MindMaps/MindMaps.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/MindMaps/MindMapsSamples.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Modals.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Modals.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/MouseFollowers.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/MouseFollowers.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/MouseFollowers.razor.css create mode 100644 src/BootstrapBlazor.Server/Components/Samples/MultiSelects.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/MultiSelects.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/MultiSelects.razor.css create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Navigation.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Navigation.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Notifications.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Notifications.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/OnScreenKeyboards.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/OnScreenKeyboards.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/OnScreenKeyboards.razor.css create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Paginations.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Paginations.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/PdfReaders.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/PdfReaders.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/PopoverConfirms.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/PopoverConfirms.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Popovers.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Popovers.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Popovers.razor.css create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Practices/Dashboard.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Practices/Dashboard.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Practices/Dashboard.razor.css create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Practices/DashboardData.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Practices/LoginAndRegister/Template6.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Practices/LoginAndRegister/Template6.razor.css create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Practices/LoginAndRegister/Template7.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Practices/LoginAndRegister/Template7.razor.css create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Practices/LoginAndRegister/Template8.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Practices/LoginAndRegister/Template8.razor.css create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Practices/LoginAndRegister/Template9.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Practices/LoginAndRegister/Template9.razor.css create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Practices/Waterfall.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Practices/Waterfall.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Practices/Waterfall.razor.css create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Practices/_Imports.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Print.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/PrintView.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/PrintView.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/PrintView.razor.css create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Progress.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Progress.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/PulseButtons.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/QRCodes.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/QRCodes.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/QueryBuilders.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/QueryBuilders.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Radios.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Radios.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Rates.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Rates.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Reconnectors.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Reconnectors.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Repeaters.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Repeaters.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Responsives.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Responsives.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/RibbonTabs.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/RibbonTabs.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Rows.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Rows.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Scrolls.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Scrolls.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Scrolls.razor.css create mode 100644 src/BootstrapBlazor.Server/Components/Samples/SearchDialogs.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/SearchDialogs.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Searches.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Searches.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Segmenteds.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Segmenteds.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/SelectTrees.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/SelectTrees.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Selects.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Selects.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Selects.razor.css create mode 100644 src/BootstrapBlazor.Server/Components/Samples/SignaturePadPageResponsive.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/SignaturePads.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/SignaturePads.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Skeletons.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Skeletons.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Skeletons.razor.css create mode 100644 src/BootstrapBlazor.Server/Components/Samples/SlideButtons.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/SlideButtons.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/SlideButtons.razor.css create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Sliders.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Sliders.razor.css create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Speeches/Index.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Speeches/Index.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Speeches/Recognizers.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Speeches/Recognizers.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Speeches/SpeechWaves.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Speeches/SpeechWaves.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Speeches/Synthesizers.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Speeches/Synthesizers.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Spinners.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Spinners.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Splits.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Splits.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Splits.razor.css create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Splittings.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Splittings.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Splittings.razor.css create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Stacks.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Stacks.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Stacks.razor.css create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Steps.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Steps.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Steps.razor.css create mode 100644 src/BootstrapBlazor.Server/Components/Samples/SweetAlerts.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/SweetAlerts.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/SwitchButtons.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/SwitchButtons.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Switches.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Switches.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Table/Tables.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Table/Tables.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Table/TablesAutoRefresh.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Table/TablesAutoRefresh.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Table/TablesCell.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Table/TablesCell.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Table/TablesCell.razor.css create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Table/TablesColumn.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Table/TablesColumn.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Table/TablesColumnDrag.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Table/TablesColumnDrag.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Table/TablesColumnList.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Table/TablesColumnList.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Table/TablesColumnResizing.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Table/TablesColumnResizing.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Table/TablesColumnTemplate.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Table/TablesColumnTemplate.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Table/TablesDetailRow.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Table/TablesDetailRow.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Table/TablesDialog.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Table/TablesDialog.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Table/TablesDynamic.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Table/TablesDynamic.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Table/TablesDynamicExcel.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Table/TablesDynamicExcel.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Table/TablesDynamicObject.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Table/TablesDynamicObject.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Table/TablesEdit.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Table/TablesEdit.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Table/TablesExcel.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Table/TablesExcel.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Table/TablesExport.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Table/TablesExport.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Table/TablesFilter.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Table/TablesFilter.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Table/TablesFixedColumn.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Table/TablesFixedColumn.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Table/TablesFixedHeader.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Table/TablesFixedHeader.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Table/TablesFooter.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Table/TablesFooter.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Table/TablesFooter.razor.css create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Table/TablesHeader.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Table/TablesHeader.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Table/TablesLoading.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Table/TablesLoading.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Table/TablesLookup.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Table/TablesLookup.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Table/TablesNameDrop.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Table/TablesNameDrop.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Table/TablesPages.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Table/TablesPages.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Table/TablesRow.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Table/TablesRow.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Table/TablesRow.razor.css create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Table/TablesSearch.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Table/TablesSearch.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Table/TablesSelection.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Table/TablesSelection.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Table/TablesToolbar.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Table/TablesToolbar.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Table/TablesTracking.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Table/TablesTracking.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Table/TablesTree.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Table/TablesTree.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Table/TablesVirtualization.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Table/TablesVirtualization.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Table/TablesVirtualization.razor.css create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Table/TablesWrap.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Table/TablesWrap.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Tabs.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Tabs.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Tabs.razor.css create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Tags.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Tags.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/TextAreas.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/TextAreas.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/TextAreas.razor.css create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Timelines.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Timelines.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Timers.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Timers.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Titles.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Titles.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Toasts.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Toasts.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Toasts.razor.css create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Toggles.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Toggles.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Tooltips.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Tooltips.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Tooltips.razor.css create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Topologies.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Topologies.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Topologies.razor.css create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Topologies.razor.js create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Transfers.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Transfers.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Transitions.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Transitions.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/TreeViews.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/TreeViews.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Trees.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Trees.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Uploads.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/Uploads.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/ValidateForms.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/ValidateForms.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/VideoPlayers.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/VideoPlayers.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/WebSerials.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/WebSerials.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/WebSpeechs.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/WebSpeechs.razor.cs create mode 100644 src/BootstrapBlazor.Server/Components/Samples/WebSpeechs.razor.css create mode 100644 src/BootstrapBlazor.Server/Components/Samples/_Imports.razor create mode 100644 src/BootstrapBlazor.Server/Data/AttributeItem.cs create mode 100644 src/BootstrapBlazor.Server/Data/CalendarDemoDataHelper.cs create mode 100644 src/BootstrapBlazor.Server/Data/CustomDynamicColumnsObjectData.cs create mode 100644 src/BootstrapBlazor.Server/Data/CustomDynamicData.cs create mode 100644 src/BootstrapBlazor.Server/Data/EventItem.cs create mode 100644 src/BootstrapBlazor.Server/Data/Foo.cs create mode 100644 src/BootstrapBlazor.Server/Data/FooSearchModel.cs create mode 100644 src/BootstrapBlazor.Server/Data/GiteePushBody.cs create mode 100644 src/BootstrapBlazor.Server/Data/LoginModel.cs create mode 100644 src/BootstrapBlazor.Server/Data/Menus.cs create mode 100644 src/BootstrapBlazor.Server/Data/MessageItem.cs create mode 100644 src/BootstrapBlazor.Server/Data/MethodItem.cs create mode 100644 src/BootstrapBlazor.Server/Data/TreeDataFoo.cs create mode 100644 src/BootstrapBlazor.Server/Data/TreeFoo.cs create mode 100644 src/BootstrapBlazor.Server/Data/User.cs create mode 100644 src/BootstrapBlazor.Server/Data/WeatherForecast.cs create mode 100644 src/BootstrapBlazor.Server/Data/WebsiteOptions.cs create mode 100644 src/BootstrapBlazor.Server/Extensions/CacheManagerExtensions.cs create mode 100644 src/BootstrapBlazor.Server/Extensions/DispatchEntryExtensions.cs create mode 100644 src/BootstrapBlazor.Server/Extensions/JSRuntimeExtensions.cs create mode 100644 src/BootstrapBlazor.Server/Extensions/MenusLocalizerExtensions.cs create mode 100644 src/BootstrapBlazor.Server/Locales/en.json create mode 100644 src/BootstrapBlazor.Server/Locales/zh.json delete mode 100644 src/BootstrapBlazor.Server/Pages/_Host.cshtml delete mode 100644 src/BootstrapBlazor.Server/Pages/_Layout.cshtml create mode 100644 src/BootstrapBlazor.Server/Services/CodeSnippetService.cs create mode 100644 src/BootstrapBlazor.Server/Services/DashboardService.cs create mode 100644 src/BootstrapBlazor.Server/Services/DemoLookupService.cs create mode 100644 src/BootstrapBlazor.Server/Services/FanControllerDataService.cs create mode 100644 src/BootstrapBlazor.Server/Services/MenuService.cs create mode 100644 src/BootstrapBlazor.Server/Services/MockAuthenticationStateProvider.cs create mode 100644 src/BootstrapBlazor.Server/Services/MockDataTableDynamicService.cs create mode 100644 src/BootstrapBlazor.Server/Services/PackageVersionService.cs create mode 100644 src/BootstrapBlazor.Server/Services/TableDemoDataService.cs create mode 100644 src/BootstrapBlazor.Server/Services/WeatherForecastService.cs create mode 100644 src/BootstrapBlazor.Server/docs.json create mode 100644 src/BootstrapBlazor.Server/menus.json create mode 100644 src/BootstrapBlazor.Server/topology.json create mode 100644 src/BootstrapBlazor.Server/versionconfig.json diff --git a/BootstrapBlazor.sln b/BootstrapBlazor.sln index 025b732e5..4b923494e 100644 --- a/BootstrapBlazor.sln +++ b/BootstrapBlazor.sln @@ -26,14 +26,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "windows", "windows", "{4A52 scripts\windows\push.ps1 = scripts\windows\push.ps1 EndProjectSection EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "dist", "dist", "{63E887C6-4610-4ED3-91F4-62EFDE7F442F}" - ProjectSection(SolutionItems) = preProject - dist\.gitattributes = dist\.gitattributes - dist\.nojekyll = dist\.nojekyll - dist\.spa = dist\.spa - dist\404.html = dist\404.html - EndProjectSection -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "wasm", "wasm", "{B84D315E-967D-4FBF-9B72-1F3128155CB0}" ProjectSection(SolutionItems) = preProject scripts\wasm\sync.cmd = scripts\wasm\sync.cmd @@ -56,8 +48,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BootstrapBlazor.Markdown", EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BootstrapBlazor.TableExport", "src\Extensions\Components\BootstrapBlazor.TableExport\BootstrapBlazor.TableExport.csproj", "{5ED0DD16-1583-4FC3-B2E9-FE5DBA98BD47}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BootstrapBlazor.Shared", "src\BootstrapBlazor.Shared\BootstrapBlazor.Shared.csproj", "{C63F35FD-FE14-4517-9457-9DA43F0DCB9E}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BootstrapBlazor.Server", "src\BootstrapBlazor.Server\BootstrapBlazor.Server.csproj", "{1ED371F3-2B28-4B2D-91B8-0C00DA42CB65}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BootstrapBlazor.WebAssembly.ClientHost", "src\Wasm\BootstrapBlazor.WebAssembly.ClientHost\BootstrapBlazor.WebAssembly.ClientHost.csproj", "{0556D9AB-8673-4248-8817-4D99F4DCC568}" @@ -155,10 +145,6 @@ Global {5ED0DD16-1583-4FC3-B2E9-FE5DBA98BD47}.Debug|Any CPU.Build.0 = Debug|Any CPU {5ED0DD16-1583-4FC3-B2E9-FE5DBA98BD47}.Release|Any CPU.ActiveCfg = Release|Any CPU {5ED0DD16-1583-4FC3-B2E9-FE5DBA98BD47}.Release|Any CPU.Build.0 = Release|Any CPU - {C63F35FD-FE14-4517-9457-9DA43F0DCB9E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C63F35FD-FE14-4517-9457-9DA43F0DCB9E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C63F35FD-FE14-4517-9457-9DA43F0DCB9E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C63F35FD-FE14-4517-9457-9DA43F0DCB9E}.Release|Any CPU.Build.0 = Release|Any CPU {1ED371F3-2B28-4B2D-91B8-0C00DA42CB65}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1ED371F3-2B28-4B2D-91B8-0C00DA42CB65}.Debug|Any CPU.Build.0 = Debug|Any CPU {1ED371F3-2B28-4B2D-91B8-0C00DA42CB65}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -296,7 +282,6 @@ Global {337FABF3-4318-408E-8544-C0F20D0197A1} = {CD062AB6-244D-402A-8F33-C37DAC5856CC} {EEB9751A-5C06-4725-8037-FA9C0F140018} = {CD062AB6-244D-402A-8F33-C37DAC5856CC} {5ED0DD16-1583-4FC3-B2E9-FE5DBA98BD47} = {CD062AB6-244D-402A-8F33-C37DAC5856CC} - {C63F35FD-FE14-4517-9457-9DA43F0DCB9E} = {A2182155-43ED-44C1-BF6F-1B70EBD2DFFE} {1ED371F3-2B28-4B2D-91B8-0C00DA42CB65} = {A2182155-43ED-44C1-BF6F-1B70EBD2DFFE} {0556D9AB-8673-4248-8817-4D99F4DCC568} = {C8E79F4C-8C55-4E13-96B5-3D2BD6A07B74} {FFFD2EB7-AE88-4DAD-A825-528B2CEFB4B5} = {C8E79F4C-8C55-4E13-96B5-3D2BD6A07B74} diff --git a/BootstrapBlazor.slnf b/BootstrapBlazor.slnf index 8b92a0230..26850ac2c 100644 --- a/BootstrapBlazor.slnf +++ b/BootstrapBlazor.slnf @@ -3,7 +3,6 @@ "path": "BootstrapBlazor.sln", "projects": [ "src\\BootstrapBlazor.Server\\BootstrapBlazor.Server.csproj", - "src\\BootstrapBlazor.Shared\\BootstrapBlazor.Shared.csproj", "src\\BootstrapBlazor\\BootstrapBlazor.csproj", "test\\UniTest.Sass\\UniTest.Sass.csproj", "test\\UnitTest\\UnitTest.csproj" diff --git a/dist/.gitattributes b/dist/.gitattributes deleted file mode 100644 index 305220871..000000000 --- a/dist/.gitattributes +++ /dev/null @@ -1,63 +0,0 @@ -############################################################################### -# Set default behavior to automatically normalize line endings. -############################################################################### -* binary - -############################################################################### -# Set default behavior for command prompt diff. -# -# This is need for earlier builds of msysgit that does not have it on by -# default for csharp files. -# Note: This is only used by command line -############################################################################### -#*.cs diff=csharp - -############################################################################### -# Set the merge driver for project and solution files -# -# Merging from the command prompt will add diff markers to the files if there -# are conflicts (Merging from VS is not affected by the settings below, in VS -# the diff markers are never inserted). Diff markers may cause the following -# file extensions to fail to load in VS. An alternative would be to treat -# these files as binary and thus will always conflict and require user -# intervention with every merge. To do so, just uncomment the entries below -############################################################################### -#*.sln merge=binary -#*.csproj merge=binary -#*.vbproj merge=binary -#*.vcxproj merge=binary -#*.vcproj merge=binary -#*.dbproj merge=binary -#*.fsproj merge=binary -#*.lsproj merge=binary -#*.wixproj merge=binary -#*.modelproj merge=binary -#*.sqlproj merge=binary -#*.wwaproj merge=binary - -############################################################################### -# behavior for image files -# -# image files are treated as binary by default. -############################################################################### -#*.jpg binary -#*.png binary -#*.gif binary - -############################################################################### -# diff behavior for common document formats -# -# Convert binary document formats to text before diffing them. This feature -# is only available from the command line. Turn it on by uncommenting the -# entries below. -############################################################################### -#*.doc diff=astextplain -#*.DOC diff=astextplain -#*.docx diff=astextplain -#*.DOCX diff=astextplain -#*.dot diff=astextplain -#*.DOT diff=astextplain -#*.pdf diff=astextplain -#*.PDF diff=astextplain -#*.rtf diff=astextplain -#*.RTF diff=astextplain \ No newline at end of file diff --git a/dist/.nojekyll b/dist/.nojekyll deleted file mode 100644 index e69de29bb..000000000 diff --git a/dist/.spa b/dist/.spa deleted file mode 100644 index 38de19e22..000000000 --- a/dist/.spa +++ /dev/null @@ -1,2 +0,0 @@ -This file is used to enable gitee pages' spa mode. -https://gitee.com/help/articles/4237 \ No newline at end of file diff --git a/dist/404.html b/dist/404.html deleted file mode 100644 index 621c7d370..000000000 --- a/dist/404.html +++ /dev/null @@ -1,40 +0,0 @@ - - - - - Single Page Apps for GitHub Pages - - - - - diff --git a/dist/gitee-pages/404.html b/dist/gitee-pages/404.html deleted file mode 100644 index 593e9e48a..000000000 --- a/dist/gitee-pages/404.html +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - Bootstrap Blazor 演示网站 - - - - - - - - - - - - - - - - - - - - - -
- -
- - 精彩即将呈现 -
-
-
-
-
- -
- - An error has occurred. This application may no longer respond until reloaded. - - - An unhandled exception has occurred. See browser dev tools for details. - - Reload - -
- - - - - - - - - - - - - - - diff --git a/exclusion.dic b/exclusion.dic index cbf0820da..507738110 100644 --- a/exclusion.dic +++ b/exclusion.dic @@ -38,3 +38,8 @@ xmark Func Prev Textarea +rendermode +motronic +webassembly +netcore +oscs diff --git a/scripts/linux/nginx.conf b/scripts/linux/nginx.conf index c459cc593..f85b97078 100644 --- a/scripts/linux/nginx.conf +++ b/scripts/linux/nginx.conf @@ -1,3 +1,16 @@ +#user nobody; +worker_processes 1; + +#error_log logs/error.log; +#error_log logs/error.log notice; +#error_log logs/error.log info; + +#pid logs/nginx.pid; + +events { + worker_connections 1024; +} + http { upstream blazor { server localhost:50853; diff --git a/src/BootstrapBlazor.Server/AIChat/Chats.razor b/src/BootstrapBlazor.Server/AIChat/Chats.razor index f5114d006..f6b6f24aa 100644 --- a/src/BootstrapBlazor.Server/AIChat/Chats.razor +++ b/src/BootstrapBlazor.Server/AIChat/Chats.razor @@ -2,7 +2,7 @@ @using Azure.AI.OpenAI @using BootstrapBlazor.Server.OAuth; @inherits BootstrapModuleComponentBase -@attribute [JSModuleAutoLoader("./AIChat/Chats.razor.js")] +@attribute [JSModuleAutoLoader("AIChat/Chats.razor.js")]

@Localizer["ChatsTitle"]

diff --git a/src/BootstrapBlazor.Server/BootstrapBlazor.Server.csproj b/src/BootstrapBlazor.Server/BootstrapBlazor.Server.csproj index 2bb93f190..cf63b2592 100644 --- a/src/BootstrapBlazor.Server/BootstrapBlazor.Server.csproj +++ b/src/BootstrapBlazor.Server/BootstrapBlazor.Server.csproj @@ -5,6 +5,27 @@ dd866c36-9a9b-4dda-bce0-44c91d3094cc + + + + + + + + + + + + + + + + + + + + + @@ -12,17 +33,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - + + + + + + diff --git a/src/BootstrapBlazor.Server/Components/Components/AttributeTable.razor b/src/BootstrapBlazor.Server/Components/Components/AttributeTable.razor new file mode 100644 index 000000000..48f3aabc9 --- /dev/null +++ b/src/BootstrapBlazor.Server/Components/Components/AttributeTable.razor @@ -0,0 +1,13 @@ +
+

@Title

+ + + + + + + + + +
+
diff --git a/src/BootstrapBlazor.Server/Components/Components/AttributeTable.razor.cs b/src/BootstrapBlazor.Server/Components/Components/AttributeTable.razor.cs new file mode 100644 index 000000000..74f4264e4 --- /dev/null +++ b/src/BootstrapBlazor.Server/Components/Components/AttributeTable.razor.cs @@ -0,0 +1,37 @@ +// Copyright (c) Argo Zhang (argo@163.com). All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +// Website: https://www.blazor.zone or https://argozhang.github.io/ + +namespace BootstrapBlazor.Server.Components.Components; + +/// +/// +/// +public sealed partial class AttributeTable +{ + [Inject] + [NotNull] + private IStringLocalizer? Localizer { get; set; } + + /// + /// + /// + [Parameter] + [NotNull] + public string? Title { get; set; } + + /// + /// + /// + [Parameter] public IEnumerable? Items { get; set; } + + /// + /// OnInitialized 方法 + /// + protected override void OnInitialized() + { + base.OnInitialized(); + + Title ??= Localizer[nameof(Title)]; + } +} diff --git a/src/BootstrapBlazor.Server/Components/Components/BBLogo.razor b/src/BootstrapBlazor.Server/Components/Components/BBLogo.razor new file mode 100644 index 000000000..fa02c2cfa --- /dev/null +++ b/src/BootstrapBlazor.Server/Components/Components/BBLogo.razor @@ -0,0 +1 @@ +logo diff --git a/src/BootstrapBlazor.Server/Components/Components/BBLogo.razor.css b/src/BootstrapBlazor.Server/Components/Components/BBLogo.razor.css new file mode 100644 index 000000000..13147bf8b --- /dev/null +++ b/src/BootstrapBlazor.Server/Components/Components/BBLogo.razor.css @@ -0,0 +1,8 @@ +.bb-icon { + width: 42px; + height: auto; + border-radius: var(--bs-border-radius); + background-color: var(--bs-info); + border: solid 1px #fff; + margin-right: 1rem; +} diff --git a/src/BootstrapBlazor.Server/Components/Components/BlazorReconnector.razor b/src/BootstrapBlazor.Server/Components/Components/BlazorReconnector.razor new file mode 100644 index 000000000..d6beae78a --- /dev/null +++ b/src/BootstrapBlazor.Server/Components/Components/BlazorReconnector.razor @@ -0,0 +1,78 @@ +@inject IOptionsMonitor WebsiteOption + + + +
+
+
+ @RenderBootstrapBlazor +
+
Reconnector 组件
+
正在尝试重新连接服务器
+
服务器正在更新新版本,稍等一会儿即可提供服务,或者 F12 打开 Developer tools 查看 控制台 是否有错误输出,请扫描左侧二维码加群与管理员联系
+
+
+ +
+
+
+
+ +
+
+
+ @RenderBootstrapBlazor +
+
Reconnector 组件
+
与服务器连接失败
+
请确认网络是否正常,或者 F12 打开 Developer tools 查看 控制台 是否有错误输出,请扫描左侧二维码加群与管理员联系
+
+ +
+
+
+ +
+
+
+ @RenderBootstrapBlazor +
+
Reconnector 组件
+
服务器拒绝连接
+
所有的连接尝试都被拒绝了,这很有可能是由于网络问题或者服务器问题引起的,请扫描左侧二维码加群与管理员联系
+
+
+ +
+
+
+
+
+ +@code { + private string TemplateUrl => $"{WebsiteOption.CurrentValue.BootstrapBlazorLink}/wikis/%E9%A1%B9%E7%9B%AE%E6%A8%A1%E6%9D%BF%E4%BD%BF%E7%94%A8%E6%95%99%E7%A8%8B"; + + RenderFragment RenderBootstrapBlazor => + @
+
Bootstrap Blazor UI 组件库
+
+
+
一套基于 Bootstrap 样式的企业级 Blazor UI 组件库,支持 Server 与 WebAssembly
+
适配移动端支持各种主流浏览器以及移动端,适配 ABP,同时支持 NET5/NET6/NET7
+
+
已提供项目模板方便快速上手 项目模板
+
+ QQGroup +
+
+
; +} diff --git a/src/BootstrapBlazor.Server/Components/Components/CSS.razor b/src/BootstrapBlazor.Server/Components/Components/CSS.razor new file mode 100644 index 000000000..49ad9818b --- /dev/null +++ b/src/BootstrapBlazor.Server/Components/Components/CSS.razor @@ -0,0 +1,4 @@ +
+

CSS Variables

+ @ChildContent +
diff --git a/src/BootstrapBlazor.Server/Components/Components/CSS.razor.cs b/src/BootstrapBlazor.Server/Components/Components/CSS.razor.cs new file mode 100644 index 000000000..7a036a7ed --- /dev/null +++ b/src/BootstrapBlazor.Server/Components/Components/CSS.razor.cs @@ -0,0 +1,17 @@ +// Copyright (c) Argo Zhang (argo@163.com). All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +// Website: https://www.blazor.zone or https://argozhang.github.io/ + +namespace BootstrapBlazor.Server.Components.Components; + +/// +/// CSS 组件 +/// +public partial class CSS +{ + /// + /// 获得/设置 子内容 + /// + [Parameter] + public RenderFragment? ChildContent { get; set; } +} diff --git a/src/BootstrapBlazor.Server/Components/Components/CalendarCrewCell.razor b/src/BootstrapBlazor.Server/Components/Components/CalendarCrewCell.razor new file mode 100644 index 000000000..e03b46cf1 --- /dev/null +++ b/src/BootstrapBlazor.Server/Components/Components/CalendarCrewCell.razor @@ -0,0 +1,12 @@ +
+
@Value.CellValue.Day
+ @if (Value.CellValue.Month == Value.CalendarValue.Month) + { +
+ @foreach (var tag in Crews) + { +
@tag.Name @tag.Value
+ } +
+ } +
diff --git a/src/BootstrapBlazor.Server/Components/Components/CalendarCrewCell.razor.cs b/src/BootstrapBlazor.Server/Components/Components/CalendarCrewCell.razor.cs new file mode 100644 index 000000000..0d3774037 --- /dev/null +++ b/src/BootstrapBlazor.Server/Components/Components/CalendarCrewCell.razor.cs @@ -0,0 +1,56 @@ +// Copyright (c) Argo Zhang (argo@163.com). All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +// Website: https://www.blazor.zone or https://argozhang.github.io/ + +namespace BootstrapBlazor.Server.Components.Components; + +/// +/// +/// +public partial class CalendarCrewCell +{ + /// + /// 获得/设置 单元格值 + /// + [Parameter] + [NotNull] + public CalendarCellValue? Value { get; set; } + + /// + /// + /// + [Parameter] + public EventCallback ValueChanged { get; set; } + + /// + /// + /// + [Parameter] + [EditorRequired] + [NotNull] + public List? Crews { get; set; } + + [Inject] + [NotNull] + private DialogService? DialogService { get; set; } + + private async Task OnClickCell() + { + await DialogService.Show(new DialogOption() + { + Title = $"明细查看 - {Value.CellValue:yyyy-MM-dd}", + Component = BootstrapDynamicComponent.CreateComponent(new Dictionary() + { + [nameof(Value)] = Value, + [nameof(Crews)] = Crews + }), + OnCloseAsync = async () => + { + if (ValueChanged.HasDelegate) + { + await ValueChanged.InvokeAsync(Value); + } + } + }); + } +} diff --git a/src/BootstrapBlazor.Server/Components/Components/CalendarCrewCell.razor.css b/src/BootstrapBlazor.Server/Components/Components/CalendarCrewCell.razor.css new file mode 100644 index 000000000..b4e62c5a2 --- /dev/null +++ b/src/BootstrapBlazor.Server/Components/Components/CalendarCrewCell.razor.css @@ -0,0 +1,3 @@ +.calendar-day { + --bb-calendar-cell-height: 101px; +} diff --git a/src/BootstrapBlazor.Server/Components/Components/CalendarCrewDialogBody.razor b/src/BootstrapBlazor.Server/Components/Components/CalendarCrewDialogBody.razor new file mode 100644 index 000000000..88d36d728 --- /dev/null +++ b/src/BootstrapBlazor.Server/Components/Components/CalendarCrewDialogBody.razor @@ -0,0 +1,19 @@ +
+ @foreach (var crew in Crews) + { +
+
+ @crew.Name +
+ +
+ + + + + + +
+
+ } +
diff --git a/src/BootstrapBlazor.Server/Components/Components/CalendarCrewDialogBody.razor.cs b/src/BootstrapBlazor.Server/Components/Components/CalendarCrewDialogBody.razor.cs new file mode 100644 index 000000000..47e11d335 --- /dev/null +++ b/src/BootstrapBlazor.Server/Components/Components/CalendarCrewDialogBody.razor.cs @@ -0,0 +1,32 @@ +// Copyright (c) Argo Zhang (argo@163.com). All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +// Website: https://www.blazor.zone or https://argozhang.github.io/ + +namespace BootstrapBlazor.Server.Components.Components; + +/// +/// +/// +public partial class CalendarCrewDialogBody +{ + /// + /// 获得/设置 单元格值 + /// + [Parameter] + [EditorRequired] + [NotNull] + public CalendarCellValue? Value { get; set; } + + /// + /// + /// + [Parameter] + [EditorRequired] + [NotNull] + public List? Crews { get; set; } + + private static void OnUpdateValue(Crew crew, int interval) + { + crew.Value += interval; + } +} diff --git a/src/BootstrapBlazor.Server/Components/Components/CalendarCrewDialogBody.razor.css b/src/BootstrapBlazor.Server/Components/Components/CalendarCrewDialogBody.razor.css new file mode 100644 index 000000000..27b0ce090 --- /dev/null +++ b/src/BootstrapBlazor.Server/Components/Components/CalendarCrewDialogBody.razor.css @@ -0,0 +1,35 @@ +.actions { + border: 1px solid var(--bs-purple); + border-radius: var(--bs-border-radius); + padding: 1px 1rem; +} + + .actions > span { + cursor: pointer; + border-radius: 50%; + width: 20px; + height: 20px; + display: inline-flex; + justify-content: center; + align-items: center; + transition: background-color .3s linear; + } + + .actions > span:hover { + background-color: var(--bs-purple); + color: #fff; + } + + .actions > span:not(:last-child) { + margin-right: .5rem; + } + +.crew:not(:last-child) { + margin-bottom: .5rem; +} + +.crew > input { + max-width: 2rem; + margin-right: 1rem; + border: none; +} diff --git a/src/BootstrapBlazor.Server/Components/Components/CommitItem.razor b/src/BootstrapBlazor.Server/Components/Components/CommitItem.razor new file mode 100644 index 000000000..62d6b2fe0 --- /dev/null +++ b/src/BootstrapBlazor.Server/Components/Components/CommitItem.razor @@ -0,0 +1,7 @@ +
+ @Timestamp + 共 @TotalCount 个提交 +
+
提交作者: @Author
+
分支名称: @Branch
+
提交信息: @Message
diff --git a/src/BootstrapBlazor.Server/Components/Components/CommitItem.razor.cs b/src/BootstrapBlazor.Server/Components/Components/CommitItem.razor.cs new file mode 100644 index 000000000..3441a4b7b --- /dev/null +++ b/src/BootstrapBlazor.Server/Components/Components/CommitItem.razor.cs @@ -0,0 +1,49 @@ +// Copyright (c) Argo Zhang (argo@163.com). All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +// Website: https://www.blazor.zone or https://argozhang.github.io/ +namespace BootstrapBlazor.Server.Components.Components; + +/// +/// +/// +public partial class CommitItem +{ + /// + /// + /// + [Parameter] + [NotNull] + [EditorRequired] + public GiteePostBody? Item { get; set; } + + private string? Author { get; set; } + + private string? Timestamp { get; set; } + + private string? Message { get; set; } + + private string? Url { get; set; } + + private string? Branch { get; set; } + + private string? TotalCount { get; set; } + + /// + /// OnInitialized 方法 + /// + protected override void OnInitialized() + { + base.OnInitialized(); + + var commit = Item.HeadCommit; + TotalCount = Item.Commits?.Count.ToString() ?? "1"; + if (commit != null) + { + Timestamp = commit.Timestamp.ToString("yyyy-MM-dd HH:mm:ss"); + Author = commit.Author.Name; + Message = commit.Message; + Url = commit.Url; + Branch = Item.GetBranchName(); + } + } +} diff --git a/src/BootstrapBlazor.Server/Components/Components/ComponentCard.razor b/src/BootstrapBlazor.Server/Components/Components/ComponentCard.razor new file mode 100644 index 000000000..04463ebb2 --- /dev/null +++ b/src/BootstrapBlazor.Server/Components/Components/ComponentCard.razor @@ -0,0 +1,8 @@ + diff --git a/src/BootstrapBlazor.Server/Components/Components/ComponentCard.razor.cs b/src/BootstrapBlazor.Server/Components/Components/ComponentCard.razor.cs new file mode 100644 index 000000000..a84c827c6 --- /dev/null +++ b/src/BootstrapBlazor.Server/Components/Components/ComponentCard.razor.cs @@ -0,0 +1,60 @@ +// Copyright (c) Argo Zhang (argo@163.com). All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +// Website: https://www.blazor.zone or https://argozhang.github.io/ + +namespace BootstrapBlazor.Server.Components.Components; + +/// +/// +/// +public sealed partial class ComponentCard +{ + private string ImageUrl => $"./images/{Image}"; + + private string? ClassString => CssBuilder.Default("col-12 col-sm-6 col-md-4 col-lg-3") + .AddClass("d-none", IsHide) + .Build(); + + /// + /// 获得/设置 Header 文字 + /// + [Parameter] + public string Text { get; set; } = "未设置"; + + /// + /// 获得/设置 组件图片 + /// + [Parameter] + public string Image { get; set; } = "Divider.svg"; + + /// + /// 获得/设置 链接地址 + /// + [Parameter] + public string? Url { get; set; } + + [CascadingParameter] + private List? ComponentNames { get; set; } + + [CascadingParameter] + private ComponentCategory? Parent { get; set; } + + [CascadingParameter] + private string? SearchText { get; set; } + + /// + /// OnInitialized 方法 + /// + protected override void OnInitialized() + { + base.OnInitialized(); + + ComponentNames?.Add(Text); + Parent?.Add(this); + } + + /// + /// + /// + internal bool IsHide => !string.IsNullOrEmpty(SearchText) && !Text.Contains(SearchText, StringComparison.OrdinalIgnoreCase); +} diff --git a/src/BootstrapBlazor.Server/Components/Components/ComponentCategory.razor b/src/BootstrapBlazor.Server/Components/Components/ComponentCategory.razor new file mode 100644 index 000000000..d1a826ac7 --- /dev/null +++ b/src/BootstrapBlazor.Server/Components/Components/ComponentCategory.razor @@ -0,0 +1,21 @@ +
+

+ @Text + + @CardCount + +

+ + @if (!string.IsNullOrEmpty(Desc)) + { +

@Desc

+ } + +
+
+ + @ChildContent + +
+
+
diff --git a/src/BootstrapBlazor.Server/Components/Components/ComponentCategory.razor.cs b/src/BootstrapBlazor.Server/Components/Components/ComponentCategory.razor.cs new file mode 100644 index 000000000..8756e7b9d --- /dev/null +++ b/src/BootstrapBlazor.Server/Components/Components/ComponentCategory.razor.cs @@ -0,0 +1,55 @@ +// Copyright (c) Argo Zhang (argo@163.com). All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +// Website: https://www.blazor.zone or https://argozhang.github.io/ + +namespace BootstrapBlazor.Server.Components.Components; + +/// +/// +/// +public sealed partial class ComponentCategory +{ + /// + /// + /// + [Parameter] + public RenderFragment? ChildContent { get; set; } + + /// + /// + /// + [Parameter] + public string? Text { get; set; } + + /// + /// + /// + [Parameter] + public string? Desc { get; set; } + + private List Cards { get; } = new List(); + + internal void Add(ComponentCard card) => Cards.Add(card); + + private int CardCount => Cards.Where(c => !c.IsHide).Count(); + + private bool IsRendered { get; set; } + + private string? ClassString => CssBuilder.Default("coms-cate") + .AddClass("d-none", IsRendered && CardCount == 0) + .Build(); + + /// + /// + /// + /// + protected override void OnAfterRender(bool firstRender) + { + base.OnAfterRender(firstRender); + + if (firstRender) + { + IsRendered = true; + } + } +} diff --git a/src/BootstrapBlazor.Server/Components/Components/ComponentCategory.razor.css b/src/BootstrapBlazor.Server/Components/Components/ComponentCategory.razor.css new file mode 100644 index 000000000..5b5d02a15 --- /dev/null +++ b/src/BootstrapBlazor.Server/Components/Components/ComponentCategory.razor.css @@ -0,0 +1,46 @@ +.coms-cate { + position: relative; +} + + .coms-cate:not(:first-child) { + margin-top: 1rem; + } + + .coms-cate ::deep .badge { + position: absolute; + top: 0; + margin-left: 1rem; + font-size: .65rem; + } + +.coms-demo { + margin-top: 1rem; +} + + .coms-demo ::deep .card { + width: 100%; + height: 100%; + transition: box-shadow .3s linear; + } + + .coms-demo ::deep .card img { + max-width: calc(100%); + } + + .coms-demo ::deep .card .card-header { + overflow: hidden; + white-space: nowrap; + } + + .coms-demo ::deep .card .card-body { + display: flex; + align-items: center; + justify-content: center; + min-height: 200px; + } + + .coms-demo ::deep a { + width: calc(100%); + height: calc(100%); + color: inherit; + } diff --git a/src/BootstrapBlazor.Server/Components/Components/ContextMenuList.razor b/src/BootstrapBlazor.Server/Components/Components/ContextMenuList.razor new file mode 100644 index 000000000..1818bf99f --- /dev/null +++ b/src/BootstrapBlazor.Server/Components/Components/ContextMenuList.razor @@ -0,0 +1,16 @@ +
    + @foreach (var item in Items) + { + +
    @item
    +
    + } +
+ +@code { + private List Items { get; } = new List() { "Test1", "Test2", "Test3" }; + + [CascadingParameter] + [NotNull] + private ContextMenuZone? Zone { get; set; } +} diff --git a/src/BootstrapBlazor.Server/Components/Components/Counter.razor b/src/BootstrapBlazor.Server/Components/Components/Counter.razor new file mode 100644 index 000000000..598c4e4c0 --- /dev/null +++ b/src/BootstrapBlazor.Server/Components/Components/Counter.razor @@ -0,0 +1,14 @@ +

Counter

+ +

Current count: @currentCount

+ + + +@code { + private int currentCount = 0; + + private void IncrementCount() + { + currentCount++; + } +} diff --git a/src/BootstrapBlazor.Server/Components/Components/CultureChooser.razor b/src/BootstrapBlazor.Server/Components/Components/CultureChooser.razor new file mode 100644 index 000000000..13e0ddfe2 --- /dev/null +++ b/src/BootstrapBlazor.Server/Components/Components/CultureChooser.razor @@ -0,0 +1,13 @@ +@inherits BootstrapComponentBase + +
+ @Label + +
diff --git a/src/BootstrapBlazor.Server/Components/Components/CultureChooser.razor.cs b/src/BootstrapBlazor.Server/Components/Components/CultureChooser.razor.cs new file mode 100644 index 000000000..9569f95ff --- /dev/null +++ b/src/BootstrapBlazor.Server/Components/Components/CultureChooser.razor.cs @@ -0,0 +1,98 @@ +// Copyright (c) Argo Zhang (argo@163.com). All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +// Website: https://www.blazor.zone or https://argozhang.github.io/ + +using Microsoft.Extensions.Options; +using System.Globalization; + +namespace BootstrapBlazor.Server.Components.Components; + +/// +/// +/// +public partial class CultureChooser +{ + [Inject] + [NotNull] + private IOptionsMonitor? BootstrapOptions { get; set; } + + [Inject] + [NotNull] + private IOptionsMonitor? WebsiteOption { get; set; } + + [Inject] + [NotNull] + private IStringLocalizer? Localizer { get; set; } + + [Inject] + [NotNull] + private NavigationManager? NavigationManager { get; set; } + + private string? ClassString => CssBuilder.Default("culture-selector") + .AddClassFromAttributes(AdditionalAttributes) + .Build(); + + private string SelectedCulture { get; set; } = CultureInfo.CurrentUICulture.Name; + + [NotNull] + private string? Label { get; set; } + + /// + /// OnInitialized 方法 + /// + protected override void OnInitialized() + { + base.OnInitialized(); + + Label ??= Localizer[nameof(Label)]; + } + + private async Task SetCulture(SelectedItem item) + { + if (OperatingSystem.IsBrowser()) + { + var cultureName = item.Value; + if (cultureName != CultureInfo.CurrentCulture.Name) + { + await JSRuntime.SetCulture(cultureName); + var culture = new CultureInfo(cultureName); + CultureInfo.CurrentCulture = culture; + CultureInfo.CurrentUICulture = culture; + + NavigationManager.NavigateTo(NavigationManager.Uri, forceLoad: true); + } + } + else + { + // 使用 api 方式 适用于 Server-Side 模式 + if (SelectedCulture != item.Value) + { + var culture = item.Value; + var uri = new Uri(NavigationManager.Uri).GetComponents(UriComponents.PathAndQuery, UriFormat.Unescaped); + var query = $"?culture={Uri.EscapeDataString(culture)}&redirectUri={Uri.EscapeDataString(uri)}"; + + // use a path that matches your culture redirect controller from the previous steps + NavigationManager.NavigateTo("/Culture/SetCulture" + query, forceLoad: true); + } + } + } + + private static string GetDisplayName(CultureInfo culture) + { + string? ret; + if (OperatingSystem.IsBrowser()) + { + ret = culture.Name switch + { + "zh-CN" => "中文(中国)", + "en-US" => "English (United States)", + _ => "" + }; + } + else + { + ret = culture.NativeName; + } + return ret; + } +} diff --git a/src/BootstrapBlazor.Server/Components/Components/CultureChooser.razor.css b/src/BootstrapBlazor.Server/Components/Components/CultureChooser.razor.css new file mode 100644 index 000000000..764961680 --- /dev/null +++ b/src/BootstrapBlazor.Server/Components/Components/CultureChooser.razor.css @@ -0,0 +1,18 @@ +.culture-selector { + display: flex; + align-items: center; +} + + .culture-selector span { + margin: 0; + color: var(--bs-navbar-color); + opacity: 0.85; + } + + .culture-selector ::deep .select { + width: 210px; + } + + .culture-selector ::deep .dropdown-menu { + --bs-dropdown-link-active-bg: #7532f9; + } diff --git a/src/BootstrapBlazor.Server/Components/Components/CustomerFilter.razor b/src/BootstrapBlazor.Server/Components/Components/CustomerFilter.razor new file mode 100644 index 000000000..7542f14d1 --- /dev/null +++ b/src/BootstrapBlazor.Server/Components/Components/CustomerFilter.razor @@ -0,0 +1,50 @@ +@inherits FilterBase + + + +@code { + private int Value = 10; + + /// + /// OnInitialized 方法 + /// + protected override void OnInitialized() + { + base.OnInitialized(); + + if (TableFilter != null) TableFilter.ShowMoreButton = false; + + Items = new SelectedItem[] + { + new SelectedItem { Value = "10", Text = "大于 10" }, + new SelectedItem { Value = "50", Text = "大于 50" }, + new SelectedItem { Value = "100", Text = "大于 100" } + }; + } + + /// + /// 重置过滤条件方法 + /// + public override void Reset() + { + Value = 10; + + StateHasChanged(); + } + + /// + /// 生成过滤条件方法 + /// + /// + public override FilterKeyValueAction GetFilterConditions() + { + var filter = new FilterKeyValueAction() { Filters = new() }; + filter.Filters.Add(new FilterKeyValueAction() + { + FieldKey = FieldKey, + FieldValue = Value, + FilterAction = FilterAction.GreaterThan + }); + return filter; + } +} diff --git a/src/BootstrapBlazor.Server/Components/Components/CustomerSelectDialog.razor b/src/BootstrapBlazor.Server/Components/Components/CustomerSelectDialog.razor new file mode 100644 index 000000000..2e99dfcb6 --- /dev/null +++ b/src/BootstrapBlazor.Server/Components/Components/CustomerSelectDialog.razor @@ -0,0 +1,8 @@ +
+
+ +
+
diff --git a/src/BootstrapBlazor.Server/Components/Components/CustomerSelectDialog.razor.cs b/src/BootstrapBlazor.Server/Components/Components/CustomerSelectDialog.razor.cs new file mode 100644 index 000000000..807100458 --- /dev/null +++ b/src/BootstrapBlazor.Server/Components/Components/CustomerSelectDialog.razor.cs @@ -0,0 +1,50 @@ +// Copyright (c) Argo Zhang (argo@163.com). All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +// Website: https://www.blazor.zone or https://argozhang.github.io/ + +namespace BootstrapBlazor.Server.Components.Components; + +/// +/// +/// +public partial class CustomerSelectDialog +{ + private IEnumerable? Items2; + private readonly IEnumerable Items3 = new SelectedItem[] + { + new SelectedItem ("", "请选择 ..."), + new SelectedItem ("Beijing", "北京"), + new SelectedItem ("Shanghai", "上海") + }; + + /// + /// 级联绑定菜单 + /// + /// + private async Task OnCascadeBindSelectClick(SelectedItem item) + { + // 模拟异步通讯获取数据 + await Task.Delay(100); + if (item.Value == "Beijing") + { + Items2 = new SelectedItem[] + { + new SelectedItem("1","朝阳区"), + new SelectedItem("2","海淀区"), + }; + } + else if (item.Value == "Shanghai") + { + Items2 = new SelectedItem[] + { + new SelectedItem("1","静安区"), + new SelectedItem("2","黄浦区"), + }; + } + else + { + Items2 = Enumerable.Empty(); + } + StateHasChanged(); + } +} diff --git a/src/BootstrapBlazor.Server/Components/Components/DataDialogComponent.razor b/src/BootstrapBlazor.Server/Components/Components/DataDialogComponent.razor new file mode 100644 index 000000000..534f3eaa9 --- /dev/null +++ b/src/BootstrapBlazor.Server/Components/Components/DataDialogComponent.razor @@ -0,0 +1,77 @@ +@inject ToastService Toast + +

同时通过传递数据主键获取数据后再显示的例子组件

+ +

传递的参数主键为:@DataPrimaryId

+ +

通过传递参数获取的数据为:

+ +@if (Model != null) +{ + + + + + + + + + +} + +@code { + [Inject] + [NotNull] + private IStringLocalizer? Localizer { get; set; } + + [CascadingParameter(Name = "BodyContext")] + private object? DataPrimaryId { get; set; } + + [CascadingParameter] + [NotNull] + private Modal? Dialog { get; set; } + + private Foo? Model { get; set; } + + [NotNull] + private List? Items { get; set; } + + [NotNull] + private IEnumerable? Hobbys { get; set; } + + /// + /// + /// + protected override void OnInitialized() + { + base.OnInitialized(); + + Items = Foo.GenerateFoo(Localizer); + Hobbys = Foo.GenerateHobbies(Localizer); + } + + protected override void OnParametersSet() + { + base.OnParametersSet(); + + if (DataPrimaryId is int primaryId) + { + Model = Items.FirstOrDefault(i => i.Id == primaryId); + } + } + + private async Task OnValidSubmit(EditContext model) + { + // do someting like save model into db + + // 关闭弹窗 + // close Dialog + await Dialog.Close(); + + // 显示 Toast 提示弹窗 + await Toast.Show(new ToastOption() { Title = "保存数据", Content = "保存成功,4 秒后自动关闭" }); + } +} diff --git a/src/BootstrapBlazor.Server/Components/Components/DemoBlock.razor b/src/BootstrapBlazor.Server/Components/Components/DemoBlock.razor new file mode 100644 index 000000000..a0f682521 --- /dev/null +++ b/src/BootstrapBlazor.Server/Components/Components/DemoBlock.razor @@ -0,0 +1,29 @@ +@inherits IdComponentBase + +
+ + +

@(new MarkupString(Introduction))

+ +
@Localizer["SubTitle"]
+ +
+
+ @ChildContent +
+ @if (ShowCode) + { + + } +
+
diff --git a/src/BootstrapBlazor.Server/Components/Components/DemoBlock.razor.cs b/src/BootstrapBlazor.Server/Components/Components/DemoBlock.razor.cs new file mode 100644 index 000000000..497fd7a88 --- /dev/null +++ b/src/BootstrapBlazor.Server/Components/Components/DemoBlock.razor.cs @@ -0,0 +1,75 @@ +// Copyright (c) Argo Zhang (argo@163.com). All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +// Website: https://www.blazor.zone or https://argozhang.github.io/ + +namespace BootstrapBlazor.Server.Components.Components; + +/// +/// +/// +public sealed partial class DemoBlock +{ + /// + /// 获得/设置 组件 Title 属性 + /// + [Parameter] + [NotNull] + public string? Title { get; set; } + + /// + /// 获得/设置 组件说明信息 + /// + [Parameter] + public string Introduction { get; set; } = "未设置"; + + /// + /// 获得/设置 组件内容 + /// + [Parameter] + public RenderFragment? ChildContent { get; set; } + + /// + /// 获得/设置 是否显示代码块 默认 true 显示 + /// + [Parameter] + public bool ShowCode { get; set; } = true; + + /// + /// 获得/设置 Tooltip 提示信息文本 + /// + [Parameter] + public string? TooltipText { get; set; } + + /// + /// 获得/设置 友好链接锚点名称 + /// + [Parameter] + public string? Name { get; set; } + + [CascadingParameter(Name = "RazorFileName")] + private string? CodeFile { get; set; } + + [Inject] + [NotNull] + private IStringLocalizer? Localizer { get; set; } + + /// + /// + /// + protected override void OnParametersSet() + { + base.OnParametersSet(); + + Title ??= Localizer[nameof(Title)]; + TooltipText ??= Localizer[nameof(TooltipText)]; + } + + private bool _showPreCode; + + private void ShowPreCode() + { + _showPreCode = true; + } + + private Task OnLoadConditionCheckAsync() => Task.FromResult(_showPreCode); +} diff --git a/src/BootstrapBlazor.Server/Components/Components/DemoBlock.razor.css b/src/BootstrapBlazor.Server/Components/Components/DemoBlock.razor.css new file mode 100644 index 000000000..5f9412795 --- /dev/null +++ b/src/BootstrapBlazor.Server/Components/Components/DemoBlock.razor.css @@ -0,0 +1,116 @@ +.card { + transition: all .3s linear; +} + + .card:hover { + box-shadow: 0 0 8px 0 rgba(232,237,250,.6), 0 2px 4px 0 rgba(232,237,250,.5); + } + + .card:hover .card-footer-control i { + margin-left: -1.5rem; + margin-left: -72px; + } + + .card:hover .card-footer-control .card-text { + margin-left: 1rem; + } + + .card:hover .card-footer-control .card-text:before { + opacity: 1; + } + + +.card-footer { + background-color: transparent; +} + +.card-footer-code { + margin: -.5rem -1rem 0 -1rem; + border-bottom: 1px solid rgba(0, 0, 0, 0.125); +} + + .card-footer-code.show + a { + margin-top: .5rem; + } + + .card-footer-code .loading { + padding: .5rem; + } + + .card-footer-code ::deep code { + border: none; + } + + .card-footer-code ::deep .pre-code { + margin: .5rem; + } + +.card-footer-control { + text-align: center; + color: #d3dce6; + display: block; +} + + .card-footer-control:hover { + color: #409eff; + } + + .card-footer-control i { + transition: .3s linear; + } + + .card-footer-control.collapsed i { + transform: rotate(180deg); + } + + .card-footer-control .card-text { + margin-left: 1.5rem; + position: absolute; + transition: all .3s linear; + } + + .card-footer-control .card-text:before { + content: "Hide Code"; + opacity: 0; + transition: opacity .3s linear; + } + + .card-footer-control.collapsed .card-text:before { + content: "Show Code"; + } + +.demo-block > ::deep .anchor-link { + font-weight: var(--bb-font-weight); + color: var(--bb-title-color); + font-size: var(--bb-sub-font-size); + margin-top: 1rem; + margin-bottom: .5rem; +} + +::deep .table-cell .progress { + height: 6px; + margin-top: 9px; + margin-bottom: 10px; +} + +::deep .chart .btn i + span { + display: none; +} + +::deep .ul-demo { + margin-bottom: 0; +} + + ::deep .ul-demo li:not(:last-child) { + margin-bottom: 0.25rem; + } + +@media (min-width: 768px) { + ::deep .chart { + max-width: 740px; + } + + ::deep .chart .btn i + span { + display: inline; + } +} diff --git a/src/BootstrapBlazor.Server/Components/Components/DemoComponent.razor b/src/BootstrapBlazor.Server/Components/Components/DemoComponent.razor new file mode 100644 index 000000000..742b3fa62 --- /dev/null +++ b/src/BootstrapBlazor.Server/Components/Components/DemoComponent.razor @@ -0,0 +1,6 @@ +
@Parameter
+ +@code { + [CascadingParameter(Name = "BodyContext")] + private object? Parameter { get; set; } +} diff --git a/src/BootstrapBlazor.Server/Components/Components/DemoTabItem.razor b/src/BootstrapBlazor.Server/Components/Components/DemoTabItem.razor new file mode 100644 index 000000000..71f0cc709 --- /dev/null +++ b/src/BootstrapBlazor.Server/Components/Components/DemoTabItem.razor @@ -0,0 +1,3 @@ +

@((MarkupString)Localizer["Info"].Value)

+ + + +@code { + private int currentCount = 0; + + private void IncrementCount() + { + throw new Exception("Custom Exception"); + } +} diff --git a/src/BootstrapBlazor.Server/Components/Components/EventTable.razor b/src/BootstrapBlazor.Server/Components/Components/EventTable.razor new file mode 100644 index 000000000..99cf2ba1c --- /dev/null +++ b/src/BootstrapBlazor.Server/Components/Components/EventTable.razor @@ -0,0 +1,17 @@ +@inject IStringLocalizer Localizer + +
+

@Localizer["Title"]

+ + + + + + + +
+
+ +@code { + [Parameter] public IEnumerable? Items { get; set; } +} diff --git a/src/BootstrapBlazor.Server/Components/Components/FetchData.razor b/src/BootstrapBlazor.Server/Components/Components/FetchData.razor new file mode 100644 index 000000000..2cae05a6e --- /dev/null +++ b/src/BootstrapBlazor.Server/Components/Components/FetchData.razor @@ -0,0 +1,47 @@ +@inject WeatherForecastService ForecastService + +

Weather forecast

+ +

This component demonstrates fetching data from a service.

+ +@if (forecasts == null) +{ +

Loading...

+} +else +{ + + + + + + + + + + + @foreach (var forecast in forecasts) + { + + + + + + + } + +
DateTemp. (C)Temp. (F)Summary
@forecast.Date.ToShortDateString()@forecast.TemperatureC@forecast.TemperatureF@forecast.Summary
+} + +@code { + private WeatherForecast[] forecasts = new WeatherForecast[0]; + + /// + /// + /// + /// + protected override async Task OnInitializedAsync() + { + forecasts = await ForecastService.GetForecastAsync(DateTime.Now); + } +} diff --git a/src/BootstrapBlazor.Server/Components/Components/FooSearch.razor b/src/BootstrapBlazor.Server/Components/Components/FooSearch.razor new file mode 100644 index 000000000..365c651ba --- /dev/null +++ b/src/BootstrapBlazor.Server/Components/Components/FooSearch.razor @@ -0,0 +1,14 @@ +
+
+ +
+
+ +
+
+ +
+
diff --git a/src/BootstrapBlazor.Server/Components/Components/FooSearch.razor.cs b/src/BootstrapBlazor.Server/Components/Components/FooSearch.razor.cs new file mode 100644 index 000000000..5618fe715 --- /dev/null +++ b/src/BootstrapBlazor.Server/Components/Components/FooSearch.razor.cs @@ -0,0 +1,35 @@ +// Copyright (c) Argo Zhang (argo@163.com). All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +// Website: https://www.blazor.zone or https://argozhang.github.io/ + +namespace BootstrapBlazor.Server.Components.Components; + +/// +/// +/// +public partial class FooSearch +{ + /// + /// + /// + [Parameter] + [NotNull] + public FooSearchModel? Value { get; set; } + + /// + /// + /// + [Parameter] + public EventCallback ValueChanged { get; set; } + + /// + /// + /// + public List CountItems { get; } = new List() + { + new SelectedItem("", "全部"), + new SelectedItem("1", "小于 30"), + new SelectedItem("2", "大于等于 30 小于 70"), + new SelectedItem("3", "大于等于 70 小于 100") + }; +} diff --git a/src/BootstrapBlazor.Server/Components/Components/FormInlineSwitch.razor b/src/BootstrapBlazor.Server/Components/Components/FormInlineSwitch.razor new file mode 100644 index 000000000..7f1ebbd64 --- /dev/null +++ b/src/BootstrapBlazor.Server/Components/Components/FormInlineSwitch.razor @@ -0,0 +1 @@ + diff --git a/src/BootstrapBlazor.Server/Components/Components/FormInlineSwitch.razor.cs b/src/BootstrapBlazor.Server/Components/Components/FormInlineSwitch.razor.cs new file mode 100644 index 000000000..0f389f870 --- /dev/null +++ b/src/BootstrapBlazor.Server/Components/Components/FormInlineSwitch.razor.cs @@ -0,0 +1,61 @@ +// Copyright (c) Argo Zhang (argo@163.com). All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +// Website: https://www.blazor.zone or https://argozhang.github.io/ + +using BootstrapBlazor.Server.Components.Samples; + +namespace BootstrapBlazor.Server.Components.Components; + +/// +/// 内部组件 +/// +public partial class FormInlineSwitch +{ + /// + /// 获得/设置 用户自定义属性 + /// + [Parameter(CaptureUnmatchedValues = true)] + public IDictionary? AdditionalAttributes { get; set; } + + [Inject] + [NotNull] + private IStringLocalizer? LocalizerRows { get; set; } + + /// + /// + /// + [Parameter] + public RowType Value { get; set; } + + /// + /// + /// + [Parameter] + public EventCallback ValueChanged { get; set; } + + [NotNull] + private IEnumerable? Items { get; set; } + + private RowType FormRowType + { + get => Value; set + { + if (Value != value) + { + Value = value; + if (ValueChanged.HasDelegate) + { + ValueChanged.InvokeAsync(Value); + } + } + } + } + + /// + /// OnInitialized 方法 + /// + protected override void OnInitialized() + { + Items = Enum.GetNames().Select(i => new SelectedItem(i, LocalizerRows[i])); + } +} diff --git a/src/BootstrapBlazor.Server/Components/Components/GlobalSearch.razor b/src/BootstrapBlazor.Server/Components/Components/GlobalSearch.razor new file mode 100644 index 000000000..871e7a705 --- /dev/null +++ b/src/BootstrapBlazor.Server/Components/Components/GlobalSearch.razor @@ -0,0 +1,3 @@ +
+ +
diff --git a/src/BootstrapBlazor.Server/Components/Components/GlobalSearch.razor.cs b/src/BootstrapBlazor.Server/Components/Components/GlobalSearch.razor.cs new file mode 100644 index 000000000..31f9769c9 --- /dev/null +++ b/src/BootstrapBlazor.Server/Components/Components/GlobalSearch.razor.cs @@ -0,0 +1,57 @@ +// Copyright (c) Argo Zhang (argo@163.com). All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +// Website: https://www.blazor.zone or https://argozhang.github.io/ + +using Microsoft.Extensions.Options; + +namespace BootstrapBlazor.Server.Components.Components; + +/// +/// Pre 组件 +/// +public partial class GlobalSearch +{ + [Inject] + [NotNull] + private IStringLocalizer? Localizer { get; set; } + + [Inject] + [NotNull] + private IOptionsMonitor? WebsiteOption { get; set; } + + [Inject] + [NotNull] + private NavigationManager? NavigationManager { get; set; } + + [Inject] + [NotNull] + private MenuService? MenuService { get; set; } + + [NotNull] + private List? ComponentItems { get; set; } + + private IEnumerable Menus => MenuService.GetMenus().SelectMany(i => i.Items).Where(i => !string.IsNullOrEmpty(i.Url)); + + /// + /// + /// + protected override void OnInitialized() + { + ComponentItems = Menus.Select(i => i.Text!).ToList(); + } + + private Task OnSearch(string searchText) + { + if (!string.IsNullOrEmpty(searchText)) + { + var item = Menus.FirstOrDefault(i => i.Text!.Contains(searchText, StringComparison.OrdinalIgnoreCase)); + if (item != null && !string.IsNullOrEmpty(item.Url)) + { + NavigationManager.NavigateTo(item.Url); + } + } + return Task.CompletedTask; + } + + private Task OnSelectedItemChanged(string searchText) => OnSearch(searchText); +} diff --git a/src/BootstrapBlazor.Server/Components/Components/Header.razor b/src/BootstrapBlazor.Server/Components/Components/Header.razor new file mode 100644 index 000000000..3ff5b6b9c --- /dev/null +++ b/src/BootstrapBlazor.Server/Components/Components/Header.razor @@ -0,0 +1,44 @@ +@inherits WebSiteModuleComponentBase +@attribute [JSModuleAutoLoader("Components/Header.razor.js")] + + + diff --git a/src/BootstrapBlazor.Server/Components/Components/Header.razor.cs b/src/BootstrapBlazor.Server/Components/Components/Header.razor.cs new file mode 100644 index 000000000..f8105585a --- /dev/null +++ b/src/BootstrapBlazor.Server/Components/Components/Header.razor.cs @@ -0,0 +1,48 @@ +// Copyright (c) Argo Zhang (argo@163.com). All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +// Website: https://www.blazor.zone or https://argozhang.github.io/ + +using Microsoft.Extensions.Options; + +namespace BootstrapBlazor.Server.Components.Components; + +/// +/// Header 组件 +/// +public partial class Header +{ + [Inject] + [NotNull] + private IOptionsMonitor? WebsiteOption { get; set; } + + [Inject] + [NotNull] + private IStringLocalizer
? Localizer { get; set; } + + [NotNull] + private string? HomeText { get; set; } + + [NotNull] + private string? IntroductionText { get; set; } + + [NotNull] + private string? ComponentsText { get; set; } + + [NotNull] + private string? DownloadText { get; set; } + + private string DownloadUrl => $"{WebsiteOption.CurrentValue.BootstrapBlazorLink}/repository/archive/main.zip"; + + /// + /// + /// + protected override void OnInitialized() + { + base.OnInitialized(); + + DownloadText ??= Localizer[nameof(DownloadText)]; + HomeText ??= Localizer[nameof(HomeText)]; + IntroductionText ??= Localizer[nameof(IntroductionText)]; + ComponentsText ??= Localizer[nameof(ComponentsText)]; + } +} diff --git a/src/BootstrapBlazor.Server/Components/Components/Header.razor.css b/src/BootstrapBlazor.Server/Components/Components/Header.razor.css new file mode 100644 index 000000000..f5db29414 --- /dev/null +++ b/src/BootstrapBlazor.Server/Components/Components/Header.razor.css @@ -0,0 +1,68 @@ +header { + --bb-violet-rgb: 112.520718,44.062154,249.437846; + background-color: transparent; + background-image: linear-gradient(to bottom, rgba(var(--bb-violet-rgb), 1), rgba(var(--bb-violet-rgb), 0.95)); + box-shadow: 0 0.5rem 1rem rgba(0,0,0,.05), inset 0 -1px 0 rgba(0,0,0,.1); + font-size: 1rem; + transition: transform .3s ease; +} + +.header-img { + display: flex; + align-items: center; + padding: 0; + margin-right: 0; +} + +::deep .btn-search .btn { + --bs-btn-bg: #8759ff; + --bs-btn-color: #fff; + --bs-btn-hover-bg: #7d53eb; + --bs-btn-hover-color: var(--bs-btn-color); + --bs-btn-hover-border-color: var(--bs-btn-hover-bg); + --bs-btn-active-bg: var(--bs-btn-hover-bg); + --bs-btn-active-color: var(--bs-btn-hover-color); + --bs-btn-active-border-color: var(--bs-btn-hover-border-color); +} + +::deep .btn-search .form-control { + --bs-border-color: #fff; + --bb-border-focus-color: var(--bs-border-color); + --bb-border-hover-color: var(--bs-border-color); + z-index: 6; +} + +::deep .btn-fs { + margin-top: 2px; +} + +.btn-bd-download { + font-weight: 600; + color: #ffe484; + border-color: #ffe484; +} + + .btn-bd-download:active, + .btn-bd-download:hover { + color: #2a2730; + background-color: #ffe484; + border-color: #ffe484; + } + +.nav-link img { + height: 24px; + width: auto; +} + +@media (min-width: 768px) { + .navbar-header { + position: sticky; + top: 0; + z-index: 1050; + height: var(--bs-header-height); + } + + .modal-open .navbar-header { + z-index: 1040; + } +} diff --git a/src/BootstrapBlazor.Server/Components/Components/Header.razor.js b/src/BootstrapBlazor.Server/Components/Components/Header.razor.js new file mode 100644 index 000000000..27316e531 --- /dev/null +++ b/src/BootstrapBlazor.Server/Components/Components/Header.razor.js @@ -0,0 +1,20 @@ +import EventHandler from "../../_content/BootstrapBlazor/modules/event-handler.js?v=$version" + +export function init() { + const scrollTop = () => (document.documentElement && document.documentElement.scrollTop) || document.body.scrollTop + let prevScrollTop = 0; + EventHandler.on(document, 'scroll', () => { + const items = document.querySelectorAll('.navbar-header, .coms-search') + const currentScrollTop = scrollTop() + if (currentScrollTop > prevScrollTop) { + items.forEach(item => item.classList.add('hide')) + } else { + items.forEach(item => item.classList.remove('hide')) + } + prevScrollTop = currentScrollTop + }) +} + +export function dispose() { + EventHandler.off(document, 'scroll') +} diff --git a/src/BootstrapBlazor.Server/Components/Components/InstallContent.razor b/src/BootstrapBlazor.Server/Components/Components/InstallContent.razor new file mode 100644 index 000000000..6059dda93 --- /dev/null +++ b/src/BootstrapBlazor.Server/Components/Components/InstallContent.razor @@ -0,0 +1,90 @@ +@using Microsoft.Extensions.DependencyInjection +@inject PackageVersionService VersionManager +@inject IStringLocalizer Localizer + +

@Title

+ +

@Localizer["Heading"]

+ +

@Localizer["P1"]

+
    +
  • visual studio 2019 @Localizer["P2"] visual studio 2022
  • +
  • net5 @Localizer["P3"] net6
  • +
+
BootstrapBlazor @Localizer["P4"] net5/net6
+ +

@Localizer["P5"]

+ +

@Localizer["P6"] [@Localizer["P7"]] @Localizer["P8"]

+ +

@Localizer["P9"]

+ +
@Localizer["P10"]
+
1. @Localizer["P11"]
+
2. @Localizer["P12"]
+
3. @Localizer["P13"] Blazor App @Localizer["P14"] @Localizer["P15"], @Localizer["P16"] Create
+install +@ChooseTemplate +
@Localizer["P17"]
+
1. @Localizer["P18"] nuget.org @Localizer["P19"] BootstrapBlazor
+
@Localizer["P20"] Manage Nuget Packages
+
dotnet add package BootstrapBlazor --version @Version
+install +
2. @Localizer["P21"]
+install +
3. @Localizer["P22"]
+
@Localizer["P23"]
+@SheetTemplate + +
@((MarkupString)Localizer["Tips2"].Value)
+
+
<head>
+    ...
+
+    <!-- @Localizer["P24"] !-->
+    <link href="_content/BootstrapBlazor.FontAwesome/css/font-awesome.min.css" rel="stylesheet">
+    <link href="_content/BootstrapBlazor/css/bootstrap.blazor.bundle.min.css" rel="stylesheet">
+
+    ...
+    <link href="css/site.css" rel="stylesheet">
+    <link href="BlazorApp1.styles.css" rel="stylesheet">
+</head>
+
4. @Localizer["P25"]
+@ScriptsTemplate +
<body>
+    ...
+    <!-- @Localizer["P26"] !-->
+    <script src="_content/BootstrapBlazor/js/bootstrap.blazor.bundle.min.js"></script>
+    ...
+    <script src="_framework/blazor.server.js"></script>
+</body>
+
5. @Localizer["P27"]
+@ServicesTemplate + +
6. @Localizer["P28"]
+
@Localizer["P29"] ~/_Imports.razor @Localizer["P30"] Razor @Localizer["P31"]
+
@@using BootstrapBlazor.Components
+ +
7. @Localizer["P32"] BootstrapBlazorRoot @Localizer["P33"] ~/App.razor @Localizer["P34"]
+
<BootstrapBlazorRoot>
+    <Router AppAssembly="@@typeof(App).Assembly">
+        <Found Context="routeData">
+            <PageTitle>Title</PageTitle>
+            <RouteView RouteData="@@routeData" DefaultLayout="@@typeof(MainLayout)" />
+            <FocusOnNavigate RouteData="@@routeData" Selector="h1" />
+        </Found>
+        <NotFound>
+            <PageTitle>Not found</PageTitle>
+            <LayoutView Layout="@@typeof(MainLayout)">
+                <p> @Localizer["P35"] ...</p>
+            </LayoutView>
+        </NotFound>
+    </Router>
+</BootstrapBlazorRoot>
+ +
@Localizer["P36"]
+
@Localizer["P37"] BootstrapBlazor @Localizer["P38"]:
+
1. @Localizer["P39"] Button @Localizer["P40"]
+
<Button Color="Color.Primary" Icon="fa-solid fa-font-awesome" Text="@Localizer["P41"]" />
+
2. @Localizer["P42"] Visual studio 2022 @Localizer["P43"] F5 @Localizer["P44"]
+install diff --git a/src/BootstrapBlazor.Server/Components/Components/InstallContent.razor.cs b/src/BootstrapBlazor.Server/Components/Components/InstallContent.razor.cs new file mode 100644 index 000000000..d7c7efa60 --- /dev/null +++ b/src/BootstrapBlazor.Server/Components/Components/InstallContent.razor.cs @@ -0,0 +1,67 @@ +// Copyright (c) Argo Zhang (argo@163.com). All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +// Website: https://www.blazor.zone or https://argozhang.github.io/ + +namespace BootstrapBlazor.Server.Components.Components; + +/// +/// +/// +public sealed partial class InstallContent +{ + /// + /// 获得/设置 版本号字符串 + /// + private string Version { get; set; } = "latest"; + + /// + /// + /// + [Parameter] + public string Title { get; set; } = "服务器端 Blazor 安装教程"; + + /// + /// + /// + [Parameter] + public string HostFile { get; set; } = "Pages/_Host.cshtml"; + + /// + /// + /// + [Parameter] + public RenderFragment? ChooseTemplate { get; set; } + + /// + /// + /// + [Parameter] + public RenderFragment? SheetTemplate { get; set; } + + /// + /// + /// + [Parameter] + public RenderFragment? ScriptsTemplate { get; set; } + + /// + /// + /// + [Parameter] + public RenderFragment? ServicesTemplate { get; set; } + + /// + /// + /// + [Parameter] + public RenderFragment? ChildContent { get; set; } + + /// + /// OnInitializedAsync 方法 + /// + /// + protected override async Task OnInitializedAsync() + { + Version = await VersionManager.GetVersionAsync(); + } +} diff --git a/src/BootstrapBlazor.Server/Components/Components/MethodTable.razor b/src/BootstrapBlazor.Server/Components/Components/MethodTable.razor new file mode 100644 index 000000000..3056cd682 --- /dev/null +++ b/src/BootstrapBlazor.Server/Components/Components/MethodTable.razor @@ -0,0 +1,13 @@ +
+

@Title

+ + + + + + + + +
+
+ diff --git a/src/BootstrapBlazor.Server/Components/Components/MethodTable.razor.cs b/src/BootstrapBlazor.Server/Components/Components/MethodTable.razor.cs new file mode 100644 index 000000000..1febf4bd4 --- /dev/null +++ b/src/BootstrapBlazor.Server/Components/Components/MethodTable.razor.cs @@ -0,0 +1,38 @@ +// Copyright (c) Argo Zhang (argo@163.com). All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +// Website: https://www.blazor.zone or https://argozhang.github.io/ + +namespace BootstrapBlazor.Server.Components.Components; + +/// +/// +/// +public sealed partial class MethodTable +{ + [Inject] + [NotNull] + private IStringLocalizer? Localizer { get; set; } + + /// + /// + /// + [Parameter] + [NotNull] + public string? Title { get; set; } + + /// + /// + /// + [Parameter] public IEnumerable? Items { get; set; } + + /// + /// OnInitialized 方法 + /// + protected override void OnInitialized() + { + base.OnInitialized(); + + Title ??= Localizer[nameof(Title)]; + + } +} diff --git a/src/BootstrapBlazor.Server/Components/Components/PackageTips.razor b/src/BootstrapBlazor.Server/Components/Components/PackageTips.razor new file mode 100644 index 000000000..b19cb506c --- /dev/null +++ b/src/BootstrapBlazor.Server/Components/Components/PackageTips.razor @@ -0,0 +1,36 @@ +@inject IStringLocalizer Localizer + +
@((MarkupString)Localizer["Tips", Name].Value)
+ +
.NET CLI
+
dotnet add package @Name
+ +
PackageReference
+
<PackageReference Include="@Name" Version="@Version" />
+ +
Package Manager
+
Install-Package @Name
+ +@code { + [Inject] + [NotNull] + private PackageVersionService? VersionManager { get; set; } + + private string Version { get; set; } = "fetching"; + + /// + /// 获得/设置 Package 名称 + /// + [Parameter] + [NotNull] + [EditorRequired] + public string? Name { get; set; } + + /// + /// + /// + protected override async Task OnInitializedAsync() + { + Version = await VersionManager.GetVersionAsync(Name.ToLower()); + } +} diff --git a/src/BootstrapBlazor.Server/Components/Components/Pre.razor b/src/BootstrapBlazor.Server/Components/Components/Pre.razor new file mode 100644 index 000000000..bab9cb60d --- /dev/null +++ b/src/BootstrapBlazor.Server/Components/Components/Pre.razor @@ -0,0 +1,21 @@ +@inherits WebSiteModuleComponentBase +@attribute [JSModuleAutoLoader("Components/Pre.razor.js")] + +
+

@LoadingText

+ @if (Loaded) + { +
@ChildContent
+ @if (CanCopy) + { + @if (ShowToolbar) + { +
+ + +
+ } + + } + } +
diff --git a/src/BootstrapBlazor.Server/Components/Components/Pre.razor.cs b/src/BootstrapBlazor.Server/Components/Components/Pre.razor.cs new file mode 100644 index 000000000..205f45ea4 --- /dev/null +++ b/src/BootstrapBlazor.Server/Components/Components/Pre.razor.cs @@ -0,0 +1,191 @@ +// Copyright (c) Argo Zhang (argo@163.com). All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +// Website: https://www.blazor.zone or https://argozhang.github.io/ + +using System.Text.RegularExpressions; + +namespace BootstrapBlazor.Server.Components.Components; + +/// +/// Pre 组件 +/// +public partial class Pre +{ + private bool Loaded { get; set; } + + private bool CanCopy { get; set; } + + /// + /// 获得 样式集合 + /// + /// + private string? ClassString => CssBuilder.Default("pre-code") + .AddClass("loaded", Loaded) + .AddClassFromAttributes(AdditionalAttributes) + .Build(); + + [Inject] + [NotNull] + private CodeSnippetService? CodeSnippetService { get; set; } + + /// + /// 获得/设置 子组件 CodeFile 为空时生效 + /// + [Parameter] + public RenderFragment? ChildContent { get; set; } + + /// + /// 获得/设置 代码段的标题 + /// + [Parameter] + public string? BlockName { get; set; } + + /// + /// 获得/设置 示例代码片段 默认 null 未设置 + /// + [Parameter] + public string? CodeFile { get; set; } + + /// + /// 获得/设置 是否显示工具按钮组 + /// + [Parameter] + public bool ShowToolbar { get; set; } + + [Inject] + [NotNull] + private IStringLocalizer
? Localizer { get; set; }
+
+    private string? LoadingText { get; set; }
+
+    private string? TooltipTitle { get; set; }
+
+    private string? PlusTooltipTitle { get; set; }
+
+    private string? MinusTooltipTitle { get; set; }
+
+    private string? CopiedText { get; set; }
+
+    /// 
+    /// 
+    /// 
+    protected override void OnParametersSet()
+    {
+        LoadingText ??= Localizer[nameof(LoadingText)];
+        TooltipTitle ??= Localizer[nameof(TooltipTitle)];
+        PlusTooltipTitle ??= Localizer[nameof(PlusTooltipTitle)];
+        MinusTooltipTitle ??= Localizer[nameof(MinusTooltipTitle)];
+        CopiedText ??= Localizer[nameof(CopiedText)];
+    }
+
+    /// 
+    /// 
+    /// 
+    /// 
+    protected override async Task OnParametersSetAsync()
+    {
+        if (ChildContent == null)
+        {
+            await GetCodeAsync();
+        }
+        else
+        {
+            Loaded = true;
+            CanCopy = true;
+        }
+    }
+
+    /// 
+    /// OnAfterRender 方法
+    /// 
+    /// 
+    protected override async Task OnAfterRenderAsync(bool firstRender)
+    {
+        await base.OnAfterRenderAsync(firstRender);
+
+        if (Loaded)
+        {
+            await InvokeVoidAsync("highlight", Id);
+        }
+    }
+
+    /// 
+    /// 
+    /// 
+    /// 
+    protected override Task InvokeInitAsync() => InvokeVoidAsync("init", Id, CopiedText);
+
+    private async Task GetCodeAsync()
+    {
+        if (!string.IsNullOrEmpty(CodeFile))
+        {
+            var code = await CodeSnippetService.GetCodeAsync(CodeFile);
+            if (!string.IsNullOrEmpty(code))
+            {
+                code = FindCodeSnippetByName(code);
+                ChildContent = builder =>
+                {
+                    builder.AddContent(0, code);
+                };
+            }
+            CanCopy = !string.IsNullOrEmpty(code) && !code.StartsWith("Error: ");
+        }
+        else
+        {
+            ChildContent = builder =>
+            {
+                builder.AddContent(0, "网站改版中 ... Refactoring website. Coming soon ...");
+            };
+            CanCopy = false;
+        }
+        Loaded = true;
+    }
+
+    private string FindCodeSnippetByName(string code)
+    {
+        var content = code;
+        if (!string.IsNullOrEmpty(BlockName))
+        {
+            var regex = new Regex($"([\\s\\S]*?)");
+            var match = regex.Match(content);
+            if (match.Success && match.Groups.Count == 2)
+            {
+                content = match.Groups[1].Value.Replace("\r\n", "\n").Replace("\n    ", "\n").TrimStart('\n');
+            }
+
+            // 移除 ignore 节点
+            regex = IgnoreRegex();
+            var matchCollection = regex.Matches(content);
+            matchCollection.ToList().ForEach(m =>
+            {
+                content = content.Replace(m.Value, "").TrimStart('\n');
+            });
+
+            // 移除 ConsoleLogger
+            regex = ConsoleLoggerRegex();
+            match = regex.Match(content);
+            if (match.Success)
+            {
+                content = content.Replace(match.Value, "").TrimStart('\n');
+            }
+
+            // 移除 Tips
+            regex = TipsRegex();
+            match = regex.Match(content);
+            if (match.Success)
+            {
+                content = content.Replace(match.Value, "").TrimStart('\n');
+            }
+        }
+        return content.TrimEnd('\n');
+    }
+
+    [GeneratedRegex("
[\\s\\S]*?
")] + private static partial Regex IgnoreRegex(); + + [GeneratedRegex("")] + private static partial Regex ConsoleLoggerRegex(); + + [GeneratedRegex("[\\s\\S]*?")] + private static partial Regex TipsRegex(); +} diff --git a/src/BootstrapBlazor.Server/Components/Components/Pre.razor.css b/src/BootstrapBlazor.Server/Components/Components/Pre.razor.css new file mode 100644 index 000000000..6eea0ccf4 --- /dev/null +++ b/src/BootstrapBlazor.Server/Components/Components/Pre.razor.css @@ -0,0 +1,48 @@ +.pre-code { + position: relative; + border: 1px solid var(--bs-border-color); + border-radius: var(--bs-border-radius); + overflow: hidden; +} + + .pre-code .loading { + padding: .5rem 1rem; + } + + .pre-code.loaded > pre > code { + display: none; + } + +::deep .btn-primary { + position: absolute; + top: .65rem; + right: 1.5rem; + font-size: 65%; + --bs-btn-color: var(--bs-primary); + --bs-btn-bg: #fff; + --bs-btn-padding-y: .25rem; + --bs-btn-padding-x: .5rem; +} + +::deep .btn-group { + position: absolute; + top: 0; + right: 3rem; +} + + ::deep .btn-group .btn-primary { + position: relative; + } + +code { + line-height: 1.8; + font-size: 0.75rem; + padding: 10px 65px 10px 16px; + display: block; + white-space: pre-wrap; + -webkit-font-smoothing: auto; +} + +.no-highlight code { + color: var(--bs-code-color); +} diff --git a/src/BootstrapBlazor.Server/Components/Components/Pre.razor.js b/src/BootstrapBlazor.Server/Components/Components/Pre.razor.js new file mode 100644 index 000000000..d7cf6ae69 --- /dev/null +++ b/src/BootstrapBlazor.Server/Components/Components/Pre.razor.js @@ -0,0 +1,88 @@ +import { copy, getDescribedElement, addLink, addScript, getHeight } from "../../_content/BootstrapBlazor/modules/utility.js?v=$version" +import EventHandler from "../../_content/BootstrapBlazor/modules/event-handler.js?v=$version" + +export async function init(id, title) { + const el = document.getElementById(id); + if (el === null) { + return + } + + await addScript('./lib/highlight/highlight.min.js') + await addScript('./lib/highlight/cshtml-razor.min.js') + await addLink('./lib/highlight/vs.min.css') + + const preElement = el.querySelector('pre') + const code = el.querySelector('pre > code') + + if (preElement) { + EventHandler.on(el, 'click', '.btn-copy', e => { + const text = code.textContent; + copy(text) + + const tooltip = getDescribedElement(e.delegateTarget) + if (tooltip) { + tooltip.querySelector('.tooltip-inner').innerHTML = title + } + }) + + EventHandler.on(el, 'click', '.btn-plus', e => { + e.preventDefault() + e.stopPropagation(); + + let preHeight = getHeight(preElement) + const codeHeight = getHeight(code) + if (preHeight < codeHeight) { + preHeight = Math.min(codeHeight, preHeight + 100) + } + preElement.style.maxHeight = `${preHeight}px` + }) + + EventHandler.on(el, 'click', '.btn-minus', e => { + e.preventDefault() + e.stopPropagation(); + + let preHeight = getHeight(preElement) + if (preHeight > 260) { + preHeight = Math.max(260, preHeight - 100) + } + preElement.style.maxHeight = `${preHeight}px` + }) + } +} + +export async function highlight(id) { + const el = document.getElementById(id); + + if (el) { + const invoke = () => { + hljs.highlightElement(el.querySelector('code')) + el.querySelector('.loading').classList.add('d-none') + el.classList.remove('loaded') + } + + const check = () => new Promise((resolve, reject) => { + const handler = setInterval(() => { + const done = window.hljs !== void 0; + if (done) { + clearInterval(handler) + resolve() + } + }, 20) + }) + + await check(); + invoke(); + } +} + +export function dispose(id) { + const el = document.getElementById(id); + + if (el === null) { + return + } + + EventHandler.off(el, 'click', '.btn-copy') + EventHandler.off(el, 'click', '.btn-plus') + EventHandler.off(el, 'click', '.btn-minus') +} diff --git a/src/BootstrapBlazor.Server/Components/Components/QQGroup.razor b/src/BootstrapBlazor.Server/Components/Components/QQGroup.razor new file mode 100644 index 000000000..b07a6483a --- /dev/null +++ b/src/BootstrapBlazor.Server/Components/Components/QQGroup.razor @@ -0,0 +1,17 @@ +@inject IOptionsMonitor WebsiteOption +@inject IStringLocalizer Localzier + +
+ @Localzier["Group"]:BootstrapAdmin & Blazor + + + 795206915 + + + + + 675147445 + + + @Localzier["Welcome"] +
diff --git a/src/BootstrapBlazor.Server/Components/Components/ResultDialogDemo.razor b/src/BootstrapBlazor.Server/Components/Components/ResultDialogDemo.razor new file mode 100644 index 000000000..ea71d60bd --- /dev/null +++ b/src/BootstrapBlazor.Server/Components/Components/ResultDialogDemo.razor @@ -0,0 +1,8 @@ +
    +
  • 更改数值后,点击 确认 返回主页面并 更新 数值
  • +
  • 点击其余按钮时关闭弹窗 不更新 数值
  • +
+ +
+ +
diff --git a/src/BootstrapBlazor.Server/Components/Components/ResultDialogDemo.razor.cs b/src/BootstrapBlazor.Server/Components/Components/ResultDialogDemo.razor.cs new file mode 100644 index 000000000..87d6a338d --- /dev/null +++ b/src/BootstrapBlazor.Server/Components/Components/ResultDialogDemo.razor.cs @@ -0,0 +1,37 @@ +// Copyright (c) Argo Zhang (argo@163.com). All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +// Website: https://www.blazor.zone or https://argozhang.github.io/ + +namespace BootstrapBlazor.Server.Components.Components; + +/// +/// +/// +public partial class ResultDialogDemo : ComponentBase, IResultDialog +{ + /// + /// + /// + [Parameter] + public int Value { get; set; } = 1; + + /// + /// + /// + [Parameter] + public EventCallback ValueChanged { get; set; } + + /// + /// + /// + public async Task OnClose(DialogResult result) + { + if (result == DialogResult.Yes) + { + if (ValueChanged.HasDelegate) + { + await ValueChanged.InvokeAsync(Value); + } + } + } +} diff --git a/src/BootstrapBlazor.Server/Components/Components/ResultDialogDemo2.razor b/src/BootstrapBlazor.Server/Components/Components/ResultDialogDemo2.razor new file mode 100644 index 000000000..ebddc0c71 --- /dev/null +++ b/src/BootstrapBlazor.Server/Components/Components/ResultDialogDemo2.razor @@ -0,0 +1,7 @@ + + + + + + +
diff --git a/src/BootstrapBlazor.Server/Components/Components/ResultDialogDemo2.razor.cs b/src/BootstrapBlazor.Server/Components/Components/ResultDialogDemo2.razor.cs new file mode 100644 index 000000000..923402073 --- /dev/null +++ b/src/BootstrapBlazor.Server/Components/Components/ResultDialogDemo2.razor.cs @@ -0,0 +1,138 @@ +// Copyright (c) Argo Zhang (argo@163.com). All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +// Website: https://www.blazor.zone or https://argozhang.github.io/ + +using System.ComponentModel; + +namespace BootstrapBlazor.Server.Components.Components; + +/// +/// +/// +public partial class ResultDialogDemo2 : ComponentBase, IResultDialog +{ + private List SelectedRows { get; set; } = new List(); + + [NotNull] + private List? Items { get; set; } + + /// + /// + /// + [Parameter] + + public IEnumerable? Emails { get; set; } + + /// + /// + /// + [Parameter] + public EventCallback> EmailsChanged { get; set; } + + [CascadingParameter(Name = "BodyContext")] + private object? BodyContext { get; set; } + + [Inject] + [NotNull] + private MessageService? MessageService { get; set; } + + private Task> OnQueryAsync(QueryPageOptions option) + { + // 模拟查询数据 + var context = BodyContext as FooContext; + Items = GenerateItems(context?.Count ?? 10); + var data = new QueryData() + { + TotalCount = Items.Count, + Items = Items + }; + + // 处理选中行 + Emails = context?.Emails?.Split(";") ?? Array.Empty(); + SelectedRows.AddRange(Items.Where(i => Emails.Any(mail => mail == i.Email))); + return Task.FromResult(data); + } + + /// + /// + /// + /// + public async Task OnClosing(DialogResult result) + { + var ret = true; + if (result == DialogResult.Yes && !SelectedRows.Any()) + { + await MessageService.Show(new MessageOption() + { + Content = "请至少选择一位用户!" + }); + ret = false; + } + return ret; + } + + /// + /// + /// + public async Task OnClose(DialogResult result) + { + if (result == DialogResult.Yes) + { + if (EmailsChanged.HasDelegate) + { + Emails = SelectedRows.Where(r => !string.IsNullOrEmpty(r.Email)).Select(r => r.Email!).ToList(); + await EmailsChanged.InvokeAsync(Emails); + } + } + } + + /// + /// + /// + /// + private static List GenerateItems(int startId) => new(Enumerable.Range(startId, 10).Select(i => new Foo() + { + Id = i, + Name = $"张三 {i:d4}", + Email = $"zhangsan{i:d4}@163.com" + })); + + /// + /// + /// + public class FooContext + { + /// + /// + /// + public int Count { get; set; } + + /// + /// + /// + public string? Emails { get; set; } + } + + /// + /// + /// + private class Foo + { + /// + /// + /// + [DisplayName("员工ID")] + public int? Id { get; set; } + + /// + /// + /// + [DisplayName("员工姓名")] + public string? Name { get; set; } + /// + /// + /// + [DisplayName("员工邮箱")] + public string? Email { get; set; } + } +} diff --git a/src/BootstrapBlazor.Server/Components/Components/ShownCallbackDummy.razor b/src/BootstrapBlazor.Server/Components/Components/ShownCallbackDummy.razor new file mode 100644 index 000000000..92096ad66 --- /dev/null +++ b/src/BootstrapBlazor.Server/Components/Components/ShownCallbackDummy.razor @@ -0,0 +1,36 @@ +

窗口加载后回调示例

+ +

在实战应用中,有些脚本比如画图类,必须窗体显示后,由具体高度或者宽度后才能正确工作,此时需要先显示此窗体,然后再调用其方法,本示例中下面数字是通过窗体加载并且显示后,由回调方法触发后,延时 2秒 后显示当前时间

+ +

@_text

+ +@code { + [Parameter] + public Action>? ShownTodo { get; set; } + + private string? _text; + + protected override void OnAfterRender(bool firstRender) + { + base.OnAfterRender(firstRender); + + if (firstRender) + { + // 首次加载时回调 ShowTodo 方法 + if (ShownTodo != null) + { + ShownTodo(DoJob); + } + } + } + + private async Task DoJob() + { + _text = "回调成功,开始延时 2 秒"; + await InvokeAsync(StateHasChanged); + + await Task.Delay(2000); + _text = $"当前时间: {DateTime.Now}"; + await InvokeAsync(StateHasChanged); + } +} diff --git a/src/BootstrapBlazor.Server/Components/Components/State.razor b/src/BootstrapBlazor.Server/Components/Components/State.razor new file mode 100644 index 000000000..fb4154a2f --- /dev/null +++ b/src/BootstrapBlazor.Server/Components/Components/State.razor @@ -0,0 +1,18 @@ +@if (IsNew) +{ + + NEW + +} +@if (IsUpdate) +{ + + Upd + +} +@if (Count > 0) +{ + + @Count + +} diff --git a/src/BootstrapBlazor.Server/Components/Components/State.razor.cs b/src/BootstrapBlazor.Server/Components/Components/State.razor.cs new file mode 100644 index 000000000..269bbbfbc --- /dev/null +++ b/src/BootstrapBlazor.Server/Components/Components/State.razor.cs @@ -0,0 +1,29 @@ +// Copyright (c) Argo Zhang (argo@163.com). All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +// Website: https://www.blazor.zone or https://argozhang.github.io/ + +namespace BootstrapBlazor.Server.Components.Components; + +/// +/// +/// +public sealed partial class State +{ + /// + /// 获得/设置 是否为新组件 默认为 false + /// + [Parameter] + public bool IsNew { get; set; } + + /// + /// 获得/设置 是否为更新功能 默认为 false + /// + [Parameter] + public bool IsUpdate { get; set; } + + /// + /// 获得/设置 组件数量 + /// + [Parameter] + public int Count { get; set; } +} diff --git a/src/BootstrapBlazor.Server/Components/Components/SwalFooter.razor b/src/BootstrapBlazor.Server/Components/Components/SwalFooter.razor new file mode 100644 index 000000000..e52ab271c --- /dev/null +++ b/src/BootstrapBlazor.Server/Components/Components/SwalFooter.razor @@ -0,0 +1 @@ +
Why do I have this issue?
diff --git a/src/BootstrapBlazor.Server/Components/Components/ThemeChooser.razor b/src/BootstrapBlazor.Server/Components/Components/ThemeChooser.razor new file mode 100644 index 000000000..60c0ee26b --- /dev/null +++ b/src/BootstrapBlazor.Server/Components/Components/ThemeChooser.razor @@ -0,0 +1,18 @@ +@inherits WebSiteModuleComponentBase +@attribute [JSModuleAutoLoader("Components/ThemeChooser.razor.js")] + +
+ +
+
+
@HeaderText
+ +
+ @foreach (var item in Themes) + { +
+ @item.Text +
+ } +
+
diff --git a/src/BootstrapBlazor.Server/Components/Components/ThemeChooser.razor.cs b/src/BootstrapBlazor.Server/Components/Components/ThemeChooser.razor.cs new file mode 100644 index 000000000..6e8572933 --- /dev/null +++ b/src/BootstrapBlazor.Server/Components/Components/ThemeChooser.razor.cs @@ -0,0 +1,74 @@ +// Copyright (c) Argo Zhang (argo@163.com). All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +// Website: https://www.blazor.zone or https://argozhang.github.io/ + +using Microsoft.Extensions.Options; + +namespace BootstrapBlazor.Server.Components.Components; + +/// +/// +/// +public partial class ThemeChooser +{ + [NotNull] + private IEnumerable? Themes { get; set; } + + [NotNull] + private string? Title { get; set; } + + [NotNull] + private string? HeaderText { get; set; } + + [Inject] + [NotNull] + private IStringLocalizer? Localizer { get; set; } + + [Inject] + [NotNull] + private IOptionsMonitor? BootstrapOptions { get; set; } + + [Inject] + [NotNull] + private IOptionsMonitor? SiteOptions { get; set; } + + /// + /// OnInitialized 方法 + /// + protected override void OnInitialized() + { + base.OnInitialized(); + + Title ??= Localizer[nameof(Title)]; + HeaderText ??= Localizer[nameof(HeaderText)]; + Themes = BootstrapOptions.CurrentValue.Themes.Select(kv => new SelectedItem(kv.Value, kv.Key)); + SiteOptions.CurrentValue.CurrentTheme = Themes.FirstOrDefault(i => i.Text == "Motronic")?.Value ?? ""; + } + + private async Task OnClickTheme(SelectedItem item) + { + SiteOptions.CurrentValue.CurrentTheme = item.Value; + + await InvokeVoidAsync("addScript", LinksCache[item.Value]); + } + + private string? GetThemeItemClass(SelectedItem item) => CssBuilder.Default("theme-item") + .AddClass("active", SiteOptions.CurrentValue.CurrentTheme == item.Value) + .Build(); + + private Dictionary> LinksCache { get; } = new(new KeyValuePair>[] + { + new("bootstrap.blazor.bundle.min.css", new List()), + new("motronic.min.css", new string[] + { + "./_content/BootstrapBlazor/css/motronic.min.css", + "./css/motronic.css" + }), + new("ant", new List()), + new("layui", new List()), + new("devui", new string[] + { + "./css/devui.css" + }) + }); +} diff --git a/src/BootstrapBlazor.Server/Components/Components/ThemeChooser.razor.css b/src/BootstrapBlazor.Server/Components/Components/ThemeChooser.razor.css new file mode 100644 index 000000000..b28028bdd --- /dev/null +++ b/src/BootstrapBlazor.Server/Components/Components/ThemeChooser.razor.css @@ -0,0 +1,63 @@ +.theme-list { + position: fixed; + z-index: 10; + bottom: 12rem; + right: 1rem; + background: #FFFFFF; + box-shadow: 0 5px 24px 0 rgba(0, 0, 0, 0.2); + border-radius: var(--bs-border-radius); + width: 260px; + box-shadow: 0 0 12px #211b50; + height: 0; + overflow: hidden; + transition: height .3s ease-in-out; +} + + .theme-list.is-open { + height: 306px; + } + +.theme-header { + padding: 0.75rem 1rem; + background-color: #8759ff; + color: #fff; + border-top-left-radius: 5px; + border-top-right-radius: 5px; + display: flex; + margin-bottom: 1rem; +} + +.btn-close { + transition: opacity .3s linear; +} + + .btn-close:hover { + opacity: 1; + } + +.theme-item { + cursor: pointer; + border-radius: 100px; + padding: 6px 15px; + background-color: #f6f6f6; + color: #005980; + transition: background-color .3s linear; + margin: 0 1rem 1rem 1rem; +} + + .theme-item:hover, + .theme-item.active { + background-color: #ab8aff; + } + +::deep .btn-theme { + --bs-btn-bg: #034995; + --bs-btn-hover-bg: #034995; + --bs-btn-active-bg: #034995; + right: 1rem; + bottom: 9rem; +} + + ::deep .btn-theme img { + width: 20px; + } diff --git a/src/BootstrapBlazor.Server/Components/Components/ThemeChooser.razor.js b/src/BootstrapBlazor.Server/Components/Components/ThemeChooser.razor.js new file mode 100644 index 000000000..99d5c2ccb --- /dev/null +++ b/src/BootstrapBlazor.Server/Components/Components/ThemeChooser.razor.js @@ -0,0 +1,49 @@ +import { insertAfter } from "../../_content/BootstrapBlazor/modules/utility.js?v=$version" +import Data from "../../_content/BootstrapBlazor/modules/data.js?v=$version" +import EventHandler from "../../_content/BootstrapBlazor/modules/event-handler.js?v=$version" + +export function init(id) { + const el = document.getElementById(id) + if (el === null) { + return + } + const themeList = el.querySelector('.theme-list') + + const chooser = { el, themeList } + Data.set(id, chooser); + + EventHandler.on(el, 'click', () => { + themeList.classList.toggle('is-open') + }) +} + +export function addScript(args) { + const links = document.querySelectorAll('link') + if (links) { + const link = [].slice.call(links).filter(function (item) { + const href = item.getAttribute('href') + return href.indexOf('/css/site.css') > -1 + }); + const original = link[0] + while (original.nextElementSibling && original.nextElementSibling.nodeName === 'LINK') { + original.nextElementSibling.remove() + } + + args.forEach(function (c) { + const link = document.createElement('link') + link.setAttribute('rel', 'stylesheet') + link.setAttribute('href', c) + + insertAfter(original, link) + }); + } +} + +export function dispose(id) { + const chooser = Data.get(id) + Data.remove(id) + + if (chooser) { + EventHandler.off(chooser.el, 'click') + } +} diff --git a/src/BootstrapBlazor.Server/Components/Components/Tips.razor b/src/BootstrapBlazor.Server/Components/Components/Tips.razor new file mode 100644 index 000000000..f6996b6c1 --- /dev/null +++ b/src/BootstrapBlazor.Server/Components/Components/Tips.razor @@ -0,0 +1,28 @@ +@inherits BootstrapComponentBase +@inject IStringLocalizer Localizer + + +

@Localizer["Title"]

+ @ChildContent +
+ +@code { + + /// + /// 获得/设置 图标 + /// + [Parameter] + public string Icon { get; set; } = "fa-regular fa-lightbulb"; + + /// + /// 获得/设置 颜色 默认为 Info + /// + [Parameter] + public Color Color { get; set; } = Color.Info; + + /// + /// 获得/设置 子组件内容 + /// + [Parameter] + public RenderFragment? ChildContent { get; set; } +} diff --git a/src/BootstrapBlazor.Server/Components/Components/UpdateIntro.razor b/src/BootstrapBlazor.Server/Components/Components/UpdateIntro.razor new file mode 100644 index 000000000..f13e632d6 --- /dev/null +++ b/src/BootstrapBlazor.Server/Components/Components/UpdateIntro.razor @@ -0,0 +1,28 @@ +@inherits WebSiteModuleComponentBase +@inject IStringLocalizer Localizer +@attribute [JSModuleAutoLoader("Components/UpdateIntro.razor.js")] + +
+
Bootstrap Blazor @Localizer["H1"] @PackageVersionService.Version
+
+
+

@Localizer["B1"] Bootstrap Blazor @Localizer["B2"] @Localizer["B3"] @Localizer["B4"]。Bootstrap Blazor @((MarkupString)Localizer["B5"].Value)

+

+ @Localizer["P1"] @PackageVersionService.Version @Localizer["P2"] [@Localizer["P3"]] @Localizer["P4"] Star + + github + + + gitee + +

+
+
+ QQGroup +
QQ 795206915
+
+
+
+ +
+
diff --git a/src/BootstrapBlazor.Server/Components/Components/UpdateIntro.razor.cs b/src/BootstrapBlazor.Server/Components/Components/UpdateIntro.razor.cs new file mode 100644 index 000000000..539016eaa --- /dev/null +++ b/src/BootstrapBlazor.Server/Components/Components/UpdateIntro.razor.cs @@ -0,0 +1,35 @@ +// Copyright (c) Argo Zhang (argo@163.com). All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +// Website: https://www.blazor.zone or https://argozhang.github.io/ + +using Microsoft.Extensions.Options; + +namespace BootstrapBlazor.Server.Components.Components; + +/// +/// 更新日志介绍组件 +/// +public partial class UpdateIntro +{ + [Inject] + [NotNull] + private IOptionsMonitor? WebsiteOption { get; set; } + + [Inject] + [NotNull] + private PackageVersionService? PackageVersionService { get; set; } + + private string UpdateLogUrl => $"{WebsiteOption.CurrentValue.BootstrapBlazorLink}/wikis/%E6%9B%B4%E6%96%B0%E6%97%A5%E5%BF%97?sort_id=4062034"; + + /// + /// + /// + protected override async Task InvokeInitAsync() + { +#if DEBUG + await InvokeVoidAsync("init", ""); +#else + await InvokeVoidAsync("init", Id, PackageVersionService.Version); +#endif + } +} diff --git a/src/BootstrapBlazor.Server/Components/Components/UpdateIntro.razor.css b/src/BootstrapBlazor.Server/Components/Components/UpdateIntro.razor.css new file mode 100644 index 000000000..92cb0e4be --- /dev/null +++ b/src/BootstrapBlazor.Server/Components/Components/UpdateIntro.razor.css @@ -0,0 +1,68 @@ +.blazor-intro { + position: fixed; + left: 0; + right: 0; + bottom: 0; + z-index: 1900; + color: #ffffff; + background: linear-gradient(54.4deg,#771f89 -28.5%,#834cef 30.36%,#636cea 99.19%); + padding: 1rem; + height: 224px; + transform: translateY(100%); + transition: transform .3s ease-in-out; +} + + .blazor-intro.show { + transform: translateY(0); + } + + .blazor-intro .blazor-intro-body { + flex: 1 1 auto; + } + + .blazor-intro .blazor-intro-body a { + color: #fff; + cursor: pointer; + text-decoration: underline; + } + + .blazor-intro .blazor-intro-body img { + width: 44px; + } + + .blazor-intro .blazor-intro-barcode { + text-align: center; + margin: 1rem 1rem 0 2rem; + } + + .blazor-intro .blazor-intro-barcode img { + width: 110px; + } + +.blazor-intro-button { + position: absolute; + top: 12px; + right: 12px; + color: #fff; + background-color: #4b4df6; + cursor: pointer; + border-radius: 50%; + padding: 6px; + transition: background-color .3s linear; +} + + .blazor-intro-button:hover { + background-color: #3c3de2; + } + + .blazor-intro-button svg { + width: 24px; + height: 24px; + fill: currentcolor; + } + +@media print { + .blazor-intro { + display: none; + } +} diff --git a/src/BootstrapBlazor.Server/Components/Components/UpdateIntro.razor.js b/src/BootstrapBlazor.Server/Components/Components/UpdateIntro.razor.js new file mode 100644 index 000000000..1f0d841dd --- /dev/null +++ b/src/BootstrapBlazor.Server/Components/Components/UpdateIntro.razor.js @@ -0,0 +1,56 @@ +import Data from "../../_content/BootstrapBlazor/modules/data.js?v=$version" +import EventHandler from "../../_content/BootstrapBlazor/modules/event-handler.js?v=$version" + +export function init(id, version) { + const el = document.getElementById(id) + if (el === null) { + return + } + + const update = { + el, + key: `bb_intro_popup:${version}`, + } + Data.set(id, update) + + check(update.key, update.el); + EventHandler.on(el, 'click', '.blazor-intro-button', () => { + close(update.key, el) + }) +} + +export function dispose(id) { + Data.remove(id) + + const data = Data.get(id) + if (data) { + EventHandler.off(data.el, 'click', '.blazor-intro-button'); + } +} + +const check = (key, el) => { + const width = window.innerWidth + if (width >= 768) { + const isShown = localStorage.getItem(key) + if (!isShown) { + slideToggle(el) + + // clean + for (let index = localStorage.length; index > 0; index--) { + const k = localStorage.key(index - 1); + if (k.indexOf('bb_intro_popup:') > -1) { + localStorage.removeItem(k); + } + } + } + } +} + +const slideToggle = el => { + el.classList.toggle('show') +} + +const close = (key, el) => { + localStorage.setItem(key, 'false') + slideToggle(el) +} diff --git a/src/BootstrapBlazor.Server/Components/Components/Video.razor b/src/BootstrapBlazor.Server/Components/Components/Video.razor new file mode 100644 index 000000000..7e51b2bd1 --- /dev/null +++ b/src/BootstrapBlazor.Server/Components/Components/Video.razor @@ -0,0 +1,42 @@ +@inject IOptionsMonitor Options +@inject IStringLocalizer