theming.rst 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. =======
  2. Theming
  3. =======
  4. .. contents:: Table of Contents
  5. :depth: 2
  6. :local:
  7. Setting up your environment
  8. ===========================
  9. In order to theme converse.js, you'll first need to set up a `development_` environment.
  10. You'll also want to preview the changes you make in the browser.
  11. To set up the development environment and also start up a web browser which
  12. will serve the files for you, simply run::
  13. make serve
  14. You can now open http://localhost:8000 in your webbrowser to see the
  15. converse.js website.
  16. However, when developing or changing the theme, you'll want to load all the
  17. unminified JS and CSS resources. To do this, open http://localhost:8000/dev.html
  18. instead.
  19. Mockups
  20. =======
  21. Converse.js contains some mockups in the ``./mockup`` directory against which you
  22. can preview and tweak your changes.
  23. The ``./mockup/index.html`` file contains the most comprehensive mockup, while
  24. the other files focus on particular UI aspects.
  25. To see it in your browser, simply open: http://localhost:8000/mockup
  26. Modifying the HTML templates of Converse.js
  27. ===========================================
  28. The HTML markup of converse.js is contained small ``.html`` files in the
  29. ``./src/templates`` directory.
  30. Modifying the CSS
  31. =================
  32. The CSS files are generated from `Sass <http://sass-lang.com>`_ files in
  33. the ``./sass`` directory.
  34. To generate the CSS you can run::
  35. make css
  36. Creating builds
  37. ===============
  38. Once you've themed converse.js, you'll want to create new minified builds of
  39. the Javascript and CSS files.
  40. Please refer to the :doc:`builds` section for information on how this is done.