-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* #27 - feat: added faq page * #27 - fix: fix * #27 - fix: code review fixes * #27 - fix: code review frontend fixes * #27 - feat: added empty state section for public side of the site * - resolving conflicts --------- Co-authored-by: Krzysztof Rewak <[email protected]>
- Loading branch information
1 parent
c17ff35
commit 25070fc
Showing
20 changed files
with
110 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Keating\Http\Controllers\Public; | ||
|
||
use Inertia\Response; | ||
use Keating\Models\Faq; | ||
|
||
class FaqController | ||
{ | ||
public function __invoke(): Response | ||
{ | ||
$faqs = Faq::query()->get(); | ||
|
||
return inertia("Public/Faq", [ | ||
"faqs" => $faqs, | ||
]); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<script setup> | ||
import PublicLayout from '@/Layouts/PublicLayout.vue' | ||
import BackgroundGrid from '@/Components/BackgroundGrid.vue' | ||
import SectionHeader from '@/Components/SectionHeader.vue' | ||
import { QuestionMarkCircleIcon } from '@heroicons/vue/24/outline' | ||
import { Head } from '@inertiajs/inertia-vue3' | ||
import DOMPurify from 'dompurify' | ||
import EmptyState from '@/Shared/Components/EmptyState/Public/EmptyState.vue' | ||
defineProps({ | ||
faqs: Object, | ||
}) | ||
</script> | ||
|
||
<template> | ||
<Head title="FAQ" /> | ||
|
||
<PublicLayout> | ||
<div class="relative isolate bg-white"> | ||
<BackgroundGrid /> | ||
<div class="py-24 sm:py-32"> | ||
<div class="mx-auto max-w-7xl px-6 lg:px-8"> | ||
<SectionHeader> | ||
<template #header> | ||
FAQ | ||
</template> | ||
<template #subheader> | ||
Często zadawane pytania i odpowiedzi na nie. | ||
</template> | ||
</SectionHeader> | ||
|
||
<div class="mx-auto mt-10 grid max-w-2xl grid-cols-1 gap-x-8 border-t border-gray-200 pt-10 sm:mt-16 sm:pt-16 lg:mx-0 lg:max-w-none"> | ||
<div v-for="(faq, index) in faqs" :key="index" class="mb-5 border-b-2 pb-5"> | ||
<div class="flex items-center justify-between text-lg font-semibold text-gray-600"> | ||
<div class="flex w-[90%] items-center gap-2"> | ||
<QuestionMarkCircleIcon class="size-7" /> | ||
<span>{{ faq.question }}</span> | ||
</div> | ||
</div> | ||
<div class="text-md flex items-center justify-between bg-white px-4 pt-3 font-normal text-gray-600"> | ||
<!-- eslint-disable vue/no-v-html --> | ||
<p class="prose max-w-full text-gray-600" v-html="DOMPurify.sanitize(faq.answer)" /> | ||
<!-- eslint-enable vue/no-v-html --> | ||
</div> | ||
</div> | ||
|
||
<EmptyState v-if="faqs.length === 0" description="Brak pytań i odpowiedzi" /> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</PublicLayout> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
16 changes: 16 additions & 0 deletions
16
resources/js/Shared/Components/EmptyState/Public/EmptyState.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<script lang="ts" setup> | ||
import { NoSymbolIcon } from '@heroicons/vue/24/outline' | ||
defineProps({ | ||
description: String, | ||
}) | ||
</script> | ||
|
||
<template> | ||
<div class="text-center"> | ||
<NoSymbolIcon class="mx-auto size-12 text-gray-400" /> | ||
<h3 class="mt-2 text-sm font-semibold text-gray-900"> | ||
{{ description }} | ||
</h3> | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters