xmpp.chapril.org-conversejs/docs/source/theming.rst

74 lines
2.2 KiB
ReStructuredText
Raw Normal View History

.. raw:: html
<div id="banner"><a href="https://github.com/jcbrand/converse.js/blob/master/docs/source/theming.rst">Edit me on GitHub</a></div>
2016-12-22 14:00:03 +01:00
.. _theming:
=======
Theming
=======
Setting up your environment
===========================
2018-09-18 10:53:43 +02:00
In order to theme Converse, you first need to set up a :ref:`development` environment.
You'll also want to preview the changes you make in your browser, for which a
webserver will be useful.
To both set up the development environment and also start up a web browser to
serve the files for you, simply run::
make serve
.. note::
To run the "make" commands, you'll need `GNUMake <https://www.gnu.org/software/make>`_
installed on your computer. If you use GNU/Linux or \*BSD, it should be installed or
available via your package manager. For Mac, I think you need to install XCode and in
Windows you can use `Chocolatey <https://chocolatey.org/>`_.
After running ``make serve`` you can open http://localhost:8000 in your webbrowser you'll
2018-09-18 10:53:43 +02:00
see the Converse website.
However, when developing or changing the theme, you'll want to load all the
unminified JS and CSS resources as separate files. To do this, open http://localhost:8000/dev.html
instead.
Mockups
=======
2018-09-18 10:53:43 +02:00
Converse contains some mockups in the ``./mockup`` directory against which you
can preview and tweak your changes.
The ``./mockup/index.html`` file contains the most comprehensive mockup, while
the other files focus on particular UI aspects.
To see it in your browser, simply open: http://localhost:8000/mockup
2018-09-18 10:53:43 +02:00
Modifying the HTML templates of Converse
========================================
2018-09-18 10:53:43 +02:00
The HTML markup of Converse is contained in small ``.html`` files in the
``./src/templates`` directory.
2018-09-18 10:53:43 +02:00
You can modify HTML markup that Converse generates by modifying these files.
Modifying the CSS
=================
The CSS files are generated from `Sass <http://sass-lang.com>`_ files in the ``./sass`` directory.
To generate the CSS you can run::
make css
Creating dist files
===================
2018-09-18 10:53:43 +02:00
Once you've themed Converse, you'll want to create new minified distribution
2017-09-03 22:12:17 +02:00
files of all the JavaScript and CSS.
Please refer to the :doc:`builds` section for information on how this is done.