Преглед изворни кода

[add]

モックアップを元にHTMLとSCSSを追加
poohr пре 3 недеља
родитељ
комит
b8acdf78e2
2 измењених фајлова са 502 додато и 1 уклоњено
  1. 143
    1
      src/app/pages/search/search.html
  2. 359
    0
      src/app/pages/search/search.scss

+ 143
- 1
src/app/pages/search/search.html Прегледај датотеку

@@ -1 +1,143 @@
1
-<p>search works!</p>
1
+<app-header></app-header>
2
+
3
+<div class="breadcrumb">
4
+  ホーム &gt; まとめて検索
5
+</div>
6
+
7
+<div class="search-page">
8
+  <app-side-menu></app-side-menu>
9
+
10
+  <main class="search-main">
11
+    <section class="search-panel">
12
+      <div class="page-title-row">
13
+        <h1>まとめて検索</h1>
14
+
15
+        <div class="top-action-list">
16
+          <button type="button" class="top-button" onclick="history.back()">
17
+            戻る
18
+          </button>
19
+
20
+          <a routerLink="/" class="top-button">
21
+            ホーム
22
+          </a>
23
+        </div>
24
+      </div>
25
+
26
+      <section class="search-condition-area">
27
+        <div class="search-input-row">
28
+          <div class="search-input-box">
29
+            <span class="search-icon">⌕</span>
30
+            <input type="text" [(ngModel)]="searchKeyword"
31
+                   placeholder="さとう / 佐藤 / 釈 / 2024 / 母 / 三回忌"
32
+                   (keydown.enter)="searchAll()"/>
33
+          </div>
34
+          <button type="button" class="search-button" (click)="searchAll()">
35
+            検索
36
+          </button>
37
+          <button type="button" class="filter-button-main">
38
+            条件を絞る
39
+          </button>
40
+          <a routerLink="/danka-list" class="back-list-button">
41
+            一覧へ戻る
42
+          </a>
43
+        </div>
44
+
45
+        <div class="search-filter-list">
46
+          @for (filter of searchTypeFilters; track filter.value) {
47
+            <button
48
+              type="button"
49
+              class="search-filter-button"
50
+              [class.active]="selectedSearchType === filter.value"
51
+              (click)="selectedSearchType = filter.value; searchAll()"
52
+            >
53
+              {{ filter.label }}
54
+            </button>
55
+          }
56
+        </div>
57
+      </section>
58
+
59
+      <section class="search-result-panel">
60
+        <h2>検索結果 {{ totalResultCount }} 件</h2>
61
+
62
+        @if (totalResultCount > 0) {
63
+          @if (dankaResults.length > 0) {
64
+            <section class="result-group">
65
+              <h3>檀家(世帯)</h3>
66
+
67
+              @for (danka of dankaResults; track danka.id) {
68
+                <a class="result-row danka-result-row"
69
+                   [routerLink]="['/danka-detail', danka.id]">
70
+                  <div class="result-main-text">
71
+                    {{ danka.householdName }}
72
+                  </div>
73
+                  <div>
74
+                    世帯主: {{ danka.householder }}
75
+                  </div>
76
+                  <div>
77
+                    住所: {{ danka.address }}
78
+                  </div>
79
+                  <div class="result-link-text">
80
+                    開く
81
+                  </div>
82
+                </a>
83
+              }
84
+            </section>
85
+          }
86
+
87
+          @if (familyResults.length > 0) {
88
+            <section class="result-group">
89
+              <h3>家族</h3>
90
+              @for (family of familyResults; track family.id) {
91
+                <a class="result-row family-result-row"
92
+                   [routerLink]="['/danka', family.dankaId, 'family', family.id, 'edit']">
93
+                  <div class="result-main-text">
94
+                    {{ family.name }}
95
+                  </div>
96
+                  <div>
97
+                    ふりがな: {{ family.furigana }}
98
+                  </div>
99
+                  <div>
100
+                    関係: {{ family.relationship }}
101
+                  </div>
102
+                  <div>
103
+                    生年月日: {{ family.birthDate || '未登録' }}
104
+                  </div>
105
+                </a>
106
+              }
107
+            </section>
108
+          }
109
+
110
+          @if (kakochoResults.length > 0) {
111
+            <section class="result-group">
112
+              <h3>過去帳</h3>
113
+
114
+              @for (kakocho of kakochoResults; track kakocho.id) {
115
+                <a class="result-row kakocho-result-row"
116
+                   [routerLink]="['/danka-detail', kakocho.dankaId]"
117
+                   [queryParams]="{ tab: 'kakocho' }">
118
+                  <div class="result-main-text">
119
+                    {{ kakocho.kaimyo }}
120
+                  </div>
121
+                  <div>
122
+                    俗名: {{ kakocho.name }}
123
+                  </div>
124
+                  <div>
125
+                    没年月日: {{ kakocho.deathDate }}
126
+                  </div>
127
+                  <div>
128
+                    {{ kakocho.note || '備考なし' }}
129
+                  </div>
130
+                </a>
131
+              }
132
+            </section>
133
+          }
134
+        } @else {
135
+          <div class="empty-result">
136
+            検索結果はありません。
137
+          </div>
138
+        }
139
+      </section>
140
+    </section>
141
+  </main>
142
+</div>
143
+

+ 359
- 0
src/app/pages/search/search.scss Прегледај датотеку

@@ -0,0 +1,359 @@
1
+:host {
2
+  position: relative;
3
+  display: block;
4
+  min-height: 100vh;
5
+  background: #f4eee4;
6
+  color: #2f2720;
7
+}
8
+
9
+.breadcrumb {
10
+  position: absolute;
11
+  top: 28px;
12
+  left: 50%;
13
+  transform: translateX(-50%);
14
+  color: #7b6b5c;
15
+  font-size: 14px;
16
+  z-index: 2;
17
+}
18
+
19
+.search-page {
20
+  display: flex;
21
+  align-items: flex-start;
22
+  gap: 8px;
23
+  background: #f4eee4;
24
+}
25
+
26
+.search-main {
27
+  flex: 1;
28
+  padding-right: 34px;
29
+  box-sizing: border-box;
30
+}
31
+
32
+.search-panel {
33
+  min-height: 650px;
34
+  padding: 26px 34px 36px;
35
+  background: #ffffff;
36
+  border: 2px solid #d8caba;
37
+  border-radius: 76px;
38
+  box-sizing: border-box;
39
+}
40
+
41
+.page-title-row {
42
+  display: flex;
43
+  justify-content: space-between;
44
+  align-items: flex-start;
45
+  gap: 24px;
46
+}
47
+
48
+.page-title-row h1 {
49
+  margin: 0;
50
+  color: #2f2720;
51
+  font-size: 32px;
52
+  line-height: 1.2;
53
+  font-weight: 800;
54
+  letter-spacing: 0.02em;
55
+}
56
+
57
+.top-action-list {
58
+  display: flex;
59
+  gap: 8px;
60
+}
61
+
62
+.top-button {
63
+  width: 92px;
64
+  height: 36px;
65
+  border: 2px solid #d8caba;
66
+  border-radius: 6px;
67
+  background: #ffffff;
68
+  color: #2f2720;
69
+  font-size: 15px;
70
+  font-weight: 800;
71
+  text-decoration: none;
72
+  display: flex;
73
+  align-items: center;
74
+  justify-content: center;
75
+  box-sizing: border-box;
76
+  cursor: pointer;
77
+}
78
+
79
+.top-button:hover {
80
+  background: #f6efe6;
81
+}
82
+
83
+.search-condition-area {
84
+  margin-top: 8px;
85
+}
86
+
87
+.search-input-row {
88
+  display: grid;
89
+  grid-template-columns: minmax(0, 1fr) 120px 140px 150px;
90
+  gap: 18px;
91
+  align-items: center;
92
+}
93
+
94
+.search-input-box {
95
+  height: 56px;
96
+  border: 2px solid #d8caba;
97
+  border-radius: 8px;
98
+  background: #fffdf9;
99
+  display: flex;
100
+  align-items: center;
101
+  padding: 0 16px;
102
+  box-sizing: border-box;
103
+}
104
+
105
+.search-icon {
106
+  width: 30px;
107
+  color: #7b6b5c;
108
+  font-size: 24px;
109
+  font-weight: 800;
110
+}
111
+
112
+.search-input-box input {
113
+  width: 100%;
114
+  border: none;
115
+  outline: none;
116
+  background: transparent;
117
+  color: #2f2720;
118
+  font-size: 18px;
119
+  font-family: inherit;
120
+}
121
+
122
+.search-input-box input::placeholder {
123
+  color: #7b6b5c;
124
+}
125
+
126
+.search-button,
127
+.filter-button-main,
128
+.back-list-button {
129
+  height: 56px;
130
+  border-radius: 8px;
131
+  font-size: 18px;
132
+  font-weight: 800;
133
+  cursor: pointer;
134
+  box-sizing: border-box;
135
+}
136
+
137
+.search-button {
138
+  border: 2px solid #8a6543;
139
+  background: #8a6543;
140
+  color: #ffffff;
141
+}
142
+
143
+.search-button:hover {
144
+  background: #765639;
145
+}
146
+
147
+.filter-button-main,
148
+.back-list-button {
149
+  border: 2px solid #d8caba;
150
+  background: #ffffff;
151
+  color: #2f2720;
152
+  text-decoration: none;
153
+  display: flex;
154
+  align-items: center;
155
+  justify-content: center;
156
+}
157
+
158
+.filter-button-main:hover,
159
+.back-list-button:hover {
160
+  background: #f6efe6;
161
+}
162
+
163
+.search-filter-list {
164
+  display: flex;
165
+  flex-wrap: wrap;
166
+  gap: 8px;
167
+  margin-top: 16px;
168
+}
169
+
170
+.search-filter-button {
171
+  min-width: 120px;
172
+  height: 38px;
173
+  padding: 0 18px;
174
+  border: 2px solid #d8caba;
175
+  border-radius: 6px;
176
+  background: #f1e7d8;
177
+  color: #2f2720;
178
+  font-size: 15px;
179
+  font-weight: 700;
180
+  cursor: pointer;
181
+  box-sizing: border-box;
182
+}
183
+
184
+.search-filter-button:hover {
185
+  background: #eadfce;
186
+}
187
+
188
+.search-filter-button.active {
189
+  background: #8a6543;
190
+  border-color: #8a6543;
191
+  color: #ffffff;
192
+}
193
+
194
+.search-result-panel {
195
+  margin-top: 16px;
196
+  padding: 28px 28px 34px;
197
+  border: 2px solid #d8caba;
198
+  border-radius: 62px;
199
+  background: #fffdf9;
200
+  box-sizing: border-box;
201
+}
202
+
203
+.search-result-panel h2 {
204
+  margin: 0 0 12px;
205
+  color: #2f2720;
206
+  font-size: 24px;
207
+  font-weight: 800;
208
+}
209
+
210
+.result-group {
211
+  margin-top: 16px;
212
+}
213
+
214
+.result-group h3 {
215
+  margin: 0 0 6px;
216
+  color: #6f6257;
217
+  font-size: 17px;
218
+  font-weight: 800;
219
+}
220
+
221
+.result-row {
222
+  min-height: 56px;
223
+  margin-top: 6px;
224
+  padding: 0 12px;
225
+  border: 2px solid #d8caba;
226
+  border-radius: 8px;
227
+  background: #ffffff;
228
+  color: #2f2720;
229
+  text-decoration: none;
230
+  display: grid;
231
+  align-items: center;
232
+  column-gap: 18px;
233
+  box-sizing: border-box;
234
+}
235
+
236
+.result-row:hover {
237
+  background: #f6efe6;
238
+}
239
+
240
+.danka-result-row {
241
+  grid-template-columns: 1.1fr 1.4fr 1.8fr 80px;
242
+}
243
+
244
+.family-result-row {
245
+  grid-template-columns: 1.1fr 1.6fr 1.2fr 1.6fr;
246
+}
247
+
248
+.kakocho-result-row {
249
+  grid-template-columns: 1.2fr 1.4fr 1.4fr 1.2fr;
250
+}
251
+
252
+.result-main-text {
253
+  font-weight: 800;
254
+}
255
+
256
+.result-link-text {
257
+  color: #3f6f45;
258
+  font-weight: 800;
259
+}
260
+
261
+.empty-result {
262
+  min-height: 72px;
263
+  padding: 22px;
264
+  border: 2px solid #d8caba;
265
+  border-radius: 10px;
266
+  background: #ffffff;
267
+  color: #7b6b5c;
268
+  font-size: 16px;
269
+  font-weight: 700;
270
+  box-sizing: border-box;
271
+}
272
+
273
+.inside-note {
274
+  margin: 16px 0 0;
275
+  color: #7b6b5c;
276
+  font-size: 14px;
277
+}
278
+
279
+.bottom-note {
280
+  width: 700px;
281
+  margin: 18px 0 22px 36px;
282
+  padding: 4px 12px;
283
+  border: 2px solid #d8caba;
284
+  border-radius: 4px;
285
+  background: #eadfce;
286
+  color: #7b6b5c;
287
+  font-size: 14px;
288
+  box-sizing: border-box;
289
+}
290
+
291
+@media (max-width: 1100px) {
292
+  .search-input-row {
293
+    grid-template-columns: 1fr 120px;
294
+  }
295
+
296
+  .filter-button-main,
297
+  .back-list-button {
298
+    width: 100%;
299
+  }
300
+
301
+  .search-result-panel {
302
+    border-radius: 36px;
303
+  }
304
+
305
+  .result-row {
306
+    overflow-x: auto;
307
+  }
308
+
309
+  .danka-result-row,
310
+  .family-result-row,
311
+  .kakocho-result-row {
312
+    min-width: 860px;
313
+  }
314
+}
315
+
316
+@media (max-width: 800px) {
317
+  .breadcrumb {
318
+    position: static;
319
+    transform: none;
320
+    padding: 16px 20px 0;
321
+  }
322
+
323
+  .search-page {
324
+    flex-direction: column;
325
+  }
326
+
327
+  .search-main {
328
+    width: 100%;
329
+    padding: 16px 20px 32px;
330
+  }
331
+
332
+  .search-panel {
333
+    padding: 24px 20px 30px;
334
+    border-radius: 32px;
335
+  }
336
+
337
+  .page-title-row {
338
+    flex-direction: column;
339
+  }
340
+
341
+  .page-title-row h1 {
342
+    font-size: 26px;
343
+  }
344
+
345
+  .search-input-row {
346
+    grid-template-columns: 1fr;
347
+    gap: 10px;
348
+  }
349
+
350
+  .search-filter-button {
351
+    flex: 1;
352
+    min-width: 100px;
353
+  }
354
+
355
+  .bottom-note {
356
+    width: auto;
357
+    margin: 10px 20px 22px;
358
+  }
359
+}

Loading…
Откажи
Сачувај