2 |
3 | @Title
4 |
5 |
6 | Please take our
7 | brief survey
8 |
9 | and tell us what you think.
10 |
11 |
12 | @code {
13 | // Demonstrates how a parent component can supply parameters
14 | [Parameter]
15 | public string Title { get; set; }
16 | }
17 |
--------------------------------------------------------------------------------
/LazyStyleSheet/ServiceExtension.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Extensions.DependencyInjection;
2 | using System;
3 |
4 | namespace Excubo.Blazor.LazyStyleSheet
5 | {
6 | public static class ServiceExtension
7 | {
8 | [Obsolete("This can be removed! Adding style sheets just became a whole lot easier. See https://github.com/excubo-ag/Blazor.LazyStyleSheet for more details.")]
9 | public static IServiceCollection AddStyleSheetLazyLoading(this IServiceCollection services)
10 | {
11 | return services
12 | .AddScoped();
13 | }
14 | }
15 | }
--------------------------------------------------------------------------------
/examples/component_library/ConsumerApp/BlazorApp/Shared/SurveyPrompt.razor:
--------------------------------------------------------------------------------
1 |
2 |
3 | @Title
4 |
5 |
6 | Please take our
7 | brief survey
8 |
9 | and tell us what you think.
10 |
11 |
12 | @code {
13 | // Demonstrates how a parent component can supply parameters
14 | [Parameter]
15 | public string Title { get; set; }
16 | }
17 |
--------------------------------------------------------------------------------
/examples/blazor_app_with_component_project/BlazorApp/Shared/SurveyPrompt.razor:
--------------------------------------------------------------------------------
1 |
2 |
3 | @Title
4 |
5 |
6 | Please take our
7 | brief survey
8 |
9 | and tell us what you think.
10 |
11 |
12 | @code {
13 | // Demonstrates how a parent component can supply parameters
14 | [Parameter]
15 | public string Title { get; set; }
16 | }
17 |
--------------------------------------------------------------------------------
/examples/standalone_app/BlazorApp/Pages/Error.razor:
--------------------------------------------------------------------------------
1 | @page "/error"
2 |
3 |
4 |
Error.
5 |
An error occurred while processing your request.
6 |
7 |
Development Mode
8 |
9 | Swapping to Development environment will display more detailed information about the error that occurred.
10 |
11 |
12 | The Development environment shouldn't be enabled for deployed applications.
13 | It can result in displaying sensitive information from exceptions to end users.
14 | For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development
15 | and restarting the app.
16 |
9 | Swapping to Development environment will display more detailed information about the error that occurred.
10 |
11 |
12 | The Development environment shouldn't be enabled for deployed applications.
13 | It can result in displaying sensitive information from exceptions to end users.
14 | For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development
15 | and restarting the app.
16 |
9 | Swapping to Development environment will display more detailed information about the error that occurred.
10 |
11 |
12 | The Development environment shouldn't be enabled for deployed applications.
13 | It can result in displaying sensitive information from exceptions to end users.
14 | For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development
15 | and restarting the app.
16 |
--------------------------------------------------------------------------------
/examples/standalone_app/BlazorApp/Properties/launchSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "iisSettings": {
3 | "windowsAuthentication": false,
4 | "anonymousAuthentication": true,
5 | "iisExpress": {
6 | "applicationUrl": "http://localhost:62545",
7 | "sslPort": 44350
8 | }
9 | },
10 | "profiles": {
11 | "IIS Express": {
12 | "commandName": "IISExpress",
13 | "launchBrowser": true,
14 | "environmentVariables": {
15 | "ASPNETCORE_ENVIRONMENT": "Development"
16 | }
17 | },
18 | "BlazorApp": {
19 | "commandName": "Project",
20 | "launchBrowser": true,
21 | "applicationUrl": "https://localhost:5001;http://localhost:5000",
22 | "environmentVariables": {
23 | "ASPNETCORE_ENVIRONMENT": "Development"
24 | }
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/examples/component_library/ConsumerApp/BlazorApp/Properties/launchSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "iisSettings": {
3 | "windowsAuthentication": false,
4 | "anonymousAuthentication": true,
5 | "iisExpress": {
6 | "applicationUrl": "http://localhost:62545",
7 | "sslPort": 44350
8 | }
9 | },
10 | "profiles": {
11 | "IIS Express": {
12 | "commandName": "IISExpress",
13 | "launchBrowser": true,
14 | "environmentVariables": {
15 | "ASPNETCORE_ENVIRONMENT": "Development"
16 | }
17 | },
18 | "BlazorApp": {
19 | "commandName": "Project",
20 | "launchBrowser": true,
21 | "applicationUrl": "https://localhost:5001;http://localhost:5000",
22 | "environmentVariables": {
23 | "ASPNETCORE_ENVIRONMENT": "Development"
24 | }
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/examples/blazor_app_with_component_project/BlazorApp/Properties/launchSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "iisSettings": {
3 | "windowsAuthentication": false,
4 | "anonymousAuthentication": true,
5 | "iisExpress": {
6 | "applicationUrl": "http://localhost:62545",
7 | "sslPort": 44350
8 | }
9 | },
10 | "profiles": {
11 | "IIS Express": {
12 | "commandName": "IISExpress",
13 | "launchBrowser": true,
14 | "environmentVariables": {
15 | "ASPNETCORE_ENVIRONMENT": "Development"
16 | }
17 | },
18 | "BlazorApp": {
19 | "commandName": "Project",
20 | "launchBrowser": true,
21 | "applicationUrl": "https://localhost:5001;http://localhost:5000",
22 | "environmentVariables": {
23 | "ASPNETCORE_ENVIRONMENT": "Development"
24 | }
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/LazyStyleSheet/LazyStyleSheet.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netcoreapp3.1;netstandard2.0;netstandard2.1
5 | 3.0
6 | Excubo.Blazor.LazyStyleSheet
7 | Excubo.Blazor.LazyStyleSheet
8 | latest
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/LazyStyleSheet/StyleSheetService.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.AspNetCore.Components;
2 | using Microsoft.JSInterop;
3 | using System.Collections.ObjectModel;
4 | using System.Threading.Tasks;
5 |
6 | [assembly: System.Runtime.CompilerServices.InternalsVisibleTo("Excubo.Blazor.Tests_LazyStyleSheet")]
7 | namespace Excubo.Blazor.LazyStyleSheet
8 | {
9 | internal class StyleSheetService : IStyleSheetService
10 | {
11 | public ObservableCollection RequiredStyleSheets { get; } = new ObservableCollection();
12 | public void Add(string url)
13 | {
14 | lock (RequiredStyleSheets)
15 | {
16 | if (!RequiredStyleSheets.Contains(url))
17 | {
18 | RequiredStyleSheets.Add(url);
19 | }
20 | }
21 | }
22 | }
23 | }
--------------------------------------------------------------------------------
/examples/blazor_app_with_component_project/ComponentWithStyle/ComponentWithStyle.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | netstandard2.0
4 | 3.0
5 | css/component_with_style
6 | false
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/examples/standalone_app/BlazorApp/Program.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.AspNetCore;
2 | using Microsoft.AspNetCore.Hosting;
3 | using Microsoft.Extensions.Configuration;
4 | using Microsoft.Extensions.Hosting;
5 | using Microsoft.Extensions.Logging;
6 | using System;
7 | using System.Collections.Generic;
8 | using System.IO;
9 | using System.Linq;
10 | using System.Threading.Tasks;
11 |
12 | namespace BlazorApp
13 | {
14 | public class Program
15 | {
16 | public static void Main(string[] args)
17 | {
18 | CreateHostBuilder(args).Build().Run();
19 | }
20 |
21 | public static IHostBuilder CreateHostBuilder(string[] args) =>
22 | Host.CreateDefaultBuilder(args)
23 | .ConfigureWebHostDefaults(webBuilder =>
24 | {
25 | webBuilder.UseStartup();
26 | });
27 | }
28 | }
--------------------------------------------------------------------------------
/examples/component_library/ConsumerApp/BlazorApp/Program.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.AspNetCore;
2 | using Microsoft.AspNetCore.Hosting;
3 | using Microsoft.Extensions.Configuration;
4 | using Microsoft.Extensions.Hosting;
5 | using Microsoft.Extensions.Logging;
6 | using System;
7 | using System.Collections.Generic;
8 | using System.IO;
9 | using System.Linq;
10 | using System.Threading.Tasks;
11 |
12 | namespace BlazorApp
13 | {
14 | public class Program
15 | {
16 | public static void Main(string[] args)
17 | {
18 | CreateHostBuilder(args).Build().Run();
19 | }
20 |
21 | public static IHostBuilder CreateHostBuilder(string[] args) =>
22 | Host.CreateDefaultBuilder(args)
23 | .ConfigureWebHostDefaults(webBuilder =>
24 | {
25 | webBuilder.UseStartup();
26 | });
27 | }
28 | }
--------------------------------------------------------------------------------
/examples/blazor_app_with_component_project/BlazorApp/Program.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.AspNetCore;
2 | using Microsoft.AspNetCore.Hosting;
3 | using Microsoft.Extensions.Configuration;
4 | using Microsoft.Extensions.Hosting;
5 | using Microsoft.Extensions.Logging;
6 | using System;
7 | using System.Collections.Generic;
8 | using System.IO;
9 | using System.Linq;
10 | using System.Threading.Tasks;
11 |
12 | namespace BlazorApp
13 | {
14 | public class Program
15 | {
16 | public static void Main(string[] args)
17 | {
18 | CreateHostBuilder(args).Build().Run();
19 | }
20 |
21 | public static IHostBuilder CreateHostBuilder(string[] args) =>
22 | Host.CreateDefaultBuilder(args)
23 | .ConfigureWebHostDefaults(webBuilder =>
24 | {
25 | webBuilder.UseStartup();
26 | });
27 | }
28 | }
--------------------------------------------------------------------------------
/examples/standalone_app/BlazorApp/Data/WeatherForecastService.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq;
3 | using System.Threading.Tasks;
4 |
5 | namespace BlazorApp.Data
6 | {
7 | public class WeatherForecastService
8 | {
9 | private static readonly string[] Summaries = new[]
10 | {
11 | "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching"
12 | };
13 |
14 | public Task GetForecastAsync(DateTime startDate)
15 | {
16 | var rng = new Random();
17 | return Task.FromResult(Enumerable.Range(1, 5).Select(index => new WeatherForecast
18 | {
19 | Date = startDate.AddDays(index),
20 | TemperatureC = rng.Next(-20, 55),
21 | Summary = Summaries[rng.Next(Summaries.Length)]
22 | }).ToArray());
23 | }
24 | }
25 | }
--------------------------------------------------------------------------------
/examples/blazor_app_with_component_project/BlazorApp/BlazorApp.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | netcoreapp3.1
4 | false
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/examples/component_library/ConsumerApp/BlazorApp/Data/WeatherForecastService.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq;
3 | using System.Threading.Tasks;
4 |
5 | namespace BlazorApp.Data
6 | {
7 | public class WeatherForecastService
8 | {
9 | private static readonly string[] Summaries = new[]
10 | {
11 | "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching"
12 | };
13 |
14 | public Task GetForecastAsync(DateTime startDate)
15 | {
16 | var rng = new Random();
17 | return Task.FromResult(Enumerable.Range(1, 5).Select(index => new WeatherForecast
18 | {
19 | Date = startDate.AddDays(index),
20 | TemperatureC = rng.Next(-20, 55),
21 | Summary = Summaries[rng.Next(Summaries.Length)]
22 | }).ToArray());
23 | }
24 | }
25 | }
--------------------------------------------------------------------------------
/examples/blazor_app_with_component_project/BlazorApp/Data/WeatherForecastService.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq;
3 | using System.Threading.Tasks;
4 |
5 | namespace BlazorApp.Data
6 | {
7 | public class WeatherForecastService
8 | {
9 | private static readonly string[] Summaries = new[]
10 | {
11 | "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching"
12 | };
13 |
14 | public Task GetForecastAsync(DateTime startDate)
15 | {
16 | var rng = new Random();
17 | return Task.FromResult(Enumerable.Range(1, 5).Select(index => new WeatherForecast
18 | {
19 | Date = startDate.AddDays(index),
20 | TemperatureC = rng.Next(-20, 55),
21 | Summary = Summaries[rng.Next(Summaries.Length)]
22 | }).ToArray());
23 | }
24 | }
25 | }
--------------------------------------------------------------------------------
/Tests_LazyStyleSheet/LazyLoadTest.cs:
--------------------------------------------------------------------------------
1 | using Bunit;
2 | using Bunit.JSInterop;
3 | using Excubo.Blazor.LazyStyleSheet;
4 | using NUnit.Framework;
5 | using System.Linq;
6 |
7 | namespace Excubo.Blazor.Tests_LazyStyleSheet
8 | {
9 | public class LazyLoadTest : Bunit.TestContext
10 | {
11 | [Test]
12 | public void Test()
13 | {
14 | IRenderedComponent? cut = null;
15 | JSInterop.SetupVoid("eval", (i) => true);
16 | Assert.DoesNotThrow(() => cut = RenderComponent((Name: "Src", Value: "hello.css")));
17 | CollectionAssert.IsNotEmpty(JSInterop.Invocations);
18 | var verification = JSInterop.VerifyInvoke("eval");
19 | Assert.IsNotNull(verification);
20 | CollectionAssert.IsNotEmpty(verification.Arguments);
21 | Assert.IsTrue(verification.Arguments.First()!.ToString()!.Contains("hello.css"));
22 | }
23 | }
24 | }
--------------------------------------------------------------------------------
/.github/workflows/deploy-to-nuget.yml:
--------------------------------------------------------------------------------
1 | name: Deploy nupkg
2 |
3 | env:
4 | dotnet_version: 3.1
5 | project_name: "LazyStyleSheet/LazyStyleSheet.csproj"
6 |
7 | on:
8 | push:
9 | branches: [ main ]
10 |
11 | jobs:
12 | build_and_deploy:
13 | if: "contains(github.event.head_commit.message, '[deploy]')"
14 | runs-on: ubuntu-latest
15 |
16 | steps:
17 | - uses: actions/checkout@v4
18 | - name: Setup .NET Core
19 | uses: actions/setup-dotnet@v3
20 | with:
21 | dotnet-version: ${{ env.dotnet_version }}
22 | - name: Install dependencies
23 | run: dotnet restore
24 | - name: Build
25 | run: dotnet build -c Release --no-restore
26 | - name: Test
27 | run: dotnet test -c Release --no-restore
28 | - name: Pack
29 | run: dotnet pack -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg -c Release -o app/packed --no-restore ${{ env.project_name }}
30 | - name: Deploy to nuget
31 | run: dotnet nuget push -s https://api.nuget.org/v3/index.json app/packed/*.nupkg -k ${{ secrets.NUGETKEY }} > push_log || grep "409" push_log
32 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2020 excubo-ag
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/Tests_LazyStyleSheet/Tests_LazyStyleSheet.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | netcoreapp3.1
4 | Excubo.Blazor.Tests_LazyStyleSheet
5 | Excubo.Blazor.Tests_LazyStyleSheet
6 | enable
7 | false
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 | all
16 | runtime; build; native; contentfiles; analyzers; buildtransitive
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/examples/standalone_app/BlazorApp/wwwroot/css/open-iconic/ICON-LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2014 Waybury
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in
13 | all copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | THE SOFTWARE.
--------------------------------------------------------------------------------
/examples/blazor_app_with_component_project/BlazorApp/wwwroot/css/open-iconic/ICON-LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2014 Waybury
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in
13 | all copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | THE SOFTWARE.
--------------------------------------------------------------------------------
/examples/component_library/ComponentLibrary/ComponentLibrary/ComponentLibrary.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | netstandard2.0
4 | 3.0
5 | true
6 | component_library
7 | false
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/examples/component_library/ConsumerApp/BlazorApp/wwwroot/css/open-iconic/ICON-LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2014 Waybury
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in
13 | all copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | THE SOFTWARE.
--------------------------------------------------------------------------------
/examples/standalone_app/standalone_app.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 16
4 | VisualStudioVersion = 16.0.29609.76
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorApp", "BlazorApp\StandaloneApp.csproj", "{62789396-FC44-4B90-942A-A2F4F93C5C73}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {62789396-FC44-4B90-942A-A2F4F93C5C73}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {62789396-FC44-4B90-942A-A2F4F93C5C73}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {62789396-FC44-4B90-942A-A2F4F93C5C73}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {62789396-FC44-4B90-942A-A2F4F93C5C73}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | GlobalSection(ExtensibilityGlobals) = postSolution
23 | SolutionGuid = {9D2C7E79-4DED-45B6-8F11-55E2CA67D344}
24 | EndGlobalSection
25 | EndGlobal
26 |
--------------------------------------------------------------------------------
/examples/component_library/ConsumerApp/consumer_app.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 16
4 | VisualStudioVersion = 16.0.29609.76
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorApp", "BlazorApp\ConsumerApp.csproj", "{134D8594-9B10-4E5E-B8F3-A365D18FEB24}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {134D8594-9B10-4E5E-B8F3-A365D18FEB24}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {134D8594-9B10-4E5E-B8F3-A365D18FEB24}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {134D8594-9B10-4E5E-B8F3-A365D18FEB24}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {134D8594-9B10-4E5E-B8F3-A365D18FEB24}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | GlobalSection(ExtensibilityGlobals) = postSolution
23 | SolutionGuid = {9D2C7E79-4DED-45B6-8F11-55E2CA67D344}
24 | EndGlobalSection
25 | EndGlobal
26 |
--------------------------------------------------------------------------------
/examples/standalone_app/BlazorApp/Pages/_Host.cshtml:
--------------------------------------------------------------------------------
1 | @page "/"
2 | @namespace BlazorApp.Pages
3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
4 | @{
5 | Layout = null;
6 | }
7 |
8 |
9 |
10 |
11 |
12 |
13 | BlazorApp
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 | An error has occurred. This application may no longer respond until reloaded.
26 |
27 |
28 | An unhandled exception has occurred. See browser dev tools for details.
29 |
30 | Reload
31 | 🗙
32 |
24 |
25 | An error has occurred. This application may no longer respond until reloaded.
26 |
27 |
28 | An unhandled exception has occurred. See browser dev tools for details.
29 |
30 | Reload
31 | 🗙
32 |
24 |
25 | An error has occurred. This application may no longer respond until reloaded.
26 |
27 |
28 | An unhandled exception has occurred. See browser dev tools for details.
29 |
30 | Reload
31 | 🗙
32 |
27 |
28 | @code {
29 | private bool collapseNavMenu = true;
30 |
31 | private string NavMenuCssClass => collapseNavMenu ? "collapse" : null;
32 |
33 | private void ToggleNavMenu()
34 | {
35 | collapseNavMenu = !collapseNavMenu;
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/LazyStyleSheet/StyleSheets.razor.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Excubo.Blazor.LazyStyleSheet
4 | {
5 | ///
6 | /// Component that writes link-tags for style sheets on demand.
7 | ///
8 | ///
9 | /// To signal that this component should add another style sheet, inject an IStyleSheetService into your component, then call style_sheet_service.Add(url);
10 | /// It is recommended to place this component in the App.razor component.
11 | ///
12 | ///
13 | ///
14 | /// <Router AppAssembly = "@typeof(Program).Assembly">
15 | /// <Found Context="routeData">
16 | /// <AuthorizeRouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)" />
17 | /// </Found>
18 | /// <NotFound>
19 | /// <LayoutView Layout="@typeof(MainLayout)" >
20 | /// <p> Sorry, there's nothing at this address.</p>
21 | /// </LayoutView>
22 | /// </NotFound>
23 | /// </Router>
24 | /// <StyleSheets/>
25 | ///
26 | ///
27 | [Obsolete("This can be removed! Adding style sheets just became a whole lot easier. See https://github.com/excubo-ag/Blazor.LazyStyleSheet for more details.")]
28 | public partial class StyleSheets
29 | {
30 | }
31 | }
--------------------------------------------------------------------------------
/LazyStyleSheet/package.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | LazyStyleSheet for Blazor
5 | Excubo.Blazor.LazyStyleSheet makes it easy to dynamically load style sheets in razor components. This improves page load times and reduces the amount of data transferred over the network.
6 | blazor,css,web
7 | Excubo.Blazor.LazyStyleSheet
8 |
9 |
10 |
11 | Stefan Lörwald
12 | excubo ag
13 |
14 |
15 |
16 | https://github.com/excubo-ag/Blazor.LazyStyleSheet
17 | https://github.com/excubo-ag/Blazor.LazyStyleSheet
18 | git
19 |
20 |
21 |
22 | Excubo.Blazor.LazyStyleSheet
23 | 3.1.21
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 | LICENSE
32 |
33 |
34 |
35 | True
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/examples/blazor_app_with_component_project/blazor_app_with_component_project.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 16
4 | VisualStudioVersion = 16.0.29609.76
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ComponentWithStyle", "ComponentWithStyle\ComponentWithStyle.csproj", "{034D8594-9B10-4E5E-B8F3-A365D18FEB24}"
7 | EndProject
8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BlazorApp", "BlazorApp\BlazorApp.csproj", "{62789396-FC44-4B90-942A-A2F4F93C5C73}"
9 | EndProject
10 | Global
11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
12 | Debug|Any CPU = Debug|Any CPU
13 | Release|Any CPU = Release|Any CPU
14 | EndGlobalSection
15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
16 | {034D8594-9B10-4E5E-B8F3-A365D18FEB24}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
17 | {034D8594-9B10-4E5E-B8F3-A365D18FEB24}.Debug|Any CPU.Build.0 = Debug|Any CPU
18 | {034D8594-9B10-4E5E-B8F3-A365D18FEB24}.Release|Any CPU.ActiveCfg = Release|Any CPU
19 | {034D8594-9B10-4E5E-B8F3-A365D18FEB24}.Release|Any CPU.Build.0 = Release|Any CPU
20 | {62789396-FC44-4B90-942A-A2F4F93C5C73}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
21 | {62789396-FC44-4B90-942A-A2F4F93C5C73}.Debug|Any CPU.Build.0 = Debug|Any CPU
22 | {62789396-FC44-4B90-942A-A2F4F93C5C73}.Release|Any CPU.ActiveCfg = Release|Any CPU
23 | {62789396-FC44-4B90-942A-A2F4F93C5C73}.Release|Any CPU.Build.0 = Release|Any CPU
24 | EndGlobalSection
25 | GlobalSection(SolutionProperties) = preSolution
26 | HideSolutionNode = FALSE
27 | EndGlobalSection
28 | GlobalSection(ExtensibilityGlobals) = postSolution
29 | SolutionGuid = {9D2C7E79-4DED-45B6-8F11-55E2CA67D344}
30 | EndGlobalSection
31 | EndGlobal
32 |
--------------------------------------------------------------------------------
/examples/standalone_app/BlazorApp/Startup.cs:
--------------------------------------------------------------------------------
1 | using BlazorApp.Data;
2 | using Microsoft.AspNetCore.Builder;
3 | using Microsoft.AspNetCore.Hosting;
4 | using Microsoft.Extensions.Configuration;
5 | using Microsoft.Extensions.DependencyInjection;
6 | using Microsoft.Extensions.Hosting;
7 |
8 | namespace BlazorApp
9 | {
10 | public class Startup
11 | {
12 | public Startup(IConfiguration configuration)
13 | {
14 | Configuration = configuration;
15 | }
16 |
17 | public IConfiguration Configuration { get; }
18 |
19 | // This method gets called by the runtime. Use this method to add services to the container.
20 | // For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940
21 | public void ConfigureServices(IServiceCollection services)
22 | {
23 | services.AddRazorPages();
24 | services.AddServerSideBlazor();
25 | services.AddSingleton();
26 | }
27 |
28 | // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
29 | public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
30 | {
31 | if (env.IsDevelopment())
32 | {
33 | app.UseDeveloperExceptionPage();
34 | }
35 | else
36 | {
37 | app.UseExceptionHandler("/Error");
38 | // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
39 | app.UseHsts();
40 | }
41 |
42 | app.UseHttpsRedirection();
43 | app.UseStaticFiles();
44 |
45 | app.UseRouting();
46 |
47 | app.UseEndpoints(endpoints =>
48 | {
49 | endpoints.MapBlazorHub();
50 | endpoints.MapFallbackToPage("/_Host");
51 | });
52 | }
53 | }
54 | }
--------------------------------------------------------------------------------
/examples/component_library/ConsumerApp/BlazorApp/Startup.cs:
--------------------------------------------------------------------------------
1 | using BlazorApp.Data;
2 | using Microsoft.AspNetCore.Builder;
3 | using Microsoft.AspNetCore.Hosting;
4 | using Microsoft.Extensions.Configuration;
5 | using Microsoft.Extensions.DependencyInjection;
6 | using Microsoft.Extensions.Hosting;
7 |
8 | namespace BlazorApp
9 | {
10 | public class Startup
11 | {
12 | public Startup(IConfiguration configuration)
13 | {
14 | Configuration = configuration;
15 | }
16 |
17 | public IConfiguration Configuration { get; }
18 |
19 | // This method gets called by the runtime. Use this method to add services to the container.
20 | // For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940
21 | public void ConfigureServices(IServiceCollection services)
22 | {
23 | services.AddRazorPages();
24 | services.AddServerSideBlazor();
25 | services.AddSingleton();
26 | }
27 |
28 | // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
29 | public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
30 | {
31 | if (env.IsDevelopment())
32 | {
33 | app.UseDeveloperExceptionPage();
34 | }
35 | else
36 | {
37 | app.UseExceptionHandler("/Error");
38 | // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
39 | app.UseHsts();
40 | }
41 |
42 | app.UseHttpsRedirection();
43 | app.UseStaticFiles();
44 |
45 | app.UseRouting();
46 |
47 | app.UseEndpoints(endpoints =>
48 | {
49 | endpoints.MapBlazorHub();
50 | endpoints.MapFallbackToPage("/_Host");
51 | });
52 | }
53 | }
54 | }
--------------------------------------------------------------------------------
/examples/blazor_app_with_component_project/BlazorApp/Startup.cs:
--------------------------------------------------------------------------------
1 | using BlazorApp.Data;
2 | using Excubo.Blazor.LazyStyleSheet;
3 | using Microsoft.AspNetCore.Builder;
4 | using Microsoft.AspNetCore.Hosting;
5 | using Microsoft.Extensions.Configuration;
6 | using Microsoft.Extensions.DependencyInjection;
7 | using Microsoft.Extensions.Hosting;
8 |
9 | namespace BlazorApp
10 | {
11 | public class Startup
12 | {
13 | public Startup(IConfiguration configuration)
14 | {
15 | Configuration = configuration;
16 | }
17 |
18 | public IConfiguration Configuration { get; }
19 |
20 | // This method gets called by the runtime. Use this method to add services to the container.
21 | // For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940
22 | public void ConfigureServices(IServiceCollection services)
23 | {
24 | services.AddRazorPages();
25 | services.AddServerSideBlazor();
26 | services.AddSingleton();
27 | }
28 |
29 | // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
30 | public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
31 | {
32 | if (env.IsDevelopment())
33 | {
34 | app.UseDeveloperExceptionPage();
35 | }
36 | else
37 | {
38 | app.UseExceptionHandler("/Error");
39 | // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
40 | app.UseHsts();
41 | }
42 |
43 | app.UseHttpsRedirection();
44 | app.UseStaticFiles();
45 |
46 | app.UseRouting();
47 |
48 | app.UseEndpoints(endpoints =>
49 | {
50 | endpoints.MapBlazorHub();
51 | endpoints.MapFallbackToPage("/_Host");
52 | });
53 | }
54 | }
55 | }
--------------------------------------------------------------------------------
/examples/standalone_app/README.md:
--------------------------------------------------------------------------------
1 | # Standalone Blazor App
2 |
3 | This project shows how to use Excubo.Blazor.LazyStyleSheet. It demonstrates both automatic and manual injection.
4 |
5 | See BlazorApp/Pages/Index.razor for manual injection. Make your life easier by using auto-injectic, see BlazorApp/Pages/Counter.razor and BlazorApp/Pages/Counter.razor.scss.
6 |
7 | ## Relevant files
8 |
9 | All the following files have been modified slightly from the plain Blazor sample project. All changes are detailed below.
10 |
11 |
12 | ### BlazorApp/Pages/Index.razor
13 |
14 | ```html
15 | @page "/"
16 |
17 |
18 |
19 |
Hello, world!
20 |
21 | Welcome to your new app.
22 |
23 |
24 | ```
25 |
26 | - Apply a style to the heading. This style is defined in BlazorApp/wwwroot/css/manual_injection.scss
27 | - Add the stylesheet. Note that we add the minified version of the compiled css, not the scss itself.
28 |
29 |
30 | ### BlazorApp/Pages/Counter.razor
31 |
32 | ```html
33 | @page "/counter"
34 |
35 |
Counter
36 |
37 |
Current count: @currentCount
38 |
39 |
40 |
41 | @code {
42 | private int currentCount = 0;
43 |
44 | private void IncrementCount()
45 | {
46 | currentCount++;
47 | }
48 | }
49 | ```
50 |
51 | - Added the custom style `colored` to the button, which is defined in BlazorApp/Pages/Counter.razor.scss
52 |
53 | ### BlazorApp/Pages/Counter.razor.scss
54 |
55 | ```css
56 | @import '../../../default_values.scss';
57 | .colored {
58 | color: $variable
59 | }
60 | ```
61 |
62 | - Defines the style colored, which takes its value from a file (see /BlazorApp/wwwroot/default_values.scss).
63 | - As this file is put with the razor component, it will be *auto-injected* into the component.
64 |
65 | ### BlazorApp/wwwroot/default_values.scss
66 |
67 | ```css
68 | $variable:blue;
69 | ```
70 |
71 | - define our custom color `variable` to be `blue`.
72 |
73 | ### BlazorApp/BlazorApp.csproj
74 |
75 | ```xml
76 |
77 |
78 |
79 | netcoreapp3.1
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 | ```
88 |
89 | - We want to have our custom scss files to be compiled:
90 | ```xml
91 |
92 |
93 |
94 | ```
95 |
96 |
97 |
--------------------------------------------------------------------------------
/examples/standalone_app/BlazorApp/wwwroot/css/site.min.css:
--------------------------------------------------------------------------------
1 | @import url('open-iconic/font/css/open-iconic-bootstrap.min.css');html,body{font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;}a,.btn-link{color:#0366d6;}.btn-primary{color:#fff;background-color:#1b6ec2;border-color:#1861ac;}app{position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;}.top-row{height:3.5rem;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}.main{-webkit-box-flex:1;-ms-flex:1;flex:1;}.main .top-row{background-color:#f7f7f7;border-bottom:1px solid #d6d5d5;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;}.main .top-row>a,.main .top-row .btn-link{white-space:nowrap;margin-left:1.5rem;}.main .top-row a:first-child{overflow:hidden;-o-text-overflow:ellipsis;text-overflow:ellipsis;}.sidebar{background-image:-webkit-gradient(linear,left top,left bottom,from(#052767),color-stop(70%,#3a0647));background-image:-o-linear-gradient(top,#052767 0%,#3a0647 70%);background-image:linear-gradient(180deg,#052767 0%,#3a0647 70%);}.sidebar .top-row{background-color:rgba(0,0,0,.4);}.sidebar .navbar-brand{font-size:1.1rem;}.sidebar .oi{width:2rem;font-size:1.1rem;vertical-align:text-top;top:-2px;}.sidebar .nav-item{font-size:.9rem;padding-bottom:.5rem;}.sidebar .nav-item:first-of-type{padding-top:1rem;}.sidebar .nav-item:last-of-type{padding-bottom:1rem;}.sidebar .nav-item a{color:#d7d7d7;border-radius:4px;height:3rem;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;line-height:3rem;}.sidebar .nav-item a.active{background-color:rgba(255,255,255,.25);color:#fff;}.sidebar .nav-item a:hover{background-color:rgba(255,255,255,.1);color:#fff;}.content{padding-top:1.1rem;}.navbar-toggler{background-color:rgba(255,255,255,.1);}.valid.modified:not([type=checkbox]){outline:1px solid #26b050;}.invalid{outline:1px solid #f00;}.validation-message{color:#f00;}#blazor-error-ui{background:#ffffe0;bottom:0;-webkit-box-shadow:0 -1px 2px rgba(0,0,0,.2);box-shadow:0 -1px 2px rgba(0,0,0,.2);display:none;left:0;padding:.6rem 1.25rem .7rem 1.25rem;position:fixed;width:100%;z-index:1000;}#blazor-error-ui .dismiss{cursor:pointer;position:absolute;right:.75rem;top:.5rem;}@media(max-width:767.98px){.main .top-row:not(.auth){display:none;}.main .top-row.auth{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;}.main .top-row a,.main .top-row .btn-link{margin-left:0;}}@media(min-width:768px){app{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;}.sidebar{width:250px;height:100vh;position:-webkit-sticky;position:sticky;top:0;}.main .top-row{position:-webkit-sticky;position:sticky;top:0;}.main>div{padding-left:2rem !important;padding-right:1.5rem !important;}.navbar-toggler{display:none;}.sidebar .collapse{display:block;}}
--------------------------------------------------------------------------------
/examples/component_library/ConsumerApp/BlazorApp/wwwroot/css/site.min.css:
--------------------------------------------------------------------------------
1 | @import url('open-iconic/font/css/open-iconic-bootstrap.min.css');html,body{font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;}a,.btn-link{color:#0366d6;}.btn-primary{color:#fff;background-color:#1b6ec2;border-color:#1861ac;}app{position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;}.top-row{height:3.5rem;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}.main{-webkit-box-flex:1;-ms-flex:1;flex:1;}.main .top-row{background-color:#f7f7f7;border-bottom:1px solid #d6d5d5;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;}.main .top-row>a,.main .top-row .btn-link{white-space:nowrap;margin-left:1.5rem;}.main .top-row a:first-child{overflow:hidden;-o-text-overflow:ellipsis;text-overflow:ellipsis;}.sidebar{background-image:-webkit-gradient(linear,left top,left bottom,from(#052767),color-stop(70%,#3a0647));background-image:-o-linear-gradient(top,#052767 0%,#3a0647 70%);background-image:linear-gradient(180deg,#052767 0%,#3a0647 70%);}.sidebar .top-row{background-color:rgba(0,0,0,.4);}.sidebar .navbar-brand{font-size:1.1rem;}.sidebar .oi{width:2rem;font-size:1.1rem;vertical-align:text-top;top:-2px;}.sidebar .nav-item{font-size:.9rem;padding-bottom:.5rem;}.sidebar .nav-item:first-of-type{padding-top:1rem;}.sidebar .nav-item:last-of-type{padding-bottom:1rem;}.sidebar .nav-item a{color:#d7d7d7;border-radius:4px;height:3rem;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;line-height:3rem;}.sidebar .nav-item a.active{background-color:rgba(255,255,255,.25);color:#fff;}.sidebar .nav-item a:hover{background-color:rgba(255,255,255,.1);color:#fff;}.content{padding-top:1.1rem;}.navbar-toggler{background-color:rgba(255,255,255,.1);}.valid.modified:not([type=checkbox]){outline:1px solid #26b050;}.invalid{outline:1px solid #f00;}.validation-message{color:#f00;}#blazor-error-ui{background:#ffffe0;bottom:0;-webkit-box-shadow:0 -1px 2px rgba(0,0,0,.2);box-shadow:0 -1px 2px rgba(0,0,0,.2);display:none;left:0;padding:.6rem 1.25rem .7rem 1.25rem;position:fixed;width:100%;z-index:1000;}#blazor-error-ui .dismiss{cursor:pointer;position:absolute;right:.75rem;top:.5rem;}@media(max-width:767.98px){.main .top-row:not(.auth){display:none;}.main .top-row.auth{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;}.main .top-row a,.main .top-row .btn-link{margin-left:0;}}@media(min-width:768px){app{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;}.sidebar{width:250px;height:100vh;position:-webkit-sticky;position:sticky;top:0;}.main .top-row{position:-webkit-sticky;position:sticky;top:0;}.main>div{padding-left:2rem !important;padding-right:1.5rem !important;}.navbar-toggler{display:none;}.sidebar .collapse{display:block;}}
--------------------------------------------------------------------------------
/examples/blazor_app_with_component_project/BlazorApp/wwwroot/css/site.min.css:
--------------------------------------------------------------------------------
1 | @import url('open-iconic/font/css/open-iconic-bootstrap.min.css');html,body{font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;}a,.btn-link{color:#0366d6;}.btn-primary{color:#fff;background-color:#1b6ec2;border-color:#1861ac;}app{position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;}.top-row{height:3.5rem;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}.main{-webkit-box-flex:1;-ms-flex:1;flex:1;}.main .top-row{background-color:#f7f7f7;border-bottom:1px solid #d6d5d5;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;}.main .top-row>a,.main .top-row .btn-link{white-space:nowrap;margin-left:1.5rem;}.main .top-row a:first-child{overflow:hidden;-o-text-overflow:ellipsis;text-overflow:ellipsis;}.sidebar{background-image:-webkit-gradient(linear,left top,left bottom,from(#052767),color-stop(70%,#3a0647));background-image:-o-linear-gradient(top,#052767 0%,#3a0647 70%);background-image:linear-gradient(180deg,#052767 0%,#3a0647 70%);}.sidebar .top-row{background-color:rgba(0,0,0,.4);}.sidebar .navbar-brand{font-size:1.1rem;}.sidebar .oi{width:2rem;font-size:1.1rem;vertical-align:text-top;top:-2px;}.sidebar .nav-item{font-size:.9rem;padding-bottom:.5rem;}.sidebar .nav-item:first-of-type{padding-top:1rem;}.sidebar .nav-item:last-of-type{padding-bottom:1rem;}.sidebar .nav-item a{color:#d7d7d7;border-radius:4px;height:3rem;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;line-height:3rem;}.sidebar .nav-item a.active{background-color:rgba(255,255,255,.25);color:#fff;}.sidebar .nav-item a:hover{background-color:rgba(255,255,255,.1);color:#fff;}.content{padding-top:1.1rem;}.navbar-toggler{background-color:rgba(255,255,255,.1);}.valid.modified:not([type=checkbox]){outline:1px solid #26b050;}.invalid{outline:1px solid #f00;}.validation-message{color:#f00;}#blazor-error-ui{background:#ffffe0;bottom:0;-webkit-box-shadow:0 -1px 2px rgba(0,0,0,.2);box-shadow:0 -1px 2px rgba(0,0,0,.2);display:none;left:0;padding:.6rem 1.25rem .7rem 1.25rem;position:fixed;width:100%;z-index:1000;}#blazor-error-ui .dismiss{cursor:pointer;position:absolute;right:.75rem;top:.5rem;}@media(max-width:767.98px){.main .top-row:not(.auth){display:none;}.main .top-row.auth{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;}.main .top-row a,.main .top-row .btn-link{margin-left:0;}}@media(min-width:768px){app{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;}.sidebar{width:250px;height:100vh;position:-webkit-sticky;position:sticky;top:0;}.main .top-row{position:-webkit-sticky;position:sticky;top:0;}.main>div{padding-left:2rem !important;padding-right:1.5rem !important;}.navbar-toggler{display:none;}.sidebar .collapse{display:block;}}
--------------------------------------------------------------------------------
/examples/standalone_app/BlazorApp/wwwroot/css/open-iconic/README.md:
--------------------------------------------------------------------------------
1 | [Open Iconic v1.1.1](http://useiconic.com/open)
2 | ===========
3 |
4 | ### Open Iconic is the open source sibling of [Iconic](http://useiconic.com). It is a hyper-legible collection of 223 icons with a tiny footprint—ready to use with Bootstrap and Foundation. [View the collection](http://useiconic.com/open#icons)
5 |
6 |
7 |
8 | ## What's in Open Iconic?
9 |
10 | * 223 icons designed to be legible down to 8 pixels
11 | * Super-light SVG files - 61.8 for the entire set
12 | * SVG sprite—the modern replacement for icon fonts
13 | * Webfont (EOT, OTF, SVG, TTF, WOFF), PNG and WebP formats
14 | * Webfont stylesheets (including versions for Bootstrap and Foundation) in CSS, LESS, SCSS and Stylus formats
15 | * PNG and WebP raster images in 8px, 16px, 24px, 32px, 48px and 64px.
16 |
17 |
18 | ## Getting Started
19 |
20 | #### For code samples and everything else you need to get started with Open Iconic, check out our [Icons](http://useiconic.com/open#icons) and [Reference](http://useiconic.com/open#reference) sections.
21 |
22 | ### General Usage
23 |
24 | #### Using Open Iconic's SVGs
25 |
26 | We like SVGs and we think they're the way to display icons on the web. Since Open Iconic are just basic SVGs, we suggest you display them like you would any other image (don't forget the `alt` attribute).
27 |
28 | ```
29 |
30 | ```
31 |
32 | #### Using Open Iconic's SVG Sprite
33 |
34 | Open Iconic also comes in a SVG sprite which allows you to display all the icons in the set with a single request. It's like an icon font, without being a hack.
35 |
36 | Adding an icon from an SVG sprite is a little different than what you're used to, but it's still a piece of cake. *Tip: To make your icons easily style able, we suggest adding a general class to the* `