summaryrefslogtreecommitdiffstats
path: root/doc/javascript_css
diff options
context:
space:
mode:
authorSimon Rettberg2016-06-14 17:13:54 +0200
committerSimon Rettberg2016-06-14 17:13:54 +0200
commit1873fa94f309b4acc2c16eea2b26387d540ae55f (patch)
tree028db06f4a61bf8432d615cd4c965295967227d5 /doc/javascript_css
parent[citymanagement] Create new menu categories in cities module (mostly as an ex... (diff)
downloadslx-admin-1873fa94f309b4acc2c16eea2b26387d540ae55f.tar.gz
slx-admin-1873fa94f309b4acc2c16eea2b26387d540ae55f.tar.xz
slx-admin-1873fa94f309b4acc2c16eea2b26387d540ae55f.zip
Add documentation
Diffstat (limited to 'doc/javascript_css')
-rw-r--r--doc/javascript_css19
1 files changed, 19 insertions, 0 deletions
diff --git a/doc/javascript_css b/doc/javascript_css
new file mode 100644
index 00000000..de4896d5
--- /dev/null
+++ b/doc/javascript_css
@@ -0,0 +1,19 @@
+In order to prevent the global ./style/default.css from growing until
+it's a complete mess, it is also possible to modularize css stylesheets
+and javascript files.
+
+If a module contains a file called style.css, it is automatically included
+in the generated HTML page of the module, or any module that declared this
+module as a dependency.
+The same goes for a file called clientscript.js. Any module containing such
+a file will have this script included in the generated HTML.
+
+This way you can have module specific CSS definitions. Some of the
+definitions in ./style/default.css should be moved into modules over
+time (TODO :)), since they are only used in one module.
+
+Thanks to the dependency mechanism it is possible to have dedicated css/js
+modules, like "js_chart" or "js_circles". An example is the module
+"statistics", which defines js_chart as a dependency in its config.json.
+The result is that js_chart/clientscript.js is automatically included
+in the HTML output of the statistics module.