Merge pull request #3 from Yasder5/yass
merge de ce que j'ai fait dans main (hehehe no merge conflict)
This commit is contained in:
commit
68ab50dac5
29 changed files with 1248 additions and 0 deletions
17
app/views/home.php
Normal file
17
app/views/home.php
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
<section class="container mt-5 p-5 d-flex flex-column align-items-center text-center">
|
||||
<h1 class="logo">Folliow</h1>
|
||||
<h2>Là où les talents rencontrent leur avenir</h2>
|
||||
<p class="col-6">Une plateforme de portfolio adapté à vos besoins et aux besoins des entreprises.
|
||||
Créer un portfolio réellement pertinent aux exigences du marché et rentrez
|
||||
directement en contact avec les entreprises.</p>
|
||||
</section>
|
||||
|
||||
<section aria-label="Articles récents">
|
||||
<h2 class="visually-hidden">Les 4 derniers articles</h2>
|
||||
<div class="row mb-2">
|
||||
<?php
|
||||
foreach($arrProjectToDiplay as $objProject){
|
||||
include("../app/views/partials/project.php");
|
||||
}
|
||||
?>
|
||||
</section>
|
||||
23
app/views/login.php
Normal file
23
app/views/login.php
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
<section aria-label="Se connecter">
|
||||
<?php if (count($arrError) > 0) {?>
|
||||
<div class="alert alert-danger">
|
||||
<?php foreach ($arrError as $strError){ ?>
|
||||
<p><?php echo $strError; ?></p>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<form method="post">
|
||||
<p>
|
||||
<label>Mail:</label>
|
||||
<input name="mail" value="<?php echo($strMail); ?>"
|
||||
class="form-control <?php if (isset($arrError['mail'])) { echo 'is-invalid'; } ?> " type="text" >
|
||||
</p>
|
||||
<p>
|
||||
<label>Mot de passe:</label>
|
||||
<input name="pwd" class="form-control <?php if (isset($arrError['pwd'])) { echo 'is-invalid'; } ?> " type="text" >
|
||||
</p>
|
||||
<p>
|
||||
<input class="form-control btn btn-primary" type="submit" >
|
||||
</p>
|
||||
</form>
|
||||
</section>
|
||||
5
app/views/partials/footer.php
Normal file
5
app/views/partials/footer.php
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
|
||||
<h2>coucou c'est le footer</h2>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/js/bootstrap.bundle.min.js" integrity="sha384-FKyoEForCGlyvwx9Hj09JcYn3nv7wiPVlz7YYwJrWVcXK/BmnVDxM+D2scQbITxI" crossorigin="anonymous"></script>
|
||||
</body>
|
||||
</html>
|
||||
88
app/views/partials/header.php
Normal file
88
app/views/partials/header.php
Normal file
|
|
@ -0,0 +1,88 @@
|
|||
<?php
|
||||
session_start();
|
||||
|
||||
?>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="stylesheet" href="assests/css/style.css">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-sRIl4kxILFvY47J16cr9ZwB07vP4J8+LH7qKQnuqkuIAvNWLzeN8tE5YBujZqJLB" crossorigin="anonymous">
|
||||
<title>Folliow</title>
|
||||
</head>
|
||||
<body>
|
||||
<nav class="navbar navbar-expand-lg navbar-light">
|
||||
<div class="container-fluid">
|
||||
<!-- Logo -->
|
||||
<a class="navbar-brand d-flex align-items-center" href="#">
|
||||
<img src="assests/img/logo.png" alt="Logo" class="logo-image">
|
||||
</a>
|
||||
|
||||
<!-- Toggler pour mobile -->
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
|
||||
<!-- Menu de navigation -->
|
||||
<div class="collapse navbar-collapse" id="navbarNav">
|
||||
<ul class="navbar-nav me-auto">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="?ctrl=&action=">Découvrir</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="?ctrl=''&action=''">Customisation</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="?ctrl=''&action=''">Orientation</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="?ctrl=''&action=''">À propos</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="?ctrl=project&action=search">Rechercher</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<!-- Menu secondaire -->
|
||||
<nav class="col-4 d-flex justify-content-end align-items-center" aria-label="Connexion utilisateur">
|
||||
<?php if (!isset($_SESSION['user'])){ ?>
|
||||
<!--- Utilisateur non connecté -->
|
||||
<ul class="navbar-nav ">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="index.php?ctrl=user&action=signin" title="Créer un compte" aria-label="Créer un compte">
|
||||
S'inscrire
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item ">
|
||||
<a class="nav-link" href="index.php?ctrl=user&action=login" title="Se connecter" aria-label="Se connecter">
|
||||
Se connecter
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<?php }else{ ?>
|
||||
<!--- Utilisateur connecté -->
|
||||
<ul class="navbar-nav ">
|
||||
<li class="nav-item ">
|
||||
<a class="nav-link" href="edit_account.php" title="Modifier mon compte" aria-label="Modifier mon compte">
|
||||
<img src=".<?php echo $_SESSION["user"]["user_image"]; ?>"
|
||||
class="rounded-circle flex-shrink-0 mt-2 ml-5"
|
||||
style="width: 36px; height: 36px; object-fit: cover;"
|
||||
alt="Photo de profil">
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item ">
|
||||
<a class="nav-link" href="index.php?ctrl=user&action=logout" title="Se déconnecter" aria-label="Se déconnecter">
|
||||
Logout
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<?php } ?>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
38
app/views/partials/project.php
Normal file
38
app/views/partials/project.php
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
<article class="col-md-3 mb-4">
|
||||
<div class="card h-100 shadow-sm article-card">
|
||||
|
||||
<!-- IMAGE (80%) -->
|
||||
<div class="ratio ratio-16x9">
|
||||
<img src=".<?php echo $objProject->getThumbnail(); ?>"
|
||||
class="w-100 h-100 object-fit-cover"
|
||||
alt=""
|
||||
loading="lazy">
|
||||
</div>
|
||||
|
||||
<div class="d-flex align-items-start gap-3">
|
||||
|
||||
<!-- PHOTO DE PROFIL -->
|
||||
<img src=".<?php echo $objProject->getUser_image(); ?>"
|
||||
class="rounded-circle flex-shrink-0 mt-2 ml-5"
|
||||
style="width: 48px; height: 48px; object-fit: cover;"
|
||||
alt="Photo de profil">
|
||||
|
||||
<!-- INFOS -->
|
||||
<div class="flex-grow-1 card-body p-3">
|
||||
<h3 class="h6 mb-1"><?php echo $objProject->getTitle(); ?></h3>
|
||||
|
||||
<small class="text-body-secondary d-block mb-1">
|
||||
<time><?php echo $objProject->getCreation_date(); ?></time>
|
||||
– <?php echo $objProject->getCreatorname(); ?>
|
||||
</small>
|
||||
|
||||
<a href="?id=<?php echo $objProject->getId()?>"
|
||||
class="stretched-link small">
|
||||
Lire la suite →
|
||||
</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</article>
|
||||
135
app/views/search.php
Normal file
135
app/views/search.php
Normal file
|
|
@ -0,0 +1,135 @@
|
|||
<section aria-label="Blog">
|
||||
<h2 class="visually-hidden">Rechercher parmi les articles</h2>
|
||||
<div class="row mb-2">
|
||||
<section class="mb-5" aria-labelledby="search-heading">
|
||||
<form name="formSearch" method="post" action="?ctrl=project&action=search" class="border rounded p-4 bg-light">
|
||||
<h3 id="search-heading" class="h4 mb-4">
|
||||
<i class="fas fa-search me-2" aria-hidden="true"></i>
|
||||
Rechercher des articles
|
||||
</h3>
|
||||
|
||||
<div class="row g-3">
|
||||
<div class="col-md-6">
|
||||
<label for="keywords" class="form-label">Mots-clés</label>
|
||||
<input
|
||||
value=""
|
||||
type="text"
|
||||
class="form-control"
|
||||
id="keywords"
|
||||
name="keywords"
|
||||
placeholder="Ex: JavaScript, CSS..."
|
||||
aria-describedby="keywords-help">
|
||||
<small id="keywords-help" class="form-text text-muted">
|
||||
Recherchez dans les titres et contenus
|
||||
</small>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<label for="author" class="form-label">Auteur</label>
|
||||
<select class="form-select" id="author" name="author">
|
||||
<option value="0">Tous les auteurs</option>
|
||||
|
||||
</select>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-12">
|
||||
<fieldset>
|
||||
<legend class="form-label">Type de recherche par date</legend>
|
||||
<div class="form-check form-check-inline">
|
||||
<input
|
||||
class="form-check-input"
|
||||
type="radio"
|
||||
name="period"
|
||||
id="period-exact"
|
||||
value="0"
|
||||
aria-controls="date-exact date-range">
|
||||
<label class="form-check-label" for="period-exact">
|
||||
Date exacte
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check form-check-inline">
|
||||
<input
|
||||
class="form-check-input"
|
||||
type="radio"
|
||||
name="period"
|
||||
id="period-range"
|
||||
value="1"
|
||||
aria-controls="date-exact date-range">
|
||||
<label class="form-check-label" for="period-range">
|
||||
Période
|
||||
</label>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6" id="date-exact">
|
||||
<label for="date" class="form-label">Date</label>
|
||||
<input
|
||||
type="date"
|
||||
class="form-control"
|
||||
id="date"
|
||||
name="date"
|
||||
aria-describedby="date-help"
|
||||
value="" >
|
||||
<small id="date-help" class="form-text text-muted">
|
||||
Format: JJ/MM/AAAA
|
||||
</small>
|
||||
</div>
|
||||
|
||||
<div id="date-range" style="display: none;">
|
||||
<div class="row g-3">
|
||||
<div class="col-md-6">
|
||||
<label for="startdate" class="form-label">Date de début</label>
|
||||
<input
|
||||
type="date"
|
||||
class="form-control"
|
||||
id="startdate"
|
||||
name="startdate"
|
||||
value="" >
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label for="enddate" class="form-label">Date de fin</label>
|
||||
<input
|
||||
type="date"
|
||||
class="form-control"
|
||||
id="enddate"
|
||||
name="enddate"
|
||||
value="" >
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12">
|
||||
<button type="submit" class="btn btn-primary">
|
||||
<i class="fas fa-search me-2" aria-hidden="true"></i>
|
||||
Rechercher
|
||||
</button>
|
||||
<button type="reset" class="btn btn-secondary ms-2">
|
||||
<i class="fas fa-redo me-2" aria-hidden="true"></i>
|
||||
Réinitialiser
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
|
||||
<!-- Liste des articles -->
|
||||
<section aria-labelledby="articles-heading">
|
||||
<h3 id="articles-heading" class="visually-hidden">Liste des projets</h3>
|
||||
<div class="row mb-2">
|
||||
<?php
|
||||
if (count($arrProject) == 0){
|
||||
?>
|
||||
<div class="alert alert-warning">
|
||||
<p>Pas de résultats</p>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
foreach($arrProjectToDisplay as $objProject){
|
||||
include("../app/views/partials/project.php");
|
||||
} ?>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</section>
|
||||
Loading…
Add table
Add a link
Reference in a new issue