diff --git a/resources/css/app.css b/resources/css/app.css index fc6381e..766c3b6 100644 --- a/resources/css/app.css +++ b/resources/css/app.css @@ -50,7 +50,8 @@ @import './components/content-wrapper.css'; @import './components/content-area.css'; @import './components/authors-list.css'; - +@import './components/collective-access-button.css'; +@import './components/slider-card.css'; @import './components/buttons/load-more.css'; /* ########### EDITOR CONTENT ############ */ diff --git a/resources/css/components/slider-card.css b/resources/css/components/slider-card.css new file mode 100644 index 0000000..d03b4d0 --- /dev/null +++ b/resources/css/components/slider-card.css @@ -0,0 +1,86 @@ +.slider-card { + @apply p-6 relative !flex flex-col pt-16; + + svg { + @apply absolute top-0 left-0 w-full h-full overflow-visible; + z-index: -1; + path { + stroke-width: 0; + vector-effect: non-scaling-stroke; + } + } + + &:hover { + svg { + path { + stroke-width: 6px; + } + } + &:after { + opacity: 1; + } + .slider-card__link-button { + svg { + @apply translate-x-2; + } + } + } + &__link-button { + @apply block mt-8; + width: 100px; + height: 100px; + svg { + transition: transform 0.3s ease-in-out; + + path, + circle { + @apply stroke-primary; + } + } + } + + + .content-meta { + @apply text-primary; + } + &__title { + @apply text-2xl font-medium uppercase pb-4 ; + + } + &__link{ + /* @apply mb-12; + + &:has(+ .slider-card__date) { + @apply mb-0; + } */ + } + + *:has(+ .slider-card__cover) { + @apply mb-16; + } + + + &__tags { + @apply flex flex-wrap gap-4 pt-4; + } + &__cover { + @apply w-40 h-40 absolute border-primary border bottom-12 right-12 hidden lg:block; + transform: rotate(-3deg); + + img { + @apply w-full h-full object-cover p-3; + } + } + .cta--go { + @apply text-primary mt-auto; + } + + &:has(.slider-card__link:hover) { + + .cta--go { + img { + @apply translate-x-2; + } + } + } +} diff --git a/template-parts/components/cards/slider-card.php b/template-parts/components/cards/slider-card.php new file mode 100644 index 0000000..c06f862 --- /dev/null +++ b/template-parts/components/cards/slider-card.php @@ -0,0 +1,60 @@ + + + +
+ + $current_post_type, + 'current_post_id' => $postID + )); ?> + + + +

+
+ + + + + + + + +
+ <?php echo get_the_title($postID); ?> +
+ + + get_the_permalink($postID), + 'label' => 'Lire la revue', + 'target' => '_self', + )); ?> + +
\ No newline at end of file