first commit
This commit is contained in:
67
index.php
Normal file
67
index.php
Normal file
@@ -0,0 +1,67 @@
|
||||
<?php $version = "1.0.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(); ?>>
|
||||
|
||||
<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>
|
||||
<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>
|
||||
<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 = '';
|
||||
|
||||
$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>';
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
<h4><?php echo $source; ?></h4>
|
||||
<div>
|
||||
<?php the_content(); ?>
|
||||
</div>
|
||||
<h3><?php comments_number( '0 Commentaire', '1 Commentaire', '% Commentaires' ); ?></h3>
|
||||
</article>
|
||||
<?php endwhile; ?>
|
||||
<?php else: ?>
|
||||
<p>Sorry, no posts matched your criteria.</p>
|
||||
<?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 ?>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user