From 8f50e939c36da3b95cb136aa48d65e1848722987 Mon Sep 17 00:00:00 2001 From: Antoine M Date: Thu, 9 Nov 2023 14:26:13 +0100 Subject: [PATCH] refactoring heading box --- template-components/heading-box--job.php | 35 ++++++++++++++++++++++ template-components/heading-box--news.css | 36 +++++++++++++++++++++++ template-components/heading-box--news.php | 35 ++++++++++++++++++++++ template-components/heading-box.css | 29 +++++++++--------- template-components/heading-box.php | 8 ++--- 5 files changed, 125 insertions(+), 18 deletions(-) create mode 100644 template-components/heading-box--job.php create mode 100644 template-components/heading-box--news.css create mode 100644 template-components/heading-box--news.php diff --git a/template-components/heading-box--job.php b/template-components/heading-box--job.php new file mode 100644 index 0000000..c868360 --- /dev/null +++ b/template-components/heading-box--job.php @@ -0,0 +1,35 @@ + + +
+ +
+ +

name ?>

+ +

+ + get_the_ID(), + "published" => $published + )); + + ?> + + +
+ + + +
\ No newline at end of file diff --git a/template-components/heading-box--news.css b/template-components/heading-box--news.css new file mode 100644 index 0000000..e69d080 --- /dev/null +++ b/template-components/heading-box--news.css @@ -0,0 +1,36 @@ +.heading-box--news { + @apply /* container */ + /* bg-primary */ + /* text-white */ + /* mx-auto */ + /* py-12 */ + /* px-8 */ + /* rounded-3xl */ + mt-8 + flex + relative + flex-nowrap + justify-between; + .post-infos-capsule { + @apply mt-8; + } + + &__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 + hidden + lg:block; + + flex-shrink: 2; + } +} diff --git a/template-components/heading-box--news.php b/template-components/heading-box--news.php new file mode 100644 index 0000000..e077822 --- /dev/null +++ b/template-components/heading-box--news.php @@ -0,0 +1,35 @@ + + +
+ +
+ +

name ?>

+ +

+ + get_the_ID(), + "published" => $published + )); + + ?> + + +
+ + + +
\ No newline at end of file diff --git a/template-components/heading-box.css b/template-components/heading-box.css index 2978cdd..0bea760 100644 --- a/template-components/heading-box.css +++ b/template-components/heading-box.css @@ -2,23 +2,24 @@ @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; */ + mx-auto + py-12 + rounded-2xl + pt-20 + px-8 + mt-8 + relative; &__title { + @apply font-bold text-4xl pt-4 max-w-3xl; + line-height: 1.2; + } + &__subtitle { @apply uppercase font-medium text-xl tracking-widest; } +} + +.heading-box--classic { + @apply text-center; &__description { @apply font-bold text-4xl max-w-screen-md mx-auto pt-4 max-w-md mx-auto; line-height: 1.2; diff --git a/template-components/heading-box.php b/template-components/heading-box.php index bfdf1f3..10a16d9 100644 --- a/template-components/heading-box.php +++ b/template-components/heading-box.php @@ -6,10 +6,10 @@ $pageIcon = $args['pageIcon'] ?? null; ?> -
+
- + -

-

+

+

\ No newline at end of file