add: backend gaming
All checks were successful
Deploy via SSH on push / deploy-via-ssh (push) Successful in 22s

This commit is contained in:
2025-12-01 12:46:08 +00:00
parent 2bb7c9f799
commit 36633ebd2b
4 changed files with 64 additions and 59 deletions

View File

@@ -1,5 +1,6 @@
import os,random
from flask import Flask, render_template
from flask import Flask, render_template, send_from_directory
from projects import projects
app = Flask(__name__)
@@ -7,12 +8,13 @@ app = Flask(__name__)
def home():
bg_files = os.listdir("static/img/backgrounds")
bg = random.choice(bg_files)
return render_template("index.html", title="Accueil", background=bg)
return render_template("index.html", title="Accueil", background=bg, projects=projects[:3])
@app.route("/projects")
def projects():
return render_template("projects.html", title="Projets")
return render_template("projects.html", title="Projets", projects=projects)
@app.route("/contact")
def contact():
return render_template("contact.html", title="Contact")

23
src/data/projects.py Normal file
View File

@@ -0,0 +1,23 @@
projects = [
{
"title": "Kernel From Scratch",
"description": "Création d'un kernel en Zig 0.13 avec pilotes claviers et graphiques, IDT, GDT, gestion mémoire et shell intégré",
"image": "kfs.png",
"link": "https://github.com/Kbz-8/42_KFS",
"align": "start"
},
{
"title": "Swifty Companion",
"description": "Application mobile Android et iOS utilisant l'API de 42 pour avoir des informations sur les campus",
"image": "companion.png",
"link": "https://git.vavaas.dev/Namonay/swifty-companion",
"align": "end"
},
{
"title": "Override",
"description": "Défis de cybersécurité sous formes de CTF, avec reverse engineering, pwn et exploitation de failles",
"image": "override.png",
"link": "https://github.com/C18H24O2/override",
"align": "start"
},
]

View File

@@ -27,67 +27,26 @@
<!-- Featured Project Boxes -->
<div class="container mb-5">
<!-- Project 1 (left) -->
<div class="row mb-5 justify-content-start">
{% for project in projects %}
<div class="row mb-5 justify-content-{{ project.align }}">
<div class="col-md-8">
<a href="https://github.com/Kbz-8/42_KFS" class="text-decoration-none">
<a href="{{ project.link }}" class="text-decoration-none">
<div class="p-4 rounded-4 text-light shadow hover-scale transparent-box">
<div class="row align-items-center">
<!-- Text -->
<div class="row align-items-center {% if project.align == 'end' %}flex-md-row-reverse{% endif %}">
<div class="col-md-7">
<h4>Kernel From Scratch</h4>
<p>Création d'un kernel en Zig 0.13 avec pilotes claviers et graphiques, IDT, GDT, gestion mémoire et shell intégré</p>
<h4>{{ project.title }}</h4>
<p>{{ project.description }}</p>
</div>
<!-- Image -->
<div class="col-md-5 text-center">
<img src="{{ url_for('static', filename='img/kfs.png') }}"
alt="Projet 1" class="img-fluid rounded shadow project-img">
<img src="{{ url_for('static', filename='img/' ~ project.image) }}"
alt="{{ project.title }}" class="img-fluid rounded shadow project-img">
</div>
</div>
</div>
</a>
</div>
</div>
<!-- Project 2 (right) -->
<div class="row mb-5 justify-content-end">
<div class="col-md-8">
<a href="https://git.vavaas.dev/Namonay/swifty-companion" class="text-decoration-none">
<div class="p-4 rounded-4 text-light shadow hover-scale transparent-box">
<div class="row align-items-center flex-md-row-reverse">
<div class="col-md-7">
<h4>Swifty Companion</h4>
<p>Application mobile Android et iOS utilisant l'API de 42 pour avoir des informations sur les campus</p>
</div>
<div class="col-md-5 text-center">
<img src="{{ url_for('static', filename='img/companion.png') }}"
alt="Projet 2" class="img-fluid rounded shadow project-img">
</div>
</div>
</div>
</a>
</div>
</div>
<!-- Project 3 (left) -->
<div class="row mb-5 justify-content-start">
<div class="col-md-8">
<a href="https://github.com/C18H24O2/override" class="text-decoration-none">
<div class="p-4 rounded-4 text-light shadow hover-scale transparent-box">
<div class="row align-items-center">
<div class="col-md-7">
<h4>Override</h4>
<p>Défis de cybersécurité sous formes de CTF, avec reverse engineering, pwn et exploitation de failles</p>
</div>
<div class="col-md-5 text-center">
<img src="{{ url_for('static', filename='img/override.png') }}"
alt="Projet 3" class="img-fluid rounded shadow project-img">
</div>
</div>
</div>
</a>
</div>
</div>
</div>
{% endfor %}
</div>
{% endblock %}

View File

@@ -1,9 +1,30 @@
{% extends "base.html" %}
{% block content %}
<h1>Mes Projets</h1>
<ul>
<li>Projet 1 Devenir un tigre</li>
<li>Projet 2 Un script dautomatisation pour acheter des monsters</li>
<li>Projet 3 Trouver un job</li>
</ul>
<div class="container my-5">
<h1 class="mb-4 text-center">My Projects</h1>
{% for project in projects %}
<div class="row mb-4 justify-content-center">
<div class="col-md-10">
<a href="{{ project.link }}" class="text-decoration-none">
<div class="p-4 rounded-4 text-light shadow hover-scale transparent-box d-flex flex-column flex-md-row align-items-center">
<!-- Project Image -->
<div class="project-img-wrapper text-center mb-3 mb-md-0 me-md-4">
<img src="{{ url_for('static', filename='img/' ~ project.image) }}"
alt="{{ project.title }}" class="img-fluid rounded shadow project-img" style="max-width: 200px;">
</div>
<!-- Project Text -->
<div class="project-text">
<h4>{{ project.title }}</h4>
<p>{{ project.description }}</p>
</div>
</div>
</a>
</div>
</div>
{% endfor %}
</div>
{% endblock %}