diff --git a/lang/en/support_lines.php b/lang/en/support_lines.php new file mode 100644 index 0000000..a7af813 --- /dev/null +++ b/lang/en/support_lines.php @@ -0,0 +1,27 @@ + 'Support lines', + 'lines' => [ + '119' => [ + 'number' => '119', + 'name' => 'DGASPC', + 'detail' => 'Free, 24/7 — abuse, neglect, exploitation, and trafficking of minors', + ], + '116111' => [ + 'number' => '116 111', + 'name' => 'Child Helpline', + 'detail' => 'Free', + ], + 'anitp' => [ + 'number' => '0800 800 678', + 'name' => 'ANITP Green Line', + 'detail' => 'Free', + ], + '112' => [ + 'number' => '112', + 'name' => 'Emergencies', + 'detail' => 'Immediate danger', + ], + ], +]; diff --git a/lang/ro/support_lines.php b/lang/ro/support_lines.php new file mode 100644 index 0000000..bc488a5 --- /dev/null +++ b/lang/ro/support_lines.php @@ -0,0 +1,27 @@ + 'Linii de sprijin', + 'lines' => [ + '119' => [ + 'number' => '119', + 'name' => 'DGASPC', + 'detail' => 'Gratuit, 24/7 — abuz, neglijare, exploatare și trafic de minori', + ], + '116111' => [ + 'number' => '116 111', + 'name' => 'Telefonul Copilului', + 'detail' => 'Gratuit', + ], + 'anitp' => [ + 'number' => '0800 800 678', + 'name' => 'Linia Verde ANITP', + 'detail' => 'Gratuit', + ], + '112' => [ + 'number' => '112', + 'name' => 'Urgențe', + 'detail' => 'Pericol imediat', + ], + ], +]; diff --git a/resources/views/components/support-lines.blade.php b/resources/views/components/support-lines.blade.php new file mode 100644 index 0000000..1b30ff1 --- /dev/null +++ b/resources/views/components/support-lines.blade.php @@ -0,0 +1,16 @@ + +

{{ __('support_lines.title') }}

+ +
diff --git "a/resources/views/pages/\342\232\241about.blade.php" "b/resources/views/pages/\342\232\241about.blade.php" index fa445c1..2b3a965 100644 --- "a/resources/views/pages/\342\232\241about.blade.php" +++ "b/resources/views/pages/\342\232\241about.blade.php" @@ -54,6 +54,8 @@ {{ __('about.notice_body') }} + +

{{ __('about.cta_title') }}

{{ __('about.cta_body') }}

diff --git "a/resources/views/pages/\342\232\241contact.blade.php" "b/resources/views/pages/\342\232\241contact.blade.php" index 589ad85..e20f1f6 100644 --- "a/resources/views/pages/\342\232\241contact.blade.php" +++ "b/resources/views/pages/\342\232\241contact.blade.php" @@ -20,6 +20,8 @@ public function organizationKeys(): array
+ + @foreach ($this->organizationKeys() as $key)

{{ __("contact.organizations.$key.name") }}

diff --git "a/resources/views/pages/\342\232\241home.blade.php" "b/resources/views/pages/\342\232\241home.blade.php" index e4346c5..3acb476 100644 --- "a/resources/views/pages/\342\232\241home.blade.php" +++ "b/resources/views/pages/\342\232\241home.blade.php" @@ -106,6 +106,11 @@ public function featuredResources(): Collection
+
+
+ +
+
{{-- Featured resources --}}
diff --git a/tests/Feature/SupportLinesTest.php b/tests/Feature/SupportLinesTest.php new file mode 100644 index 0000000..b544053 --- /dev/null +++ b/tests/Feature/SupportLinesTest.php @@ -0,0 +1,20 @@ +get('/ro')->assertSuccessful()->getContent(); + $about = $this->get('/ro/about')->assertSuccessful()->getContent(); + $contact = $this->get('/ro/contact')->assertSuccessful()->getContent(); + + foreach ([$home, $about, $contact] as $html) { + expect($html) + ->toContain('Linii de sprijin') + ->toContain('data-support-lines') + ->toContain('0800 800 678') + ->toContain('116 111') + ->toContain('Telefonul Copilului'); + } + + expect(strpos($home, 'Linii de sprijin'))->toBeLessThan(strpos($home, __('home.featured_title', [], 'ro'))) + ->and(strpos($about, __('about.notice_title', [], 'ro')))->toBeLessThan(strpos($about, 'Linii de sprijin')) + ->and(strpos($contact, 'Linii de sprijin'))->toBeLessThan(strpos($contact, __('contact.organizations.anitp.name', [], 'ro'))); +});