This repository has been archived on 2024-04-03. You can view files and clone it, but cannot push or open issues or pull requests.
kspace-wordpress-theme/home.php

68 lines
2.5 KiB
PHP
Raw Permalink Normal View History

2021-01-02 19:31:24 +01:00
<?php get_header(); ?>
2023-07-15 12:48:08 +02:00
<div class="fullwidth" id="skip">
2021-01-17 11:27:29 +01:00
<?php include(TEMPLATEPATH . '/components/globalflag.php'); ?>
2021-01-02 19:31:24 +01:00
<!-- Recuperation de la page de home -->
<?php if ( !is_paged() ) {
2023-07-15 12:48:08 +02:00
$page = get_page_by_path( 'home' );
2021-01-02 19:31:24 +01:00
if ($page != null) {
2023-07-15 12:48:08 +02:00
?>
2023-10-28 09:04:41 +02:00
<section id="description" class="p-0">
<h1 id="desc-title" class="page-title"><?php echo get_the_title( $page ); ?></h1>
<img class="illustration" alt="Un kobold gris et violet binoclard, avec un manteau noir plein de cables" src="<?php echo get_template_directory_uri();?>/img/zerhjyj-small.webp" height="530px" width="509px" />
<div id="description-content">
2024-02-16 16:08:33 +01:00
<div class="post-content"><?php echo $page->post_content; ?></div>
2023-10-28 09:04:41 +02:00
<div class="align-centered-block"><a href="/about" class="btn btn-primary">Plus d'info</a></div>
2023-07-15 12:48:08 +02:00
</div>
</section>
<section class="mb-2 d-none d-block-xl">
2023-10-28 09:04:41 +02:00
<nav aria-label="Mes sites web">
2023-07-15 12:48:08 +02:00
<ul class="no-pills f-row f-between mb-1">
<?php
$listmenu = get_nav_menu_locations();
$menu = wp_get_nav_menu_items($listmenu['link-menu']);
foreach ($menu as $menuElement) {
echo '<li class="m-0"><a href="' . $menuElement->url . '" class="btn btn-primary">'. $menuElement->title . '</a></li>';
}
?>
</ul>
</nav>
</section>
<?php
2021-01-02 19:31:24 +01:00
}
2023-07-15 12:48:08 +02:00
}
2021-01-02 19:31:24 +01:00
?>
2023-07-15 12:48:08 +02:00
<div class="container-blog">
<section>
<div class="mb-1 d-none d-block-sm bg-light-2">
<?php include(TEMPLATEPATH . '/components/searchform.php'); ?>
</div>
<?php
echo '<h1 class="page-title">Dernier article</h1>';
include(TEMPLATEPATH . '/components/featured.php');
?>
<h1 class="page-title">Dernières publications</h1>
<?php include(TEMPLATEPATH . '/components/preview-list-home.php'); ?>
<div>
<?php if ( !is_paged() ) {
$page = get_page_by_path( 'buttons' );
if ($page != null) {
?> <h1 class="sr-only" id="title-buttons">Boutons web</h1> <?php
echo '<div>' . $page->post_content . '</div>';
}
}
?>
</div>
</section>
2021-01-02 19:31:24 +01:00
2023-07-15 12:48:08 +02:00
<aside class="sidebar" aria-labelledby="title-sidebar">
<h1 class="sr-only" id="title-sidebar">Menu de navigation</h1>
<?php include(TEMPLATEPATH . '/components/sidebar/categories.php'); ?>
<?php include(TEMPLATEPATH . '/components/sidebar/tags.php'); ?>
<?php include(TEMPLATEPATH . '/components/sidebar/archives.php'); ?>
</aside>
</div>
</div>
2021-01-02 19:31:24 +01:00
<?php get_footer(); ?>