core.js 1.3 KB

1234567891011121314151617181920212223242526272829
  1. import { height_equaler } from "./height_equaler.js";
  2. import { product } from "./product.js";
  3. import { products_loader } from "./products_loader.js";
  4. import { product_container } from "./product_container.js";
  5. import { product_containers } from "./product_containers.js";
  6. import { searcher } from "./searcher.js";
  7. import { login_bar } from "./login_bar.js";
  8. import { scroll_up } from "./scroll_up.js";
  9. import { color_theme } from "./color_theme.js";
  10. document.addEventListener("DOMContentLoaded", async () => {
  11. const top_bar_spacing = new height_equaler(
  12. document.querySelector(".top-bar"),
  13. document.querySelector(".top-bar-spacing")
  14. );
  15. const container = document.querySelector(".products");
  16. const search_bar = document.querySelector("form.search");
  17. const search_title = document.querySelector(".search-title");
  18. const login_space = document.querySelector(".top-bar .right");
  19. const scroll_up_button = document.querySelector(".scroll-up-button");
  20. const reverse_colors = document.querySelector(".reverse-colors");
  21. const manager = new product_containers(container);
  22. new login_bar(login_space);
  23. new scroll_up(scroll_up_button);
  24. new color_theme(reverse_colors);
  25. new searcher(search_bar, manager, search_title).show_all();
  26. });