Skip to content

Commit b0d9cfa

Browse files
committed
Initial commit
1 parent 0739e2f commit b0d9cfa

File tree

5 files changed

+23
-42
lines changed

5 files changed

+23
-42
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
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)

img.png

72.3 KB
Loading

img_1.png

24.2 KB
Loading

pom.xml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,14 @@
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>

src/main/resources/static/index.html

Lines changed: 6 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -2,46 +2,13 @@
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">&times;</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>

0 commit comments

Comments
 (0)