Compare commits
4 Commits
87dc84fdcc
...
620ff09eb6
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
620ff09eb6 | ||
|
|
f4c9649f70 | ||
|
|
d6c0c32290 | ||
|
|
b2ce3aadc9 |
|
|
@ -128,8 +128,6 @@ function like_post($request)
|
||||||
{
|
{
|
||||||
|
|
||||||
$post_id = $request->get_param('post_id');
|
$post_id = $request->get_param('post_id');
|
||||||
write_log($request);
|
|
||||||
write_log($post_id);
|
|
||||||
if (!$post_id) {
|
if (!$post_id) {
|
||||||
return new WP_Error('post_id_required', 'Post ID is required', array('status' => 400));
|
return new WP_Error('post_id_required', 'Post ID is required', array('status' => 400));
|
||||||
}
|
}
|
||||||
|
|
@ -157,7 +155,7 @@ function like_post($request)
|
||||||
'likes_count' => $new_likes,
|
'likes_count' => $new_likes,
|
||||||
'message' => 'Like ajouté avec succès'
|
'message' => 'Like ajouté avec succès'
|
||||||
);
|
);
|
||||||
write_log($response_data);
|
|
||||||
$response = new WP_REST_Response($response_data);
|
$response = new WP_REST_Response($response_data);
|
||||||
|
|
||||||
$response->set_status(200);
|
$response->set_status(200);
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
&.has-cover {
|
&.has-cover {
|
||||||
@apply gap-2;
|
@apply gap-2;
|
||||||
.post-card__content {
|
.post-card__content {
|
||||||
@apply pl-6;
|
@apply md:pl-6;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.post-card__title {
|
.post-card__title {
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,19 @@
|
||||||
.post-card {
|
.post-card {
|
||||||
@apply p-8 border border-primary relative grid gap-12 bg-white;
|
@apply p-8 border border-primary relative grid gap-y-4 gap-12 bg-white;
|
||||||
grid-template-columns: 1fr 40px;
|
grid-template-columns: 1fr;
|
||||||
|
@screen lg {
|
||||||
|
grid-template-columns: 1fr 40px;
|
||||||
|
}
|
||||||
&.has-cover {
|
&.has-cover {
|
||||||
grid-template-columns: 1fr 3fr 40px;
|
.post-card__cover {
|
||||||
|
@apply col-span-1;
|
||||||
|
}
|
||||||
|
@screen lg {
|
||||||
|
grid-template-columns: 1fr 3fr 40px;
|
||||||
|
.post-card__cover {
|
||||||
|
@apply col-span-1;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.content-meta {
|
.content-meta {
|
||||||
|
|
@ -20,8 +30,9 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
&__cover {
|
&__cover {
|
||||||
@apply p-2 object-cover w-full h-36 relative;
|
@apply order-3 lg:order-1 p-2 object-cover w-full h-36 md:h-56 lg:h-36 md:mt-6 lg:mt-0 relative mb-6 lg:mb-0;
|
||||||
z-index: 10;
|
z-index: 10;
|
||||||
|
|
||||||
img {
|
img {
|
||||||
@apply w-full h-full object-cover;
|
@apply w-full h-full object-cover;
|
||||||
}
|
}
|
||||||
|
|
@ -46,8 +57,13 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&__content {
|
||||||
|
@apply order-2 lg:order-1;
|
||||||
|
}
|
||||||
|
|
||||||
.issue-number {
|
.issue-number {
|
||||||
@apply bg-primary text-white w-full h-auto flex items-center justify-center;
|
@apply order-1 lg:order-1;
|
||||||
|
@apply bg-primary text-white w-[40px] h-auto flex items-center justify-center;
|
||||||
aspect-ratio: 1/1;
|
aspect-ratio: 1/1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
.post-grid {
|
.post-grid {
|
||||||
&__toolbar {
|
&__toolbar {
|
||||||
@apply grid grid-cols-1 md:grid-cols-2 gap-4 items-center justify-between pb-12;
|
@apply flex flex-col md:grid md:grid-cols-2 gap-4 md:items-center justify-between pb-12;
|
||||||
|
|
||||||
h2.post-count {
|
h2.post-count {
|
||||||
@apply flex items-end gap-2;
|
@apply flex items-end gap-2;
|
||||||
|
|
@ -16,20 +16,20 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.search-bar {
|
.search-bar {
|
||||||
@apply justify-self-end;
|
@apply md:justify-self-end text-primary;
|
||||||
input {
|
input {
|
||||||
@apply py-2 px-4 border border-primary rounded-full;
|
@apply w-full md:w-auto py-2 px-4 border border-primary rounded-full;
|
||||||
&::placeholder {
|
&::placeholder {
|
||||||
@apply text-sm text-carhop-green-700;
|
@apply text-base font-normal text-carhop-green-700;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
&__toolbar-actions {
|
&__toolbar-actions {
|
||||||
@apply col-span-2 flex items-center gap-4;
|
@apply col-span-2 flex flex-wrap items-center gap-4;
|
||||||
|
|
||||||
select {
|
select {
|
||||||
@apply border border-carhop-green-700 rounded-full py-2 px-4;
|
@apply w-full md:w-auto border border-carhop-green-700 text-carhop-green-700 rounded-full py-2 px-4 max-w-full text-base;
|
||||||
}
|
}
|
||||||
|
|
||||||
select[name='etiquettes'] {
|
select[name='etiquettes'] {
|
||||||
|
|
@ -41,7 +41,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
select[name='sort_by'] {
|
select[name='sort_by'] {
|
||||||
@apply ml-auto;
|
@apply md:ml-auto;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
.post-header {
|
.post-header {
|
||||||
@apply bg-primary text-white py-32 px-2 lg:px-4 md:px-8;
|
@apply bg-primary text-white py-32 px-2 lg:px-4 md:px-8 overflow-x-hidden;
|
||||||
|
|
||||||
h1.post-header__title,
|
h1.post-header__title,
|
||||||
h2.post-header__title {
|
h2.post-header__title {
|
||||||
|
|
@ -25,12 +25,13 @@
|
||||||
}
|
}
|
||||||
.thumbnail-wrapper {
|
.thumbnail-wrapper {
|
||||||
@apply order-2 lg:order-1 relative z-20 h-fit;
|
@apply order-2 lg:order-1 relative z-20 h-fit;
|
||||||
|
width: calc(100% - 40px);
|
||||||
padding: 1.2rem;
|
padding: 1.2rem;
|
||||||
/* max-width: calc(70% - 40px);
|
/* max-width: calc(70% - 40px);
|
||||||
@apply mx-auto; */
|
@apply mx-auto; */
|
||||||
|
|
||||||
@screen lg {
|
@screen lg {
|
||||||
transform: translateX(-40px);
|
/* transform: translateX(-10px); */
|
||||||
}
|
}
|
||||||
|
|
||||||
&:before {
|
&:before {
|
||||||
|
|
@ -41,15 +42,17 @@
|
||||||
img {
|
img {
|
||||||
aspect-ratio: 4/5;
|
aspect-ratio: 4/5;
|
||||||
/* max-height: 200px; */
|
/* max-height: 200px; */
|
||||||
@apply max-h-[200px] lg:max-h-full w-full h-full relative z-10;
|
@apply max-h-[200px] lg:max-h-full h-full relative z-10;
|
||||||
@apply object-cover;
|
@apply object-cover;
|
||||||
|
|
||||||
/* width: calc(100% - 2rem);
|
/* width: calc(100% - 2rem);
|
||||||
height: calc(100% - 2rem);
|
height: calc(100% - 2rem);
|
||||||
margin: 0 auto; */
|
margin: 0 auto; */
|
||||||
}
|
}
|
||||||
.thumbnail-overlay {
|
.thumbnail-overlay {
|
||||||
@apply absolute z-0 rotate-3 top-6 left-6 w-full h-full border border-primary bg-white flex items-center justify-center;
|
@apply absolute z-0 rotate-3 top-6 left-6 w-full h-full border border-primary bg-white flex items-center justify-center;
|
||||||
transform: translate(12px, 12px) rotate(3deg);
|
transform: translate(2px, 2px) rotate(2deg);
|
||||||
|
/* transform: translate(12px, 12px) rotate(3deg); */
|
||||||
background-image: linear-gradient(#efe8ff, #efe8ff);
|
background-image: linear-gradient(#efe8ff, #efe8ff);
|
||||||
background-size: calc(100% - 12px) calc(100% - 12px);
|
background-size: calc(100% - 12px) calc(100% - 12px);
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
|
|
@ -76,7 +79,10 @@
|
||||||
|
|
||||||
.socials-buttons {
|
.socials-buttons {
|
||||||
@apply flex flex-wrap justify-start xl:justify-end gap-4 h-fit shrink-0;
|
@apply flex flex-wrap justify-start xl:justify-end gap-4 h-fit shrink-0;
|
||||||
min-width: 570px;
|
@screen xl {
|
||||||
|
min-width: 570px;
|
||||||
|
}
|
||||||
|
|
||||||
&__button {
|
&__button {
|
||||||
@apply bg-white text-carhop-green-700 px-4 lg:px-6 md:px-8 !py-3 lg:!py-4 font-normal rounded-full w-max flex items-center gap-2;
|
@apply bg-white text-carhop-green-700 px-4 lg:px-6 md:px-8 !py-3 lg:!py-4 font-normal rounded-full w-max flex items-center gap-2;
|
||||||
transition: transform 0.3s ease-in-out;
|
transition: transform 0.3s ease-in-out;
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,6 @@ $likes_count = get_post_likes_count($post_id);
|
||||||
<div class="socials-buttons">
|
<div class="socials-buttons">
|
||||||
<?php
|
<?php
|
||||||
$shareUrls = build_share_urls();
|
$shareUrls = build_share_urls();
|
||||||
write_log($shareUrls);
|
|
||||||
?>
|
?>
|
||||||
<button class="socials-buttons__button socials-buttons__button--cite" <?php echo empty($citeReference) ? 'disabled' : ''; ?> title="<?php echo empty($citeReference) ? 'Citation non disponible' : 'Copier la citation'; ?>">
|
<button class="socials-buttons__button socials-buttons__button--cite" <?php echo empty($citeReference) ? 'disabled' : ''; ?> title="<?php echo empty($citeReference) ? 'Citation non disponible' : 'Copier la citation'; ?>">
|
||||||
<img src="<?php echo get_template_directory_uri(); ?>/resources/img/icons/carhop-citer-article.svg" alt="">
|
<img src="<?php echo get_template_directory_uri(); ?>/resources/img/icons/carhop-citer-article.svg" alt="">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user