Show More
@@ -1,53 +1,53 b'' | |||||
1 | syntax: glob |
|
1 | syntax: glob | |
2 | *.pyc |
|
2 | *.pyc | |
3 | *.swp |
|
3 | *.swp | |
4 | *.sqlite |
|
4 | *.sqlite | |
5 | *.tox |
|
5 | *.tox | |
6 | *.egg-info |
|
6 | *.egg-info | |
7 | *.egg |
|
7 | *.egg | |
8 | *.mo |
|
8 | *.mo | |
9 | *.bak |
|
9 | *.bak | |
10 | .eggs/ |
|
10 | .eggs/ | |
11 | tarballcache/ |
|
11 | tarballcache/ | |
12 |
|
12 | |||
13 | syntax: regexp |
|
13 | syntax: regexp | |
14 | ^rcextensions |
|
14 | ^rcextensions | |
15 | ^build |
|
15 | ^build | |
16 | ^dist/ |
|
16 | ^dist/ | |
17 | ^docs/build/ |
|
17 | ^docs/build/ | |
18 | ^docs/_build/ |
|
18 | ^docs/_build/ | |
19 | ^data$ |
|
19 | ^data$ | |
20 | ^sql_dumps/ |
|
20 | ^sql_dumps/ | |
21 | ^\.settings$ |
|
21 | ^\.settings$ | |
22 | ^\.project$ |
|
22 | ^\.project$ | |
23 | ^\.pydevproject$ |
|
23 | ^\.pydevproject$ | |
24 | ^\.coverage$ |
|
24 | ^\.coverage$ | |
25 | ^kallithea/front-end/node_modules$ |
|
25 | ^kallithea/front-end/node_modules$ | |
26 | ^kallithea/front-end/package-lock\.json$ |
|
26 | ^kallithea/front-end/package-lock\.json$ | |
|
27 | ^kallithea/front-end/theme\.less$ | |||
27 | ^kallithea/front-end/tmp$ |
|
28 | ^kallithea/front-end/tmp$ | |
28 | ^kallithea/public/codemirror$ |
|
29 | ^kallithea/public/codemirror$ | |
29 | ^kallithea/public/css/select2-spinner\.gif$ |
|
30 | ^kallithea/public/css/select2-spinner\.gif$ | |
30 | ^kallithea/public/css/select2\.png$ |
|
31 | ^kallithea/public/css/select2\.png$ | |
31 | ^kallithea/public/css/select2x2\.png$ |
|
32 | ^kallithea/public/css/select2x2\.png$ | |
32 | ^kallithea/public/css/style\.css$ |
|
33 | ^kallithea/public/css/style\.css$ | |
33 | ^kallithea/public/css/style\.css\.map$ |
|
34 | ^kallithea/public/css/style\.css\.map$ | |
34 | ^kallithea/public/js/bootstrap\.js$ |
|
35 | ^kallithea/public/js/bootstrap\.js$ | |
35 | ^kallithea/public/js/dataTables\.bootstrap\.js$ |
|
36 | ^kallithea/public/js/dataTables\.bootstrap\.js$ | |
36 | ^kallithea/public/js/jquery\.atwho\.min\.js$ |
|
37 | ^kallithea/public/js/jquery\.atwho\.min\.js$ | |
37 | ^kallithea/public/js/jquery\.caret\.min\.js$ |
|
38 | ^kallithea/public/js/jquery\.caret\.min\.js$ | |
38 | ^kallithea/public/js/jquery\.dataTables\.js$ |
|
39 | ^kallithea/public/js/jquery\.dataTables\.js$ | |
39 | ^kallithea/public/js/jquery\.flot\.js$ |
|
40 | ^kallithea/public/js/jquery\.flot\.js$ | |
40 | ^kallithea/public/js/jquery\.flot\.selection\.js$ |
|
41 | ^kallithea/public/js/jquery\.flot\.selection\.js$ | |
41 | ^kallithea/public/js/jquery\.flot\.time\.js$ |
|
42 | ^kallithea/public/js/jquery\.flot\.time\.js$ | |
42 | ^kallithea/public/js/jquery\.min\.js$ |
|
43 | ^kallithea/public/js/jquery\.min\.js$ | |
43 | ^kallithea/public/js/select2\.js$ |
|
44 | ^kallithea/public/js/select2\.js$ | |
44 | ^theme\.less$ |
|
|||
45 | ^kallithea\.db$ |
|
45 | ^kallithea\.db$ | |
46 | ^test\.db$ |
|
46 | ^test\.db$ | |
47 | ^Kallithea\.egg-info$ |
|
47 | ^Kallithea\.egg-info$ | |
48 | ^my\.ini$ |
|
48 | ^my\.ini$ | |
49 | ^fabfile.py |
|
49 | ^fabfile.py | |
50 | ^\.idea$ |
|
50 | ^\.idea$ | |
51 | ^\.cache$ |
|
51 | ^\.cache$ | |
52 | ^\.pytest_cache$ |
|
52 | ^\.pytest_cache$ | |
53 | /__pycache__$ |
|
53 | /__pycache__$ |
@@ -1,70 +1,71 b'' | |||||
1 | .. _customization: |
|
1 | .. _customization: | |
2 |
|
2 | |||
3 | ============= |
|
3 | ============= | |
4 | Customization |
|
4 | Customization | |
5 | ============= |
|
5 | ============= | |
6 |
|
6 | |||
7 | There are several ways to customize Kallithea to your needs depending on what |
|
7 | There are several ways to customize Kallithea to your needs depending on what | |
8 | you want to achieve. |
|
8 | you want to achieve. | |
9 |
|
9 | |||
10 |
|
10 | |||
11 | HTML/JavaScript/CSS customization |
|
11 | HTML/JavaScript/CSS customization | |
12 | --------------------------------- |
|
12 | --------------------------------- | |
13 |
|
13 | |||
14 | To customize the look-and-feel of the web interface (for example to add a |
|
14 | To customize the look-and-feel of the web interface (for example to add a | |
15 | company banner or some JavaScript widget or to tweak the CSS style definitions) |
|
15 | company banner or some JavaScript widget or to tweak the CSS style definitions) | |
16 | you can enter HTML code (possibly with JavaScript and/or CSS) directly via the |
|
16 | you can enter HTML code (possibly with JavaScript and/or CSS) directly via the | |
17 | *Admin > Settings > Global > HTML/JavaScript customization |
|
17 | *Admin > Settings > Global > HTML/JavaScript customization | |
18 | block*. |
|
18 | block*. | |
19 |
|
19 | |||
20 |
|
20 | |||
21 | Style sheet customization with Less |
|
21 | Style sheet customization with Less | |
22 | ----------------------------------- |
|
22 | ----------------------------------- | |
23 |
|
23 | |||
24 | Kallithea uses `Bootstrap 3`_ and Less_ for its style definitions. If you want |
|
24 | Kallithea uses `Bootstrap 3`_ and Less_ for its style definitions. If you want | |
25 | to make some customizations, we recommend to do so by creating a ``theme.less`` |
|
25 | to make some customizations, we recommend to do so by creating a ``theme.less`` | |
26 |
file. When you create a file named ``theme.less`` in |
|
26 | file. When you create a file named ``theme.less`` in directory | |
27 | directory, you can use this file to override the default style. For example, |
|
27 | ``kallithea/front-end/`` inside the Kallithea installation, you can use this | |
28 | you can use this to override ``@kallithea-theme-main-color``, |
|
28 | file to override the default style. For example, you can use this to override | |
29 |
``@kallithea-logo-url`` or other `Bootstrap |
|
29 | ``@kallithea-theme-main-color``, ``@kallithea-logo-url`` or other `Bootstrap | |
|
30 | variables`_. | |||
30 |
|
31 | |||
31 | After creating the ``theme.less`` file, you need to regenerate the CSS files, by |
|
32 | After creating the ``theme.less`` file, you need to regenerate the CSS files, by | |
32 | running:: |
|
33 | running:: | |
33 |
|
34 | |||
34 | kallithea-cli front-end-build --no-install-deps |
|
35 | kallithea-cli front-end-build --no-install-deps | |
35 |
|
36 | |||
36 | .. _bootstrap 3: https://getbootstrap.com/docs/3.3/ |
|
37 | .. _bootstrap 3: https://getbootstrap.com/docs/3.3/ | |
37 | .. _bootstrap variables: https://getbootstrap.com/docs/3.3/customize/#less-variables |
|
38 | .. _bootstrap variables: https://getbootstrap.com/docs/3.3/customize/#less-variables | |
38 | .. _less: http://lesscss.org/ |
|
39 | .. _less: http://lesscss.org/ | |
39 |
|
40 | |||
40 |
|
41 | |||
41 | Behavioral customization: rcextensions |
|
42 | Behavioral customization: rcextensions | |
42 | -------------------------------------- |
|
43 | -------------------------------------- | |
43 |
|
44 | |||
44 | Some behavioral customization can be done in Python using ``rcextensions``, a |
|
45 | Some behavioral customization can be done in Python using ``rcextensions``, a | |
45 | custom Python package that can extend Kallithea functionality. |
|
46 | custom Python package that can extend Kallithea functionality. | |
46 |
|
47 | |||
47 | With ``rcextensions`` it's possible to add additional mappings for Whoosh |
|
48 | With ``rcextensions`` it's possible to add additional mappings for Whoosh | |
48 | indexing and statistics, to add additional code into the push/pull/create/delete |
|
49 | indexing and statistics, to add additional code into the push/pull/create/delete | |
49 | repository hooks (for example to send signals to build bots such as Jenkins) and |
|
50 | repository hooks (for example to send signals to build bots such as Jenkins) and | |
50 | even to monkey-patch certain parts of the Kallithea source code (for example |
|
51 | even to monkey-patch certain parts of the Kallithea source code (for example | |
51 | overwrite an entire function, change a global variable, ...). |
|
52 | overwrite an entire function, change a global variable, ...). | |
52 |
|
53 | |||
53 | To generate a skeleton extensions package, run:: |
|
54 | To generate a skeleton extensions package, run:: | |
54 |
|
55 | |||
55 | kallithea-cli extensions-create -c my.ini |
|
56 | kallithea-cli extensions-create -c my.ini | |
56 |
|
57 | |||
57 | This will create an ``rcextensions`` package next to the specified ``ini`` file. |
|
58 | This will create an ``rcextensions`` package next to the specified ``ini`` file. | |
58 | See the ``__init__.py`` file inside the generated ``rcextensions`` package |
|
59 | See the ``__init__.py`` file inside the generated ``rcextensions`` package | |
59 | for more details. |
|
60 | for more details. | |
60 |
|
61 | |||
61 |
|
62 | |||
62 | Behavioral customization: code changes |
|
63 | Behavioral customization: code changes | |
63 | -------------------------------------- |
|
64 | -------------------------------------- | |
64 |
|
65 | |||
65 | As Kallithea is open-source software, you can make any changes you like directly |
|
66 | As Kallithea is open-source software, you can make any changes you like directly | |
66 | in the source code. |
|
67 | in the source code. | |
67 |
|
68 | |||
68 | We encourage you to send generic improvements back to the |
|
69 | We encourage you to send generic improvements back to the | |
69 | community so that Kallithea can become better. See :ref:`contributing` for more |
|
70 | community so that Kallithea can become better. See :ref:`contributing` for more | |
70 | details. |
|
71 | details. |
General Comments 0
You need to be logged in to leave comments.
Login now