diff --git a/.gitignore b/.gitignore index a444de0e..e6fdb1a4 100644 --- a/.gitignore +++ b/.gitignore @@ -59,3 +59,5 @@ vendor .vscode/* !.vscode/multi-terminals.json !.vscode/*.shared.json + +stats.html diff --git a/Gemfile.lock b/Gemfile.lock index 939fe0b9..6563326e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -331,7 +331,7 @@ GEM language_server-protocol (~> 3.17.0) prism (>= 0.19.0, < 0.20) sorbet-runtime (>= 0.5.10782) - ruby-lsp-rails (0.2.8) + ruby-lsp-rails (0.2.9) actionpack (>= 6.0) activerecord (>= 6.0) railties (>= 6.0) @@ -344,13 +344,13 @@ GEM rexml (~> 3.2, >= 3.2.5) rubyzip (>= 1.2.2, < 3.0) websocket (~> 1.0) - sorbet (0.5.11205) - sorbet-static (= 0.5.11205) - sorbet-runtime (0.5.11205) - sorbet-static (0.5.11205-x86_64-linux) - sorbet-static-and-runtime (0.5.11205) - sorbet (= 0.5.11205) - sorbet-runtime (= 0.5.11205) + sorbet (0.5.11213) + sorbet-static (= 0.5.11213) + sorbet-runtime (0.5.11213) + sorbet-static (0.5.11213-x86_64-linux) + sorbet-static-and-runtime (0.5.11213) + sorbet (= 0.5.11213) + sorbet-runtime (= 0.5.11213) spoom (1.2.4) erubi (>= 1.10.0) sorbet-static-and-runtime (>= 0.5.10187) diff --git a/app/frontend/entrypoints/admin.js b/app/frontend/entrypoints/admin.js index 274578ab..ddad5a29 100644 --- a/app/frontend/entrypoints/admin.js +++ b/app/frontend/entrypoints/admin.js @@ -1,7 +1,6 @@ import "iconify-icon"; import "@hotwired/turbo-rails"; import Alpine from "alpinejs"; -import "../channels"; import "~/stylesheets/admin.css.scss"; window.Alpine = Alpine; diff --git a/app/frontend/entrypoints/application.js b/app/frontend/entrypoints/application.js index 9dcf3daa..8ff1b629 100644 --- a/app/frontend/entrypoints/application.js +++ b/app/frontend/entrypoints/application.js @@ -4,15 +4,26 @@ import "iconify-icon"; import "@hotwired/turbo-rails"; import Alpine from "alpinejs"; import { Chart, PieController, ArcElement, Tooltip } from "chart.js"; -import tippy, { followCursor } from "tippy.js"; -import Swiper from "swiper/bundle"; -import "../channels"; +import Tippy, { followCursor } from "tippy.js"; +import Swiper from "swiper"; +import { + Autoplay, + Navigation, + EffectFade, + EffectCoverflow, +} from "swiper/modules"; import "tippy.js/dist/tippy.css"; import "tippy.js/themes/light.css"; import "tippy.js/animations/perspective-subtle.css"; import "tippy.js/animations/shift-away-subtle.css"; -import "swiper/css/bundle"; + +import "swiper/css"; +import "swiper/css/autoplay"; +import "swiper/css/navigation"; +import "swiper/css/effect-fade"; +import "swiper/css/effect-coverflow"; + import "~/stylesheets/application.css.scss"; const initElems = (parent = null) => { @@ -20,7 +31,7 @@ const initElems = (parent = null) => { const tippyPopoverList = [].slice.call( (parent || document).querySelectorAll("[data-tippy=popover]"), ); - tippy(tippyPopoverList, { + Tippy(tippyPopoverList, { theme: "light", trigger: "click", animation: "shift-away-subtle", @@ -38,7 +49,7 @@ const initElems = (parent = null) => { const tippyTooltipList = [].slice.call( (parent || document).querySelectorAll("[data-tippy=tooltip]"), ); - tippy(tippyTooltipList, { + Tippy(tippyTooltipList, { theme: "light", placement: "top", followCursor: "horizontal", @@ -155,10 +166,16 @@ document.addEventListener("turbo:before-stream-render", () => { Turbo.navigator.delegate.adapter.progressBar.hide(); }); -Chart.register([PieController, ArcElement, Tooltip]); - -window.Alpine = Alpine; -window.Chart = Chart; -window.tippy = tippy; -window.Swiper = Swiper; +Chart.register(PieController, ArcElement, Tooltip); + +Object.assign(window, { + Alpine, + Chart, + Tippy, + Swiper, + Autoplay, + Navigation, + EffectFade, + EffectCoverflow, +}); Alpine.start(); diff --git a/app/views/anilist/index.html.erb b/app/views/anilist/index.html.erb index 3f9fedaf..9c3c0dc5 100644 --- a/app/views/anilist/index.html.erb +++ b/app/views/anilist/index.html.erb @@ -2,7 +2,7 @@
-