From 98d3243b32cf6d253a4f47d415868392bf6d854e Mon Sep 17 00:00:00 2001 From: Antoine M Date: Thu, 26 Oct 2023 17:48:59 +0200 Subject: [PATCH] introducing the component --- template-components/heading-box.css | 30 ++++++++++++++ template-components/heading-box.php | 15 +++++++ template-components/news-heading-box.css | 39 ++++++++++++++++++ template-components/news-heading-box.php | 32 +++++++++++++++ template-components/post-infos-capsule.php | 48 ++++++++++++++++++++++ 5 files changed, 164 insertions(+) create mode 100644 template-components/heading-box.css create mode 100644 template-components/heading-box.php create mode 100644 template-components/news-heading-box.css create mode 100644 template-components/news-heading-box.php create mode 100644 template-components/post-infos-capsule.php diff --git a/template-components/heading-box.css b/template-components/heading-box.css new file mode 100644 index 0000000..2978cdd --- /dev/null +++ b/template-components/heading-box.css @@ -0,0 +1,30 @@ +.heading-box { + @apply container + bg-primary + text-white + text-center + mx-auto + py-12 + rounded-2xl + pt-20 + mt-8 + relative; + + /* max-w-screen-2xl + px-8 mx-auto + + + relative + pt-20; */ + &__title { + @apply uppercase font-medium text-xl tracking-widest; + } + &__description { + @apply font-bold text-4xl max-w-screen-md mx-auto pt-4 max-w-md mx-auto; + line-height: 1.2; + } + &__page-icon { + @apply mx-auto w-28 absolute top-0 left-1/2; + transform: translate(-50%, -50%); + } +} diff --git a/template-components/heading-box.php b/template-components/heading-box.php new file mode 100644 index 0000000..bfdf1f3 --- /dev/null +++ b/template-components/heading-box.php @@ -0,0 +1,15 @@ + + +
+ + + +

+

+
\ No newline at end of file diff --git a/template-components/news-heading-box.css b/template-components/news-heading-box.css new file mode 100644 index 0000000..1905247 --- /dev/null +++ b/template-components/news-heading-box.css @@ -0,0 +1,39 @@ +.news-heading-box { + @apply container + bg-primary + text-white + mx-auto + py-12 + px-8 + rounded-3xl + mt-8 + relative + flex + flex-nowrap + justify-between; + .post-infos-capsule { + @apply mt-4; + } + &__type { + @apply uppercase font-medium text-xl tracking-widest; + } + &__title { + @apply font-bold text-4xl pt-4 max-w-xl; + line-height: 1.2; + } + &__page-icon { + @apply mx-auto w-28 absolute top-0 left-1/2; + transform: translate(-50%, -50%); + } + + &__content { + flex-shrink: 1; + flex-grow: 2; + } + + &__thumbnail { + @apply w-80 h-56 object-cover rounded-3xl; + + flex-shrink: 2; + } +} diff --git a/template-components/news-heading-box.php b/template-components/news-heading-box.php new file mode 100644 index 0000000..71f9df4 --- /dev/null +++ b/template-components/news-heading-box.php @@ -0,0 +1,32 @@ + + +
+ +
+ +

name ?>

+ +

+ + get_the_ID(), + "published" => $published + )); + + ?> + + +
+ + + +
\ No newline at end of file diff --git a/template-components/post-infos-capsule.php b/template-components/post-infos-capsule.php new file mode 100644 index 0000000..e93ec52 --- /dev/null +++ b/template-components/post-infos-capsule.php @@ -0,0 +1,48 @@ + $facebookUrl, + 'twitter-x' => $twitterUrl, + 'linkedin' => $linkedInUrl + ); +} + +$shareUrls = build_share_urls($postID); + + +?> + +
+ + + + + + + +
\ No newline at end of file