Compare commits
15 Commits
bc393a3ca3
...
46c4502cb4
| Author | SHA1 | Date | |
|---|---|---|---|
| 46c4502cb4 | |||
| 4d78151bb1 | |||
| 3f81bfa85d | |||
| dec082510d | |||
| dca838ec8c | |||
| 63ec998a05 | |||
| 7e16c6ee9d | |||
| 4b7fc02440 | |||
| 9fb9b3bb03 | |||
| 6e6a3d4fbe | |||
| 6372714ff6 | |||
| ee051a80fa | |||
| 4da8cef796 | |||
| 7e9e38c642 | |||
| 56ffe3d39e |
58
archive-articles.php
Normal file
58
archive-articles.php
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
<?php get_header(); ?>
|
||||
|
||||
|
||||
<?php get_template_part('template-parts/page-header', null, array(
|
||||
'title' => 'Articles',
|
||||
'subtitle' => 'Plongez dans les archives vivantes de l’histoire sociale',
|
||||
'description' => 'Explorez tous les numéros de la revue Dynamiques, le fruit d’un dialogue entre mémoires populaires, engagements militants et recherches critiques.
|
||||
|
||||
Chaque parution propose un dossier thématique nourri de contributions plurielles : articles, témoignages, entretiens, regards croisés…',
|
||||
'cover' => array(
|
||||
'url' => get_stylesheet_directory_uri() . '/resources/img/covers/carhop-articles-page-cover.svg',
|
||||
'alt' => 'Revues'
|
||||
)
|
||||
)); ?>
|
||||
|
||||
|
||||
<?php get_template_part('template-parts/articles/articles-grid'); ?>
|
||||
|
||||
<!-- #### EXPLORE TAGS #### -->
|
||||
<?php
|
||||
$block_content = '<!-- wp:dynamiques-blocks/explore-tags /-->';
|
||||
echo do_blocks($block_content);
|
||||
?>
|
||||
|
||||
<!-- #### PROCHAINEMENT #### -->
|
||||
<?php get_template_part('template-parts/components/chapter-section', null, array(
|
||||
'subtitle' => __('Prochainement', 'dynamiques'),
|
||||
'title' => __('Un regard en avant sur les publications à venir', 'dynamiques'),
|
||||
'content' => sprintf(
|
||||
'<p>%s</p><p>%s</p>',
|
||||
__('Découvrez les prochaines parutions de la revue Dynamiques : dossiers en préparation, appels à contributions en cours, avant-goûts des articles à paraître, et coulisses éditoriales. Cette page dédiée vous plonge dans les futurs numéros en construction.', 'dynamiques'),
|
||||
__('Restez informé·e, soyez parmi les premier·ères à lire, partager… ou contribuer.', 'dynamiques')
|
||||
),
|
||||
'cta' => array(
|
||||
'title' => __('Voir les publications à venir', 'dynamiques'),
|
||||
'url' => '#',
|
||||
),
|
||||
'cover' => array(
|
||||
'url' => get_stylesheet_directory_uri() . '/resources/img/covers/carhop-prochainement-cover.svg',
|
||||
'alt' => 'Revues'
|
||||
),
|
||||
'cover_size' => 'medium'
|
||||
)); ?>
|
||||
|
||||
|
||||
<!-- #### INFOLETTRE #### -->
|
||||
<?php
|
||||
$block_content = '<!-- wp:carhop-blocks/subscribe-infolettre {"title":"Restez connectés à l’histoire sociale","className":"wp-block-carhop-blocks-subscribe-infolettre subscribe-infolettre"} -->
|
||||
<!-- wp:paragraph {"placeholder":"Description","className":"subscribe-infolettre__description"} -->
|
||||
<p class="subscribe-infolettre__description">Recevez les dernières actualités du CARHOP directement dans votre boîte mail. Abonnez-vous et surveillez votre boîte : un mail de confirmation vous attend !</p>
|
||||
<!-- /wp:paragraph -->
|
||||
<!-- /wp:carhop-blocks/subscribe-infolettre -->';
|
||||
echo do_blocks($block_content);
|
||||
?>
|
||||
|
||||
|
||||
<?php
|
||||
get_footer();
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
Chaque parution propose un dossier thématique nourri de contributions plurielles : articles, témoignages, entretiens, regards croisés…',
|
||||
'cover' => array(
|
||||
'url' => get_stylesheet_directory_uri() . '/resources/img/covers/carhop-revues-page-thumbnail.svg',
|
||||
'url' => get_stylesheet_directory_uri() . '/resources/img/covers/carhop-revues-page-cover.svg',
|
||||
'alt' => 'Revues'
|
||||
)
|
||||
)); ?>
|
||||
|
|
|
|||
|
|
@ -8,11 +8,11 @@ function dynamiques_setup()
|
|||
|
||||
// ##### Setup 🡒 Navigation
|
||||
|
||||
register_nav_menus(
|
||||
array(
|
||||
'dynamiques-menu' => __('Dynamiques Menu', 'dynamiques'),
|
||||
)
|
||||
);
|
||||
// register_nav_menus(
|
||||
// array(
|
||||
// 'dynamiques-menu' => __('Dynamiques Menu', 'dynamiques'),
|
||||
// )
|
||||
// );
|
||||
|
||||
// ##### Setup 🡒 Ajout des themes supports
|
||||
|
||||
|
|
|
|||
|
|
@ -12,10 +12,18 @@
|
|||
@import './components/cta.css';
|
||||
@import './components/post-card-dbmod.css';
|
||||
@import './components/news-card.css';
|
||||
@import './components/post-grid.css';
|
||||
|
||||
@import './components/revues-grid.css';
|
||||
@import './components/articles-grid.css';
|
||||
@import './components/post-card--revue.css';
|
||||
@import './components/post-card--article.css';
|
||||
@import './components/post-card.css';
|
||||
|
||||
/* ########### PAGES ############ */
|
||||
@import './pages/single-revues.css';
|
||||
@import './pages/archive-revues.css';
|
||||
@import './pages/archive-articles.css';
|
||||
|
||||
/* ########### LAYOUT ############ */
|
||||
@import './layout/nav.css';
|
||||
|
|
|
|||
|
|
@ -1,46 +1,46 @@
|
|||
.chapter-section {
|
||||
@apply flex items-center justify-center gap-8 2xl:gap-12 !my-0 px-12;
|
||||
/* min-height: 80vh; */
|
||||
@apply xl:pt-32;
|
||||
@apply flex items-center justify-center gap-8 2xl:gap-12 !my-0 px-12;
|
||||
/* min-height: 80vh; */
|
||||
@apply xl:pt-32;
|
||||
|
||||
@apply mx-auto;
|
||||
@apply mx-auto;
|
||||
|
||||
/* & + *:not(.simple-screen) {
|
||||
/* & + *:not(.simple-screen) {
|
||||
@apply xl:mt-32;
|
||||
} */
|
||||
&--right {
|
||||
@apply flex-row-reverse;
|
||||
}
|
||||
&__content {
|
||||
flex-shrink: 0;
|
||||
@apply max-w-lg;
|
||||
p {
|
||||
@apply text-neutral-600 max-w-sm;
|
||||
}
|
||||
}
|
||||
&__innerblocks {
|
||||
/* @apply max-w-xl; */
|
||||
p {
|
||||
}
|
||||
}
|
||||
&__cover {
|
||||
@apply object-contain;
|
||||
min-width: 0;
|
||||
flex-shrink: 1;
|
||||
max-width: 100%; /* Empêche de dépasser son conteneur */
|
||||
display: block;
|
||||
&--right {
|
||||
@apply flex-row-reverse;
|
||||
}
|
||||
&__content {
|
||||
flex-shrink: 0;
|
||||
@apply max-w-lg;
|
||||
p {
|
||||
@apply text-neutral-600 max-w-sm;
|
||||
}
|
||||
}
|
||||
&__innerblocks {
|
||||
/* @apply max-w-xl; */
|
||||
p {
|
||||
}
|
||||
}
|
||||
&__cover {
|
||||
@apply object-contain;
|
||||
min-width: 0;
|
||||
flex-shrink: 1;
|
||||
max-width: 100%; /* Empêche de dépasser son conteneur */
|
||||
display: block;
|
||||
|
||||
&--large {
|
||||
@apply !h-96;
|
||||
}
|
||||
&--grande {
|
||||
@apply !h-80;
|
||||
}
|
||||
&--medium {
|
||||
@apply !h-64;
|
||||
}
|
||||
&--small {
|
||||
@apply !h-12;
|
||||
}
|
||||
}
|
||||
&--large {
|
||||
@apply !h-96;
|
||||
}
|
||||
&--grande {
|
||||
@apply !h-80;
|
||||
}
|
||||
&--medium {
|
||||
@apply !h-64;
|
||||
}
|
||||
&--small {
|
||||
@apply !h-12;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
0
resources/css/components/articles-grid.css
Normal file
0
resources/css/components/articles-grid.css
Normal file
0
resources/css/components/post-card--article.css
Normal file
0
resources/css/components/post-card--article.css
Normal file
8
resources/css/components/post-card--revue.css
Normal file
8
resources/css/components/post-card--revue.css
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
.post-card--revue {
|
||||
&:after {
|
||||
content: '';
|
||||
@apply absolute top-0 left-0 w-full h-full border border-primary;
|
||||
z-index: -1;
|
||||
transform: translate(10px, 10px);
|
||||
}
|
||||
}
|
||||
53
resources/css/components/post-card.css
Normal file
53
resources/css/components/post-card.css
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
.post-card {
|
||||
@apply p-8 border border-primary relative grid gap-12 bg-white;
|
||||
grid-template-columns: 1fr 40px;
|
||||
|
||||
&.has-cover {
|
||||
grid-template-columns: 1fr 3fr 40px;
|
||||
}
|
||||
|
||||
.content-meta {
|
||||
@apply mb-4;
|
||||
.content-meta__type--revue {
|
||||
@apply text-lg;
|
||||
}
|
||||
}
|
||||
&__title {
|
||||
@apply text-3xl font-normal;
|
||||
}
|
||||
&__date {
|
||||
@apply capitalize pt-3 block;
|
||||
}
|
||||
|
||||
&__cover {
|
||||
@apply p-2 object-cover w-full h-36 relative;
|
||||
z-index: 10;
|
||||
img {
|
||||
@apply w-full h-full object-cover;
|
||||
}
|
||||
&:before,
|
||||
&:after {
|
||||
content: '';
|
||||
@apply absolute top-0 left-0 w-full h-full;
|
||||
}
|
||||
&:before {
|
||||
z-index: -1;
|
||||
@apply bg-white border border-primary;
|
||||
}
|
||||
&:after {
|
||||
z-index: -2;
|
||||
@apply border border-primary;
|
||||
transform: translate(12px, 12px) rotate(3deg);
|
||||
background-image: linear-gradient(#efe8ff, #efe8ff);
|
||||
background-size: calc(100% - 12px) calc(100% - 12px);
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
background-blend-mode: color-burn;
|
||||
}
|
||||
}
|
||||
|
||||
.issue-number {
|
||||
@apply bg-primary text-white w-full h-auto flex items-center justify-center;
|
||||
aspect-ratio: 1/1;
|
||||
}
|
||||
}
|
||||
51
resources/css/components/post-grid.css
Normal file
51
resources/css/components/post-grid.css
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
.post-grid {
|
||||
&__toolbar {
|
||||
@apply grid grid-cols-1 md:grid-cols-2 gap-4 items-center justify-between pb-12;
|
||||
|
||||
h2.post-count {
|
||||
@apply flex items-end gap-2;
|
||||
|
||||
&__count {
|
||||
@apply font-normal uppercase fjalla;
|
||||
line-height: 0.8;
|
||||
}
|
||||
|
||||
&__text {
|
||||
@apply text-xl nunito;
|
||||
}
|
||||
}
|
||||
|
||||
.search-bar {
|
||||
@apply justify-self-end;
|
||||
input {
|
||||
@apply py-2 px-4 border border-primary rounded-full;
|
||||
&::placeholder {
|
||||
@apply text-sm text-carhop-green-700;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
&__toolbar-actions {
|
||||
@apply col-span-2 flex items-center gap-4;
|
||||
|
||||
select {
|
||||
@apply border border-carhop-green-700 rounded-full py-2 px-4;
|
||||
}
|
||||
|
||||
select[name='etiquettes'] {
|
||||
/* @apply bg-blue-300; */
|
||||
}
|
||||
|
||||
select[name='auteurs'] {
|
||||
/* @apply bg-red-300; */
|
||||
}
|
||||
|
||||
select[name='sort_by'] {
|
||||
@apply ml-auto;
|
||||
}
|
||||
}
|
||||
|
||||
&__list {
|
||||
@apply grid grid-cols-1 md:grid-cols-2 gap-8;
|
||||
}
|
||||
}
|
||||
0
resources/css/components/revues-grid.css
Normal file
0
resources/css/components/revues-grid.css
Normal file
5
resources/css/pages/archive-articles.css
Normal file
5
resources/css/pages/archive-articles.css
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
#page-archive-articles {
|
||||
.explore-tags {
|
||||
@apply bg-carhop-orange-50;
|
||||
}
|
||||
}
|
||||
95
resources/img/covers/carhop-articles-page-cover.svg
Normal file
95
resources/img/covers/carhop-articles-page-cover.svg
Normal file
|
|
@ -0,0 +1,95 @@
|
|||
<svg width="430" height="453" viewBox="0 0 430 453" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g filter="url(#filter0_d_420_14288)">
|
||||
<rect x="2.90234" y="243.875" width="188.605" height="103.586" transform="rotate(-6.72087 2.90234 243.875)" fill="#EFE8FF"/>
|
||||
<rect x="14.0039" y="252.636" width="168.605" height="83.5861" transform="rotate(-6.72087 14.0039 252.636)" stroke="white" stroke-width="20"/>
|
||||
</g>
|
||||
<g filter="url(#filter1_d_420_14288)">
|
||||
<rect x="239.316" y="2" width="188.605" height="103.586" transform="rotate(1.62337 239.316 2)" fill="#EFE8FF"/>
|
||||
<rect x="249.029" y="12.2793" width="168.605" height="83.5861" transform="rotate(1.62337 249.029 12.2793)" stroke="white" stroke-width="20"/>
|
||||
</g>
|
||||
<g filter="url(#filter2_d_420_14288)">
|
||||
<rect x="224.777" y="328.32" width="188.605" height="103.586" transform="rotate(5.98277 224.777 328.32)" fill="#EFE8FF"/>
|
||||
<rect x="233.681" y="339.308" width="168.605" height="83.5861" transform="rotate(5.98277 233.681 339.308)" stroke="white" stroke-width="20"/>
|
||||
</g>
|
||||
<path d="M288.807 84L136 236.807L230.193 331L383 178.193L288.807 84Z" fill="#D6C3FF"/>
|
||||
<rect x="83.0352" y="106.489" width="36.1352" height="36.1352" fill="white"/>
|
||||
<rect x="149.488" y="55.6735" width="36.1352" height="36.1352" fill="white"/>
|
||||
<rect x="301.934" y="220.825" width="36.1352" height="36.1352" fill="white"/>
|
||||
<rect x="349.816" y="139.715" width="36.1352" height="36.1352" fill="white"/>
|
||||
<rect x="368.387" y="256.982" width="36.1352" height="36.1352" fill="white"/>
|
||||
<g clip-path="url(#clip0_420_14288)">
|
||||
<path d="M360.59 166.957H365.792L377.192 155.792V145.719L360.59 161.985V166.957Z" stroke="#136F63" stroke-width="2"/>
|
||||
<path d="M357.488 169.992L365.141 162.497" stroke="#136F63" stroke-width="2"/>
|
||||
</g>
|
||||
<g clip-path="url(#clip1_420_14288)">
|
||||
<path d="M92.582 114.223H105.976L109.62 117.813V134.89H92.582V114.223Z" stroke="#136F63" stroke-width="2"/>
|
||||
</g>
|
||||
<g clip-path="url(#clip2_420_14288)">
|
||||
<path d="M316.051 234.722L312.867 237.978L316.051 241.235L319.234 237.978L316.051 234.722Z" stroke="#136F63" stroke-width="2"/>
|
||||
<path d="M324.953 234.722L321.77 237.979L324.953 241.236L328.137 237.979L324.953 234.722Z" stroke="#136F63" stroke-width="2"/>
|
||||
<path d="M309.332 229.213H331.671V246.371H324.165L320.304 250.315L316.843 246.775H309.332V229.213Z" stroke="#136F63" stroke-width="2"/>
|
||||
</g>
|
||||
<g clip-path="url(#clip3_420_14288)">
|
||||
<path d="M176.85 69.8752H162.695" stroke="#136F63" stroke-width="2"/>
|
||||
<path d="M176.85 83.4228H162.695" stroke="#136F63" stroke-width="2"/>
|
||||
<path d="M171.407 63.1044H157.305" stroke="#136F63" stroke-width="2"/>
|
||||
<path d="M172.909 76.6519H162.695" stroke="#136F63" stroke-width="2"/>
|
||||
</g>
|
||||
<g clip-path="url(#clip4_420_14288)">
|
||||
<path d="M386.707 263.823V285.322" stroke="#136F63" stroke-width="2"/>
|
||||
<path d="M381.641 267.852V281.288" stroke="#136F63" stroke-width="2"/>
|
||||
<path d="M375.785 272.043V277.102" stroke="#136F63" stroke-width="2"/>
|
||||
<path d="M392.266 267.852V281.288" stroke="#136F63" stroke-width="2"/>
|
||||
<path d="M398.121 272.043V277.102" stroke="#136F63" stroke-width="2"/>
|
||||
</g>
|
||||
<defs>
|
||||
<filter id="filter0_d_420_14288" x="0.902344" y="219.802" width="203.434" height="128.947" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
||||
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
||||
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
||||
<feMorphology radius="1" operator="dilate" in="SourceAlpha" result="effect1_dropShadow_420_14288"/>
|
||||
<feOffset/>
|
||||
<feGaussianBlur stdDeviation="0.5"/>
|
||||
<feComposite in2="hardAlpha" operator="out"/>
|
||||
<feColorMatrix type="matrix" values="0 0 0 0 0.0745098 0 0 0 0 0.435294 0 0 0 0 0.388235 0 0 0 1 0"/>
|
||||
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_420_14288"/>
|
||||
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_420_14288" result="shape"/>
|
||||
</filter>
|
||||
<filter id="filter1_d_420_14288" x="234.383" y="0" width="195.461" height="112.888" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
||||
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
||||
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
||||
<feMorphology radius="1" operator="dilate" in="SourceAlpha" result="effect1_dropShadow_420_14288"/>
|
||||
<feOffset/>
|
||||
<feGaussianBlur stdDeviation="0.5"/>
|
||||
<feComposite in2="hardAlpha" operator="out"/>
|
||||
<feColorMatrix type="matrix" values="0 0 0 0 0.0745098 0 0 0 0 0.435294 0 0 0 0 0.388235 0 0 0 1 0"/>
|
||||
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_420_14288"/>
|
||||
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_420_14288" result="shape"/>
|
||||
</filter>
|
||||
<filter id="filter2_d_420_14288" x="211.98" y="326.32" width="202.375" height="126.68" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
||||
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
||||
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
||||
<feMorphology radius="1" operator="dilate" in="SourceAlpha" result="effect1_dropShadow_420_14288"/>
|
||||
<feOffset/>
|
||||
<feGaussianBlur stdDeviation="0.5"/>
|
||||
<feComposite in2="hardAlpha" operator="out"/>
|
||||
<feColorMatrix type="matrix" values="0 0 0 0 0.0745098 0 0 0 0 0.435294 0 0 0 0 0.388235 0 0 0 1 0"/>
|
||||
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_420_14288"/>
|
||||
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_420_14288" result="shape"/>
|
||||
</filter>
|
||||
<clipPath id="clip0_420_14288">
|
||||
<rect width="20.7778" height="26.198" fill="white" transform="translate(357.043 144.232)"/>
|
||||
</clipPath>
|
||||
<clipPath id="clip1_420_14288">
|
||||
<rect width="18.0676" height="21.6811" fill="white" transform="translate(92.0664 113.716)"/>
|
||||
</clipPath>
|
||||
<clipPath id="clip2_420_14288">
|
||||
<rect width="23.4535" height="22.4762" fill="white" transform="translate(308.773 228.643)"/>
|
||||
</clipPath>
|
||||
<clipPath id="clip3_420_14288">
|
||||
<rect width="19.5445" height="21.499" fill="white" transform="translate(157.305 62.5141)"/>
|
||||
</clipPath>
|
||||
<clipPath id="clip4_420_14288">
|
||||
<rect width="23.4535" height="21.499" fill="white" transform="translate(375.227 263.823)"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 6.1 KiB |
|
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 6.2 KiB |
|
|
@ -1,7 +1,6 @@
|
|||
<?php get_header(); ?>
|
||||
|
||||
<?php
|
||||
|
||||
$current_issue = get_queried_object();
|
||||
|
||||
$issue_related_articles = new WP_Query(array(
|
||||
|
|
@ -18,11 +17,7 @@ $issue_related_articles = new WP_Query(array(
|
|||
),
|
||||
));
|
||||
|
||||
|
||||
$articles = get_field('articles', $current_issue->ID);
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
|
@ -81,45 +76,9 @@ $articles = get_field('articles', $current_issue->ID);
|
|||
|
||||
</article>
|
||||
|
||||
<!-- <section class="block-dernieres-dynamiques">
|
||||
<div class="block-dernieres-dynamiques__inner">
|
||||
|
||||
|
||||
|
||||
<div class="content-meta">
|
||||
<span class="content-meta__type content-meta__type--revue">Revue</span>
|
||||
</div>
|
||||
|
||||
<div class="block-dernieres-dynamiques__issue-content-wrapper">
|
||||
<div class="block-dernieres-dynamiques__issue-content">
|
||||
|
||||
<h3 class="block-dernieres-dynamiques__issue-title">
|
||||
<?php echo $last_issue->post_title; ?>
|
||||
</h3>
|
||||
<h4 class="block-dernieres-dynamiques__issue-description-title">Édito</h4>
|
||||
<p class="block-dernieres-dynamiques__issue-description">
|
||||
<?php echo $last_issue->post_excerpt; ?>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="block-dernieres-dynamiques__issue-thumbnail-wrapper">
|
||||
<div class="block-dernieres-dynamiques__issue-thumbnail">
|
||||
<?php echo get_the_post_thumbnail($last_issue->ID, 'full'); ?>
|
||||
</div>
|
||||
<div class="card-background"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</section> -->
|
||||
|
||||
<?php endwhile; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
|
||||
<?php
|
||||
get_footer();
|
||||
|
|
|
|||
73
template-parts/articles/articles-grid.php
Normal file
73
template-parts/articles/articles-grid.php
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
<?php
|
||||
$articles = new WP_Query(array(
|
||||
'post_type' => 'articles',
|
||||
'posts_per_page' => -1
|
||||
));
|
||||
$post_count = $articles->post_count;
|
||||
$authors = get_posts(array(
|
||||
'post_type' => 'auteurs',
|
||||
'posts_per_page' => -1
|
||||
));
|
||||
|
||||
$thematiques = get_terms(array(
|
||||
'taxonomy' => 'etiquettes',
|
||||
'hide_empty' => true,
|
||||
));
|
||||
?>
|
||||
|
||||
<section class="post-grid articles-grid content-section">
|
||||
<div class="content-section__inner">
|
||||
|
||||
<div class="post-grid__toolbar">
|
||||
<h2 class="post-count">
|
||||
<span class="post-count__count">
|
||||
<?php echo $post_count; ?>
|
||||
</span>
|
||||
<span class="post-count__text">
|
||||
<?php _e('Articles', 'dynamiques'); ?>
|
||||
</span>
|
||||
</h2>
|
||||
|
||||
<div class="search-bar">
|
||||
<input type="text" placeholder="<?php _e('Rechercher par mot-clé', 'dynamiques'); ?>">
|
||||
</div>
|
||||
|
||||
<div class="post-grid__toolbar-actions">
|
||||
|
||||
<select name="etiquettes">
|
||||
<option value="1"><?php _e('Thématiques', 'dynamiques'); ?></option>
|
||||
<?php foreach ($thematiques as $thematique) : ?>
|
||||
<option value="<?php echo $thematique->term_id; ?>"><?php echo $thematique->name; ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<select name="auteurs">
|
||||
<option value="1"><?php _e('Auteur·e·s', 'dynamiques'); ?></option>
|
||||
<?php foreach ($authors as $author) : ?>
|
||||
<option value="<?php echo $author->ID; ?>"><?php echo $author->post_title; ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
|
||||
<select name="sort_by">
|
||||
<option value="recent" selected><?php _e('Numéros récents en premier', 'dynamiques'); ?></option>
|
||||
<option value="oldest"><?php _e('Numéros anciens en premier', 'dynamiques'); ?></option>
|
||||
<option value="alphabetical"><?php _e('Par ordre alphabétique', 'dynamiques'); ?></option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<ul class="post-grid__list">
|
||||
|
||||
<?php if ($articles->have_posts()) : ?>
|
||||
<?php while ($articles->have_posts()) : $articles->the_post(); ?>
|
||||
<?php get_template_part('template-parts/articles/card-article', null, array(
|
||||
|
||||
'date' => get_the_date(),
|
||||
'image' => get_the_post_thumbnail_url(),
|
||||
'link' => get_the_permalink(),
|
||||
'ID' => get_the_ID()
|
||||
)); ?>
|
||||
<?php endwhile; ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</section>
|
||||
37
template-parts/articles/card-article.php
Normal file
37
template-parts/articles/card-article.php
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
<?php
|
||||
$ID = $args['ID'];
|
||||
$title = get_the_title($ID);
|
||||
$date = get_the_date('F Y', $ID);
|
||||
$cover = get_the_post_thumbnail_url($ID);
|
||||
$link = get_the_permalink($ID);
|
||||
|
||||
$related_revue = get_field('related_revue', $ID);
|
||||
$related_revue_issue_number = $related_revue ? get_field('issue_number', $related_revue) : null;
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
<a href="<?php echo $link; ?>" class="post-card post-card--article <?php echo $cover ? 'has-cover' : ''; ?>">
|
||||
|
||||
<?php if ($cover) : ?>
|
||||
<div class="post-card__cover">
|
||||
<img src="<?php echo $cover; ?>" alt="<?php echo $title; ?>">
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="post-card__content">
|
||||
<div class="content-meta">
|
||||
<span class="content-meta__type content-meta__type--article">Article</span>
|
||||
</div>
|
||||
<h3 class="post-card__title"><?php echo $title; ?></h3>
|
||||
<time class="post-card__date" datetime="<?php echo $date; ?>"><?php echo $date; ?></time>
|
||||
</div>
|
||||
|
||||
<div class="issue-number">
|
||||
<?php if ($related_revue_issue_number) : ?>
|
||||
<span><?php echo $related_revue_issue_number; ?></span>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
|
||||
</a>
|
||||
|
|
@ -2,22 +2,24 @@
|
|||
$ID = $args['ID'];
|
||||
$title = get_the_title($ID);
|
||||
$date = get_the_date('F Y', $ID);
|
||||
$image = get_the_post_thumbnail_url($ID);
|
||||
$cover = get_the_post_thumbnail_url($ID);
|
||||
$link = get_the_permalink($ID);
|
||||
$issue_number = get_field('issue_number', $ID);
|
||||
?>
|
||||
|
||||
<a href="<?php echo $link; ?>" class="card-revue">
|
||||
<a href="<?php echo $link; ?>" class="post-card post-card--revue <?php echo $cover ? 'has-cover' : ''; ?>">
|
||||
|
||||
<div class="card-revue__image">
|
||||
<img src="<?php echo $image; ?>" alt="<?php echo $title; ?>">
|
||||
</div>
|
||||
<div class="card-revue__content">
|
||||
<?php if ($cover) : ?>
|
||||
<div class="post-card__cover">
|
||||
<img src="<?php echo $cover; ?>" alt="<?php echo $title; ?>">
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="post-card__content">
|
||||
<div class="content-meta">
|
||||
<span class="content-meta__type content-meta__type--revue">Revue</span>
|
||||
</div>
|
||||
<h3 class="card-revue__title"><?php echo $title; ?></h3>
|
||||
<time class="card-revue__date" datetime="<?php echo $date; ?>"><?php echo $date; ?></time>
|
||||
<h3 class="post-card__title"><?php echo $title; ?></h3>
|
||||
<time class="post-card__date" datetime="<?php echo $date; ?>"><?php echo $date; ?></time>
|
||||
</div>
|
||||
|
||||
<div class="issue-number">
|
||||
|
|
|
|||
|
|
@ -15,15 +15,15 @@ $thematiques = get_terms(array(
|
|||
));
|
||||
?>
|
||||
|
||||
<section class="revues-grid content-section">
|
||||
<section class="post-grid content-section">
|
||||
<div class="content-section__inner">
|
||||
|
||||
<div class="revues-grid__toolbar">
|
||||
<h2 class="revues-count">
|
||||
<span class="revues-count__count">
|
||||
<div class="post-grid__toolbar">
|
||||
<h2 class="post-count">
|
||||
<span class="post-count__count">
|
||||
<?php echo $post_count; ?>
|
||||
</span>
|
||||
<span class="revues-count__text">
|
||||
<span class="post-count__text">
|
||||
<?php _e('Revues', 'dynamiques'); ?>
|
||||
</span>
|
||||
</h2>
|
||||
|
|
@ -32,7 +32,7 @@ $thematiques = get_terms(array(
|
|||
<input type="text" placeholder="<?php _e('Rechercher par mot-clé', 'dynamiques'); ?>">
|
||||
</div>
|
||||
|
||||
<div class="revues-grid__toolbar-actions">
|
||||
<div class="post-grid__toolbar-actions">
|
||||
|
||||
<select name="etiquettes">
|
||||
<option value="1"><?php _e('Thématiques', 'dynamiques'); ?></option>
|
||||
|
|
@ -56,7 +56,7 @@ $thematiques = get_terms(array(
|
|||
|
||||
</div>
|
||||
|
||||
<ul class="revues-grid__list">
|
||||
<ul class="post-grid__list">
|
||||
|
||||
<?php if ($revues->have_posts()) : ?>
|
||||
<?php while ($revues->have_posts()) : $revues->the_post(); ?>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user