diff --git a/.vscode/settings.json b/.vscode/settings.json index 82790b61..e1df40fe 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -16,7 +16,8 @@ }, "search.exclude": { "components/": true, - "**/*.svg": true + "**/*.svg": true, + "**/*.html": true }, "[jade]": { "files.trimTrailingWhitespace": false diff --git a/layout/layout.pixy b/layout/layout.pixy index 0b3c987b..591243fc 100644 --- a/layout/layout.pixy +++ b/layout/layout.pixy @@ -41,6 +41,7 @@ component Layout(app *aero.Application, ctx *aero.Context, user *arn.User, openG Content(content) LoadingAnimation StatusMessage + ExtensionNavigation if user != nil #user(data-id=user.ID, data-theme=user.Settings().Theme) script(src="/scripts") diff --git a/layout/sidebar/sidebar.scarlet b/layout/sidebar/sidebar.scarlet index ba173656..17346ce8 100644 --- a/layout/sidebar/sidebar.scarlet +++ b/layout/sidebar/sidebar.scarlet @@ -7,6 +7,7 @@ sidebar-spacing-y = 0.7rem top 0 z-index 10 width 70vw + max-width 300px height 100% background sidebar-opaque-background transform translateX(-100%) diff --git a/pages/embed/embed.go b/pages/embed/embed.go index f6cd35d5..3a4c2500 100644 --- a/pages/embed/embed.go +++ b/pages/embed/embed.go @@ -31,5 +31,5 @@ func Get(ctx *aero.Context) string { watchingList := animeList.Watching() watchingList.Sort() - return utils.AllowEmbed(ctx, ctx.HTML(components.AnimeList(watchingList, animeList.User(), user))) + return utils.AllowEmbed(ctx, ctx.HTML(components.BrowserExtension(watchingList, animeList.User(), user))) } diff --git a/pages/embed/embed.pixy b/pages/embed/embed.pixy new file mode 100644 index 00000000..10b407c8 --- /dev/null +++ b/pages/embed/embed.pixy @@ -0,0 +1,7 @@ +component BrowserExtension(watchingList *arn.AnimeList, viewUser *arn.User, user *arn.User) + AnimeList(watchingList, viewUser, user) + +component ExtensionNavigation + nav.extension-navigation + button.action(data-trigger="click", data-action="toggleSidebar") + RawIcon("bars") \ No newline at end of file diff --git a/pages/embed/embed.scarlet b/pages/embed/embed.scarlet new file mode 100644 index 00000000..aeb3c687 --- /dev/null +++ b/pages/embed/embed.scarlet @@ -0,0 +1,13 @@ +.extension-navigation + display none + +> 780px + .extension-navigation + display block + position fixed + bottom 1rem + left 1rem + +> 790px + .extension-navigation + display none \ No newline at end of file