|
81 | 81 |
|
82 | 82 | @if (Posts != null && Posts.Count > 0)
|
83 | 83 | {
|
84 |
| - <ul class="list" aria-label="posts"> |
85 |
| - <Virtualize Items="Posts" Context="post"> |
86 |
| - |
87 |
| - @{ |
88 |
| - string pubDate = post.Published > DateTime.MinValue ? post.Published.ToFriendlyShortDateString() : @_localizer["draft"]; |
89 |
| - string pubStatus = post.Published > DateTime.MinValue ? "published" : ""; |
90 |
| - string featured = post.IsFeatured ? "featured" : ""; |
91 |
| - } |
92 |
| - |
93 |
| - <li class="list-item"> |
94 |
| - <label class="list-check form-check" data-bs-toggle="tooltip" title="@_localizer["select"]"> |
95 |
| - <input type="checkbox" @bind="post.Selected" class="list-check-input form-check-input"> |
96 |
| - </label> |
97 |
| - <a class="list-title -link" href="/admin/editor/@post.Slug"> |
98 |
| - @post.Title |
99 |
| - </a> |
100 |
| - <span class="list-text -nowrap ms-auto"> |
101 |
| - @pubDate |
102 |
| - </span> |
103 |
| - <button class="list-btn" @onclick="(async () => await Publish(post))"> |
| 84 | + <div style="height:650px;overflow-y:scroll"> |
| 85 | + <ul class="list" aria-label="posts"> |
| 86 | + <Virtualize Items="Posts" Context="post"> |
| 87 | + |
| 88 | + @{ |
| 89 | + string pubDate = post.Published > DateTime.MinValue ? post.Published.ToFriendlyShortDateString() : @_localizer["draft"]; |
| 90 | + string pubStatus = post.Published > DateTime.MinValue ? "published" : ""; |
| 91 | + string featured = post.IsFeatured ? "featured" : ""; |
| 92 | + } |
| 93 | + |
| 94 | + <li class="list-item"> |
| 95 | + <label class="list-check form-check" data-bs-toggle="tooltip" title="@_localizer["select"]"> |
| 96 | + <input type="checkbox" @bind="post.Selected" class="list-check-input form-check-input"> |
| 97 | + </label> |
| 98 | + <a class="list-title -link" href="/admin/editor/@post.Slug"> |
| 99 | + @post.Title |
| 100 | + </a> |
| 101 | + <span class="list-text -nowrap ms-auto"> |
| 102 | + @pubDate |
| 103 | + </span> |
| 104 | + <button class="list-btn" @onclick="(async () => await Publish(post))"> |
104 | 105 | @if (@pubStatus == "published")
|
105 | 106 | {
|
106 | 107 | <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="currentColor" class="bi bi-check link-success" viewBox="0 0 16 16" data-bs-toggle="tooltip" title="@_localizer["published"]">
|
|
113 | 114 | <path d="M6 12.5C6 11.6716 6.67157 11 7.5 11H16.5C17.3284 11 18 11.6716 18 12.5C18 13.3284 17.3284 14 16.5 14H7.5C6.67157 14 6 13.3284 6 12.5Z" />
|
114 | 115 | </svg>
|
115 | 116 | }
|
116 |
| - </button> |
117 |
| - <button class="list-btn" @onclick="(async () => await Featured(post))"> |
| 117 | + </button> |
| 118 | + <button class="list-btn" @onclick="(async () => await Featured(post))"> |
118 | 119 | @if (@featured == "featured")
|
119 | 120 | {
|
120 | 121 | <svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" fill="currentColor" class="bi bi-star-fill link-gold" viewBox="0 0 16 16" data-bs-toggle="tooltip" title="@_localizer["featured"]">
|
|
127 | 128 | <path d="M3.612 15.443c-.386.198-.824-.149-.746-.592l.83-4.73L.173 6.765c-.329-.314-.158-.888.283-.95l4.898-.696L7.538.792c.197-.39.73-.39.927 0l2.184 4.327 4.898.696c.441.062.612.636.282.95l-3.522 3.356.83 4.73c.078.443-.36.79-.746.592L8 13.187l-4.389 2.256z"/>
|
128 | 129 | </svg>
|
129 | 130 | }
|
130 |
| - </button> |
131 |
| - <a class="list-btn" href="posts/@post.Slug" target="_blank"> |
132 |
| - <svg class="bi" width="15" height="15" viewBox="0 0 16 16" fill="currentColor" xmlns="http://www.w3.org/2000/svg" data-bs-toggle="tooltip" title="@_localizer["view"]"> |
133 |
| - <path d="M7.85724 2.17097L6 4L7 5L8.93201 3.24577C9.89935 2.27845 11.4719 2.27845 12.4393 3.24577C13.4066 4.21308 13.4066 5.78571 12.4393 6.75303L10.5141 8.75674L11.5141 9.75674L13.5141 7.82783C15.0754 6.26652 15.0754 3.73225 13.5141 2.17094C11.9528 0.609657 9.41852 0.609688 7.85724 2.17097Z" /> |
134 |
| - <path d="M3.24575 12.4392C2.2784 11.4719 2.2784 9.89935 3.24575 8.93201L5 7L4 6L2.17098 7.85721C0.609703 9.41849 0.609642 11.9528 2.17098 13.514C3.73226 15.0753 6.26656 15.0753 7.82784 13.514L9.5141 11.7567L8.5141 10.7567L6.75301 12.4392C5.78573 13.4066 4.2131 13.4066 3.24575 12.4392Z" /> |
135 |
| - <path d="M4.99941 9.55426L9.52486 5.02878L10.6563 6.16016L6.13076 10.6856L4.99941 9.55426Z" /> |
136 |
| - </svg> |
137 |
| - </a> |
138 |
| - </li> |
139 |
| - </Virtualize> |
140 |
| - </ul> |
| 131 | + </button> |
| 132 | + <a class="list-btn" href="posts/@post.Slug" target="_blank"> |
| 133 | + <svg class="bi" width="15" height="15" viewBox="0 0 16 16" fill="currentColor" xmlns="http://www.w3.org/2000/svg" data-bs-toggle="tooltip" title="@_localizer["view"]"> |
| 134 | + <path d="M7.85724 2.17097L6 4L7 5L8.93201 3.24577C9.89935 2.27845 11.4719 2.27845 12.4393 3.24577C13.4066 4.21308 13.4066 5.78571 12.4393 6.75303L10.5141 8.75674L11.5141 9.75674L13.5141 7.82783C15.0754 6.26652 15.0754 3.73225 13.5141 2.17094C11.9528 0.609657 9.41852 0.609688 7.85724 2.17097Z" /> |
| 135 | + <path d="M3.24575 12.4392C2.2784 11.4719 2.2784 9.89935 3.24575 8.93201L5 7L4 6L2.17098 7.85721C0.609703 9.41849 0.609642 11.9528 2.17098 13.514C3.73226 15.0753 6.26656 15.0753 7.82784 13.514L9.5141 11.7567L8.5141 10.7567L6.75301 12.4392C5.78573 13.4066 4.2131 13.4066 3.24575 12.4392Z" /> |
| 136 | + <path d="M4.99941 9.55426L9.52486 5.02878L10.6563 6.16016L6.13076 10.6856L4.99941 9.55426Z" /> |
| 137 | + </svg> |
| 138 | + </a> |
| 139 | + </li> |
| 140 | + </Virtualize> |
| 141 | + </ul> |
| 142 | + </div> |
141 | 143 | }
|
142 | 144 | else
|
143 | 145 | {
|
|
0 commit comments