This commit is contained in:
root 2025-08-18 17:56:26 -04:00
parent 737e558e3f
commit 035dc77d8e
12 changed files with 189 additions and 49 deletions

44
404.php Normal file
View File

@ -0,0 +1,44 @@
<?php $version = "1.1.0"; ?>
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo('charset'); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>MxDev</title>
<?php wp_head(); // Crucial: Allows plugins to add scripts and styles ?>
</head>
<body <?php body_class(); ?>>
<?php get_header(); ?>
<main>
<div id="primary" class="content-area">
<main id="main" class="site-main">
<section class="error-404 not-found">
<header class="page-header">
<h2 class="page-title">
<?php esc_html_e("Oops! Vous ne devirez pas être ici!", 'your-theme-text-domain'); ?>
</h2>
<br>
<h2 class="page-title">
<?php esc_html_e("Faites comme si vous n'aviez rien vue...", 'your-theme-text-domain'); ?>
</h2>
</header>
<br>
<div class="page-content">
<img src="/wp-content/themes/mxdev/img/mariofpeach.gif">
<p><?php esc_html_e("Cette page n'existe pas, laissons Mario et Peach tranquille!", 'your-theme-text-domain'); ?>
</p>
</div>
</section>
</main>
</div>
</main>
<?php get_footer('layout', 'footer'); ?>
</body>
</html>

View File

@ -4,7 +4,7 @@ function my_custom_comment_format($comment, $args, $depth)
$GLOBALS['comment'] = $comment; ?>
<article class="comment">
<h2><?php echo get_avatar($comment, 48); ?><?php comment_author(); ?>
<h2><?php comment_author(); ?>
</h2>
<br>
<h3><?php printf(__('%1$s at %2$s'), get_comment_date(), get_comment_time()); ?></h3>

4
footer.php Normal file
View File

@ -0,0 +1,4 @@
<h3>Thème <a href="https://mxgit.ovh/mikx/WordPress_MxDev">MxDev</a> v<?php echo get_theme_version(); ?></h3>
<h3>Alimenté par <a href="https://wordpress.org/">WordPress</a></h3>
<h3><a href="https://creativecommons.org/licenses/by-sa/4.0/"><img src="/wp-content/themes/mxdev/img/by-sa.png" width="118" heigth="41"></a></h3><br>
<?php wp_footer(); // Crucial: Allows plugins to add scripts at the end of the body ?>

View File

@ -1,5 +1,9 @@
<?php
function get_theme_version(){
return $version = "1.1.0";
}
function my_awesome_theme_scripts() {
// Enqueue the main stylesheet.
wp_enqueue_style(

48
header.php Normal file
View File

@ -0,0 +1,48 @@
<header>
<?php
// ... (existing code)
// Before the main content, or in a sidebar area
if (!is_user_logged_in()) { // Only show the form if the user is not logged in
echo '<div class="login-form-container">';
echo '<h2>Connexion</h2>';
wp_login_form(array(
'redirect' => home_url(), // Redirects to the homepage after login
'label_username' => __('Utilisateur/Courriel', 'my-custom-theme'),
'label_password' => __('Mot de passe', 'my-custom-theme'),
'label_remember' => __('Se souvenir de moi', 'my-custom-theme'),
'label_log_in' => __('Connexion', 'my-custom-theme'),
'id_username' => 'user_login',
'id_password' => 'user_pass',
'id_remember' => 'rememberme',
'id_submit' => 'wp-submit',
'remember' => true,
'value_username' => '',
'value_remember' => false // Default to not checked
));
echo '<p class="login-links">';
echo '<a href="' . wp_registration_url() . '">' . __('Créer un compte', 'my-custom-theme') . '</a> | ';
echo '<a href="' . wp_lostpassword_url() . '">' . __('Oublié votre mot de passe?', 'my-custom-theme') . '</a>';
echo '</p>';
echo '</div>';
} else {
// Optional: Display a message for logged-in users
echo '<div class="logged-in-message">';
echo '<h3>' . sprintf(__('Bienvenue, <a href="/wp-admin/profile.php">%s</a>!', 'my-custom-theme'), wp_get_current_user()->display_name) . '</h3> <h4><a href="' . wp_logout_url(home_url()) . '">' . __('Déconnexion', 'my-custom-theme') . '</a></h4>';
echo '</div>';
}
// ... (rest of your existing code)
?>
<?php
if (function_exists('the_custom_logo')) {
the_custom_logo();
}
?>
<br>
<h3>Thème WordPress par mikx. Créé avec l'aide de Gemini.</h3><br>
<h3>Pour me rejoindre</h3>
<h4><a href="https://www.facebook.com/groups/2141742079467131" target="_blank">Facebook</a></h4>
<h4><a href="http://discord.mxg.ovh" target="_blank">Discord</a></h4>
<h3>Setup</h3> <h4><a href="/index.php/setup-maison/">Maison</a></h4> <h4><a href="/index.php/setup-ovh/">OVH</a></h4>
</header>
<br>

BIN
img/by-sa.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

BIN
img/mariofpeach.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

BIN
img/mxdev_hbackground.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

@ -1,4 +1,3 @@
<?php $version = "1.0.0"; ?>
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
@ -11,48 +10,42 @@
<body <?php body_class(); ?>>
<header>
<?php
if (function_exists('the_custom_logo')) {
the_custom_logo();
}
?>
<br>
<h3>Thème WordPress par mikx. Créé avec l'aide de Gemini.</h3><br>
<h3>Pour me rejoindre</h3> <h3><a href="https://www.facebook.com/groups/2141742079467131" target="_blank">Facebook</a></h3> <h3><a href="http://discord.mxg.ovh" target="_blank">Discord</a></h3>
</header>
<br>
<?php get_header(); ?>
<main>
<?php if (have_posts()): ?>
<?php while (have_posts()):
the_post(); ?>
<article>
<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a> (<?php the_date(); ?>) (<?php the_author(); ?>)</h2>
<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a> (<?php the_date(); ?>)
(<?php the_author(); ?>)</h2>
<br>
<h3><?php echo 'Projet : ' . get_field('projet'); ?></h3>
<h4><?php echo 'Language : ' . get_field('language'); ?></h4>
<?php
// Format the sources text. Set it as "Privé" if there is no http in the field value.
$source = '';
<?php if (in_category('dev')): ?>
<h3><?php echo 'Projet : ' . get_field('projet'); ?></h3>
<h4><?php echo 'Language : ' . get_field('language'); ?></h4>
<?php
// Format the sources text. Set it as "Privé" if there is no http in the field value.
$source = '';
$proSources = get_field('sources');
if (!str_contains($proSources, "http")) {
$source = 'Sources : Privé';
} else {
if (str_contains($proSources, "mxgit")) {
$source = 'Sources : <a href="' . get_field('sources') . '" target="_blank">MxGit</a>';
$proSources = get_field('sources');
if (!str_contains($proSources, "http")) {
$source = 'Sources : Privé';
} else {
if (str_contains($proSources, "mxgit")) {
$source = 'Sources : <a href="' . get_field('sources') . '" target="_blank">MxGit</a>';
}
if (str_contains($proSources, "github")) {
$source = 'Sources : <a href="' . get_field('sources') . '" target="_blank">GitHub</a>';
}
}
if (str_contains($proSources, "github")) {
$source = 'Sources : <a href="' . get_field('sources') . '" target="_blank">GitHub</a>';
}
}
?>
<h4><?php echo $source; ?></h4>
?>
<h4><?php echo $source; ?></h4>
<?php endif; ?>
<div>
<?php the_content(); ?>
</div>
<h3><?php comments_number( '0 Commentaire', '1 Commentaire', '% Commentaires' ); ?></h3>
<h3>Catégorie(s)</h3> <h4><?php the_category( $separator, $parents, $post_id ); ?></h4> <h3><?php comments_number('0 Commentaire', '1 Commentaire', '% Commentaires'); ?></h3>
</article>
<?php endwhile; ?>
<?php else: ?>
@ -60,8 +53,7 @@
<?php endif; ?>
</main>
<h3>Thème <a href="https://mxgit.ovh/mikx/WordPress_MxDev">MxDev</a> v<?php echo $version?></h3> <h3>Alimenté par <a href="https://wordpress.org/">WordPress</a></h3> <h3><a href="https://spdx.org/licenses/MPL-2.0.html">Mozilla Public License 2.0</a></h3><br>
<?php wp_footer(); // Crucial: Allows plugins to add scripts at the end of the body ?>
<?php get_footer('layout', 'footer'); ?>
</body>
</html>

31
page.php Normal file
View File

@ -0,0 +1,31 @@
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo('charset'); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>MxDev</title>
<?php wp_head(); // Crucial: Allows plugins to add scripts and styles ?>
</head>
<body <?php body_class(); ?>></body>
<?php get_header(); ?>
<div id="primary" class="content-area">
<main id="main" class="site-main" role="main">
<?php while (have_posts()):
the_post(); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<h2><?php the_title(); ?></h2>
<?php the_content(); ?>
</article>
<?php endwhile; ?>
</main>
</div>
<?php get_footer(); ?>

View File

@ -51,8 +51,11 @@ body a:hover {
}
h2 {
background: linear-gradient(to bottom, rgba(255, 255, 255, 0.15) 0%, rgba(0, 0, 0, 0.15) 100%), radial-gradient(at top center, rgba(255, 255, 255, 0.40) 0%, rgba(0, 0, 0, 0.40) 120%) #989898;
background-blend-mode: multiply, multiply;
background-image: url('img/mxdev_hbackground.png');
/* Or contain, or specific dimensions */
background-repeat: repeat;
/* Prevent image repetition */
background-size: auto;
max-width: 100%;
/* A good readable width for text */
line-height: 1.7;
@ -71,8 +74,11 @@ h2 {
}
h3 {
background: linear-gradient(to bottom, rgba(255, 255, 255, 0.15) 0%, rgba(0, 0, 0, 0.15) 100%), radial-gradient(at top center, rgba(255, 255, 255, 0.40) 0%, rgba(0, 0, 0, 0.40) 120%) #989898;
background-blend-mode: multiply, multiply;
background-image: url('img/mxdev_hbackground.png');
/* Or contain, or specific dimensions */
background-repeat: repeat;
/* Prevent image repetition */
background-size: auto;
max-width: 100%;
/* A good readable width for text */
line-height: 1.7;
@ -91,8 +97,11 @@ h3 {
}
h4 {
background: linear-gradient(to bottom, rgba(255, 255, 255, 0.15) 0%, rgba(0, 0, 0, 0.15) 100%), radial-gradient(at top center, rgba(255, 255, 255, 0.40) 0%, rgba(0, 0, 0, 0.40) 120%) #989898;
background-blend-mode: multiply, multiply;
background-image: url('img/mxdev_hbackground.png');
/* Or contain, or specific dimensions */
background-repeat: repeat;
/* Prevent image repetition */
background-size: auto;
max-width: 100%;
/* A good readable width for text */
line-height: 1.7;
@ -126,7 +135,7 @@ article {
border-radius: 8px;
box-shadow: rgba(0, 0, 0, 0.3) 0px 19px 38px, rgba(0, 0, 0, 0.22) 0px 15px 12px;
color: #ffffff;
background-image: url('mxdev_posttitleback.png');
background-image: url('img/mxdev_posttitleback.png');
/* Or contain, or specific dimensions */
background-repeat: repeat;
/* Prevent image repetition */
@ -137,8 +146,11 @@ article {
}
article h2 {
background: linear-gradient(to bottom, rgba(255, 255, 255, 0.15) 0%, rgba(0, 0, 0, 0.15) 100%), radial-gradient(at top center, rgba(255, 255, 255, 0.40) 0%, rgba(0, 0, 0, 0.40) 120%) #989898;
background-blend-mode: multiply, multiply;
background-image: url('img/mxdev_hbackground.png');
/* Or contain, or specific dimensions */
background-repeat: repeat;
/* Prevent image repetition */
background-size: auto;
max-width: 100%;
/* A good readable width for text */
line-height: 1.7;
@ -147,7 +159,6 @@ article h2 {
/* Centers the content container */
margin-bottom: 1.5em;
/* Space between paragraphs */
background-color: var(--surface-color);
border: 2px solid #474747;
border-width: 1px 1px 1px 1px;
color: #000000;
@ -159,8 +170,11 @@ article h2 {
}
article h3 {
background: linear-gradient(to bottom, rgba(255, 255, 255, 0.15) 0%, rgba(0, 0, 0, 0.15) 100%), radial-gradient(at top center, rgba(255, 255, 255, 0.40) 0%, rgba(0, 0, 0, 0.40) 120%) #989898;
background-blend-mode: multiply, multiply;
background-image: url('img/mxdev_hbackground.png');
/* Or contain, or specific dimensions */
background-repeat: repeat;
/* Prevent image repetition */
background-size: auto;
max-width: 100%;
/* A good readable width for text */
line-height: 1.7;
@ -179,8 +193,11 @@ article h3 {
}
article h4 {
background: linear-gradient(to bottom, rgba(255, 255, 255, 0.15) 0%, rgba(0, 0, 0, 0.15) 100%), radial-gradient(at top center, rgba(255, 255, 255, 0.40) 0%, rgba(0, 0, 0, 0.40) 120%) #989898;
background-blend-mode: multiply, multiply;
background-image: url('img/mxdev_hbackground.png');
/* Or contain, or specific dimensions */
background-repeat: repeat;
/* Prevent image repetition */
background-size: auto;
max-width: 100%;
/* A good readable width for text */
line-height: 1.7;
@ -226,7 +243,7 @@ article a:hover {
border-radius: 8px;
box-shadow: rgba(0, 0, 0, 0.3) 0px 19px 38px, rgba(0, 0, 0, 0.22) 0px 15px 12px;
color: #ffffff;
background-image: url('mxdev_posttitleback.png');
background-image: url('img/mxdev_posttitleback.png');
/* Or contain, or specific dimensions */
background-repeat: repeat;
/* Prevent image repetition */