mirror of https://github.com/abpframework/abp
parent
3ab1db1e38
commit
92561484cc
@ -0,0 +1,10 @@
|
||||
using System;
|
||||
|
||||
namespace Volo.CmsKit.Tags;
|
||||
|
||||
public class PopularTagDto
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
public int Count { get; set; }
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
using System;
|
||||
|
||||
namespace Volo.CmsKit.Tags;
|
||||
|
||||
public class PopularTag
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
public int Count { get; set; }
|
||||
|
||||
public PopularTag(Guid id, string name, int count)
|
||||
{
|
||||
Id = id;
|
||||
Name = name;
|
||||
Count = count;
|
||||
}
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
@inject IHtmlLocalizer<CmsKitResource> L
|
||||
@using Microsoft.AspNetCore.Mvc.Localization
|
||||
@using Volo.CmsKit.Localization
|
||||
@model Volo.CmsKit.Public.Web.Pages.CmsKit.Shared.Components.PopularTags.PopularTagsViewComponent.PopularTagsViewModel
|
||||
|
||||
@if (Model.Tags != null && Model.Tags.Any())
|
||||
{
|
||||
<h4 class="mb-3 fw--6">@L["PopularTags"]</h4>
|
||||
|
||||
<div class="cms-tags-area my-3">
|
||||
@foreach (var tag in Model.Tags)
|
||||
{
|
||||
if (Model.UrlFactory == null)
|
||||
{
|
||||
<span class="br-8 me-2 mb-2 p-2 d-inline-block cmskit-tag fw--5" style="background: #eeedf7; color: #766bc8">
|
||||
@tag.Name
|
||||
</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<a href="@Model.UrlFactory(tag)">
|
||||
<span class="br-8 me-2 mb-2 p-2 d-inline-block cmskit-tag fw--5" style="background: #eeedf7; color: #766bc8">
|
||||
@tag.Name
|
||||
</span>
|
||||
</a>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
}
|
Loading…
Reference in new issue