Skip to content

Commit d02aa92

Browse files
committed
feat(web): Add offcanvas view fragment and controller
1 parent 999bbe9 commit d02aa92

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package dev.ikm.server.cosmos.webapp;
2+
3+
import org.springframework.stereotype.Controller;
4+
import org.springframework.ui.Model;
5+
import org.springframework.web.bind.annotation.GetMapping;
6+
7+
@Controller
8+
public class ViewController {
9+
10+
@GetMapping("/view")
11+
public String home(Model model) {
12+
return "fragments/view :: view";
13+
}
14+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<!DOCTYPE html>
2+
<html xmlns:th="http://www.thymeleaf.org">
3+
<body>
4+
5+
<div class="offcanvas offcanvas-start" data-bs-scroll="true" tabindex="-1" id="viewOffCanvas" th:fragment="view">
6+
<div class="offcanvas-header">
7+
<h5 class="offcanvas-title" id="offcanvasWithBothOptionsLabel">Backdrop with scrolling</h5>
8+
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" aria-label="Close"></button>
9+
</div>
10+
<div class="offcanvas-body">
11+
<p>Try scrolling the rest of the page to see this option in action.</p>
12+
</div>
13+
</div>
14+
15+
</body>
16+
</html>

0 commit comments

Comments
 (0)