-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathflow.vue
1534 lines (1504 loc) · 39 KB
/
flow.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<template>
<div>
<div :class="$style.title" class="title">
<covid-icon aria-hidden="true" />
<page-header :class="$style.text" class="text">
{{ $t('新型コロナウイルス感染症が心配なときに') }}
</page-header>
<printer-button :wrapper-class="$style.printerButton" to="/print/flow" />
</div>
<div :class="$style.container" class="container">
<h3 :class="$style.conHeading" class="conHeading">
{{ $t('新型コロナウイルス感染症にかかる相談窓口について') }}
</h3>
<p ref="upperTrigger" :class="$style.anchorLead" class="anchorLead">
{{ $t('相談方法は、症状や状況別で3つに分かれます') }}
</p>
<nav ref="nav" :class="$style.anchor" class="anchor">
<ul :class="$style.anchorList" class="anchorList">
<li :class="$style.anchorItem" class="anchorItem">
<a
href="#sydr"
:class="$style.anchorLink"
class="anchorLink"
@click.prevent="onClickAnchor"
>
<span>{{ $t('かかりつけ医がいて症状のある方') }}</span>
<fig-cond-sy-dr
:class="$style.fig"
class="fig"
aria-hidden="true"
/>
</a>
</li>
<li :class="$style.anchorItem" class="anchorItem">
<a
href="#sy"
:class="$style.anchorLink"
class="anchorLink"
@click.prevent="onClickAnchor"
>
<span>{{ $t('かかりつけ医がいない症状のある方') }}</span>
<fig-cond-sy :class="$style.fig" class="fig" aria-hidden="true" />
</a>
</li>
<li :class="$style.anchorItem" class="anchorItem">
<a
href="#anx"
:class="$style.anchorLink"
class="anchorLink"
@click.prevent="onClickAnchor"
>
<span>{{ $t('不安に思う方') }}</span>
<fig-cond-anx
:class="$style.fig"
class="fig"
aria-hidden="true"
/>
</a>
</li>
</ul>
</nav>
<div id="sydr" :class="$style.section" class="section">
<h4 :class="$style.sxnHeading" class="sxnHeading">
{{ $t('かかりつけ医がいて、次の症状がある方') }}
</h4>
<ul :class="$style.boxes" class="boxes">
<li :class="[$style.box, $style.border]" class="box border">
<i18n
path="発熱や咳などの{minorSymptom}がある"
:class="$style.boxLead"
class="boxLead"
>
<template v-slot:minorSymptom>
<span :class="$style.underline" class="underline">
{{ $t('比較的軽い風邪の症状') }}
</span>
</template>
</i18n>
<span :class="$style.alignLeft" class="alignLeft">{{
$t(
'妊娠中の方、重症化しやすい方(高齢者、糖尿病、心不全、呼吸器疾患(COPD等)等の基礎疾患がある方や透析を受けている方、免疫抑制剤や抗がん剤等を用いている方)はすぐに、それ以外の方は症状が4日以上続いた場合は必ず、相談してください。'
)
}}</span>
</li>
<li :class="[$style.box, $style.border]" class="box border">
<i18n
path="息苦しさ(呼吸困難)、強いだるさ(倦怠感)、高熱等の{majorSymptom}がある"
:class="$style.boxLead"
class="boxLead"
>
<template v-slot:majorSymptom>
<span :class="$style.underline" class="underline">
{{ $t('強い症状') }}
</span>
</template>
</i18n>
<span :class="$style.alignLeft" class="alignLeft">{{
$t(
'症状には個人差がありますので、強い症状と思う場合にはすぐに相談してください。解熱剤などを飲み続けなければならない方も同様です。'
)
}}</span>
</li>
</ul>
<p :class="[$style.box, $style.bgYellow]" class="box bgYellow">
<span :class="$style.large" class="large">{{
$t('日ごろ受診されている医療機関に電話でご相談ください。')
}}</span>
<span :class="$style.small" class="small">{{
$t(
'(上記の症状がない場合も、不安に思う方は、日ごろ受診されている医療機関に電話でご相談ください。)'
)
}}</span>
</p>
</div>
<div id="sy" :class="$style.section" class="section">
<h4 :class="$style.sxnHeading" class="sxnHeading">
{{ $t('かかりつけ医がいない、次の症状がある方') }}
</h4>
<ul :class="$style.boxes" class="boxes">
<li :class="[$style.box, $style.border]" class="box border">
<i18n
path="発熱や咳などの{minorSymptom}がある"
:class="$style.boxLead"
class="boxLead"
>
<template v-slot:minorSymptom>
<span :class="$style.underline" class="underline">
{{ $t('比較的軽い風邪の症状') }}
</span>
</template>
</i18n>
<span :class="$style.alignLeft" class="alignLeft">{{
$t(
'妊娠中の方、重症化しやすい方(高齢者、糖尿病、心不全、呼吸器疾患(COPD等)等の基礎疾患がある方や透析を受けている方、免疫抑制剤や抗がん剤等を用いている方)はすぐに、それ以外の方は症状が4日以上続いた場合は必ず、相談してください。'
)
}}</span>
</li>
<li :class="[$style.box, $style.border]" class="box border">
<i18n
path="息苦しさ(呼吸困難)、強いだるさ(倦怠感)、高熱等の{majorSymptom}がある"
:class="$style.boxLead"
class="boxLead"
>
<template v-slot:majorSymptom>
<span :class="$style.underline" class="underline">
{{ $t('強い症状') }}
</span>
</template>
</i18n>
<span :class="$style.alignLeft" class="alignLeft">{{
$t(
'症状には個人差がありますので、強い症状と思う場合にはすぐに相談してください。解熱剤などを飲み続けなければならない方も同様です。'
)
}}</span>
</li>
</ul>
<div :class="[$style.box, $style.bgGray]" class="box bgGray">
<h5 :class="$style.boxHeading" class="boxHeading">
{{ $t('新型コロナ受診相談窓口') }}
</h5>
<dl :class="$style.contact" class="contact">
<div>
<dt>{{ $t('平日:') }}</dt>
<dd
:class="$style.overrideExternalLink"
class="overrideExternalLink"
>
<i18n path="{publicHealthCenter}に掲載しています">
<template v-slot:publicHealthCenter>
<AppLink to="https://www.pref.okayama.jp/page/648845.html">
{{ $t('各保健所の電話番号は岡山県公式HP') }}
</AppLink>
</template>
</i18n>
</dd>
</div>
<div>
<dt>
{{ $t('土日祝:') }}
</dt>
<dd>
{{ $t('留守番電話に繋がります') }}
{{
$t(
'(岡山市保健所と倉敷市保健所は午前9時から午後17時まで受付)'
)
}}
</dd>
</div>
</dl>
</div>
<p :class="[$style.sxnText, $style.hr]" class="sxnText hr">
{{
$t(
'上記の症状に当てはまらない方は、新型コロナコールセンターにご相談ください。'
)
}}
</p>
<div :class="[$style.box, $style.bgGray]" class="box bgGray">
<h5 :class="$style.boxHeading" class="boxHeading">
{{ $t('新型コロナコールセンター') }}
</h5>
<dl :class="$style.contact" class="contact">
<dt>{{ $t('24時間対応') }}</dt>
<dd>
<a :class="$style.tel" class="tel" href="tel:086-226-7877">
<icon-phone
:class="$style.icon"
class="icon"
aria-hidden="true"
/>
086-226-7877</a
>
</dd>
</dl>
<p :class="$style.notice" class="notice">
{{
$t(
'電話のおかけ間違いが多くなっております。発信の際は今一度電話番号をお確かめの上、お間違えのないようお願いいたします。'
)
}}
</p>
</div>
</div>
<div id="anx" ref="lowerTrigger" :class="$style.section" class="section">
<h4 :class="$style.sxnHeading" class="sxnHeading">
{{ $t('不安に思う方') }}
</h4>
<p :class="$style.sxnText" class="sxnText">
{{
$t(
'感染したかもしれないと不安に思う方、感染予防法を知りたい方などは、下記、新型コロナコールセンターにご相談ください。'
)
}}
</p>
<div :class="[$style.box, $style.bgGray]" class="box bgGray">
<h5 :class="$style.boxHeading" class="boxHeading">
{{ $t('新型コロナコールセンター') }}
</h5>
<dl :class="$style.contact" class="contact">
<dt>{{ $t('24時間対応') }}</dt>
<dd>
<a :class="$style.tel" class="tel" href="tel:086-226-7877">
<icon-phone
:class="$style.icon"
class="icon"
aria-hidden="true"
/>
086-226-7877</a
>
</dd>
</dl>
<p :class="$style.notice" class="notice">
{{
$t(
'電話のおかけ間違いが多くなっております。発信の際は今一度電話番号をお確かめの上、お間違えのないようお願いいたします。'
)
}}
</p>
</div>
</div>
<div :class="[$style.section, $style.yellow]" class="section yellow">
<h4 :class="$style.sxnHeadingSmall" class="sxnHeadingSmall">
{{
$t(
'新型コロナ受診相談窓口、またはかかりつけ医によって新型コロナ外来(帰国者・接触者外来)またはPCR検査センターの受診が必要だと判断された方'
)
}}
</h4>
<p :class="[$style.box, $style.bgGray]" class="box bgGray">
<span :class="$style.large" class="large">{{
$t('医師が検査の必要性を判断いたします。')
}}</span>
<span>{{
$t(
'マスクをして公共交通機関をできるだけ使わずに受診をしてください。'
)
}}</span>
</p>
<h4 :class="$style.sxnHeadingSmall" class="sxnHeadingSmall">
{{ $t('医師により検査が必要だと判断されPCR検査を受けた結果') }}
</h4>
<div :class="$style.boxes" class="boxes">
<div :class="[$style.box, $style.border]" class="box border">
<h5 :class="$style.boxLead" class="boxLead">
{{ $t('陽性の場合') }}
</h5>
<p>
{{
$t(
'感染症指定医療機関等への入院、又は宿泊施設等での療養となります'
)
}}
</p>
<div :class="$style.grow" class="grow" aria-hidden="true">
<icon-bed :class="$style.iconBed" class="iconBed" />
</div>
</div>
<div :class="[$style.box, $style.border]" class="box border">
<h5 :class="$style.boxLead" class="boxLead">
{{ $t('陰性の場合') }}
</h5>
<p>
{{
$t('自宅で安静に過ごし、必要に応じて医療機関を受診してください')
}}
</p>
<p :class="[$style.small, $style.grow]" class="small grow">
{{
$t(
'ただし、症状が良くならない場合は再度受診相談窓口またはかかりつけ医に相談してください'
)
}}
</p>
</div>
</div>
</div>
</div>
</div>
</template>
<script lang="ts">
import Vue from 'vue'
import { TranslateResult } from 'vue-i18n'
import VueScrollTo from 'vue-scrollto'
import AppLink from '@/components/AppLink.vue'
import PageHeader from '@/components/PageHeader.vue'
import PrinterButton from '@/components/PrinterButton.vue'
import CovidIcon from '@/static/covid.svg'
import IconBed from '@/static/flow/bed.svg'
import FigCondAnx from '@/static/flow/cond_anx.svg'
import FigCondSy from '@/static/flow/cond_sy.svg'
import FigCondSyDr from '@/static/flow/cond_sydr.svg'
import IconPhone from '@/static/flow/phone.svg'
type LocalData = {
nav: HTMLElement | null // アンカーリンクコンテナ(フローティング対象)
upperTrigger: HTMLElement | null // フローティング判定上側トリガ(代替余白付与対象)
lowerTrigger: HTMLElement | null // フローティング判定下側トリガ
buttons: HTMLElement[] | null // アンカーリンクボタン
sections: HTMLElement[] | null // アンカーリンクの飛び先
navW: number // アンカーリンクコンテナの幅(upperTriggerの幅を使用)
navH: number // アンカーリンクコンテナの高さ(navW指定後のnavの高さ)
navOffsetTop: number // アンカーリンクコンテナ上端の表示領域上端からのオフセット量
upperTriggerOffsetTop: number // upperTrigger要素下端の表示領域上端からのオフセット量
lowerTriggerOffsetTop: number // lowerTrigger要素下端の表示領域上端からのオフセット量
floatingOffset: number // フローティング時のオフセット量
forceFloating: boolean // ボタン押下時の強制フローティングフラグ
timerId: number // scrollイベントのdebounce用タイマーID
}
export default Vue.extend({
middleware: 'redirect',
components: {
CovidIcon,
PrinterButton,
PageHeader,
AppLink,
FigCondSyDr,
FigCondSy,
FigCondAnx,
IconPhone,
IconBed,
},
data(): LocalData {
const nav = null
const upperTrigger = null
const lowerTrigger = null
const buttons = null
const sections = null
const navW = 0
const navH = 0
const navOffsetTop = 0
const upperTriggerOffsetTop = 0
const lowerTriggerOffsetTop = 0
const floatingOffset = 0
const forceFloating = false
const timerId = 0
return {
nav,
upperTrigger,
lowerTrigger,
buttons,
sections,
navW,
navH,
navOffsetTop,
upperTriggerOffsetTop,
lowerTriggerOffsetTop,
floatingOffset,
forceFloating,
timerId,
}
},
mounted() {
const self = this
this.nav = this.$refs.nav as HTMLElement
this.buttons = Array.prototype.slice.call(
document.getElementsByClassName(this.$style.anchorLink)
)
this.sections = Array.prototype.slice.call(
document.querySelectorAll(`.${this.$style.section}[id]`)
)
this.upperTrigger = this.$refs.upperTrigger as HTMLElement
this.lowerTrigger = this.$refs.lowerTrigger as HTMLElement
window.addEventListener('scroll', function () {
// debounce
if (self.timerId) {
window.clearTimeout(self.timerId)
}
self.timerId = window.setTimeout(self.onBrowserRender, 100)
})
window.addEventListener('resize', this.onBrowserRender)
// 初期化
this.onBrowserRender()
// ハッシュ付きアクセス処理
const hash = this.$route.hash
if (hash !== '') {
if (hash !== '#sydr') {
this.startFloating()
}
document // eslint-disable-line no-unused-expressions
.querySelector(`a.${this.$style.anchorLink}[href='${hash}']`)
?.classList.add(this.$style.active)
VueScrollTo.scrollTo(hash, 300, {
offset: -(this.navH + this.floatingOffset + 1), // +1はIE11用サブピクセル対策
})
}
},
methods: {
onBrowserRender(): void {
const self = this
this.timerId = 0
if (this.forceFloating) {
return
}
// 整形
const navRect = this.nav!.getBoundingClientRect()
const upperTriggerRect = this.upperTrigger!.getBoundingClientRect()
const bottomTriggerRect = this.lowerTrigger!.getBoundingClientRect()
this.navOffsetTop = navRect!.top
this.navW = this.upperTrigger!.clientWidth
this.navH = this.nav!.offsetHeight
this.lowerTriggerOffsetTop = bottomTriggerRect.bottom
if (matchMedia('(max-width: 600px)').matches) {
this.floatingOffset = 64 // NOTE: nuxt.config.tsのoffsetから余白を抜いたもの
} else {
this.floatingOffset = 0
}
this.upperTriggerOffsetTop = upperTriggerRect.bottom - this.floatingOffset
// 表示切替
if (
this.upperTriggerOffsetTop <= 0 + 2 && // +2はサブピクセル対策
this.lowerTriggerOffsetTop >= this.navH + this.floatingOffset
) {
this.startFloating()
// 表示位置追従カレント処理
this.sections!.forEach(function (ele: HTMLElement, idx: number) {
const rect = ele.getBoundingClientRect()
if (
rect.top <= self.navH + self.floatingOffset + 10 &&
rect.bottom >= self.navH + self.floatingOffset - 10
) {
self.buttons![idx].classList.add(self.$style.active)
} else if (
self.buttons![idx].classList.contains(self.$style.active)
) {
self.buttons![idx].classList.remove(self.$style.active)
}
})
} else {
this.stopFloating()
this.resetNavCurrent()
}
},
onClickAnchor(event: Event): void {
const self = this
const target = event.target as HTMLAnchorElement
const hash = target.hash
this.forceFloating = true
if (hash !== '#sydr') {
this.startFloating()
}
this.resetNavCurrent()
target.classList.add(this.$style.active)
VueScrollTo.scrollTo(hash, 1000, {
offset: -(this.navH + this.floatingOffset + 1), // +1はIE11用サブピクセル対策
onDone() {
self.forceFloating = false
self.onBrowserRender()
},
onCancel() {
self.forceFloating = false
self.onBrowserRender()
},
})
},
startFloating(): void {
if (!this.nav!.classList.contains(this.$style.floating)) {
this.nav!.classList.add(this.$style.floating) // eslint-disable-line no-unused-expressions
}
this.upperTrigger!.style.marginBottom = this.navH + 'px'
this.nav!.style.width = this.navW + 'px'
},
stopFloating(): void {
if (this.nav!.classList.contains(this.$style.floating)) {
this.nav!.classList.remove(this.$style.floating) // eslint-disable-line no-unused-expressions
}
this.upperTrigger!.style.marginBottom = ''
this.nav!.style.width = ''
},
resetNavCurrent(): void {
const self = this
this.buttons!.forEach(function (ele: HTMLElement) {
if (ele.classList.contains(self.$style.active)) {
ele.classList.remove(self.$style.active)
}
})
},
},
head(): any {
const title: TranslateResult = this.$t(
'新型コロナウイルス感染症が心配なときに'
)
return {
title,
}
},
})
</script>
<style lang="scss" scoped>
/* stylelint-disable no-descending-specificity */
$fzSmall: 14;
$fzRegular: 16;
$fzMedium: 18;
$fzLarge: 20;
$fzHuge: 22;
$fzHeading: 24;
$fzHeadingL: 26;
$padding: 20;
$margin: 20;
.title {
display: flex;
align-items: center;
margin-bottom: $margin * 1px;
> svg {
width: 30px;
height: 30px;
> path:not(:first-of-type) {
fill: $gray-2;
}
}
.text {
margin-left: 8px;
}
.printerButton {
margin: 0 0 0 auto;
}
}
.container {
background-color: $white;
box-shadow: $shadow;
border: 0.5px solid $gray-4 !important;
border-radius: 4px;
padding: $padding * 1px;
line-height: 1.35;
color: $gray-2;
@include font-size($fzRegular);
> .conHeading {
@include font-size($fzHeading);
}
> .anchorLead {
margin-top: $margin * 1.5px;
color: $green-1;
font-weight: bold;
text-align: center;
@include font-size($fzHuge);
}
ul {
padding-left: 0; // override Vuetify style
}
p {
margin-bottom: 0; // override Vuetify style
}
}
.anchor {
padding-top: $margin * 1px;
padding-bottom: $margin * 1px;
background-color: $white;
position: relative;
.anchorList {
margin: 0 -6px;
display: flex;
}
.anchorItem {
display: flex;
width: (100% / 3);
padding: 0 6px;
flex: 0 0 auto;
}
.anchorLink {
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: center;
flex: 1 0 auto;
position: relative;
padding: 20px 20px 40px;
width: 100%;
border: 4px solid $green-1;
border-radius: 10px;
text-align: center;
font-weight: bold;
text-decoration: none;
font-size: inherit;
color: $gray-2;
transition: color 0.2s;
z-index: 2;
> * {
display: block;
max-width: 100%;
pointer-events: none;
}
> span {
display: flex;
justify-content: center;
align-items: center;
flex: 1 0 auto;
}
> svg {
flex: 0 0 auto;
margin-top: 20px;
max-width: 120px;
max-height: 120px;
width: 100%;
}
&::after {
content: '';
display: block;
position: absolute;
left: 50%;
bottom: 20px;
transform: translate(-50%, 50%);
width: 0;
height: 0;
border-width: 9.5px 6.3px 0 6.3px;
border-style: solid;
border-color: $green-1 transparent transparent transparent;
transition: border-color 0.2s;
}
&.active,
&:hover {
background-color: $green-1;
color: $white;
> svg path {
fill: $white;
}
}
&.active {
&::after {
bottom: -1px;
transform: translate(-50%, 100%);
border-width: 19.5px 12.99px 0 12.99px;
transition: none;
}
}
&:not(.active) {
&:hover {
&::after {
border-top-color: $white;
}
}
}
}
&.floating {
position: fixed;
top: 0;
z-index: 1;
}
}
.section {
margin-top: $margin * 1.5px;
padding: $padding * 1px;
border: 3px solid $gray-3;
border-radius: 10px;
background-color: $white;
&.yellow {
border-width: 4px;
border-color: #00a040;
}
> * {
line-height: 1.5;
&:not(.box):not(.boxes):not(:first-child) {
margin-top: $margin * 1px;
}
}
> .sxnHeading {
text-align: center;
font-weight: bold;
@include font-size($fzHeadingL);
}
> .sxnHeadingSmall {
text-align: center;
font-weight: bold;
@include font-size($fzHuge);
}
> .sxnText {
margin-top: 20px;
text-align: center;
font-weight: bold;
@include font-size($fzMedium);
}
> .hr {
margin-top: $margin * 1px;
padding-top: $margin * 1.5px;
border-top: 1px solid $gray-2;
}
}
.anchor + .section {
margin-top: 0;
}
.boxes {
display: flex;
justify-content: space-between;
}
.box {
margin-top: $margin * 1px;
display: flex;
flex-direction: column;
align-items: stretch;
justify-content: center;
border-radius: 4px;
padding: $padding * 1px;
text-align: center;
line-height: 1.65;
&.border {
border: 2px solid $gray-3;
}
&.bgGray {
background-color: $gray-2;
color: $white;
.icon path {
fill: $white; // 内包するアイコンの色を変更
}
}
&.bgYellow {
background-color: $emergency;
}
> .boxHeading {
font-weight: bold;
@include font-size($fzLarge);
}
> .boxLead {
font-weight: bold;
@include font-size($fzMedium);
}
> .large {
font-weight: bold;
@include font-size($fzHuge);
}
> .small {
@include font-size($fzSmall);
}
> .alignLeft {
text-align: left;
}
> .grow {
flex: 1 0 auto;
}
> * {
max-width: 100%;
}
> *:not(:first-child) {
margin-top: $margin * 0.75px;
}
> .notice {
width: 100%;
padding: $margin * 1px;
border-radius: 4px;
background-color: $white;
color: #a00000;
text-align: center;
font-weight: bold;
line-height: 1.35;
@include font-size($fzSmall);
}
> .contact {
> div {
display: flex;
width: 100%;
justify-content: center;
align-items: flex-end;
flex-wrap: wrap;
> dt {
margin-right: 0.5em;
}
> dd {
text-align: left;
}
}
> *:not(:first-child) {
margin-top: $margin * 1px;
}
}
li {
list-style-type: none;
}
a {
color: inherit;
text-decoration: none;
&:not(.tel) {
> i {
vertical-align: baseline;
}
&:hover {
text-decoration: underline;
}
}
}
.underline {
text-decoration: underline;
}
}
.container .box a {
color: inherit; // for IE11
}
.boxes > .box {
width: calc(50% - 10px);
}
.iconBed {
max-width: 37px;
max-height: 37px; // for IE11
width: 100%;
}
.overrideExternalLink {
i {
font-size: 1em !important;
&::before {
color: $white;
margin-right: 0.2em;
}
}
}
.tel {
font-weight: bold;
vertical-align: baseline;
white-space: nowrap;
line-height: 1px * $fzHuge * 1.35;
padding: 0 0.25em;
@include font-size($fzHuge);
> svg {
vertical-align: baseline;
max-width: 0.7em;
max-height: 0.7em; // for IE11
width: 100%;
}
&:visited,
&:hover,
&:active,
&:focus {
outline: 1px dotted $white;
}
}
.detail {
text-align: center;
.detailButton {
@include button-text('md');
@include font-size(20);
margin: ($margin * 1.5px) auto 0;
font-weight: bold;
text-decoration: none;
color: $green-1 !important;
&:hover {
color: $white !important;
}
> .icon {
margin-left: 2px;
color: $green-1 !important;
}
}
}
// 960
@include lessThan(960) {
.anchor {
padding-top: 2px;
.anchorLink {
padding: 10px 10px 20px;
> svg {
margin-top: 1px;
max-width: 80px;
max-height: 80px;
}
&::after {
bottom: 5px;
}
}
}
.boxes {
display: block;
}
.boxes > .box {
width: auto;
}
}
// 600
@function px2vw($px, $vw: 600) {
@return $px / $vw * 100vw;
}
@include lessThan($small) {
.title {
margin-bottom: px2vw($margin);
}
.container {
padding: px2vw($padding);
font-size: px2vw($fzRegular);
> .conHeading {
font-size: px2vw($fzHeading);
}
> .anchorLead {
margin-top: px2vw($margin * 1.5);
font-size: px2vw($fzHuge);
}
}
.anchor {
padding-top: px2vw($margin);
.anchorLink {
padding: px2vw(20) px2vw(20) px2vw(40);
border-width: px2vw(4);
border-radius: px2vw(10);
> svg {
margin-top: px2vw(20);
}
&::after {
bottom: px2vw(20);
border-width: px2vw(9.5) px2vw(6.3) 0 px2vw(6.3);
}
&.active {
&::after {
border-width: px2vw(19.5) px2vw(12.99) 0 px2vw(12.99);
}
}
}
&.floating {
top: 64px; // NOTE: nuxt.config.tsのoffsetから余白を抜いたもの
}
}
.section {
//margin-top: px2vw($margin * 1.5);
margin-top: 20px; // フローティングの都合で固定
padding: px2vw($padding);
border-width: px2vw(3);
border-radius: px2vw(10);
&.yellow {
border-width: px2vw(3);
}
> * {
&:not(.box):not(.boxes):not(:first-child) {
margin-top: px2vw($margin);
}
}
> .sxnHeading {
font-size: px2vw($fzHeadingL);
}
> .sxnHeadingSmall {
font-size: px2vw($fzHuge);
}
> .sxnText {
font-size: px2vw($fzMedium);
}
> .hr {
margin-top: px2vw($margin);
padding-top: px2vw($margin * 1.5);
}
}
.box {
margin-top: px2vw($margin);
padding: px2vw($padding);
border-radius: px2vw(4);
&.border {
border-width: px2vw(2);
}
> .boxHeading {