adding project page
continuous-integration/drone/push Build is failing Details

master
cocaillot 5 months ago
parent 35c9f8842b
commit 9345ed9519

@ -1,55 +1,9 @@
const disk = document.getElementById('profile');
const audio = document.getElementById('disk-audio');
let hovering = false;
let startTime = 0;
let speedInterval = null;
// On page load, try to prime the audio.
window.addEventListener('load', () => {
// Start playing the audio muted to force loading and decoding.
audio.muted = true;
audio.play().then(() => {
// Immediately pause so it doesn't actually play muted.
audio.pause();
audio.muted = false;
audio.currentTime = 0; // Reset to start if desired.
console.log("Audio primed and ready.");
}).catch(err => {
// If this fails (due to browser policies), we'll still try on hover.
console.log("Could not prime audio:", err);
});
});
disk.addEventListener('mouseenter', () => {
hovering = true;
startTime = Date.now();
// Play the audio if not already playing
if (audio.paused) {
audio.currentTime = 0; // Start from beginning if desired
audio.play().catch(err => {
console.log('Playback blocked:', err);
});
}
speedInterval = setInterval(() => {
if (!hovering) return;
const elapsedSeconds = (Date.now() - startTime) / 1000;
const newDuration = Math.max(0.2, 2 - 0.2 * elapsedSeconds);
disk.style.animationDuration = newDuration + 's';
}, 100);
});
disk.addEventListener('mouseleave', () => {
hovering = false;
clearInterval(speedInterval);
disk.style.animationDuration = '2s';
// Pause the audio when the mouse leaves
audio.pause();
});
@ -87,4 +41,28 @@ themeSwitch.addEventListener('change', (e) => {
/* Project gallery animation (click on project to go to project page)*/
document.addEventListener("DOMContentLoaded", function () {
const projects = document.querySelectorAll(".article-wrapper");
projects.forEach((project) => {
project.addEventListener("click", function (event) {
event.preventDefault();
// Get the project name dynamically
const projectName = this.querySelector(".project-title").innerText.trim().toLowerCase().replace(/\s+/g, "_");
// Add animation class
this.classList.add("clicked");
// Wait for animation to finish, then redirect with project name in URL
setTimeout(() => {
document.body.classList.add("fade-out");
setTimeout(() => {
window.location.href = `project.html?name=${projectName}`;
}, 300);
}, 600);
});
});
});

@ -2,81 +2,136 @@
<!-- Doctype HTML5 -->
<html lang="fr">
<head>
<meta charset="UTF-8" />
<meta charset="UTF-8">
<link type="text/css" rel="stylesheet" href="style.css">
<script src="effect.js" defer></script>
<title>Corentin</title>
<nav class="navbar"></nav>
<nav class="navbar">
<ul class="navbar-list">
<li>
<a href="index.html">Accueil</a>
</li>
<li>
<a href="cursus.html">Cursus</a>
</li>
<li>
<a href="planning.html">Planning</a>
</li>
<li><a href="index.html">Accueil</a></li>
<li><a href="cursus.html">Cursus</a></li>
<li><a href="planning.html">Planning</a></li>
<li class="dropdown">
<a href="#">Gallerie</a>
<ul class="dropdown-content">
<li>
<a href="images.html">Images</a>
</li>
<li>
<a href="videos.html">Vidéos</a>
</li>
<li><a href="images.html">Images</a></li>
<li><a href="videos.html">Vidéos</a></li>
</ul>
</li>
<li>
<a href="form.php">Formulaire</a>
</li>
<li><a href="form.html">Contact</a></li>
<label class="switch">
<input type="checkbox" id="theme-switch">
<span class="slider"></span>
</label>
</ul>
</nav>
</head>
<body>
<h1>Galerie d'Images</h1>
<h3 class="title_gallery">Espace</h3>
<div class="gallery">
<a href="space1.html">
<img src="img/space1.jpg" alt="Espace" />
</a>
<a href="space2.html">
<img src="img/space2.jpg" alt="Espace" />
</a>
<a href="space2.html">
<img src="img/space3.jpg" alt="Espace" />
</a>
</div>
<h1>Galerie de Projets</h1>
<h3 class="title_gallery">Jeux video</h3>
<h3 class="title_gallery">Projets Personnels</h3>
<div class="gallery">
<a href="video_game1.html">
<img src="img/video_game1.jpg" alt="Rocket league" />
</a>
<a href="video_game2.html">
<img src="img/video_game2.jpg" alt="Valorant" />
</a>
<a href="video_game3.html">
<img src="img/video_game3.jpeg" alt="Fortnite" />
</a>
<article class="article-wrapper">
<div class="rounded-lg container-project">
</div>
<div class="project-info">
<div class="flex-pr">
<div class="project-title text-nowrap">Project</div>
<div class="project-hover">
<svg style="color: black;" xmlns="http://www.w3.org/2000/svg" width="2em" height="2em" color="black" stroke-linejoin="round" stroke-linecap="round" viewBox="0 0 24 24" stroke-width="2" fill="none" stroke="currentColor"><line y2="12" x2="19" y1="12" x1="5"></line><polyline points="12 5 19 12 12 19"></polyline></svg>
</div>
</div>
<div class="types">
<span style="background-color: rgba(165, 96, 247, 0.43); color: rgb(85, 27, 177);" class="project-type">• Analytics</span>
<span class="project-type">• Dashboards</span>
</div>
</div>
</article>
<article class="article-wrapper">
<div class="rounded-lg container-project">
</div>
<div class="project-info">
<div class="flex-pr">
<div class="project-title text-nowrap">Project</div>
<div class="project-hover">
<svg style="color: black;" xmlns="http://www.w3.org/2000/svg" width="2em" height="2em" color="black" stroke-linejoin="round" stroke-linecap="round" viewBox="0 0 24 24" stroke-width="2" fill="none" stroke="currentColor"><line y2="12" x2="19" y1="12" x1="5"></line><polyline points="12 5 19 12 12 19"></polyline></svg>
</div>
</div>
<div class="types">
<span style="background-color: rgba(165, 96, 247, 0.43); color: rgb(85, 27, 177);" class="project-type">• Analytics</span>
<span class="project-type">• Dashboards</span>
</div>
</div>
</article>
<article class="article-wrapper">
<div class="rounded-lg container-project">
</div>
<div class="project-info">
<div class="flex-pr">
<div class="project-title text-nowrap">Project</div>
<div class="project-hover">
<svg style="color: black;" xmlns="http://www.w3.org/2000/svg" width="2em" height="2em" color="black" stroke-linejoin="round" stroke-linecap="round" viewBox="0 0 24 24" stroke-width="2" fill="none" stroke="currentColor"><line y2="12" x2="19" y1="12" x1="5"></line><polyline points="12 5 19 12 12 19"></polyline></svg>
</div>
</div>
<div class="types">
<span style="background-color: rgba(165, 96, 247, 0.43); color: rgb(85, 27, 177);" class="project-type">• Analytics</span>
<span class="project-type">• Dashboards</span>
</div>
</div>
</article>
</div>
<h3 class="title_gallery">Sport</h3>
<h3 class="title_gallery">Projets Scolaires</h3>
<div class="gallery">
<a href="sport1.html">
<img src="img/sport1.jpg" alt="Paintball" />
</a>
<a href="sport2.html">
<img src="img/sport2.jpg" alt="Ping-pong" />
</a>
<a href="sport3.html">
<img src="img/sport3.jpg" alt="Natation" />
</a>
<article class="article-wrapper">
<div class="rounded-lg container-project">
</div>
<div class="project-info">
<div class="flex-pr">
<div class="project-title text-nowrap">analytics</div>
<div class="project-hover">
<svg style="color: black;" xmlns="http://www.w3.org/2000/svg" width="2em" height="2em" color="black" stroke-linejoin="round" stroke-linecap="round" viewBox="0 0 24 24" stroke-width="2" fill="none" stroke="currentColor"><line y2="12" x2="19" y1="12" x1="5"></line><polyline points="12 5 19 12 12 19"></polyline></svg>
</div>
</div>
<div class="types">
<span style="background-color: rgba(165, 96, 247, 0.43); color: rgb(85, 27, 177);" class="project-type">• Analytics</span>
<span class="project-type">• Dashboards</span>
</div>
</div>
</article>
<article class="article-wrapper">
<div class="rounded-lg container-project">
</div>
<div class="project-info">
<div class="flex-pr">
<div class="project-title text-nowrap">Project</div>
<div class="project-hover">
<svg style="color: black;" xmlns="http://www.w3.org/2000/svg" width="2em" height="2em" color="black" stroke-linejoin="round" stroke-linecap="round" viewBox="0 0 24 24" stroke-width="2" fill="none" stroke="currentColor"><line y2="12" x2="19" y1="12" x1="5"></line><polyline points="12 5 19 12 12 19"></polyline></svg>
</div>
</div>
<div class="types">
<span style="background-color: rgba(165, 96, 247, 0.43); color: rgb(85, 27, 177);" class="project-type">• Analytics</span>
<span class="project-type">• Dashboards</span>
</div>
</div>
</article>
<article class="article-wrapper">
<div class="rounded-lg container-project">
</div>
<div class="project-info">
<div class="flex-pr">
<div class="project-title text-nowrap">Project</div>
<div class="project-hover">
<svg style="color: black;" xmlns="http://www.w3.org/2000/svg" width="2em" height="2em" color="black" stroke-linejoin="round" stroke-linecap="round" viewBox="0 0 24 24" stroke-width="2" fill="none" stroke="currentColor"><line y2="12" x2="19" y1="12" x1="5"></line><polyline points="12 5 19 12 12 19"></polyline></svg>
</div>
</div>
<div class="types">
<span style="background-color: rgba(165, 96, 247, 0.43); color: rgb(85, 27, 177);" class="project-type">• Analytics</span>
<span class="project-type">• Dashboards</span>
</div>
</div>
</article>
</div>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 312 KiB

@ -0,0 +1,55 @@
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<link type="text/css" rel="stylesheet" href="style.css">
<script src="effect.js" defer></script>
<script src="project.js" defer></script> <!-- Load dynamic content -->
<title>Projet</title>
</head>
<body>
<nav class="navbar">
<ul class="navbar-list">
<li><a href="index.html">Accueil</a></li>
<li><a href="cursus.html">Cursus</a></li>
<li><a href="planning.html">Planning</a></li>
<li class="dropdown">
<a href="#">Galerie</a>
<ul class="dropdown-content">
<li><a href="images.html">Images</a></li>
<li><a href="videos.html">Vidéos</a></li>
</ul>
</li>
<li><a href="form.html">Contact</a></li>
<label class="switch">
<input type="checkbox" id="theme-switch">
<span class="slider"></span>
</label>
</ul>
</nav>
<header class="project-header">
<h1 id="project-title">Nom du Projet</h1>
<p id="project-subtitle" class="project-subtitle">Description courte.</p>
</header>
<section class="project-content">
<h2>Description</h2>
<p id="project-description">Chargement...</p>
</section>
<section class="project-gallery">
<h2>Galerie</h2>
<div id="project-gallery" class="gallery"></div>
</section>
<section class="project-tech">
<h2>Technologies utilisées</h2>
<div id="project-tech-icons" class="tech-icons"></div>
</section>
<footer>
<p>Pied de page</p>
</footer>
</body>
</html>

@ -0,0 +1,67 @@
document.addEventListener("DOMContentLoaded", function () {
// Get project name from URL
const urlParams = new URLSearchParams(window.location.search);
const projectName = urlParams.get("name");
// Simulated "database" of projects
const projects = {
"analytics": {
title: "Projet Analytics",
subtitle: "Un projet basé sur l'analyse de données.",
description: "Ce projet se concentre sur l'analyse de données et les tableaux de bord interactifs.",
images: ["img/project/scolaire/mastermind_menu.png", "img/project/analytics2.jpg"],
technologies: ["html", "css", "js"]
},
"dashboards": {
title: "Projet Dashboards",
subtitle: "Création de tableaux de bord interactifs.",
description: "Un projet mettant en avant la visualisation des données avec des graphiques dynamiques.",
images: ["img/dashboards1.jpg", "img/dashboards2.jpg"],
technologies: ["react", "nodejs"]
}
};
// Get project data or fallback
const project = projects[projectName] || {
title: "Projet Inconnu",
subtitle: "Désolé, ce projet n'existe pas.",
description: "Nous n'avons pas trouvé d'informations sur ce projet.",
images: [],
technologies: []
};
// Update HTML content
document.getElementById("project-title").innerText = project.title;
document.getElementById("project-subtitle").innerText = project.subtitle;
document.getElementById("project-description").innerText = project.description;
// Update gallery
const galleryContainer = document.getElementById("project-gallery");
project.images.forEach(imgSrc => {
const img = document.createElement("img");
img.src = imgSrc;
img.alt = "Image du projet";
galleryContainer.appendChild(img);
});
// Update technologies
// Update technologies
const techContainer = document.getElementById("project-tech-icons");
project.technologies.forEach(tech => {
const div = document.createElement("div");
div.classList.add("tech-box", `${tech}-box`); // Ensure the correct class is added
const img = document.createElement("img");
img.src = `icons/${tech}.png`;
img.alt = tech.toUpperCase();
const text = document.createElement("span");
text.innerText = tech.toUpperCase();
div.appendChild(img);
div.appendChild(text);
techContainer.appendChild(div);
});
// Fade-in effect when page loads
document.body.classList.remove("fade-out");
});

@ -395,7 +395,7 @@ figcaption {
.title_gallery {
background: rgba(0, 0, 0, 0.3);
background: rgba(184, 165, 165, 0.3);
padding: 10px 20px;
border-radius: 5px;
}
@ -795,3 +795,259 @@ ul {
background-color: #ff0000;
}
/* Gallerie projet */
.article-wrapper {
width: 250px;
-webkit-transition: 0.15s all ease-in-out;
transition: 0.15s all ease-in-out;
border-radius: 10px;
padding: 5px;
border: 4px solid transparent;
cursor: pointer;
background-color: white;
}
.article-wrapper:hover {
-webkit-box-shadow: 10px 10px 0 #4e84ff, 20px 20px 0 #4444bd;
box-shadow: 10px 10px 0 #4e84ff, 20px 20px 0 #4444bd;
border-color: #0578c5;
-webkit-transform: translate(-20px, -20px);
-ms-transform: translate(-20px, -20px);
transform: translate(-20px, -20px);
}
.article-wrapper:active {
-webkit-box-shadow: none;
box-shadow: none;
-webkit-transform: translate(0, 0);
-ms-transform: translate(0, 0);
transform: translate(0, 0);
}
.types {
gap: 10px;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
place-content: flex-start;
}
.rounded-lg {
/* class tailwind */
border-radius: 10px;
}
.article-wrapper:hover .project-hover {
-webkit-transform: rotate(-45deg);
-ms-transform: rotate(-45deg);
transform: rotate(-45deg);
background-color: #a6c2f0;
}
.project-info {
padding-top: 20px;
padding: 10px;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
gap: 20px;
}
.project-title {
font-size: 2em;
margin: 0;
font-weight: 600;
/* depend de la font */
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
color: black;
}
.flex-pr {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-pack: justify;
-ms-flex-pack: justify;
justify-content: space-between;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
}
.project-type {
background: #b2b2fd;
color: #1a41cd;
font-weight: bold;
padding: 0.3em 0.7em;
border-radius: 15px;
font-size: 12px;
letter-spacing: -0.6px
}
.project-hover {
border-radius: 50%;
width: 50px;
height: 50px;
padding: 9px;
-webkit-transition: all 0.3s ease;
transition: all 0.3s ease;
}
.container-project {
width: 100%;
height: 170px;
background: gray;
}
/* Dark Mode for Project Gallery */
body.light-mode .article-wrapper {
background-color: #9c8d8d;
border-color: #555;
}
body.light-mode .article-wrapper:hover {
box-shadow: 10px 10px 0 #6a5acd, 20px 20px 0 #483d8b;
border-color: #6a5acd;
}
body.light-mode .project-info {
color: #f1f1f1;
}
body.light-mode .project-title {
color: #fff;
}
body.light-mode .project-hover {
background-color: #444;
}
body.light-mode .project-type {
background: #555;
color: #bbb;
}
/* Click effect */
.article-wrapper.clicked {
transform: scale(0.9);
opacity: 0;
transition: transform 0.6s ease, opacity 0.6s ease;
}
/* Smooth page fade-in */
body {
opacity: 1;
transition: opacity 0.3s ease-in-out;
}
body.fade-out {
opacity: 0;
}
/* General Styling for Project Page */
.project-header {
text-align: center;
margin: 40px auto;
animation: fadeIn 0.8s ease-in-out;
}
.project-subtitle {
font-size: 1.2em;
color: #aaa;
margin-bottom: 20px;
}
.project-content, .project-gallery, .project-tech {
width: 80%;
margin: 20px auto;
text-align: center;
animation: slideUp 0.8s ease-in-out;
}
/* Center and style images */
.project-gallery img {
width: 100%;
max-width: 600px;
height: auto;
border-radius: 10px;
transition: transform 0.3s ease, box-shadow 0.3s ease;
cursor: pointer;
}
.project-gallery img:hover {
transform: scale(1.1);
box-shadow: 0 4px 10px rgba(255, 255, 255, 0.3);
}
.tech-icons {
display: flex;
gap: 15px;
justify-content: center;
flex-wrap: wrap;
padding: 20px;
}
/* Language/Tech Boxes */
.tech-box {
display: flex;
align-items: center;
justify-content: center;
gap: 10px;
padding: 10px 15px;
border-radius: 10px;
font-weight: bold;
color: white;
font-size: 1.1em;
transition: transform 0.3s ease, box-shadow 0.3s ease;
border: 2px solid rgba(255, 255, 255, 0.3);
}
.tech-box img {
width: 30px;
height: 30px;
border-radius: 50%;
background: rgba(255, 255, 255, 0.2);
padding: 5px;
}
.tech-box:hover {
transform: scale(1.1);
box-shadow: 0 4px 10px rgba(255, 255, 255, 0.5);
}
/* Colors for Technologies */
.html-box { background: #E34F26; border-color: #b3391d; }
.css-box { background: #1572B6; border-color: #0d5ea0; }
.js-box { background: #F7DF1E; color: #333; border-color: #c2b000; }
.react-box { background: #61DAFB; color: #000; border-color: #48bcd1; }
.nodejs-box { background: #83CD29; border-color: #639b1e; }
.python-box { background: #3776AB; border-color: #255680; }
.sql-box { background: #4479A1; border-color: #325d78; }
/* Animations */
@keyframes fadeIn {
from { opacity: 0; transform: translateY(-10px); }
to { opacity: 1; transform: translateY(0); }
}
@keyframes slideUp {
from { opacity: 0; transform: translateY(20px); }
to { opacity: 1; transform: translateY(0); }
}

Loading…
Cancel
Save