.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/webgl/static_with_custom_template.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note Click :ref:`here ` to download the full example code .. rst-class:: sphx-glr-example-title .. _sphx_glr_auto_examples_webgl_static_with_custom_template.py: ================================ Static viewer with html template ================================ A static viewer is a brain viewer that exists permanently on a filesystem The viewer is stored in a directory that stores html, javascript, data, etc The viewer directory must be hosted by a server such as nginx. Pycortex has the functionality of provide a custom html template to specify the attributes of the viewer. The file 'my_template.html' included in this directory has css code which changes the color scheme of the controls window. The background is now white, with black text, and the sliders are red instead of blue. The templates files included with pycortex () have been modified by adding the following css code: .. GENERATED FROM PYTHON SOURCE LINES 49-66 .. code-block:: default import cortex import numpy as np np.random.seed(1234) # gather data Volume volume = cortex.Volume.random(subject='S1', xfmname='fullhead') # select path for static viewer on disk viewer_path = '/path/to/store/viewer' # create viewer using the 'my_template.html' template: cortex.webgl.make_static(outpath=viewer_path, data=volume, template = 'my_template.html') # a webserver such as nginx can then be used to host the static viewer # with the new template .. rst-class:: sphx-glr-timing **Total running time of the script:** ( 0 minutes 0.000 seconds) .. _sphx_glr_download_auto_examples_webgl_static_with_custom_template.py: .. only :: html .. container:: sphx-glr-footer :class: sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: static_with_custom_template.py ` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: static_with_custom_template.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_