File tree Expand file tree Collapse file tree 5 files changed +23
-42
lines changed
src/main/resources/static Expand file tree Collapse file tree 5 files changed +23
-42
lines changed Original file line number Diff line number Diff line change 1+ # SpringBoot + DBUX
2+
3+ This is a simple example how to use DBUX npm libraries with SpringBoot.
4+
5+ You need to add npm packages to [ webjars] ( https://www.webjars.org/ ) via "Add web jar" button:
6+ ![ img.png] ( img.png )
7+
8+ Select `` npm `` and paste the name of the npm library into the input (in this example ` @db-ui/components ` ) and select a version. Press "Deploy!" afterward:
9+ ![ img_1.png] ( img_1.png )
Original file line number Diff line number Diff line change 3030 <artifactId >spring-boot-starter-web</artifactId >
3131 </dependency >
3232 <dependency >
33- <groupId >org.webjars</groupId >
34- <artifactId >bootstrap</artifactId >
35- <version >2.1.1</version >
33+ <groupId >org.webjars.npm</groupId >
34+ <artifactId >db-ui__foundations</artifactId >
35+ <version >0.4.4</version >
36+ </dependency >
37+ <dependency >
38+ <groupId >org.webjars.npm</groupId >
39+ <artifactId >db-ui__components</artifactId >
40+ <version >0.4.4</version >
3641 </dependency >
3742 <dependency >
3843 <groupId >org.webjars</groupId >
Original file line number Diff line number Diff line change 22< html >
33< head >
44 < title > Play2 WebJars Demo</ title >
5- < link rel ='stylesheet ' media ='screen ' href ='/webjars/bootstrap/css/bootstrap.min.css '>
6- < script type ='text/javascript ' src ='/webjars/jquery/jquery.min.js '> </ script >
7- < script type ='text/javascript ' src ='/webjars/bootstrap/js/bootstrap.min.js '> </ script >
8- < style type ="text/css ">
9- body {
10- margin-top : 50px ;
11- }
12- </ style >
13- < script type ="text/javascript ">
14- $ ( function ( ) {
15- $ ( "#showModalButton" ) . bind ( 'click' , function ( event ) {
16- $ ( '#myModal' ) . modal ( )
17- } )
18- } )
19- </ script >
5+ < link rel ='stylesheet ' media ='screen ' href ='/webjars/db-ui__components/build/styles/db-ui-42.css '>
206</ head >
217< body >
22- < div class ="navbar navbar-fixed-top ">
23- < div class ="navbar-inner ">
24- < div class ="container-fluid ">
25- < a id ="titleLink " class ="brand " href ="/ "> hello, bootstrap</ a >
26- </ div >
27- </ div >
28- </ div >
29-
30- < div class ="container ">
31- < button id ="showModalButton " class ="btn btn-primary btn-large "> < i class ="icon-exclamation-sign icon-white "> </ i > Show a Modal</ button >
32- </ div >
33-
34- < div id ="myModal " class ="modal hide fade ">
35- < div class ="modal-header ">
36- < button class ="close " data-dismiss ="modal "> ×</ button >
37- < h3 > This is a Modal</ h3 >
38- </ div >
39- < div class ="modal-body ">
40- < p > Bootstrap depends on jQuery. So when you specify Bootstrap as a dependency you get jQuery too.</ p >
41- </ div >
42- < div class ="modal-footer ">
43- < a href ="# " class ="btn " data-dismiss ="modal "> Close</ a >
44- </ div >
45- </ div >
8+ < main >
9+ < h1 > Test</ h1 >
10+ < div data-icon ="person "> Test</ div >
11+ < button class ="db-button "> Test</ button >
12+ </ main >
4613</ body >
4714</ html >
You can’t perform that action at this time.
0 commit comments