a fork of iceshrimp.net but a tweaked frontend to my personal liking. waow
fediverse social-media social iceshrimp fedi
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

[backend/razor] Use button style links for pagination in profile public preview

authored by

pancakes and committed by
Iceshrimp development
cb21b448 7ab137bf

+14 -12
+5 -5
Iceshrimp.Backend/Pages/UserPreview.razor
··· 116 116 <div class="pagination"> 117 117 @if (Offset is > 0) 118 118 { 119 - <button class="button" role="link" data-target="/@@@Acct?offset=@(Math.Max(0, Offset.Value - 20))" 120 - onclick="navigate(event)">❮ Previous page 121 - </button> 119 + <a class="button" href="/@@@Acct?offset=@(Math.Max(0, Offset.Value - 20))"> 120 + ❮ Previous page 121 + </a> 122 122 } 123 123 else 124 124 { ··· 127 127 128 128 @if (_notes.Count == 20) 129 129 { 130 - <button class="button" role="link" data-target="/@@@Acct?offset=@((Offset ?? 0) + 20)" onclick="navigate(event)"> 130 + <a class="button" href="/@@@Acct?offset=@((Offset ?? 0) + 20)"> 131 131 Next page ❯ 132 - </button> 132 + </a> 133 133 } 134 134 else 135 135 {
+9
Iceshrimp.Backend/wwwroot/css/main.css
··· 127 127 align-items: center; 128 128 } 129 129 130 + a.button { 131 + cursor: pointer; 132 + width: fit-content; 133 + height: fit-content; 134 + background-color: var(--foreground-color); 135 + color: var(--notice-color); 136 + text-decoration: none; 137 + } 138 + 130 139 .button:hover { 131 140 background-color: var(--hover-color); 132 141 }
-7
Iceshrimp.Backend/wwwroot/js/user-preview.js
··· 1 - function navigate(event) { 2 - const target = event.target.getAttribute('data-target') 3 - if (event.ctrlKey || event.metaKey) 4 - window.open(target, '_blank'); 5 - else 6 - window.location.href = target; 7 - }