core.js 626 B

123456789101112131415161718192021
  1. import { search } from "./search.js";
  2. import { pixel, percent, auto } from "./size.js";
  3. import { position, place_top } from "./position.js";
  4. import { sticky } from "./sticky.js";
  5. document.addEventListener("DOMContentLoaded", () => {
  6. const container = document.querySelector(".container");
  7. const top_bar = new sticky();
  8. top_bar.width = new percent(100);
  9. top_bar.height = new auto();
  10. top_bar.position = new place_top();
  11. const top_bar_element = top_bar.element;
  12. const search_bar = new search();
  13. top_bar_element.appendChild(search_bar.ui);
  14. container.appendChild(top_bar_element);
  15. });