Skip to content

Commit 6a6ddd0

Browse files
committed
disable enhance nav on album page whose links break after back button
1 parent 1c8c602 commit 6a6ddd0

File tree

3 files changed

+16
-7
lines changed

3 files changed

+16
-7
lines changed

BlazorDiffusion/Components/Pages/Albums/Index.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
@if (artifact != null)
1515
{
1616
<div>
17-
<NavLink href="@($"/albums/{album.Slug}")" class="@CssUtils.ClassNames("overflow-hidden flex justify-center")">
17+
<NavLink data-enhance-nav="false" href="@($"/albums/{album.Slug}")" class="@CssUtils.ClassNames("overflow-hidden flex justify-center")">
1818
<div class="relative sm:p-2 flex flex-col cursor-pointer items-center w-32 h-32 sm:w-64 sm:h-64 xl:w-96 xl:h-96 2xl:w-[512px] 2xl:h-[512px]">
1919
<ArtifactImage Artifact=@artifact MinSize="@artifact.Width" Class="flex rounded sm:rounded-xl w-full h-full" ImageClass="object-cover" />
2020

BlazorDiffusion/wwwroot/css/app.css

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1609,6 +1609,10 @@ select{
16091609
max-width: 42rem;
16101610
}
16111611

1612+
.max-w-32 {
1613+
max-width: 8rem;
1614+
}
1615+
16121616
.max-w-3xl {
16131617
max-width: 48rem;
16141618
}
@@ -2539,6 +2543,11 @@ select{
25392543
padding-right: 0.25rem;
25402544
}
25412545

2546+
.px-10 {
2547+
padding-left: 2.5rem;
2548+
padding-right: 2.5rem;
2549+
}
2550+
25422551
.px-2 {
25432552
padding-left: 0.5rem;
25442553
padding-right: 0.5rem;
@@ -2852,6 +2861,10 @@ select{
28522861
text-transform: uppercase;
28532862
}
28542863

2864+
.lowercase {
2865+
text-transform: lowercase;
2866+
}
2867+
28552868
.capitalize {
28562869
text-transform: capitalize;
28572870
}
@@ -3258,11 +3271,6 @@ select{
32583271
--tw-ring-color: rgb(0 0 0 / var(--tw-ring-opacity));
32593272
}
32603273

3261-
.ring-blue-800 {
3262-
--tw-ring-opacity: 1;
3263-
--tw-ring-color: rgb(30 64 175 / var(--tw-ring-opacity));
3264-
}
3265-
32663274
.ring-gray-800 {
32673275
--tw-ring-opacity: 1;
32683276
--tw-ring-color: rgb(31 41 55 / var(--tw-ring-opacity));

BlazorDiffusion/wwwroot/mjs/app.mjs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ export function mount(sel, component, props) {
7979
if (!hasTemplate(el, component)) {
8080
// Fallback for enhanced navigation clearing HTML DOM template of Vue App, requiring a force reload
8181
// Avoid by disabling enhanced navigation to page, e.g. by adding data-enhance-nav="false" to element
82-
console.warn('Vue Compontent template is missing, force reloading...', el, component)
82+
console.warn('Vue Component template is missing, force reloading...', el, component)
8383
blazorRefresh()
8484
return
8585
}
@@ -276,6 +276,7 @@ globalThis.logout = function () {
276276

277277
document.addEventListener('DOMContentLoaded', () =>
278278
Blazor.addEventListener('enhancedload', () => {
279+
console.log('enhancedload')
279280
remount()
280281
globalThis.hljs?.highlightAll()
281282
if (localStorage.getItem('color-scheme') == 'dark') {

0 commit comments

Comments
 (0)