2023-03-27 22:45:16 +01:00
|
|
|
@using Yavsc.Models.Messaging;
|
|
|
|
|
<!DOCTYPE html>
|
2023-03-19 17:57:55 +00:00
|
|
|
<html lang="en">
|
|
|
|
|
<head>
|
|
|
|
|
<meta charset="utf-8" />
|
2024-03-04 01:02:19 +00:00
|
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no" />
|
2026-06-10 11:10:15 +01:00
|
|
|
<link rel="icon" type="image/svg+xml" href="~/images/yavsc-logo.svg" asp-append-version="true" />
|
|
|
|
|
<link rel="alternate icon" type="image/x-icon" href="@SiteSettings.Value.FavIcon" asp-append-version="true" />
|
refac: load jQuery + Bootstrap as global scripts in _Layout
JQuery, jQuery UI, Bootstrap, jquery-validation and
jquery-validation-unobtrusive are now loaded as separate
<script> tags by _Layout.cshtml, BEFORE the core bundle.
Why: esbuild IIFE bundles do not expose jQuery ($ and jQuery)
on window — UMD-style modules bundled in IIFE format are wrapped
in a closure. The application code (site.js, md-helpers.js,
yavsc-remote-fs.js, etc.) consumes window.$ / window.jQuery, so
it broke at runtime. Loading these scripts as global <script> tags
restores the expected global exposure.
This commit only touches the layout. Future commits will remove
the corresponding imports from each bundle's entry (chat, dropzone,
datetime, timepicker) and let them rely on window.$ being already
defined by the layout.
Tested: dotnet test 11/11 green. The new global scripts are
served by ASP.NET static files (HTTP 200 verified). Server
restart by developer required to pick up the new layout.
2026-06-14 15:16:16 +01:00
|
|
|
<link rel="stylesheet" href="~/css/main/site.css" asp-append-version="true"/>
|
|
|
|
|
<link rel="stylesheet" href="~/css/main/bootstrap.min.css" asp-append-version="true"/>
|
|
|
|
|
<link rel="stylesheet" href="~/css/main/jquery-ui.min.css" asp-append-version="true"/>
|
|
|
|
|
<!-- Vendor scripts: jQuery first, everything else depends on it.
|
|
|
|
|
Loaded as global <script> tags (not bundled) so they are
|
|
|
|
|
exposed on window as $ / jQuery for the application code. -->
|
|
|
|
|
<script src="~/js/jquery.min.js" asp-append-version="true"></script>
|
|
|
|
|
<script src="~/js/jquery-ui.min.js" asp-append-version="true"></script>
|
|
|
|
|
<script src="~/js/bootstrap.bundle.min.js" asp-append-version="true"></script>
|
|
|
|
|
<script src="~/js/jquery.validate.min.js" asp-append-version="true"></script>
|
|
|
|
|
<script src="~/js/jquery.validate.unobtrusive.min.js" asp-append-version="true"></script>
|
refac: separate front assets into esbuild bundles
Sort ~50 Mo de libs tierces hors du repo et regroupe le code
front en 6 bundles thématiques + 2 assets statiques.
Bundles produits par esbuild :
- core.bundle.min.js : jQuery + jQuery UI + Bootstrap 4 + validation
+ tout le code applicatif 'core'
(site, signout, signin, input-lib, md-helpers,
audiovideoinput, parallax, google.geocode,
google-geoloc). Chargé par _Layout.cshtml.
- chat.bundle.min.js : core subset (sans Bootstrap) + chat.js + comment.js
(SignalR client chargé séparément, voir plus bas)
- dropzone.bundle.min.js : jQuery + dropzone + yavsc-remote-fs
- datetime.bundle.min.js : jQuery + jQuery UI + eonasdan datetimepicker
+ jquery-timepicker
- timepicker.bundle.min.js : jQuery + jQuery UI + jquery-timepicker
- quill.bundle.min.js : Quill rich text editor
Assets statiques (non bundlés, copiés depuis node_modules) :
- signalr.min.js : client SignalR 2.x (legacy server)
- moment-with-locales.min.js : moment + 137 locales (require dynamique
non résolvable statiquement par esbuild)
CSS vendor copiées comme assets statiques vers wwwroot/css/ :
bootstrap.min.css, jquery-ui.min.css, dropzone.min.css,
dropzone-basic.min.css, bootstrap-datetimepicker.min.css,
jquery.timepicker.css
Exception gitignore : jonthornton-Datepair/jquery.datepair.min.js
n'est pas sur npm, conservé comme asset statique sous
wwwroot/lib/jonthornton-Datepair/ (téléchargé depuis upstream).
Vues Razor mises à jour (15 fichiers) pour pointer vers les bundles
et les CSS vendor. Suppression de la majorité de wwwroot/lib/ (1300+
fichiers). Suppression des jquery*.js, quill.js, showdown.js,
to-markdown.js, jquery.signalR-2.2.1.js, dropzone.js et de leurs
.min.js associés.
'jquery-datepair' et 'jquery-ui-map' non publiés sur npm :
- jquery-ui-map n'est utilisé nulle part dans le repo (vérifié),
la dépendance est purement historique.
- datepair reste en static sous wwwroot/lib/jonthornton-Datepair/.
2026-06-14 14:11:33 +01:00
|
|
|
<script src="~/js/core.bundle.min.js" asp-append-version="true"></script>
|
2023-03-27 22:45:16 +01:00
|
|
|
@await RenderSectionAsync("header", false)
|
2023-03-19 17:57:55 +00:00
|
|
|
</head>
|
2025-07-09 13:16:01 +01:00
|
|
|
<body style="background-image: url('@Config.SiteSetup.Banner');
|
|
|
|
|
background-position: 0%;
|
|
|
|
|
background-attachment: fixed;
|
|
|
|
|
">
|
2024-03-04 01:02:19 +00:00
|
|
|
<partial name="_Nav" />
|
|
|
|
|
@RenderSection("ctxmenu", required: false)
|
2026-06-04 12:13:37 +01:00
|
|
|
@if (ViewBag.Notify != null)
|
2024-03-04 01:02:19 +00:00
|
|
|
{
|
2026-06-04 12:13:37 +01:00
|
|
|
foreach (Notification n in ViewBag.Notify as IEnumerable<Notification>)
|
2024-03-04 01:02:19 +00:00
|
|
|
{
|
2025-08-25 12:58:25 +01:00
|
|
|
<div class="alert alert-info alert-dismissable" data-nid="@n.Id">
|
2024-03-04 01:02:19 +00:00
|
|
|
<img src="~/images/Notifications/@(n.icon).png" style="max-height:3em; float: left; margin:1em;" />
|
|
|
|
|
<h2 markdown="@n.title"></h2>
|
|
|
|
|
<a class="close" data-dismiss="alert" aria-label="close"
|
2026-02-22 23:39:56 +00:00
|
|
|
onclick="notifClick(@n.Id)">@((n.click_action == null) ? Localizer["Fermer"] : Localizer[n.click_action])</a>
|
2024-03-04 01:02:19 +00:00
|
|
|
<asciidoc>@n.body</asciidoc>
|
2019-01-01 16:28:47 +00:00
|
|
|
</div>
|
2023-03-27 22:45:16 +01:00
|
|
|
}
|
2024-03-04 01:02:19 +00:00
|
|
|
}
|
2023-03-29 00:43:35 +01:00
|
|
|
@await RenderSectionAsync("subbanner", false)
|
2026-03-16 23:16:12 +00:00
|
|
|
<div class="container py-4">
|
2024-03-04 01:02:19 +00:00
|
|
|
@RenderBody()
|
|
|
|
|
</div>
|
2023-03-19 17:57:55 +00:00
|
|
|
<footer class="border-top footer text-muted">
|
|
|
|
|
<div class="container">
|
2025-02-24 21:26:21 +00:00
|
|
|
© WTFPL 2025 - <a asp-area="" asp-controller="Home" asp-action="Privacy">Privacy</a>
|
2023-03-19 17:57:55 +00:00
|
|
|
</div>
|
|
|
|
|
</footer>
|
2024-12-14 20:21:41 +00:00
|
|
|
|
|
|
|
|
@await RenderSectionAsync("scripts", false)
|
2024-11-10 14:30:12 +00:00
|
|
|
|
2023-03-19 17:57:55 +00:00
|
|
|
</body>
|
2019-01-01 16:28:47 +00:00
|
|
|
</html>
|