Compare commits
3 Commits
9407a093fb
...
24c4dadbca
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
24c4dadbca | ||
|
|
4fc13822a8 | ||
|
|
42181d6b74 |
36
archive-fonds-archives.php
Normal file
36
archive-fonds-archives.php
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
<?php get_header(); ?>
|
||||
|
||||
<?php
|
||||
$current_post_type = get_post_type();
|
||||
|
||||
?>
|
||||
|
||||
<main id="content" class="site-content flex-grow">
|
||||
<?php get_template_part('template-parts/post-types/fonds-archives/archive-header'); ?>
|
||||
|
||||
|
||||
|
||||
<!-- #### ARCHIVE POST GRID #### -->
|
||||
<?php get_template_part('template-parts/post-types/fonds-archives/archive-post-grid', null, array(
|
||||
'current_post_type' => 'fonds-archives',
|
||||
'post_amount' => -1,
|
||||
'grid_title' => 'Trouver un fonds d\'archives',
|
||||
)); ?>
|
||||
|
||||
|
||||
<!-- #### ACCES CONSULTATION #### -->
|
||||
<?php get_template_part('template-parts/compositions/acces-consultation'); ?>
|
||||
|
||||
<!-- #### COLLECTIVE ACCES #### -->
|
||||
<?php get_template_part('template-parts/compositions/collective-acess'); ?>
|
||||
|
||||
<!-- #### SOUTENIR #### -->
|
||||
<?php get_template_part('template-parts/compositions/soutenir'); ?>
|
||||
|
||||
|
||||
<!-- #### INFOLETTRE #### -->
|
||||
<?php get_template_part('template-parts/compositions/infolettre'); ?>
|
||||
</main>
|
||||
|
||||
<?php
|
||||
get_footer();
|
||||
|
|
@ -41,6 +41,8 @@ function get_archive_page_icon_html($post_type)
|
|||
return '<img class="page_icon" src="' . get_template_directory_uri() . '/resources/img/icons/icon-outils-pedagogiques.svg" alt="Outils pédagogiques" />';
|
||||
case 'actualites':
|
||||
return '<img class="page_icon" src="' . get_template_directory_uri() . '/resources/img/icons/icon-actualites.svg" alt="Actualités" />';
|
||||
case 'fonds-archives':
|
||||
return '<img class="page_icon" src="' . get_template_directory_uri() . '/resources/img/icons/icon-fonds-archives.svg" alt="Actualités" />';
|
||||
default:
|
||||
return '';
|
||||
}
|
||||
|
|
@ -64,6 +66,8 @@ function get_archive_page_subtitle_html($post_type)
|
|||
return '<span class="page_subtitle">Accédez à nos revues et publications</span> ';
|
||||
case 'actualites':
|
||||
return '<span class="page_subtitle">Suivez nos projets, événements et publications.</span> ';
|
||||
case 'fonds-archives':
|
||||
return '<span class="page_subtitle">Consultez nos fonds et collections à travers des inventaires clairs et accessibles.</span> ';
|
||||
default:
|
||||
return '';
|
||||
}
|
||||
|
|
|
|||
13
resources/img/covers/carhop-page-acces-consultation-c.svg
Normal file
13
resources/img/covers/carhop-page-acces-consultation-c.svg
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<svg width="299" height="299" viewBox="0 0 299 299" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect x="149.152" width="210.929" height="210.929" transform="rotate(45 149.152 0)" fill="#0AD3FF"/>
|
||||
<rect x="27.0742" y="181.56" width="74.8817" height="74.8817" fill="#136F63"/>
|
||||
<g clip-path="url(#clip0_4141_16553)">
|
||||
<path d="M64.8828 240.35C76.5477 240.35 86.0039 230.754 86.0039 218.916C86.0039 207.078 76.5477 197.481 64.8828 197.481C53.218 197.481 43.7617 207.078 43.7617 218.916C43.7617 230.754 53.218 240.35 64.8828 240.35Z" stroke="white" stroke-width="2"/>
|
||||
<path d="M64.8775 212.003L57.6602 219.327L64.8775 226.652L72.0948 219.327L64.8775 212.003Z" stroke="white" stroke-width="2"/>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_4141_16553">
|
||||
<rect width="45.754" height="45.754" fill="white" transform="translate(42.0039 196.083)"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 856 B |
13
resources/img/covers/carhop-page-collective-access.svg
Normal file
13
resources/img/covers/carhop-page-collective-access.svg
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<svg width="352" height="336" viewBox="0 0 352 336" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect x="202.152" y="37" width="210.929" height="210.929" transform="rotate(45 202.152 37)" fill="#0AD3FF"/>
|
||||
<rect width="74.8817" height="74.8817" fill="#136F63"/>
|
||||
<g clip-path="url(#clip0_3432_29783)">
|
||||
<path d="M45.4766 28.8671L59.7708 22.0342V52.3968L45.5562 45.5428L45.4766 28.8671Z" stroke="white" stroke-width="2"/>
|
||||
<path d="M45.4749 22.0342H16.3633V52.3968H45.4749V22.0342Z" stroke="white" stroke-width="2"/>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_3432_29783">
|
||||
<rect width="45.6802" height="33.8372" fill="white" transform="translate(15.2266 20.3022)"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 681 B |
14
resources/img/covers/carhop-page-fonds-archives-cover.svg
Normal file
14
resources/img/covers/carhop-page-fonds-archives-cover.svg
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<svg width="320" height="321" viewBox="0 0 320 321" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect x="149.391" y="22.0005" width="211.27" height="211.27" transform="rotate(45 149.391 22.0005)" fill="#0AD3FF"/>
|
||||
<rect x="242" width="77.6812" height="75.0026" fill="white"/>
|
||||
<g clip-path="url(#clip0_2172_24684)">
|
||||
<path d="M296.739 26.9846H264.262V57.8417H296.739V26.9846Z" stroke="#136F63" stroke-width="2"/>
|
||||
<path d="M300.877 18.1583H260.121V26.9846H300.877V18.1583Z" stroke="#136F63" stroke-width="2"/>
|
||||
<path d="M288.494 36.5521H272.508" stroke="#136F63" stroke-width="2"/>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_2172_24684">
|
||||
<rect width="43" height="42" fill="white" transform="translate(259 17)"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 727 B |
13
resources/img/icons/icon-fonds-archives.svg
Normal file
13
resources/img/icons/icon-fonds-archives.svg
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<svg width="50" height="50" viewBox="0 0 50 50" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect width="50" height="50" fill="white"/>
|
||||
<g clip-path="url(#clip0_3916_16609)">
|
||||
<path d="M37.2069 17.1318H13.7931V39.1727H37.2069V17.1318Z" stroke="#136F63" stroke-width="2"/>
|
||||
<path d="M40.1912 10.8274H10.8088V17.1318H40.1912V10.8274Z" stroke="#136F63" stroke-width="2"/>
|
||||
<path d="M31.2625 23.9658H19.7375" stroke="#136F63" stroke-width="2"/>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_3916_16609">
|
||||
<rect width="31" height="30" fill="white" transform="translate(10 10)"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 587 B |
15
template-parts/post-types/fonds-archives/archive-header.php
Normal file
15
template-parts/post-types/fonds-archives/archive-header.php
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<?php get_template_part('template-parts/page-header', null, array(
|
||||
'title' => 'Fonds d\'archives',
|
||||
'subtitle' => 'Explorer les fonds conservés au CARHOP',
|
||||
'description' => 'Vous trouverez ci-dessous la liste des fonds d’archives conservés au CARHOP. Les inventaires disponibles sont accessibles via notre base de données, qui permet des recherches multicritères et, pour certaines pièces, une prévisualisation de documents numérisés.',
|
||||
'cover' => array(
|
||||
'url' => get_stylesheet_directory_uri() . '/resources/img/covers/carhop-page-fonds-archives-cover.svg',
|
||||
'alt' => 'Revues'
|
||||
),
|
||||
'has_overlap' => false,
|
||||
'background_style' => 'sliced',
|
||||
'cta' => array(
|
||||
'title' => __('Consulter notre politique de collecte', 'carhop'),
|
||||
'url' => '#prochaines-expositions',
|
||||
)
|
||||
));
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
<?php
|
||||
$post_amount = $args['post_amount'] ?? -1;
|
||||
$grid_title = $args['grid_title'] ?? 'Trouver un fonds d\'archives';
|
||||
$current_post_type = 'fonds-archives';
|
||||
|
||||
|
||||
// Construire les arguments de la query
|
||||
$query_args = array(
|
||||
'post_type' => $current_post_type,
|
||||
'posts_per_page' => $post_amount,
|
||||
'post_status' => 'publish',
|
||||
);
|
||||
|
||||
|
||||
$posts_query = new WP_Query($query_args);
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<section class="post-grid content-section fonds-archives-grid <?php echo !empty($etiquette_slug) ? 'has-initial-filter' : '' ?>">
|
||||
<h2 class="find-publication__title title-small"><?php echo $grid_title; ?></h2>
|
||||
<div class="content-section__inner">
|
||||
|
||||
<?php get_template_part('template-parts/post-types/fonds-archives/fonds-archives-grid-toolbar', null, array(
|
||||
'posts_query' => $posts_query,
|
||||
'current_post_type' => $current_post_type,
|
||||
'etiquette_active_filter_slug' => $etiquette_slug,
|
||||
)); ?>
|
||||
|
||||
<ul class="post-grid__list">
|
||||
<?php if (isset($posts_query) && $posts_query->have_posts()) : ?>
|
||||
<?php while ($posts_query->have_posts()) : $posts_query->the_post(); ?>
|
||||
<?php get_template_part('template-parts/components/cards/post-card', null, array(
|
||||
'ID' => get_the_ID(),
|
||||
)); ?>
|
||||
<?php endwhile; ?>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
<?php
|
||||
$current_post_type = $args['current_post_type'] ?? get_post_type();
|
||||
$posts_query = $args['posts_query'] ?? null;
|
||||
$post_count = $posts_query->post_count;
|
||||
$current_post_type_obj = get_post_type_object($current_post_type);
|
||||
|
||||
$etiquette_active_filter_slug = $args['etiquette_active_filter_slug'] ?? null;
|
||||
|
||||
$post_ids = wp_list_pluck($posts_query->posts, 'ID');
|
||||
|
||||
$types = get_terms(array(
|
||||
'taxonomy' => 'type',
|
||||
'hide_empty' => true,
|
||||
));
|
||||
|
||||
$authors = get_authors_linked_to_posts($post_ids);
|
||||
$tags = get_terms(array(
|
||||
'taxonomy' => 'etiquettes',
|
||||
'hide_empty' => true,
|
||||
'object_ids' => $post_ids,
|
||||
));
|
||||
|
||||
?>
|
||||
|
||||
<div class="post-grid__toolbar fonds-archives-grid__toolbar">
|
||||
|
||||
<h2 class="post-count">
|
||||
<span class="post-count__count">
|
||||
<?php echo $post_count; ?>
|
||||
</span>
|
||||
<?php if ($post_amount > 1) : ?>
|
||||
<span class="post-count__text">
|
||||
<?php echo $current_post_type_obj->labels->name; ?>
|
||||
</span>
|
||||
<?php else : ?>
|
||||
<span class="post-count__text">
|
||||
<?php echo $current_post_type_obj->labels->singular_name; ?>
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
</h2>
|
||||
<select name="sort_by">
|
||||
<option value="date_desc" selected><?php _e('Numéros récents en premier', 'dynamiques'); ?></option>
|
||||
<option value="date_asc"><?php _e('Numéros anciens en premier', 'dynamiques'); ?></option>
|
||||
<option value="title_asc"><?php _e('Par ordre alphabétique', 'dynamiques'); ?></option>
|
||||
</select>
|
||||
|
||||
<div class="alphabetical-order-select">
|
||||
<?php $letters = range('A', 'Z'); ?>
|
||||
<h3 class="alphabetical-order-select__title">Rechercher par ordre alphabétique</h3>
|
||||
<div class="alphabetical-order-select__list">
|
||||
<?php foreach ($letters as $letter) : ?>
|
||||
<button class="alphabetical-order-select__button">
|
||||
<?php echo $letter; ?>
|
||||
</button>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Loading…
Reference in New Issue
Block a user