teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

1

homeLayout.htmlの追加

2020/07/30 04:25

投稿

Rivermouth
Rivermouth

スコア19

title CHANGED
File without changes
body CHANGED
@@ -106,6 +106,63 @@
106
106
 
107
107
  ```
108
108
 
109
+ ## homeLayout.html
110
+ ```HTML
111
+ <!DOCTYPE html>
112
+ <html xmlns:th="http://www.thymeleaf.org"
113
+ xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout">
114
+
115
+ <head>
116
+ <meta charset="UTF-8"></meta>
117
+
118
+ <!-- Bootstrapの設定 -->
119
+ <link th:href="@{/webjars/bootstrap/3.3.7-1/css/bootstrap.min.css}" rel="stylesheet"></link>
120
+ <script th:src="@{/webjars/jquery/1.11.1/jquery.min.js}"></script>
121
+ <script th:src="@{/webjars/bootstrap/3.3.7-1/js/bootstrap.min.js}"></script>
122
+
123
+ <!-- CSSの読込 -->
124
+ <link th:href="@{/css/home.css}" rel="stylesheet"></link>
125
+
126
+ <title>Home</title>
127
+ </head>
128
+ <body>
129
+ <!-- ===== ヘッダー(ナビゲーションバー) ===== -->
130
+ <nav class="navbar navbar-inverse navbar-fixed-top">
131
+ <div class="container-fluid">
132
+ <div class="navbar-header">
133
+ <a class="navbar-brand" href="#">SpringSample</a>
134
+ </div>
135
+ <form method="post" th:action="@{/logout}">
136
+ <button class="btn btn-link pull-right navbar-brand" type="submit">
137
+ ログアウト
138
+ </button>
139
+ </form>
140
+ </div>
141
+ </nav>
142
+ <!-- ===== サイドバー ===== -->
143
+ <div class="container-fluid">
144
+ <div class="row">
145
+ <div class="col-sm-2 sidebar">
146
+ <ul class="nav nav-pills nav-stacked">
147
+ <li role="presentation">
148
+ <a th:href="@{'/userList'}">ユーザ管理</a>
149
+ </li>
150
+ </ul>
151
+ </div>
152
+ </div>
153
+ </div>
154
+ <!-- ===== コンテンツ ===== -->
155
+ <div class="container-fluid">
156
+ <div class="row">
157
+ <div class="col-sm-10 col-sm-offset-2 main">
158
+ <div th:include="__${contents}__"></div>
159
+ </div>
160
+ </div>
161
+ </div>
162
+ </body>
163
+ </html>
164
+ ```
165
+
109
166
  文字数制限の関係で全てのクラスやHTMLファイルを載せることはできないのですが、不明点などがあればコメントをお願いいたします。
110
167
 
111
168
  よろしくお願い致します。