Divers ajouts/modifications

- Ajout du blog
- Ajout de la page équipe
- Modification du header (style)
- Modification du footer (contenu + style)
- Ajout du plan du site
- Ajout des mentions légales
- Ajout du favicon
- Ajout des balises OpenGraph
- Ajout du logo GitHub
This commit is contained in:
Lyanis SOUIDI 2023-01-17 23:44:08 +01:00
parent e6806dc692
commit 6a654ae0d7
23 changed files with 1107 additions and 280 deletions

View File

@ -3,7 +3,15 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" href="../assets/img/favicon_dark.ico" media="(prefers-color-scheme: light)">
<link rel="icon" href="../assets/img/favicon_light.ico" media="(prefers-color-scheme: dark)">
<title>Qui sommes-nous ? - Elite Solar</title>
<meta property="og:title" content="Qui sommes-nous ? - Elite Solar">
<meta name="description" content="En savoir plus sur Elite Solar">
<meta property="og:description" content="En savoir plus sur Elite Solar">
<meta property="og:type" content="website">
<meta property="og:site_name" content="Elite Solar">
<meta property="og:locale" content="fr_FR">
<link rel="stylesheet" href="../assets/css/style.css">
<link rel="stylesheet" href="../assets/css/header.css">
<link rel="stylesheet" href="../assets/css/footer.css">
@ -12,8 +20,10 @@
</head>
<body>
<header>
<h1>Elite Solar</h1>
<div>
<a href="../"><img id="logo" src="../assets/img/logo_noir.png" height="60"></a>
<img id="burger-menu" alt="Menu" onclick="burgerMenu()" src="../assets/img/open-menu.svg">
<nav>
<ul id="menu" class="invisible">
<li><a href="../">Accueil</a></li>
<li class="active"><a href="../about">Qui sommes-nous ?</a></li>
@ -21,8 +31,17 @@
<li><a href="../contact">Contact</a></li>
<li><a href="../faq">FAQ</a></li>
</ul>
</nav>
</div>
</header>
<main>
<nav class="crumbs">
<ol>
<li class="crumb"><a href="../">Accueil</a></li> &gt;
<li class="crumb">Qui sommes-nous ?</li>
</ol>
</nav>
<h1>Qui sommes-nous ?</h1><br>
<div class="about">
@ -40,40 +59,26 @@
<p>Les motivations de notre équipe sont principalement axées sur lécologie et linnovation. En effet grâce à notre technologie nous contribuons à la promotion des énergies renouvelables, et de ce fait, à la réduction de lempreinte carbone. Nous permettons à tous daccéder à une nouvelle manière innovante de consommer lélectricité, il est indispensable dinnover dans ce domaine afin de préserver lenvironnement.</p>
<h2>Notre équipe</h2>
<p>Notre équipe est constituée tout d'abord des trois fondateurs, Lyanis Souidi, Tom Moguljak et Romain Journeau, et d'une autre part d'ingénieurs spécialisés dans les cellules photovoltaïque. Pour les futurs candidats, nous veillerons à ce que ces derniers adhèrent à notre culture dentreprise, les candidats devront notamment être engagés dans la protection de lenvironnement, lune des valeurs fondamentales de notre projet. Le niveau dexpertise des candidats sera également un point important pour nos recrutements étant donné que nous proposons une technologie très innovante.</p>
<p>Notre équipe est constituée tout d'abord des trois fondateurs, <a href="../team/lyanis-souidi">Lyanis Souidi</a>, <a href="../team/tom-moguljak">Tom Moguljak</a> et <a href="../team/romain-journeau">Romain Journeau</a>, et d'une autre part d'ingénieurs spécialisés dans les cellules photovoltaïque. Pour les futurs candidats, nous veillerons à ce que ces derniers adhèrent à notre culture dentreprise, les candidats devront notamment être engagés dans la protection de lenvironnement, lune des valeurs fondamentales de notre projet. Le niveau dexpertise des candidats sera également un point important pour nos recrutements étant donné que nous proposons une technologie très innovante.</p>
</div>
</div>
</main>
<button onclick="topFunction()" id="backToTop" title="Revenir au début de la page">⬆️</button>
<footer>
<div id="social">
<p>Suivez-Nous</p>
<ul>
<li><a href="https://linkedin.com"><img src="../assets/img/linkedin.svg" width="50" height="50" alt="LinkedIn"></a></li>
<li><a href="https://instagram.com/elitesolar77"><img src="../assets/img/instagram.svg" width="50" height="50" alt="Instagram"></a></li>
<li><a href="https://www.facebook.com/profile.php?id=100089332237449"><img src="../assets/img/facebook.svg" width="50" height="50" alt="Facebook"></a></li>
<li><a href="https://twitter.com/EliteSolar77"><img src="../assets/img/twitter.svg" width="50" height="50" alt="Twitter"></a></li>
</ul>
<div class="content">
<div class="text">
© <?= date("Y") ?> Elite Solar
<a href="../legal">Mentions légales</a>
<a href="../sitemap">Plan du site</a>
</div>
<div id="sitemap">
<p>Plan du site</p>
<ul>
<li><a href="../">Page d'accueil</a></li>
<li><a href="../about">Qui sommes-nous ?</a></li>
<li><a href="../product">Notre produit</a></li>
<li><a href="../faq">Foire aux questions</a></li>
<li><a href="../contact">Contact</a></li>
<li><a href="../privacy">Politique de confidentialité</a></li>
<li><a href="../legal">Mentions légales</a></li>
</ul>
<div class="social">
<a target="_blank" href="https://linkedin.com"><img src="../assets/img/linkedin.svg" width="25" height="25" alt="LinkedIn"></a>
<a target="_blank" href="https://instagram.com/elitesolar77"><img src="../assets/img/instagram.svg" width="25" height="25" alt="Instagram"></a>
<a target="_blank" href="https://www.facebook.com/profile.php?id=100089332237449"><img src="../assets/img/facebook.svg" width="25" height="25" alt="Facebook"></a>
<a target="_blank" href="https://twitter.com/EliteSolar77"><img src="../assets/img/twitter.svg" width="25" height="25" alt="Twitter"></a>
</div>
<div id="contact">
<p>Contact</p>
<ul>
<li><a href="tel:+33160746800">+33 1 60 74 68 00</a></li>
<li><a href="mailto:elitesolar.contact77@gmail.com">elitesolar.contact77@gmail.com</a></li>
</ul>
</div>
<p id="copyright">© <?= date("Y") ?> Elite Solar. Créé par Lyanis Souidi, Tom Moguljak et Romain Journeau.</p>
</footer>
<script src="../assets/js/script.js"></script>
</body>
</html>

3
assets/css/blog.css Normal file
View File

@ -0,0 +1,3 @@
#articles li {
margin-bottom: 15px;
}

View File

@ -1,100 +1,32 @@
footer {
background: var(--c-bg-footer);
color: var(--c-footer-text);
display: grid;
padding-top: 1rem;
padding-bottom: 1rem;
background-color: #21262d;
color: #ddd;
}
footer div.content {
display: flex;
align-items: center;
justify-content: space-between;
max-width: 1280px;
margin-right: auto;
margin-left: auto;
padding-right: 1rem;
padding-left: 1rem;
}
footer div.text {
display: flex;
gap: 1.5rem;
font-size: 14px;
}
footer div.text a {
color: #ddd;
}
footer div.social {
display: flex;
gap: 1rem;
align-items: center;
}
footer div p {
font-size: 25pt;
text-align: center;
}
#social ul {
display: inline-block;
}
#social li {
display: inline;
}
#copyright {
text-align: center;
padding-top: 25px;
padding-bottom: 25px;
height: 100%;
background-color: #21262d;
margin: 0;
}
#social, #sitemap, #contact {
height: max-content;
}
footer a {
color: var(--c-footer-text);
text-decoration: none;
}
#contact a:hover, #sitemap a:hover {
text-decoration: underline;
}
#social ul {
display: flex;
justify-content: center;
padding: 0;
}
#social li {
padding: 20px;
}
#sitemap ul {
list-style: none;
}
#sitemap li, #contact li {
padding-bottom: 15px;
}
footer ul {
font-weight: 600;
}
#contact ul {
list-style: none;
text-align: center;
padding: 0;
}
#contact a[href^="tel:"]::before {
content: "☎️ ";
}
#contact a[href^="mailto:"]::before {
content: "✉️ ";
}
@media screen and (min-width: 800px) {
footer {
grid-template-columns: 1fr 1fr 1fr;
grid-template-rows: 85% 15%;
}
#social, #sitemap, #contact {
grid-row: 1;
}
#copyright {
grid-column: 1/4;
grid-row: 2;
}
}
@media screen and (max-width: 800px) {
footer {
grid-template-columns: 100%;
grid-auto-rows: auto;
}
}

View File

@ -5,6 +5,33 @@ header {
min-height: 100px;
}
header div {
max-width: 1280px;
margin-right: auto;
margin-left: auto;
padding-right: 1rem;
padding-left: 1rem;
}
header #logo {
filter: invert(100%);
float: left;
}
@media (prefers-color-scheme: light) {
header {
background-color: #edecec;
}
#burger-menu {
filter: none;
}
header #logo {
filter: none;
}
}
header h1 {
float: left;
font-size: 25px;
@ -35,6 +62,7 @@ header h1 {
#burger-menu {
transform: translateY(25%);
filter: invert(100%);
}
@media screen and (min-width: 700px) {

View File

@ -24,7 +24,7 @@ display: inline;
margin-right: auto;
}
p {
main p {
padding-left: 5%;
padding-right: 5%;
padding-bottom: 2%;

View File

@ -100,3 +100,34 @@ main a:hover::after {
grid-column: 1;
}
}
#backToTop {
display: none;
position: fixed;
bottom: 55px;
right: 55px;
z-index: 99;
font-size: 18px;
border: none;
outline: none;
background-color: #00A6ED;
padding: 15px;
border-radius: 4px;
}
#backToTop:hover {
background-color: #555;
}
nav.crumbs {
border-bottom: 1px solid var(--c-b-primary);
}
.crumbs ol {
list-style-type: none;
padding-left: 0;
}
.crumb {
display: inline-block;
}

81
assets/css/team.css Normal file
View File

@ -0,0 +1,81 @@
@media screen and (min-width: 700px) {
#team {
display: grid;
grid-template-columns: repeat(3, 1fr);
}
main p#join, #team {
text-align: center;
}
}
@media screen and (min-width: 850px) {
#cv {
display: grid;
grid-template-columns: 1fr 2fr;
gap: 25px;
}
#skill {
display: grid;
grid-template-columns: repeat(2, 1fr);
}
#skill h2 {
grid-column: 1/3;
}
}
ul#social {
display: inline-block;
display: flex;
padding: 0;
list-style: none;
}
ul#social li {
display: inline;
padding: 10px;
}
img[alt="github"] {
filter: invert(100%);
}
@media (prefers-color-scheme: light) {
img[alt="github"] {
filter: none;
}
}
@media print {
* {
background-color: transparent !important;
color: black !important;
box-shadow: none !important;
text-shadow: none !important;
}
header, footer {
display: none;
}
#cv {
display: grid;
grid-template-columns: 1fr 2fr;
gap: 25px;
}
#skill {
display: grid;
grid-template-columns: repeat(2, 1fr);
}
#skill h2 {
grid-column: 1/3;
}
}
#articles li {
margin-bottom: 15px;
}

BIN
assets/img/favicon_dark.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 220 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 220 KiB

1
assets/img/github.svg Normal file
View File

@ -0,0 +1 @@
<svg width="98" height="96" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M48.854 0C21.839 0 0 22 0 49.217c0 21.756 13.993 40.172 33.405 46.69 2.427.49 3.316-1.059 3.316-2.362 0-1.141-.08-5.052-.08-9.127-13.59 2.934-16.42-5.867-16.42-5.867-2.184-5.704-5.42-7.17-5.42-7.17-4.448-3.015.324-3.015.324-3.015 4.934.326 7.523 5.052 7.523 5.052 4.367 7.496 11.404 5.378 14.235 4.074.404-3.178 1.699-5.378 3.074-6.6-10.839-1.141-22.243-5.378-22.243-24.283 0-5.378 1.94-9.778 5.014-13.2-.485-1.222-2.184-6.275.486-13.038 0 0 4.125-1.304 13.426 5.052a46.97 46.97 0 0 1 12.214-1.63c4.125 0 8.33.571 12.213 1.63 9.302-6.356 13.427-5.052 13.427-5.052 2.67 6.763.97 11.816.485 13.038 3.155 3.422 5.015 7.822 5.015 13.2 0 18.905-11.404 23.06-22.324 24.283 1.78 1.548 3.316 4.481 3.316 9.126 0 6.6-.08 11.897-.08 13.526 0 1.304.89 2.853 3.316 2.364 19.412-6.52 33.405-24.935 33.405-46.691C97.707 22 75.788 0 48.854 0z" fill="#24292f"/></svg>

After

Width:  |  Height:  |  Size: 963 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 8.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

16
assets/js/script.js Normal file
View File

@ -0,0 +1,16 @@
let backToTop = document.getElementById("backToTop");
window.onscroll = function() {scrollFunction()};
function scrollFunction() {
if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) {
backToTop.style.display = "block";
} else {
backToTop.style.display = "none";
}
}
function topFunction() {
document.body.scrollTop = 0;
document.documentElement.scrollTop = 0;
}

1
blog/.htaccess Normal file
View File

@ -0,0 +1 @@
FallbackResource index.php

171
blog/index.php Normal file
View File

@ -0,0 +1,171 @@
<?php
try {
$error = false;
$dbh = new PDO('mysql:host=saeweb2022.souidi.fr;dbname=saeweb2022', "saeweb2022");
$url = parse_url($_SERVER["REQUEST_URI"])["path"];
if (str_ends_with($url, "/")) {
$url = substr($url, 0, -1);
}
$url = explode("/", $url);
if (end($url) == "blog") {
$mode = "list";
$articles = array();
foreach($dbh->query('SELECT article.title, article.created_at, article.slug, article.excerpt, employee.name AS author, employee.slug AS authorUrl FROM article JOIN employee ON article.author=employee.id ORDER BY created_at DESC;') as $row) {
$articles[] = $row;
}
} else {
$mode = "view";
$sth = $dbh->prepare("SELECT article.title, article.created_at, article.modified_at, article.slug, article.content, article.excerpt, employee.name AS author, employee.slug AS authorUrl FROM article JOIN employee ON article.author=employee.id AND article.slug = ?;");
$sth->execute([end($url)]);
$article = $sth->fetch(PDO::FETCH_ASSOC);
if (empty($article)) {
http_response_code(404);
$error = "notfound";
}
$sth = null;
}
$dbh = null;
} catch (PDOException $e) {
http_response_code(503);
$error = "db";
die($e->getMessage());
}
?>
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" href="../assets/img/favicon_dark.ico" media="(prefers-color-scheme: light)">
<link rel="icon" href="../assets/img/favicon_light.ico" media="(prefers-color-scheme: dark)">
<?php
if ($mode == 'list') {
echo '<title>Blog - Elite Solar</title>';
echo '<meta name="description" content="Le blog d\'Elite Solar">';
echo '<meta property="og:title" content="Blog - Elite Solar">';
echo '<meta property="og:description" content="Le blog d\'Elite Solar">';
echo '<meta property="og:type" content="website">';
}
elseif ($mode == 'view') {
echo '<title>' . $article['title'] . ' - Elite Solar</title>';
echo '<meta name="description" content="' . $article['excerpt'] . '">';
echo '<meta property="og:title" content="' . $article['title'] . ' - Elite Solar">';
echo '<meta property="og:description" content="' . $article['excerpt'] . '">';
echo '<meta name="author" content="' . $article['author'] . '">';
echo '<meta property="og:author" content="' . $article['author'] . '">';
echo '<meta property="article:author" content="' . $article['author'] . '">';
echo '<meta property="og:type" content="article">';
echo '<meta property="article:published_time" content="' . $article['created_at'] . '">';
echo '<meta property="article:modified_time" content="' . $article['modified_at'] . '">';
}
?>
<meta property="og:site_name" content="Elite Solar">
<meta property="og:locale" content="fr_FR">
<link rel="stylesheet" href="../assets/css/style.css">
<link rel="stylesheet" href="../assets/css/header.css">
<link rel="stylesheet" href="../assets/css/footer.css">
<link rel="stylesheet" href="../assets/css/blog.css">
<script src="../assets/js/header.js"></script>
</head>
<body>
<header>
<div>
<a href="../"><img id="logo" src="../assets/img/logo_noir.png" height="60"></a>
<img id="burger-menu" alt="Menu" onclick="burgerMenu()" src="../assets/img/open-menu.svg">
<nav>
<ul id="menu" class="invisible">
<li><a href="../">Accueil</a></li>
<li><a href="../about">Qui sommes-nous ?</a></li>
<li><a href="../product">Produit</a></li>
<li><a href="../contact">Contact</a></li>
<li><a href="../faq">FAQ</a></li>
</ul>
</nav>
</div>
</header>
<main>
<?php
if ($error == "db") {
echo '<nav class="crumbs">
<ol>
<li class="crumb"><a href="../">Accueil</a></li> &gt;
<li class="crumb">Blog</li>
</ol>
</nav>
<p>Une erreur est survenue lors du chargement de la page.</p>';
} elseif ($error == "notfound") {
echo '<nav class="crumbs">
<ol>
<li class="crumb"><a href="../">Accueil</a></li> &gt;
<li class="crumb"><a href="./">Blog</a></li>
<li class="crumb">Article</li>
</ol>
</nav>' .
"<h1>Article introuvable</h1>
<p>L'article que vous cherchez à atteindre ne peut pas être trouvée.
Il est possible qu'il ait été supprimé ou déplacé. Si vous avez saisi manuellement son adresse,
veuillez vérifier une éventuelle erreur de saisie.</p><br>
<p><a href='../../'>Retour à la page d'accueil</a></p>";
} else {
if ($mode == 'list') {
echo '<nav class="crumbs">
<ol>
<li class="crumb"><a href="../">Accueil</a></li> &gt;
<li class="crumb">Blog</li>
</ol>
</nav>' .
"<h1>Blog</h1><br><div>";
echo '<ul id="articles">';
foreach ($articles as $article) {
$date = new DateTime($article['created_at']);
echo '<li><a href="../blog/' . $article["slug"] . '">' . $article["title"] . '</a><br>
Publié le ' . $date->format('d/m/Y') . ' par <a href="../team/' . $article["authorUrl"] . '">' . $article["author"] . '</a><br>
Extrait : ' . $article["excerpt"] . '</li>';
}
echo '</ul>';
} elseif ($mode == 'view') {
$date = new DateTime($article['created_at']);
echo '<nav class="crumbs">
<ol>
<li class="crumb"><a href="../">Accueil</a></li> &gt;
<li class="crumb"><a href="./">Blog</a></li> &gt;
<li class="crumb">' . $article["title"] . '</li>
</ol>
</nav>' .
"<h1>" . $article["title"] . "</h1><br>
<p>Publié le " . $date->format('d/m/Y') . " par <a href='../team/" . $article["authorUrl"] . "'>" . $article["author"] . "</a></p><br>
<p>" . $article["content"] . "</p>";
}
}
?>
</main>
<button onclick="topFunction()" id="backToTop" title="Revenir au début de la page">⬆️</button>
<footer>
<div class="content">
<div class="text">
© <?= date("Y") ?> Elite Solar
<a href="legal">Mentions légales</a>
<a href="sitemap">Plan du site</a>
</div>
<div class="social">
<a target="_blank" href="https://linkedin.com"><img src="../assets/img/linkedin.svg" width="25" height="25" alt="LinkedIn"></a>
<a target="_blank" href="https://instagram.com/elitesolar77"><img src="../assets/img/instagram.svg" width="25" height="25" alt="Instagram"></a>
<a target="_blank" href="https://www.facebook.com/profile.php?id=100089332237449"><img src="../assets/img/facebook.svg" width="25" height="25" alt="Facebook"></a>
<a target="_blank" href="https://twitter.com/EliteSolar77"><img src="../assets/img/twitter.svg" width="25" height="25" alt="Twitter"></a>
</div>
</div>
</footer>
<script src="../assets/js/script.js"></script>
</body>
</html>

View File

@ -119,7 +119,15 @@ function select_profile() : string {
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" href="../assets/img/favicon_dark.ico" media="(prefers-color-scheme: light)">
<link rel="icon" href="../assets/img/favicon_light.ico" media="(prefers-color-scheme: dark)">
<title>Contact - Elite Solar</title>
<meta property="og:title" content="Contact - Elite Solar">
<meta name="description" content="Besoin d'un renseignement ? Contactez-nous via notre formulaire en ligne">
<meta property="og:description" content="Besoin d'un renseignement ? Contactez-nous via notre formulaire en ligne">
<meta property="og:type" content="website">
<meta property="og:site_name" content="Elite Solar">
<meta property="og:locale" content="fr_FR">
<link rel="stylesheet" href="../assets/css/style.css">
<link rel="stylesheet" href="../assets/css/header.css">
<link rel="stylesheet" href="../assets/css/contact.css">
@ -128,8 +136,10 @@ function select_profile() : string {
</head>
<body>
<header>
<h1>Elite Solar</h1>
<div>
<a href="../"><img id="logo" src="../assets/img/logo_noir.png" height="60"></a>
<img id="burger-menu" alt="Menu" onclick="burgerMenu()" src="../assets/img/open-menu.svg">
<nav>
<ul id="menu" class="invisible">
<li><a href="../">Accueil</a></li>
<li><a href="../about">Qui sommes-nous ?</a></li>
@ -137,43 +147,38 @@ function select_profile() : string {
<li class="active"><a href="../contact">Contact</a></li>
<li><a href="../faq">FAQ</a></li>
</ul>
</nav>
</div>
</header>
<main>
<nav class="crumbs">
<ol>
<li class="crumb"><a href="../">Accueil</a></li> &gt;
<li class="crumb">Contact</li>
</ol>
</nav>
<div>
<h1>Nous contacter</h1>
<?= select_profile() ?>
</main>
<button onclick="topFunction()" id="backToTop" title="Revenir au début de la page">⬆️</button>
<footer>
<div id="social">
<p>Suivez-Nous</p>
<ul>
<li><a href="https://linkedin.com"><img src="../assets/img/linkedin.svg" width="50" height="50" alt="LinkedIn"></a></li>
<li><a href="https://instagram.com/elitesolar77"><img src="../assets/img/instagram.svg" width="50" height="50" alt="Instagram"></a></li>
<li><a href="https://www.facebook.com/profile.php?id=100089332237449"><img src="../assets/img/facebook.svg" width="50" height="50" alt="Facebook"></a></li>
<li><a href="https://twitter.com/EliteSolar77"><img src="../assets/img/twitter.svg" width="50" height="50" alt="Twitter"></a></li>
</ul>
<div class="content">
<div class="text">
© <?= date("Y") ?> Elite Solar
<a href="../legal">Mentions légales</a>
<a href="../sitemap">Plan du site</a>
</div>
<div id="sitemap">
<p>Plan du site</p>
<ul>
<li><a href="../">Page d'accueil</a></li>
<li><a href="../about">Qui sommes-nous ?</a></li>
<li><a href="../product">Notre produit</a></li>
<li><a href="../faq">Foire aux questions</a></li>
<li><a href="../contact">Contact</a></li>
<li><a href="../privacy">Politique de confidentialité</a></li>
<li><a href="../legal">Mentions légales</a></li>
</ul>
<div class="social">
<a target="_blank" href="https://linkedin.com"><img src="../assets/img/linkedin.svg" width="25" height="25" alt="LinkedIn"></a>
<a target="_blank" href="https://instagram.com/elitesolar77"><img src="../assets/img/instagram.svg" width="25" height="25" alt="Instagram"></a>
<a target="_blank" href="https://www.facebook.com/profile.php?id=100089332237449"><img src="../assets/img/facebook.svg" width="25" height="25" alt="Facebook"></a>
<a target="_blank" href="https://twitter.com/EliteSolar77"><img src="../assets/img/twitter.svg" width="25" height="25" alt="Twitter"></a>
</div>
<div id="contact">
<p>Contact</p>
<ul>
<li><a href="tel:+33160746800">+33 1 60 74 68 00</a></li>
<li><a href="mailto:elitesolar.contact77@gmail.com">elitesolar.contact77@gmail.com</a></li>
</ul>
</div>
<p id="copyright">© <?= date("Y") ?> Elite Solar. Créé par Lyanis Souidi, Tom Moguljak et Romain Journeau.</p>
</footer>
<script src="../assets/js/contact.js"></script>
<script src="../assets/js/script.js"></script>
</body>
</html>

View File

@ -3,7 +3,15 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" href="../assets/img/favicon_dark.ico" media="(prefers-color-scheme: light)">
<link rel="icon" href="../assets/img/favicon_light.ico" media="(prefers-color-scheme: dark)">
<title>FAQ - Elite Solar</title>
<meta property="og:title" content="FAQ - Elite Solar">
<meta name="description" content="Foire aux questions">
<meta property="og:description" content="Foire aux questions">
<meta property="og:type" content="website">
<meta property="og:site_name" content="Elite Solar">
<meta property="og:locale" content="fr_FR">
<link rel="stylesheet" href="../assets/css/style.css">
<link rel="stylesheet" href="../assets/css/header.css">
<link rel="stylesheet" href="../assets/css/footer.css">
@ -12,8 +20,10 @@
</head>
<body>
<header>
<h1>Elite Solar</h1>
<div>
<a href="../"><img id="logo" src="../assets/img/logo_noir.png" height="60"></a>
<img id="burger-menu" alt="Menu" onclick="burgerMenu()" src="../assets/img/open-menu.svg">
<nav>
<ul id="menu" class="invisible">
<li><a href="../">Accueil</a></li>
<li><a href="../about">Qui sommes-nous ?</a></li>
@ -21,8 +31,17 @@
<li><a href="../contact">Contact</a></li>
<li class="active"><a href="../faq">FAQ</a></li>
</ul>
</nav>
</div>
</header>
<main>
<nav class="crumbs">
<ol>
<li class="crumb"><a href="../">Accueil</a></li> &gt;
<li class="crumb">FAQ</li>
</ol>
</nav>
<h1>FAQ</h1>
<p>Voici les questions fréquentes de nos clients :<p>
<div class="faq">
@ -51,36 +70,22 @@
</div>
<script src="../assets/js/faq.js"></script>
</main>
<button onclick="topFunction()" id="backToTop" title="Revenir au début de la page">⬆️</button>
<footer>
<div id="social">
<p>Suivez-Nous</p>
<ul>
<li><a href="https://linkedin.com"><img src="../assets/img/linkedin.svg" width="50" height="50" alt="LinkedIn"></a></li>
<li><a href="https://instagram.com/elitesolar77"><img src="../assets/img/instagram.svg" width="50" height="50" alt="Instagram"></a></li>
<li><a href="https://www.facebook.com/profile.php?id=100089332237449"><img src="../assets/img/facebook.svg" width="50" height="50" alt="Facebook"></a></li>
<li><a href="https://twitter.com/EliteSolar77"><img src="../assets/img/twitter.svg" width="50" height="50" alt="Twitter"></a></li>
</ul>
<div class="content">
<div class="text">
© <?= date("Y") ?> Elite Solar
<a href="../legal">Mentions légales</a>
<a href="../sitemap">Plan du site</a>
</div>
<div id="sitemap">
<p>Plan du site</p>
<ul>
<li><a href="../">Page d'accueil</a></li>
<li><a href="../about">Qui sommes-nous ?</a></li>
<li><a href="../product">Notre produit</a></li>
<li><a href="../faq">Foire aux questions</a></li>
<li><a href="../contact">Contact</a></li>
<li><a href="../privacy">Politique de confidentialité</a></li>
<li><a href="../legal">Mentions légales</a></li>
</ul>
<div class="social">
<a target="_blank" href="https://linkedin.com"><img src="../assets/img/linkedin.svg" width="25" height="25" alt="LinkedIn"></a>
<a target="_blank" href="https://instagram.com/elitesolar77"><img src="../assets/img/instagram.svg" width="25" height="25" alt="Instagram"></a>
<a target="_blank" href="https://www.facebook.com/profile.php?id=100089332237449"><img src="../assets/img/facebook.svg" width="25" height="25" alt="Facebook"></a>
<a target="_blank" href="https://twitter.com/EliteSolar77"><img src="../assets/img/twitter.svg" width="25" height="25" alt="Twitter"></a>
</div>
<div id="contact">
<p>Contact</p>
<ul>
<li><a href="tel:+33160746800">+33 1 60 74 68 00</a></li>
<li><a href="mailto:elitesolar.contact77@gmail.com">elitesolar.contact77@gmail.com</a></li>
</ul>
</div>
<p id="copyright">© <?= date("Y") ?> Elite Solar. Créé par Lyanis Souidi, Tom Moguljak et Romain Journeau.</p>
</footer>
<script src="../assets/js/script.js"></script>
</body>
</html>

View File

@ -3,7 +3,15 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" href="assets/img/favicon_dark.ico" media="(prefers-color-scheme: light)">
<link rel="icon" href="assets/img/favicon_light.ico" media="(prefers-color-scheme: dark)">
<title>Elite Solar</title>
<meta property="og:title" content="Elite Solar">
<meta name="description" content="Page d'accueil">
<meta property="og:description" content="Page d'accueil">
<meta property="og:type" content="website">
<meta property="og:site_name" content="Elite Solar">
<meta property="og:locale" content="fr_FR">
<link rel="stylesheet" href="assets/css/style.css">
<link rel="stylesheet" href="assets/css/header.css">
<link rel="stylesheet" href="assets/css/footer.css">
@ -12,8 +20,10 @@
</head>
<body>
<header>
<h1>Elite Solar</h1>
<div>
<a href="./"><img id="logo" src="assets/img/logo_noir.png" height="60"></a>
<img id="burger-menu" alt="Menu" onclick="burgerMenu()" src="assets/img/open-menu.svg">
<nav>
<ul id="menu" class="invisible">
<li class="active"><a href="./">Accueil</a></li>
<li><a href="about">Qui sommes-nous ?</a></li>
@ -21,6 +31,8 @@
<li><a href="contact">Contact</a></li>
<li><a href="faq">FAQ</a></li>
</ul>
</nav>
</div>
</header>
<main>
<h1>Bienvenue chez Elite Solar !</h1><br>
@ -80,36 +92,22 @@
<p>Nous sommes impatients de vous aider à profiter de notre technologie innovante et de vous offrir un service de qualité. N'hésitez pas à nous <a href="contact/index.php">contacter</a> pour en savoir plus sur notre produit et comment il peut vous aider.</p>
</div>
</main>
<button onclick="topFunction()" id="backToTop" title="Revenir au début de la page">⬆️</button>
<footer>
<div id="social">
<p>Suivez-Nous</p>
<ul>
<li><a href="https://linkedin.com"><img src="assets/img/linkedin.svg" width="50" height="50" alt="LinkedIn"></a></li>
<li><a href="https://instagram.com/elitesolar77"><img src="assets/img/instagram.svg" width="50" height="50" alt="Instagram"></a></li>
<li><a href="https://www.facebook.com/profile.php?id=100089332237449"><img src="assets/img/facebook.svg" width="50" height="50" alt="Facebook"></a></li>
<li><a href="https://twitter.com/EliteSolar77"><img src="assets/img/twitter.svg" width="50" height="50" alt="Twitter"></a></li>
</ul>
<div class="content">
<div class="text">
© <?= date("Y") ?> Elite Solar
<a href="legal">Mentions légales</a>
<a href="sitemap">Plan du site</a>
</div>
<div id="sitemap">
<p>Plan du site</p>
<ul>
<li><a href="./">Page d'accueil</a></li>
<li><a href="about">Qui sommes-nous ?</a></li>
<li><a href="product">Notre produit</a></li>
<li><a href="faq">Foire aux questions</a></li>
<li><a href="contact">Contact</a></li>
<li><a href="privacy">Politique de confidentialité</a></li>
<li><a href="legal">Mentions légales</a></li>
</ul>
<div class="social">
<a target="_blank" href="https://linkedin.com"><img src="assets/img/linkedin.svg" width="25" height="25" alt="LinkedIn"></a>
<a target="_blank" href="https://instagram.com/elitesolar77"><img src="assets/img/instagram.svg" width="25" height="25" alt="Instagram"></a>
<a target="_blank" href="https://www.facebook.com/profile.php?id=100089332237449"><img src="assets/img/facebook.svg" width="25" height="25" alt="Facebook"></a>
<a target="_blank" href="https://twitter.com/EliteSolar77"><img src="assets/img/twitter.svg" width="25" height="25" alt="Twitter"></a>
</div>
<div id="contact">
<p>Contact</p>
<ul>
<li><a href="tel:+33160746800">+33 1 60 74 68 00</a></li>
<li><a href="mailto:elitesolar.contact77@gmail.com">elitesolar.contact77@gmail.com</a></li>
</ul>
</div>
<p id="copyright">© <?= date("Y") ?> Elite Solar. Créé par Lyanis Souidi, Tom Moguljak et Romain Journeau.</p>
</footer>
<script src="assets/js/script.js"></script>
</body>
</html>

123
legal/index.php Normal file
View File

@ -0,0 +1,123 @@
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" href="../assets/img/favicon_dark.ico" media="(prefers-color-scheme: light)">
<link rel="icon" href="../assets/img/favicon_light.ico" media="(prefers-color-scheme: dark)">
<title>Mentions légales - Elite Solar</title>
<meta property="og:title" content="Mentions légales - Elite Solar">
<meta name="description" content="Mentions légale du site">
<meta property="og:description" content="Mentions légale du site">
<meta property="og:type" content="website">
<meta property="og:site_name" content="Elite Solar">
<meta property="og:locale" content="fr_FR">
<link rel="stylesheet" href="../assets/css/style.css">
<link rel="stylesheet" href="../assets/css/header.css">
<link rel="stylesheet" href="../assets/css/footer.css">
<script src="../assets/js/header.js"></script>
</head>
<body>
<header>
<div>
<a href="../"><img id="logo" src="../assets/img/logo_noir.png" height="60"></a>
<img id="burger-menu" alt="Menu" onclick="burgerMenu()" src="../assets/img/open-menu.svg">
<nav>
<ul id="menu" class="invisible">
<li><a href="../">Accueil</a></li>
<li><a href="../about">Qui sommes-nous ?</a></li>
<li><a href="../product">Produit</a></li>
<li><a href="../contact">Contact</a></li>
<li><a href="../faq">FAQ</a></li>
</ul>
</nav>
</div>
</header>
<main>
<nav class="crumbs">
<ol>
<li class="crumb"><a href="../">Accueil</a></li> &gt;
<li class="crumb">Mentions légales</li>
</ol>
</nav>
<h1>Mentions légales</h1>
<p>
Conformément aux dispositions des Articles 6-III et 19 de la Loi n°2004-575 du 21 juin 2004 pour la Confiance
dans léconomie numérique, dite L.C.E.N., il est porté à la connaissance des utilisateurs et visiteurs,
ci-après l""Utilisateur", du site Elite Solar, ci-après le "Site", les présentes mentions légales.
</p>
<p>
La connexion et la navigation sur le site par lUtilisateur implique acceptation intégrale et sans réserve des
présentes mentions légales.
</p>
<p>
Ces dernières sont accessibles sur le Site à la rubrique « Mentions légales ».
</p>
<h2>ARTICLE 1 - L'EDITEUR</h2>
<p>
L'édition du Site est assurée par Elite Solar dont le siège social est situé Route forestière Hurtault,
77300 Fontainebleau.<br>
Numéro de téléphone : +33 1 60 74 68 00<br>
Adresse e-mail : elitesolar.contact77@gmail.com<br>
Le Directeur de la publication est Souidi Lyanis ci-après l'"Editeur".
</p>
<h2>ARTICLE 2 - L'HEBERGEUR</h2>
<p>
L'hébergeur du Site est l'IUT de Fontainebleau, dont le siège social est situé au Route forestière Hurtault,
77300 Fontainebleau.<br>
Numéro de téléphone : +33 1 60 74 68 00
</p>
<h2>ARTICLE 3 - ACCES AU SITE</h2>
<p>
Le Site est accessible en tout endroit, 7j/7, 24h/24 sauf cas de force majeure, interruption programmée ou
non et pouvant découlant dune nécessité de maintenance.
</p>
<p>
En cas de modification, interruption ou suspension du Site, l'Editeur ne saurait être tenu responsable.
</p>
<h2>ARTICLE 4 - COLLECTE DES DONNEES</h2>
<p>
Le site est exempté de déclaration à la Commission Nationale Informatique et Libertés (CNIL) dans la mesure
il ne collecte aucune donnée concernant les utilisateurs.
</p>
<p>
Toute utilisation, reproduction, diffusion, commercialisation, modification de toute ou partie du Site,
sans autorisation de lEditeur est prohibée et pourra entraînée des actions et poursuites judiciaires
telles que notamment prévues par le Code de la propriété intellectuelle et le Code civil.
</p>
<p>NOTE : Elite Solar est une entreprise <u>fictive</u> crée dans le cadre d'un projet lors de notre formation à l'IUT de Fontainebleau.</p>
</main>
<button onclick="topFunction()" id="backToTop" title="Revenir au début de la page">⬆️</button>
<footer>
<div class="content">
<div class="text">
© <?= date("Y") ?> Elite Solar
<a href="../legal">Mentions légales</a>
<a href="../sitemap">Plan du site</a>
</div>
<div class="social">
<a target="_blank" href="https://linkedin.com"><img src="../assets/img/linkedin.svg" width="25" height="25" alt="LinkedIn"></a>
<a target="_blank" href="https://instagram.com/elitesolar77"><img src="../assets/img/instagram.svg" width="25" height="25" alt="Instagram"></a>
<a target="_blank" href="https://www.facebook.com/profile.php?id=100089332237449"><img src="../assets/img/facebook.svg" width="25" height="25" alt="Facebook"></a>
<a target="_blank" href="https://twitter.com/EliteSolar77"><img src="../assets/img/twitter.svg" width="25" height="25" alt="Twitter"></a>
</div>
</div>
</footer>
<script src="../assets/js/script.js"></script>
</body>
</html>

View File

@ -3,7 +3,15 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" href="../assets/img/favicon_dark.ico" media="(prefers-color-scheme: light)">
<link rel="icon" href="../assets/img/favicon_light.ico" media="(prefers-color-scheme: dark)">
<title>Produit - Elite Solar</title>
<meta property="og:title" content="Produit - Elite Solar">
<meta name="description" content="Retrouvez toutes les informations sur notre produit">
<meta property="og:description" content="Retrouvez toutes les informations sur notre produit">
<meta property="og:type" content="website">
<meta property="og:site_name" content="Elite Solar">
<meta property="og:locale" content="fr_FR">
<link rel="stylesheet" href="../assets/css/style.css">
<link rel="stylesheet" href="../assets/css/header.css">
<link rel="stylesheet" href="../assets/css/footer.css">
@ -12,8 +20,10 @@
</head>
<body>
<header>
<h1>Elite Solar</h1>
<div>
<a href="../"><img id="logo" src="../assets/img/logo_noir.png" height="60"></a>
<img id="burger-menu" alt="Menu" onclick="burgerMenu()" src="../assets/img/open-menu.svg">
<nav>
<ul id="menu" class="invisible">
<li><a href="../">Accueil</a></li>
<li><a href="../about">Qui sommes-nous ?</a></li>
@ -21,8 +31,17 @@
<li><a href="../contact">Contact</a></li>
<li><a href="../faq">FAQ</a></li>
</ul>
</nav>
</div>
</header>
<main>
<nav class="crumbs">
<ol>
<li class="crumb"><a href="../">Accueil</a></li> &gt;
<li class="crumb">Produit</li>
</ol>
</nav>
<h1>Notre produit</h1><br>
<div class="product">
@ -48,36 +67,22 @@
</div>
</div>
</main>
<button onclick="topFunction()" id="backToTop" title="Revenir au début de la page">⬆️</button>
<footer>
<div id="social">
<p>Suivez-Nous</p>
<ul>
<li><a href="https://linkedin.com"><img src="../assets/img/linkedin.svg" width="50" height="50" alt="LinkedIn"></a></li>
<li><a href="https://instagram.com/elitesolar77"><img src="../assets/img/instagram.svg" width="50" height="50" alt="Instagram"></a></li>
<li><a href="https://www.facebook.com/profile.php?id=100089332237449"><img src="../assets/img/facebook.svg" width="50" height="50" alt="Facebook"></a></li>
<li><a href="https://twitter.com/EliteSolar77"><img src="../assets/img/twitter.svg" width="50" height="50" alt="Twitter"></a></li>
</ul>
<div class="content">
<div class="text">
© <?= date("Y") ?> Elite Solar
<a href="../legal">Mentions légales</a>
<a href="../sitemap">Plan du site</a>
</div>
<div id="sitemap">
<p>Plan du site</p>
<ul>
<li><a href="../">Page d'accueil</a></li>
<li><a href="../about">Qui sommes-nous ?</a></li>
<li><a href="../product">Notre produit</a></li>
<li><a href="../faq">Foire aux questions</a></li>
<li><a href="../contact">Contact</a></li>
<li><a href="../privacy">Politique de confidentialité</a></li>
<li><a href="../legal">Mentions légales</a></li>
</ul>
<div class="social">
<a target="_blank" href="https://linkedin.com"><img src="../assets/img/linkedin.svg" width="25" height="25" alt="LinkedIn"></a>
<a target="_blank" href="https://instagram.com/elitesolar77"><img src="../assets/img/instagram.svg" width="25" height="25" alt="Instagram"></a>
<a target="_blank" href="https://www.facebook.com/profile.php?id=100089332237449"><img src="../assets/img/facebook.svg" width="25" height="25" alt="Facebook"></a>
<a target="_blank" href="https://twitter.com/EliteSolar77"><img src="../assets/img/twitter.svg" width="25" height="25" alt="Twitter"></a>
</div>
<div id="contact">
<p>Contact</p>
<ul>
<li><a href="tel:+33160746800">+33 1 60 74 68 00</a></li>
<li><a href="mailto:elitesolar.contact77@gmail.com">elitesolar.contact77@gmail.com</a></li>
</ul>
</div>
<p id="copyright">© <?= date("Y") ?> Elite Solar. Créé par Lyanis Souidi, Tom Moguljak et Romain Journeau.</p>
</footer>
<script src="../assets/js/script.js"></script>
</body>
</html>

92
sitemap/index.php Normal file
View File

@ -0,0 +1,92 @@
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" href="../assets/img/favicon_dark.ico" media="(prefers-color-scheme: light)">
<link rel="icon" href="../assets/img/favicon_light.ico" media="(prefers-color-scheme: dark)">
<title>Plan du site - Elite Solar</title>
<meta property="og:title" content="Plan du site - Elite Solar">
<meta name="description" content="Plan du site">
<meta property="og:description" content="Plan du site">
<meta property="og:type" content="website">
<meta property="og:site_name" content="Elite Solar">
<meta property="og:locale" content="fr_FR">
<link rel="stylesheet" href="../assets/css/style.css">
<link rel="stylesheet" href="../assets/css/header.css">
<link rel="stylesheet" href="../assets/css/footer.css">
<script src="../assets/js/header.js"></script>
</head>
<body>
<header>
<div>
<a href="../"><img id="logo" src="../assets/img/logo_noir.png" height="60"></a>
<img id="burger-menu" alt="Menu" onclick="burgerMenu()" src="../assets/img/open-menu.svg">
<nav>
<ul id="menu" class="invisible">
<li><a href="../">Accueil</a></li>
<li><a href="../about">Qui sommes-nous ?</a></li>
<li><a href="../product">Produit</a></li>
<li><a href="../contact">Contact</a></li>
<li><a href="../faq">FAQ</a></li>
</ul>
</nav>
</div>
</header>
<main>
<nav class="crumbs">
<ol>
<li class="crumb"><a href="../">Accueil</a></li> &gt;
<li class="crumb">Mentions légales</li>
</ol>
</nav>
<h1>Plan du site</h1>
<ul>
<li><a href="../">Accueil</a></li>
<li><a href="../about">Qui sommes-nous ?</a></li>
<li><a href="../product">Produit</a></li>
<li><a href="../contact">Contact</a></li>
<li><a href="../faq">Foire aux questions</a></li>
<li><a href="../team">Notre équipe</a></li>
<?php
try {
$dbh = new PDO('mysql:host=saeweb2022.souidi.fr;dbname=saeweb2022', "saeweb2022");
$employees = $dbh->query('SELECT name, slug FROM employee;');
if (!empty($employees)) {
echo "<ul>";
foreach ($employees as $employee) {
echo '<li><a href="../team/' . $employee['slug'] . '">' . $employee['name'] . '</a></li>' .
'<ul>
<li><a href="../team/' . $employee['slug'] . '?cv">CV</a></li>
<li><a href="../team/' . $employee['slug'] . '?articles">Articles</a></li>
</ul>';
}
echo "</ul>";
}
$dbh = null;
} catch (Exception $e) {}
?>
<li><a href="../blog">Blog</a></li>
<li><a href="../legal">Mentions légales</a></li>
</ul>
</main>
<button onclick="topFunction()" id="backToTop" title="Revenir au début de la page">⬆️</button>
<footer>
<div class="content">
<div class="text">
© <?= date("Y") ?> Elite Solar
<a href="../legal">Mentions légales</a>
<a href="../sitemap">Plan du site</a>
</div>
<div class="social">
<a target="_blank" href="https://linkedin.com"><img src="../assets/img/linkedin.svg" width="25" height="25" alt="LinkedIn"></a>
<a target="_blank" href="https://instagram.com/elitesolar77"><img src="../assets/img/instagram.svg" width="25" height="25" alt="Instagram"></a>
<a target="_blank" href="https://www.facebook.com/profile.php?id=100089332237449"><img src="../assets/img/facebook.svg" width="25" height="25" alt="Facebook"></a>
<a target="_blank" href="https://twitter.com/EliteSolar77"><img src="../assets/img/twitter.svg" width="25" height="25" alt="Twitter"></a>
</div>
</div>
</footer>
<script src="../assets/js/script.js"></script>
</body>
</html>

1
team/.htaccess Normal file
View File

@ -0,0 +1 @@
FallbackResource index.php

329
team/index.php Normal file
View File

@ -0,0 +1,329 @@
<?php
function age($date): int {
$date = new DateTime($date);
$now = new DateTime();
$interval = $now->diff($date);
return $interval->y;
}
try {
$error = false;
$dbh = new PDO('mysql:host=saeweb2022.souidi.fr;dbname=saeweb2022', "saeweb2022");
$url = parse_url($_SERVER["REQUEST_URI"])["path"];
if (str_ends_with($url, "/")) {
$url = substr($url, 0, -1);
}
$url = explode("/", $url);
if (end($url) == "team") {
$mode = "list";
$employees = array();
foreach($dbh->query('SELECT name, jobTitle, slug FROM employee;') as $row) {
$employees[] = $row;
}
} else {
$mode = "view";
$sth = $dbh->prepare("SELECT name, jobTitle, birthdate, email FROM employee WHERE employee.slug = ?;");
$sth->execute([end($url)]);
$employee = $sth->fetch(PDO::FETCH_ASSOC);
if (empty($employee)) {
http_response_code(404);
$error = "notfound";
}
if (isset($_GET["articles"])) {
$mode = "articles";
$sth = $dbh->prepare("SELECT article.title, article.slug, article.created_at, article.excerpt FROM article JOIN employee ON article.author=employee.id WHERE employee.slug = ? ORDER BY article.created_at DESC;");
$sth->execute([end($url)]);
$employee["articles"] = $sth->fetchAll(PDO::FETCH_ASSOC);
} else {
$employee['age'] = age($employee['birthdate']);
$sth = $dbh->prepare("SELECT social.name, social.url FROM employee_social social JOIN employee ON social.employeeId=employee.id WHERE employee.slug = ?;");
$sth->execute([end($url)]);
$employee["socials"] = $sth->fetchAll(PDO::FETCH_ASSOC);
$employee['cv'] = array('formation' => array(), 'work' => array(), 'language' => array(), 'skill' => array(), 'project' => array());
if (isset($_GET["cv"])) {
$mode = "cv";
$sth = $dbh->prepare("SELECT cv.type, cv.title, cv.description, cv.link FROM cv JOIN employee ON cv.employeeId=employee.id WHERE employee.slug = ? ORDER BY cv.priority;");
$sth->execute([end($url)]);
foreach ($sth->fetchAll(PDO::FETCH_ASSOC) as $e) {
if ($e['type'] == "skill") {
$employee['cv'][$e['type']][$e['title']][] = $e['description'];
} else {
$employee['cv'][$e['type']][] = array(
'title' => $e['title'],
'description' => $e['description'],
'link' => $e['link']
);
}
}
} else {
$sth = $dbh->prepare("SELECT article.title, article.slug, article.created_at, article.excerpt FROM article JOIN employee ON article.author=employee.id WHERE employee.slug = ? ORDER BY article.created_at DESC LIMIT 2;");
$sth->execute([end($url)]);
$employee["articles"] = $sth->fetchAll(PDO::FETCH_ASSOC);
$sth = $dbh->prepare("SELECT cv.title, cv.description, cv.link FROM cv JOIN employee ON cv.employeeId=employee.id WHERE employee.slug = ? AND cv.type = 'formation' ORDER BY cv.priority LIMIT 1;");
$sth->execute([end($url)]);
foreach ($sth->fetchAll(PDO::FETCH_ASSOC) as $e) {
$employee['cv']['formation'][] = array(
'title' => $e['title'],
'description' => $e['description'],
'link' => $e['link']
);
}
}
}
$sth = null;
}
$dbh = null;
} catch (PDOException) {
http_response_code(503);
$error = "db";
}
?>
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" href="../assets/img/favicon_dark.ico" media="(prefers-color-scheme: light)">
<link rel="icon" href="../assets/img/favicon_light.ico" media="(prefers-color-scheme: dark)">
<?php
if ($mode == 'list') {
echo '<title>Équipe - Elite Solar</title>';
echo '<meta property="og:title" content="Équipe - Elite Solar">';
echo '<meta name="description" content="L\équipe d\Elite Solar">';
echo '<meta property="og:description" content="L\équipe d\Elite Solar">';
} elseif ($mode == 'view') {
echo '<title>'. $employee['name'] .' - Elite Solar</title>';
echo '<meta property="og:title" content="'. $employee['name'] .' - Elite Solar">';
echo '<meta name="description" content="'. $employee['name'] .' chez Elite Solar">';
echo '<meta property="og:description" content="'. $employee['name'] .' chez Elite Solar">';
} elseif ($mode == 'articles') {
echo '<title>Articles de '. $employee['name'] .' - Elite Solar</title>';
echo '<meta property="og:title" content="Articles de '. $employee['name'] .' - Elite Solar">';
echo '<meta name="description" content="Articles de '. $employee['name'] .' chez Elite Solar">';
echo '<meta property="og:description" content="Articles de '. $employee['name'] .' chez Elite Solar">';
} elseif ($mode == 'cv') {
echo 'CV de ' . $employee['name'];
echo '<title>CV de '. $employee['name'] .' - Elite Solar</title>';
echo '<meta property="og:title" content="CV de '. $employee['name'] .' - Elite Solar">';
echo '<meta name="description" content="CV de '. $employee['name'] .'">';
echo '<meta property="og:description" content="CV de '. $employee['name'] .'">';
}
?>
<meta property="og:type" content="website">
<meta property="og:site_name" content="Elite Solar">
<meta property="og:locale" content="fr_FR">
<link rel="stylesheet" href="../assets/css/style.css">
<link rel="stylesheet" href="../assets/css/header.css">
<link rel="stylesheet" href="../assets/css/footer.css">
<link rel="stylesheet" href="../assets/css/team.css">
<script src="../assets/js/header.js"></script>
</head>
<body>
<header>
<div>
<a href="../"><img id="logo" src="../assets/img/logo_noir.png" height="60"></a>
<img id="burger-menu" alt="Menu" onclick="burgerMenu()" src="../assets/img/open-menu.svg">
<nav>
<ul id="menu" class="invisible">
<li><a href="../">Accueil</a></li>
<li><a href="../about">Qui sommes-nous ?</a></li>
<li><a href="../product">Produit</a></li>
<li><a href="../contact">Contact</a></li>
<li><a href="../faq">FAQ</a></li>
</ul>
</nav>
</div>
</header>
<main>
<?php
if ($error == "db") {
echo '<nav class="crumbs">
<ol>
<li class="crumb"><a href="../">Accueil</a></li> &gt;
<li class="crumb">Équipe</li>
</ol>
</nav>
<p>Une erreur est survenue lors du chargement de la page.</p>';
} elseif ($error == "notfound") {
echo '<nav class="crumbs">
<ol>
<li class="crumb"><a href="../">Accueil</a></li> &gt;
<li class="crumb"><a href="./">Équipe</a></li>
<li class="crumb">Employé</li>
</ol>
</nav>' .
"<h1>Page introuvable</h1>
<p>La page que vous cherchez à atteindre ne peut pas être trouvée.
Il est possible qu'elle ait été supprimée ou déplacée. Si vous avez saisi manuellement son adresse,
veuillez vérifier une éventuelle erreur de saisie.</p><br>
<p><a href='../../'>Retour à la page d'accueil</a></p>";
} else {
if ($mode == 'list') {
echo '<nav class="crumbs">
<ol>
<li class="crumb"><a href="../">Accueil</a></li> &gt;
<li class="crumb">Équipe</li>
</ol>
</nav>' .
"<h1>Notre équipe</h1><br><div id='team'>";
foreach ($employees as $employee) {
echo '<div>
<a href="' . $employee['slug'] . '"><h2>' . $employee['name'] . '</h2></a>
<p>' . $employee['jobTitle'] . '</p>
</div>';
}
echo "</div>";
echo"<br><p id='join'>Vous souhaitez rejoindre notre équipe ? Contactez-nous par mail à l'adresse suivante : <a href='mailto:elitesolar.contact77@gmail.com'>elitesolar.contact77@gmail.com</a></p>";
} elseif ($mode == 'view') {
echo '<nav class="crumbs">
<ol>
<li class="crumb"><a href="../">Accueil</a></li> &gt;
<li class="crumb"><a href="./">Équipe</a></li> &gt;
<li class="crumb">' . $employee["name"] . '</li>
</ol>
</nav>' .
"<h1>" . $employee["name"] . "</h1>";
echo "<h2>" . $employee["age"] . " ans | " . $employee["jobTitle"] . "</h2>";
echo '<ul id="social">';
foreach ($employee["socials"] as $social) {
echo '<li><a target="_blank" href="https://' . $social["url"] . '"><img src="../assets/img/' . $social["name"] . '.svg" width="30" height="30" alt="' . $social["name"] . '"></a></li>';
}
echo '</ul>';
echo "<h2>Articles récents (<a href='?articles'>Voir tout</a>)</h2>";
if (empty($employee["articles"])) echo '<p>Aucun article.</p>';
echo '<ul id="articles">';
foreach ($employee["articles"] as $article) {
$date = new DateTime($article['created_at']);
echo '<li><a href="../blog/' . $article["slug"] . '">' . $article["title"] . '</a><br>
Date : ' . $date->format('d/m/Y') . '<br>
Extrait : ' . $article["excerpt"] . '</li>';
}
echo '</ul>';
echo '<div id="formation"><h2>Formation (<a href="?cv">Voir le CV</a>)</h2>';
if (empty($employee["cv"]["formation"])) echo '<p>Aucune formation enregistrée.</p>';
foreach ($employee["cv"]["formation"] as $formation) {
echo '<b>' . $formation["title"] . '</b><ul><li>' . $formation["description"] . '</li></ul>';
}
echo '</div>';
} elseif ($mode == "cv") {
echo '<nav class="crumbs">
<ol>
<li class="crumb"><a href="../">Accueil</a></li> &gt;
<li class="crumb"><a href="./">Équipe</a></li> &gt;
<li class="crumb"><a href="./' . end($url) . '">' . $employee["name"] . '</a></li> &gt;
<li class="crumb">CV</li>
</ol>
</nav>' .
"<h1> CV de <a href='./" . end($url) . "'>" . $employee["name"] . "</a></h1>";
echo "<div id='cv'><div class='left'>";
echo "<h2>Informations</h2>" .
"<ul>
<li><b>Âge :</b> " . $employee["age"] . "</li>
<li><b>Adresse électronique :</b> " . $employee["email"] . "</li>";
foreach ($employee["socials"] as $social) {
if ($social["name"] == "linkedin" || $social["name"] == "github") {
echo "<li><a target='_blank' href='https://". $social['url'] ."'>" . $social["url"] . "</a></li>";
}
}
echo "</ul>";
echo '<div id="formation"><h2>Formation</h2><div>';
if (empty($employee["cv"]["formation"])) echo '<p>Aucune formation enregistrée.</p>';
foreach ($employee["cv"]["formation"] as $formation) {
echo '<b>' . $formation["title"] . '</b><ul><li>' . $formation["description"] . '</li></ul>';
}
echo '</div></div>';
echo '<div id="work"><h2>Expérience</h2><div>';
if (empty($employee["cv"]["work"])) echo '<p>Aucune expérience enregistrée.</p>';
foreach ($employee["cv"]["work"] as $work) {
echo '<b>' . $work["title"] . '</b><ul><li>' . $work["description"] . '</li></ul>';
}
echo '</div></div>';
echo '<div id="language"><h2>Langues</h2><div>';
if (empty($employee["cv"]["language"])) echo '<p>Aucune langue enregistrée.</p>';
echo '<ul>';
foreach ($employee["cv"]["language"] as $language) {
echo '<li><b>' . $language["title"] . '</b> : ' . $language["description"] . '</li>';
}
echo '</ul></div></div></div>';
echo '<div class="right"><div id="skill"><h2>Compétences</h2>';
if (empty($employee["cv"]["skill"])) echo '<div><p>Aucune compétence enregistrée.</p></div>';
while ($skill = current($employee["cv"]["skill"])) {
echo '<div><b>' . key($employee["cv"]["skill"]) . '</b><ul><li>';
echo implode('</li><li>', $skill);
echo '</li></ul></div>';
next($employee["cv"]["skill"]);
}
echo '</div>';
echo '<div id="project"><h2>Projets</h2>';
if (empty($employee["cv"]["project"])) echo '<p>Aucun projet enregistré.</p>';
foreach ($employee["cv"]["project"] as $project) {
if (empty($project["link"])) {
echo '<b>' . $project["title"] . '</b><ul><li>' . $project["description"] . '</li></ul>';
} else {
echo '<b><a target="_blank" href="' . $project["link"] . '">' . $project["title"] . '</a></b><ul><li>' . $project["description"] . '</li></ul>';
}
}
echo '</div></div></div>';
} elseif ($mode == 'articles') {
echo '<nav class="crumbs">
<ol>
<li class="crumb"><a href="../">Accueil</a></li> &gt;
<li class="crumb"><a href="./">Équipe</a></li> &gt;
<li class="crumb"><a href="./' . end($url) . '">' . $employee["name"] . '</a></li> &gt;
<li class="crumb">Articles</li>
</ol>
</nav>' .
"<h1>Articles publiés par <a href='./" . end($url) . "'>" . $employee["name"] . "</a></h1>";
if (empty($employee["articles"])) echo '<p>Aucun article.</p>';
echo '<ul id="articles">';
foreach ($employee["articles"] as $article) {
$date = new DateTime($article['created_at']);
echo '<li><a href="../blog/' . $article["slug"] . '">' . $article["title"] . '</a><br>
Date : ' . $date->format('d/m/Y') . '<br>
Extrait : ' . $article["excerpt"] . '</li>';
}
echo '</ul>';
}
}
?>
</main>
<button onclick="topFunction()" id="backToTop" title="Revenir au début de la page">⬆️</button>
<footer>
<div class="content">
<div class="text">
© <?= date("Y") ?> Elite Solar
<a href="legal">Mentions légales</a>
<a href="sitemap">Plan du site</a>
</div>
<div class="social">
<a target="_blank" href="https://linkedin.com"><img src="../assets/img/linkedin.svg" width="25" height="25" alt="LinkedIn"></a>
<a target="_blank" href="https://instagram.com/elitesolar77"><img src="../assets/img/instagram.svg" width="25" height="25" alt="Instagram"></a>
<a target="_blank" href="https://www.facebook.com/profile.php?id=100089332237449"><img src="../assets/img/facebook.svg" width="25" height="25" alt="Facebook"></a>
<a target="_blank" href="https://twitter.com/EliteSolar77"><img src="../assets/img/twitter.svg" width="25" height="25" alt="Twitter"></a>
</div>
</div>
</footer>
<script src="../assets/js/script.js"></script>
</body>
</html>