asome minor fixes
This commit is contained in:
parent
650f74781d
commit
ac1dc009cd
@ -13,6 +13,17 @@
|
||||
var pluginUrl = Url.Action(nameof(HomeController.GetPluginDetails), "Home", new { pluginSlug = Model.Plugin.ProjectSlug }, Context.Request.Scheme, Context.Request.Host.ToString());
|
||||
var currentRating = Model.RatingFilter;
|
||||
DateTimeOffset.TryParse(Model.Plugin.BuildInfo?["buildDate"]?.ToString(), out var buildDate);
|
||||
|
||||
var videoEmbedUrl = Model.Plugin.VideoUrl.GetVideoEmbedUrl();
|
||||
var videoThumbUrl = Model.Plugin.VideoUrl.GetVideoThumbnailUrl();
|
||||
var screenshots = Model.Plugin.Images?.Where(s => !string.IsNullOrWhiteSpace(s)).ToList() ?? new List<string>();
|
||||
var mediaItems = new List<(bool IsVideo, string MediaUrl, string? ThumbUrl, string Alt, string ThumbLabel)>();
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(videoEmbedUrl))
|
||||
mediaItems.Add((true, videoEmbedUrl, videoThumbUrl, "Plugin video", "Show video"));
|
||||
|
||||
for (var i = 0; i < screenshots.Count; i++)
|
||||
mediaItems.Add((false, screenshots[i], screenshots[i], $"{Model.Plugin.PluginTitle} screenshot {i + 1}", $"Show screenshot {i + 1}"));
|
||||
}
|
||||
|
||||
@section Meta {
|
||||
@ -87,18 +98,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@{
|
||||
var videoEmbedUrl = Model.Plugin.VideoUrl.GetVideoEmbedUrl();
|
||||
var videoThumbUrl = Model.Plugin.VideoUrl.GetVideoThumbnailUrl();
|
||||
var screenshots = Model.Plugin.Images?.Where(s => !string.IsNullOrWhiteSpace(s)).ToList() ?? new List<string>();
|
||||
var mediaItems = new List<(bool IsVideo, string MediaUrl, string? ThumbUrl, string Alt, string ThumbLabel)>();
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(videoEmbedUrl))
|
||||
mediaItems.Add((true, videoEmbedUrl, videoThumbUrl, "Plugin video", "Show video"));
|
||||
|
||||
for (var i = 0; i < screenshots.Count; i++)
|
||||
mediaItems.Add((false, screenshots[i], screenshots[i], $"{Model.Plugin.PluginTitle} screenshot {i + 1}", $"Show screenshot {i + 1}"));
|
||||
}
|
||||
@if (mediaItems.Any())
|
||||
{
|
||||
<div class="card mt-4">
|
||||
@ -107,10 +106,10 @@
|
||||
<div id="plugin-media-carousel" class="plugin-media-carousel" tabindex="0" aria-label="Plugin media carousel">
|
||||
<div class="plugin-media-stage ratio ratio-16x9 rounded overflow-hidden">
|
||||
<button type="button" class="plugin-media-nav plugin-media-nav-prev" data-media-nav="prev" aria-label="Previous media">
|
||||
<i class="fa fa-chevron-left" aria-hidden="true"></i>
|
||||
<vc:icon symbol="caret-left" />
|
||||
</button>
|
||||
<button type="button" class="plugin-media-nav plugin-media-nav-next" data-media-nav="next" aria-label="Next media">
|
||||
<i class="fa fa-chevron-right" aria-hidden="true"></i>
|
||||
<vc:icon symbol="caret-right" />
|
||||
</button>
|
||||
@for (var i = 0; i < mediaItems.Count; i++)
|
||||
{
|
||||
@ -457,7 +456,7 @@
|
||||
<div class="row">
|
||||
@foreach (var user in Model.Contributors)
|
||||
{
|
||||
<div class="col-12 col-lg-6 d-flex align-items-center mb-3">
|
||||
<div class="col-12 d-flex align-items-center mb-3">
|
||||
<div class="me-3 flex-shrink-0">
|
||||
<img src="@user.AvatarUrl" class="rounded-circle" style="width: 48px; height: 48px;" alt="@user.Login avatar" loading="lazy" />
|
||||
</div>
|
||||
|
||||
@ -52,6 +52,9 @@
|
||||
<symbol id="caret-right" viewBox="0 0 24 24">
|
||||
<path d="M9.5 17L14.5 12L9.5 7" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" fill="none"/>
|
||||
</symbol>
|
||||
<symbol id="caret-left" viewBox="0 0 24 24">
|
||||
<path d="M7.92303 12.0039C7.92303 12.3233 8.03989 12.5882 8.28919 12.8375L14.2881 18.704C14.4906 18.9065 14.7322 19 15.0204 19C15.6047 19 16.08 18.5403 16.08 17.956C16.08 17.6678 15.9553 17.4029 15.745 17.1925L10.4161 12.0117L15.745 6.81525C15.9553 6.6049 16.08 6.3478 16.08 6.05175C16.08 5.46745 15.6047 5 15.0204 5C14.7322 5 14.4906 5.10128 14.2881 5.30384L8.28919 11.1703C8.0321 11.4196 7.92303 11.6845 7.92303 12.0039Z" fill="currentColor"/>
|
||||
</symbol>
|
||||
<symbol id="caret-down" viewBox="0 0 24 24">
|
||||
<path d="M7 9.5L12 14.5L17 9.5" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" fill="none"/>
|
||||
</symbol>
|
||||
|
||||
|
Before Width: | Height: | Size: 56 KiB After Width: | Height: | Size: 56 KiB |
Loading…
Reference in New Issue
Block a user