App.pupper 809 B

123456789101112131415161718192021222324
  1. import DocsComponent(from="./DocsComponent.pupper")
  2. import LandingComponent(from="./LandingComponent.pupper")
  3. template
  4. div
  5. //- Stylesheets
  6. link(rel="stylesheet", href="https://cdn.jsdelivr.net/npm/bootswatch@4.5.2/dist/litera/bootstrap.min.css", integrity="sha384-enpDwFISL6M3ZGZ50Tjo8m65q06uLVnyvkFO3rsoW0UC15ATBFz3QEhr3hmxpYsn", crossorigin="anonymous")
  7. //- If it's loading the docs
  8. if isDocs
  9. //- Load the docs component
  10. DocsComponent
  11. else
  12. //- Load the landing page component
  13. LandingComponent
  14. data
  15. isDocs = window.location.hash.includes("docs")
  16. implementation
  17. when#mounted
  18. window.addEventListener("hashchange", () => {
  19. this.isDocs = window.location.hash.includes("docs");
  20. });