Proyectos de Subversion Moodle

Rev

Rev 1 | | Comparar con el anterior | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
Description of Twitter bootstrap import into Moodle
2
 
3
Twitter bootstrap
4
-----------------
5
 
6
Sass:
7
This theme uses Bootstrap frontend toolkit.
8
The Bootstrap repository is available on:
9
 
10
https://github.com/twbs/bootstrap
11
 
12
To update to the latest release of twitter bootstrap:
13
 
1441 ariadna 14
* download bootstrap source files to your home folder
1 efrain 15
* remove folder theme/boost/scss/bootstrap
16
* copy the scss files from ~/bootstrap/scss to theme/boost/scss/bootstrap
17
* update ./thirdpartylibs.xml
18
* follow the instructions in admin/tool/component_library/readme_moodle.txt to update the Bootstrap documentation there.
19
 
20
Javascript:
21
 
22
* remove folder theme/boost/amd/src/bootstrap
23
* copy the js files from ~/bootstrap/js/src to theme/boost/amd/src/bootstrap (including the subfolder)
24
* copy index.js from ~/bootstrap/js to theme/boost/amd/src
25
* edit theme/boost/amd/src/index.js and update import path (src -> bootstrap)
26
* Moodle core includes the popper.js library, make sure each of the new Bootstrap js files
1441 ariadna 27
includes the 'core/popper2' library instead of 'popperjs'. For current version these files were: tooltip.js and dropdown.js
28
* Fix all Boostrap JS files import paths to use the correct AMD module names. For example, change:
29
    import Manipulator from '../dom/manipulator.js'
30
        to:
31
    import Manipulator from '../dom/manipulator'
32
* update ./thirdpartylibs.xml
1 efrain 33
* run "grunt ignorefiles" to prevent linting errors appearing from the new Bootstrap js files.
34
* in folder theme/boost run "grunt amd" to compile the bootstrap JS
35
* in folder theme/boost run "grunt css" to compile scss