Skip to content

Commit

Permalink
📦 production: Second beta release
Browse files Browse the repository at this point in the history
Push structure to production branch
  • Loading branch information
Psykoxen authored Dec 14, 2023
2 parents 938bbdf + 42cbcbc commit ebc1c65
Show file tree
Hide file tree
Showing 8 changed files with 540 additions and 81 deletions.
21 changes: 10 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,13 @@ The mission is to democratize knowledge in first aid. The objective is to create
### For Whom? ⛑️

- **Beginners:** If you're new to first aid, our site offers a clear and practical introduction to essential techniques.

- **Young Learners:** Explore crucial information interactively and educationally.

- **Experienced Individuals:** For those who have already undergone first aid training, our platform serves as a continuous resource, providing regular updates to maintain and enhance their skills.

## Features 🚀

- **Interactive Documentation:** Explore detailed guides with visual demonstrations of first aid techniques.

- **Annual Updates:** Stay informed about the latest advancements and recommendations in first aid.

- **Knowledge Memo:** A space for quick revision of essential techniques.
Expand All @@ -41,15 +39,17 @@ The mission is to democratize knowledge in first aid. The objective is to create
- ⏳ Detailed display of courses
- ⏳ Gesture memo
- ⏳ Case simulation
- Legal content
- RNMSC-DPS
- RIS Calculator
- Legal content
- RNMSC-DPS
- RIS Calculator
- ⏳ Training content
- ⏳ PSE1
- ⏳ PSE2
- ✅ GQSe
- ⏳ PSC1
- ⏳ SSA
- ⏳France
- ⏳ PSE1
- ⏳ PSE2
- ✅ GQS
- ⏳ PSC1
- ⏳ SSA


## How to Contribute 🤝

Expand All @@ -64,4 +64,3 @@ If you find this project useful or interesting, we encourage you to give it a
If you're particularly excited about our mission to make first aid accessible to everyone, consider contributing further by [**becoming a contributor**](#how-to-contribute) or by sharing the project with your colleagues and friends.

Thank you very much for your support! 🌟

10 changes: 8 additions & 2 deletions assets/svg/ico.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 24 additions & 0 deletions components/link-section.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<template>
<a
:href="url"
class="border-solid border-light-gray-main-200 bg-white rounded-lg border-2 flex flex-row gap-3 items-center pl-2 w-full"
>
<Icon name="akar-icons:receipt" color="#979797" class="h-full" />
<p class="text-light-gray-main-800">{{ title }}</p>
</a>
</template>

<script>
export default {
props: {
url: {
type: String,
required: true,
},
title: {
type: String,
required: true,
},
},
};
</script>
1 change: 1 addition & 0 deletions components/navbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<a class="text-red-main-600 font-semibold" href="/formations/"
>Formations</a
>
<a class="text-red-main-600 font-semibold" href="/legal">Legal</a>
<!-- <a class="text-red-main-600 font-semibold" href="/contact">Memo</a> -->
<!-- <a class="text-red-main-600 font-semibold" href="/about">À propos</a> -->
</div>
Expand Down
177 changes: 110 additions & 67 deletions pages/formations/[formation]/[id].vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,47 +8,106 @@ const { data: formation } = await useFetch(`/api/${route.params.formation}`, {
transform: (_formation) => _formation.data,
});
console.log(formation);
const section = formation._value?.chapters[
parseInt(route.params.id.substring(0, 2).valueOf(), 10) - 1
]?.sections.find((section) => section.id === route.params.id);
console.log(section);
console.log(route.params.id);
console.log(parseInt(route.params.id.substring(0, 2).valueOf(), 10) - 1);
</script>
<template>
<section>
<div class="flex flex-col items-center justify-center">
<p
class="m-6 mb-4 lg:text-4xl text-xl font-semibold"
v-if="section.id.substring(2, 4) == 'FT'"
>
Fiche Technique
</p>
<p
class="m-6 mb-4 lg:text-4xl text-xl font-semibold"
v-if="section.id.substring(2, 4) == 'AC'"
>
Apport de Connaissances
</p>
<p
class="m-6 mb-4 lg:text-4xl text-xl font-semibold"
v-if="section.id.substring(2, 4) == 'PR'"
>
Procédure
</p>
<h1
v-if="section.title"
class="lg:text-7xl text-4xl text-white font-semibold m-10 mt-16 mb-20"
class="lg:text-7xl text-4xl text-white font-semibold m-10 mt-5 mb-20 text-center"
>
{{ section.title }}
</h1>
<div class="w-3/4 flex flex-col gap-4">
<div class="w-full lg:hidden flex-col flex gap-4">
<div
v-for="data in section.content"
class="bg-white rounded-lg shadow-lg text-black p-6"
>
<h2 class="text-4xl font-semibold mb-2">
<span class="text-6xl"
>{{ data.id < 10 ? "0" + data.id : data.id }}.</span
>
{{ data.title }}
</h2>
<p v-html="data.content" class="text-justify"></p>
<div
class="w-full flex flex-col items-center"
v-for="row in section.content"
>
<div class="w-3/4 flex flex-col gap-4">
<div class="w-full lg:hidden flex-col flex gap-4">
<div
v-for="data in row"
class="bg-white rounded-lg shadow-lg text-black p-6"
>
<h2 class="text-4xl font-semibold mb-2">
<span class="text-6xl"
>{{ data.id < 10 ? "0" + data.id : data.id }}.</span
>
{{ data.title }}
</h2>
<p v-html="data.content" class="text-justify"></p>
</div>
</div>
</div>
<div class="w-full flex-row flex gap-4">
<div class="w-1/2 lg:flex flex-col hidden justify-center">
<div v-for="data in section.content">
<div class="w-full flex-row flex gap-4">
<div class="w-1/2 lg:flex flex-col hidden justify-center">
<div v-for="data in row">
<div
v-if="
data.id % 2 !== 0 &&
data.type != 'array' &&
data.type != 'fulltext'
"
class="bg-white rounded-lg shadow-lg text-black p-6 mb-2 mt-2"
>
<h2 class="text-4xl font-semibold mb-2">
<span class="text-6xl"
>{{ data.id < 10 ? "0" + data.id : data.id }}.</span
>
{{ data.title }}
</h2>
<p v-html="data.content" class="text-justify"></p>
</div>
</div>
</div>
<div class="w-1/2 lg:flex flex-col hidden justify-center">
<div v-for="data in row">
<div
v-if="
data.id % 2 === 0 &&
data.type != 'array' &&
data.type != 'fulltext'
"
class="bg-white rounded-lg shadow-lg text-black p-6 mb-2 mt-2"
>
<h2 class="text-4xl font-semibold mb-2">
<span class="text-6xl"
>{{ data.id < 10 ? "0" + data.id : data.id }}.</span
>
{{ data.title }}
</h2>
<p v-html="data.content" class="text-justify"></p>
</div>
</div>
</div>
</div>
<div class="w-full flex-col lg:flex hidden">
<div v-for="data in row">
<div
v-if="data.id % 2 !== 0 && data.type != 'array'"
class="bg-white rounded-lg shadow-lg text-black p-6 mb-2 mt-2"
v-if="data.type == 'fulltext'"
class="bg-white rounded-lg shadow-lg text-black p-6 w-full"
>
<h2 class="text-4xl font-semibold mb-2">
<span class="text-6xl"
Expand All @@ -60,10 +119,10 @@ console.log(parseInt(route.params.id.substring(0, 2).valueOf(), 10) - 1);
</div>
</div>
</div>
<div class="w-1/2 lg:flex flex-col hidden justify-center">
<div class="w-full flex-col lg:flex hidden">
<div v-for="data in section.content">
<div
v-if="data.id % 2 === 0 && data.type != 'array'"
v-if="data.type == 'array'"
class="bg-white rounded-lg shadow-lg text-black p-6 mb-2 mt-2"
>
<h2 class="text-4xl font-semibold mb-2">
Expand All @@ -72,49 +131,33 @@ console.log(parseInt(route.params.id.substring(0, 2).valueOf(), 10) - 1);
>
{{ data.title }}
</h2>
<p v-html="data.content" class="text-justify"></p>
<table class="w-full">
<tr v-for="ligne in data.content">
<template v-if="ligne.length === 3">
<td
v-for="cellule in ligne"
:key="cellule"
class="border border-black p-2"
v-html="cellule"
></td>
</template>
<template v-else>
<td
v-html="ligne[0]"
class="w-1/4 border border-black p-2"
></td>
<td
v-html="ligne[1]"
class="border border-black p-2"
colspan="2"
></td>
</template>
</tr>
</table>
</div>
</div>
</div>
</div>
<div class="w-full flex-col lg:flex hidden">
<div v-for="data in section.content">
<div
v-if="data.type == 'array'"
class="bg-white rounded-lg shadow-lg text-black p-6 mb-2 mt-2"
>
<h2 class="text-4xl font-semibold mb-2">
<span class="text-6xl"
>{{ data.id < 10 ? "0" + data.id : data.id }}.</span
>
{{ data.title }}
</h2>
<table class="w-full">
<tr v-for="ligne in data.content">
<template v-if="ligne.length === 3">
<td
v-for="cellule in ligne"
:key="cellule"
class="border border-black p-2"
v-html="cellule"
></td>
</template>
<template v-else>
<td
v-html="ligne[0]"
class="w-1/4 border border-black p-2"
></td>
<td
v-html="ligne[1]"
class="border border-black p-2"
colspan="2"
></td>
</template>
</tr>
</table>
</div>
</div>
</div>
</div>
</div>
</section>
Expand Down
2 changes: 1 addition & 1 deletion pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<section
class="w-full h-4/5 absolute bottom-0 left-0 p-12 flex items-start lg:justify-between justify-center"
>
<h1 class="lg:text-9xl text-7xl opacity-75 font-semibold">
<h1 class="lg:text-9xl text-7xl text-white opacity-75 font-semibold">
Sauver des vies
</h1>
<svg
Expand Down
Loading

0 comments on commit ebc1c65

Please sign in to comment.