File tree Expand file tree Collapse file tree 1 file changed +25
-19
lines changed
modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Tags Expand file tree Collapse file tree 1 file changed +25
-19
lines changed Original file line number Diff line number Diff line change 33@model TagViewComponent .TagViewModel
44
55<div class =" my-3" >
6- <div class =" cms-tags-area" >
7- @if (Model .Tags != null )
8- {
9- foreach (var tag in Model .Tags )
10- {
11- if (Model .UrlFormat .IsNullOrWhiteSpace ())
12- {
13- < span class = " badge rounded-pill badge-secondary text-bg-secondary cmskit-tag font-weight-normal" >
14- @tag .Name
15- < / span >
16- }
17- else
18- {
19- var formattedUrl = Model .UrlFormat .Replace (" {TagId}" , tag .Id .ToString ()).Replace (" {TagName}" , tag .Name );
20- <a href =" @formattedUrl" ><span class =" badge rounded-pill badge-secondary text-bg-secondary rounded-pill cmskit-tag font-weight-normal" >@tag.Name </span ></a >
21- }
22- }
23- }
24- </div >
6+ <div class =" cms-tags-area" >
7+ @if (Model .Tags != null )
8+ {
9+ <ul class =" d-flex flex-wrap gap-1" >
10+ @foreach ( var tag in Model .Tags )
11+ {
12+ if (Model .UrlFormat .IsNullOrWhiteSpace ())
13+ {
14+ < li >
15+ < span class = " badge rounded-pill badge-secondary text-bg-secondary cmskit-tag font-weight-normal" >
16+ @tag .Name
17+ < / span >
18+ < / li >
19+ }
20+ else
21+ {
22+ var formattedUrl = Model .UrlFormat .Replace (" {TagId}" , tag .Id .ToString ()).Replace (" {TagName}" , tag .Name );
23+ <li >
24+ <a href =" @formattedUrl" ><span class =" badge rounded-pill badge-secondary text-bg-secondary cmskit-tag font-weight-normal" >@tag.Name </span ></a >
25+ </li >
26+ }
27+ }
28+ </ul >
29+ }
30+ </div >
2531</div >
You can’t perform that action at this time.
0 commit comments