fix: performance e otimizações
This commit is contained in:
parent
5ba0d62595
commit
552ae6fd10
20
Program.cs
20
Program.cs
@ -25,6 +25,7 @@ using Microsoft.AspNetCore.DataProtection;
|
|||||||
using Microsoft.AspNetCore.RateLimiting;
|
using Microsoft.AspNetCore.RateLimiting;
|
||||||
using System.Threading.RateLimiting;
|
using System.Threading.RateLimiting;
|
||||||
using Microsoft.AspNetCore.Server.Kestrel.Core;
|
using Microsoft.AspNetCore.Server.Kestrel.Core;
|
||||||
|
using WebOptimizer;
|
||||||
|
|
||||||
// Fix for WSL path issues - disable StaticWebAssets completely
|
// Fix for WSL path issues - disable StaticWebAssets completely
|
||||||
var options = new WebApplicationOptions
|
var options = new WebApplicationOptions
|
||||||
@ -95,6 +96,23 @@ Log.Logger = loggerConfig.CreateLogger();
|
|||||||
builder.Host.UseSerilog();
|
builder.Host.UseSerilog();
|
||||||
|
|
||||||
// Add services to the container
|
// Add services to the container
|
||||||
|
builder.Services.AddWebOptimizer(pipelines =>
|
||||||
|
{
|
||||||
|
pipelines.AddCssBundle(
|
||||||
|
"/css/app.min.css",
|
||||||
|
"css/site.css",
|
||||||
|
"css/qrrapido-theme.css");
|
||||||
|
|
||||||
|
pipelines.AddJavaScriptBundle(
|
||||||
|
"/js/app.min.js",
|
||||||
|
"js/test.js",
|
||||||
|
"js/simple-opcacity.js",
|
||||||
|
"js/qr-speed-generator.js",
|
||||||
|
"js/language-switcher.js",
|
||||||
|
"js/theme-toggle.js",
|
||||||
|
"js/cookie-consent.js");
|
||||||
|
});
|
||||||
|
|
||||||
builder.Services.AddControllersWithViews()
|
builder.Services.AddControllersWithViews()
|
||||||
.AddViewLocalization(Microsoft.AspNetCore.Mvc.Razor.LanguageViewLocationExpanderFormat.Suffix)
|
.AddViewLocalization(Microsoft.AspNetCore.Mvc.Razor.LanguageViewLocationExpanderFormat.Suffix)
|
||||||
.AddDataAnnotationsLocalization();
|
.AddDataAnnotationsLocalization();
|
||||||
@ -298,6 +316,8 @@ if (!app.Environment.IsDevelopment())
|
|||||||
|
|
||||||
app.UseHttpsRedirection();
|
app.UseHttpsRedirection();
|
||||||
|
|
||||||
|
app.UseWebOptimizer();
|
||||||
|
|
||||||
app.UseStaticFiles();
|
app.UseStaticFiles();
|
||||||
|
|
||||||
// Language redirection middleware (before routing)
|
// Language redirection middleware (before routing)
|
||||||
|
|||||||
@ -9,6 +9,7 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<PackageReference Include="LigerShark.WebOptimizer.Core" Version="3.0.477" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.Google" Version="8.0.0" />
|
<PackageReference Include="Microsoft.AspNetCore.Authentication.Google" Version="8.0.0" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.MicrosoftAccount" Version="8.0.0" />
|
<PackageReference Include="Microsoft.AspNetCore.Authentication.MicrosoftAccount" Version="8.0.0" />
|
||||||
<PackageReference Include="MongoDB.Driver" Version="2.22.0" />
|
<PackageReference Include="MongoDB.Driver" Version="2.22.0" />
|
||||||
|
|||||||
9962
Qrrapido - PageSpeed Insights.pdf
Normal file
9962
Qrrapido - PageSpeed Insights.pdf
Normal file
File diff suppressed because it is too large
Load Diff
@ -40,6 +40,10 @@
|
|||||||
<meta name="twitter:description" content="@Localizer["QRGenerateDescription"]">
|
<meta name="twitter:description" content="@Localizer["QRGenerateDescription"]">
|
||||||
<meta name="twitter:image" content="https://qrrapido.site/images/qrrapido-twitter-card.png">
|
<meta name="twitter:image" content="https://qrrapido.site/images/qrrapido-twitter-card.png">
|
||||||
|
|
||||||
|
<!-- Preload critical fonts -->
|
||||||
|
<link rel="preload" href="/webfonts/fa-solid-900.woff2" as="font" type="font/woff2" crossorigin>
|
||||||
|
<link rel="preload" href="/webfonts/fa-brands-400.woff2" as="font" type="font/woff2" crossorigin>
|
||||||
|
|
||||||
<!-- Structured Data Schema.org -->
|
<!-- Structured Data Schema.org -->
|
||||||
<script type="application/ld+json">
|
<script type="application/ld+json">
|
||||||
{
|
{
|
||||||
@ -134,11 +138,10 @@
|
|||||||
|
|
||||||
<!-- Bootstrap 5 -->
|
<!-- Bootstrap 5 -->
|
||||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" rel="stylesheet">
|
<link rel="stylesheet" href="~/css/vendor/fontawesome.min.css" asp-append-version="true" />
|
||||||
|
|
||||||
<!-- Custom CSS -->
|
<!-- Custom CSS -->
|
||||||
<link rel="stylesheet" href="~/css/site.css" asp-append-version="true" />
|
<link rel="stylesheet" href="~/css/app.min.css" asp-append-version="true" />
|
||||||
<link rel="stylesheet" href="~/css/qrrapido-theme.css" asp-append-version="true" />
|
|
||||||
|
|
||||||
<!-- Translation variables for JavaScript -->
|
<!-- Translation variables for JavaScript -->
|
||||||
<script>
|
<script>
|
||||||
@ -359,11 +362,7 @@
|
|||||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
|
||||||
|
|
||||||
<!-- Custom JS -->
|
<!-- Custom JS -->
|
||||||
<script src="~/js/test.js" asp-append-version="true"></script>
|
<script src="~/js/app.min.js" asp-append-version="true" defer></script>
|
||||||
<script src="~/js/qr-speed-generator.js" asp-append-version="true"></script>
|
|
||||||
<script src="~/js/language-switcher.js" asp-append-version="true"></script>
|
|
||||||
<script src="~/js/theme-toggle.js" asp-append-version="true"></script>
|
|
||||||
<script src="~/js/cookie-consent.js" asp-append-version="true"></script>
|
|
||||||
|
|
||||||
<!-- Fallback inline script for debug -->
|
<!-- Fallback inline script for debug -->
|
||||||
<script>
|
<script>
|
||||||
@ -401,4 +400,4 @@
|
|||||||
|
|
||||||
@await RenderSectionAsync("Scripts", required: false)
|
@await RenderSectionAsync("Scripts", required: false)
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
9
wwwroot/css/vendor/fontawesome.min.css
vendored
Normal file
9
wwwroot/css/vendor/fontawesome.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
BIN
wwwroot/webfonts/fa-brands-400.woff2
Normal file
BIN
wwwroot/webfonts/fa-brands-400.woff2
Normal file
Binary file not shown.
BIN
wwwroot/webfonts/fa-solid-900.woff2
Normal file
BIN
wwwroot/webfonts/fa-solid-900.woff2
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user