Reader fullscreen: the topbar gains a fullscreen toggle (icon state + f shortcut + help row; f is guarded so Ctrl/Cmd+F stays find-in-page). Enter requests the Fullscreen API with fallbacks (desktop/Android get a true full display; iOS Safari has no page-fullscreen API and falls back to the soft visual mode only). Margins: the foliate paginator's closed shadow root only yields through its observed 'margin' attribute, so fullscreen fits a comfortable ratio (6% of the short side, floored at 48px) and floors it by the measured env insets — Android reports true cutout insets in fullscreen, so portrait phones keep text clear of the camera band; iOS letterboxes are already env-padded chrome. Fixed-layout renderers skip it (fxl/webtoon pack pages edge-to-edge by design). Exits the user makes outside the toggle (Esc, browser UI) sync via fullscreenchange(+webkit) and restore the ordinary 48px margin; a position-keeping re-render follows the ResizeObserver re-entry path. Verified on-device: enter -> true fullscreen + icon swap + camera band clear, exit -> chrome back, margins restored, position kept. Volume: revert the stacked panel — the popup returns to the liked shape (mute button left, horizontal dragger right, dialogue above the strip); one-line flex restore of the pre-89665fb layout. Manga badges: MediaBadgeKind makes the library type authoritative for the comic/manga split — manga volumes ship as fixed_layout scans as often as comic_archive (and manga_type is unreliable across sources: unknown/NULL on real rows), so the old comic_archive+manga mapping left the scan volumes unbadged. Anything in a manga library reads manga; anything in a comics library reads comic. Verified: /dashboard lands 24 title="Manga" cover badges for the Manga library and the sections API reports badge=manga for a fixed_layout item. Ghost sidebar: the >=1024px media block applied body padding-left:var(--sidebar-w) unconditionally, so pages that never render the sidebar (logged-out pages, the audio player, the reader itself) carried a phantom 16rem left margin that pushed content off center on desktop widths. The body:has(.app-sidebar) rule below was already the correct conditional source — it is now the only one. Verified in the built stylesheet: exactly one such rule remains. Infra: main.js ?v=3 stamp bump (reader.ts changed; hashed chunks churn their URLs themselves).
56 lines
2.0 KiB
Go
56 lines
2.0 KiB
Go
// Code generated by templ - DO NOT EDIT.
|
|
|
|
// templ: version: v0.3.1020
|
|
package templates
|
|
|
|
//lint:file-ignore SA4006 This context is only used if a nested component is present.
|
|
|
|
import "github.com/a-h/templ"
|
|
import templruntime "github.com/a-h/templ/runtime"
|
|
|
|
func ErrorToast(message string) templ.Component {
|
|
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
|
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
|
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
|
return templ_7745c5c3_CtxErr
|
|
}
|
|
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
|
|
if !templ_7745c5c3_IsBuffer {
|
|
defer func() {
|
|
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
|
|
if templ_7745c5c3_Err == nil {
|
|
templ_7745c5c3_Err = templ_7745c5c3_BufErr
|
|
}
|
|
}()
|
|
}
|
|
ctx = templ.InitializeContext(ctx)
|
|
templ_7745c5c3_Var1 := templ.GetChildren(ctx)
|
|
if templ_7745c5c3_Var1 == nil {
|
|
templ_7745c5c3_Var1 = templ.NopComponent
|
|
}
|
|
ctx = templ.ClearChildren(ctx)
|
|
if message != "" {
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "<div x-data=\"toastError\" x-init=\"")
|
|
if templ_7745c5c3_Err != nil {
|
|
return templ_7745c5c3_Err
|
|
}
|
|
var templ_7745c5c3_Var2 string
|
|
templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.ResolveAttributeValue("showErrorToast('" + message + "')")
|
|
if templ_7745c5c3_Err != nil {
|
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `templates/toast.templ`, Line: 5, Col: 71}
|
|
}
|
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var2)
|
|
if templ_7745c5c3_Err != nil {
|
|
return templ_7745c5c3_Err
|
|
}
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 2, "\"></div>")
|
|
if templ_7745c5c3_Err != nil {
|
|
return templ_7745c5c3_Err
|
|
}
|
|
}
|
|
return nil
|
|
})
|
|
}
|
|
|
|
var _ = templruntime.GeneratedTemplate
|