From 58966731aa9079cc1da05cb58c7c55129401a1f1 Mon Sep 17 00:00:00 2001 From: Atala Date: Thu, 12 May 2016 00:03:22 +0200 Subject: [PATCH 1/3] celan: remove useless if --- theme/front-page.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/theme/front-page.php b/theme/front-page.php index ba8a99c..f10c383 100644 --- a/theme/front-page.php +++ b/theme/front-page.php @@ -14,13 +14,9 @@
- Date: Thu, 12 May 2016 00:19:01 +0200 Subject: [PATCH 2/3] feat: add three columns layout --- theme/front-page.php | 13 ++++++++++++- theme/lib/setup.php | 27 +++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 1 deletion(-) diff --git a/theme/front-page.php b/theme/front-page.php index f10c383..60cf266 100644 --- a/theme/front-page.php +++ b/theme/front-page.php @@ -14,7 +14,18 @@
- +
+
+
+ + + +
+
+
+ '

', // 'after_title' => '

' // ]); + + // Three columns layout + register_sidebar([ + 'name' => 'Haut première colonne', // TODO translate + 'id' => 'homepage-top-one-third', + 'before_widget' => '
', + 'after_widget' => '
', + 'before_title' => '

', + 'after_title' => '

' + ]); + register_sidebar([ + 'name' => 'Haut seconde colonne', // TODO translate + 'id' => 'homepage-top-two-third', + 'before_widget' => '
', + 'after_widget' => '
', + 'before_title' => '

', + 'after_title' => '

' + ]); + register_sidebar([ + 'name' => 'Haut troisième colonne', // TODO translate + 'id' => 'homepage-top-three-third', + 'before_widget' => '
', + 'after_widget' => '
', + 'before_title' => '

', + 'after_title' => '

' + ]); + // register_sidebar([ 'name' => 'Bas de page', // TODO translate 'id' => 'homepage-bottom', From 5478333497078b33cf1fcf755a96f0ee580816f5 Mon Sep 17 00:00:00 2001 From: Atala Date: Thu, 12 May 2016 00:34:01 +0200 Subject: [PATCH 3/3] feat: add two columns layout --- theme/front-page.php | 20 +++++++++++++++----- theme/lib/setup.php | 35 +++++++++++++++++++++++++++-------- 2 files changed, 42 insertions(+), 13 deletions(-) diff --git a/theme/front-page.php b/theme/front-page.php index 60cf266..8f29dda 100644 --- a/theme/front-page.php +++ b/theme/front-page.php @@ -15,13 +15,23 @@ -
+ if (is_active_sidebar('homepage-one-half') || is_active_sidebar('homepage-two-half')) : ?> +
+
+
+ + +
+
+
+ +
- - - + + +
diff --git a/theme/lib/setup.php b/theme/lib/setup.php index 8b9b5cf..a15e186 100644 --- a/theme/lib/setup.php +++ b/theme/lib/setup.php @@ -75,26 +75,45 @@ function widgets_init() { // 'after_title' => '' // ]); + // Two columns layout + register_sidebar([ + 'name' => '[Deux colonnes] Première colonne', // TODO translate + 'id' => 'homepage-one-half', + 'before_widget' => '
', + 'after_widget' => '
', + 'before_title' => '

', + 'after_title' => '

' + ]); + register_sidebar([ + 'name' => '[Deux colonnes] Seconde colonne', // TODO translate + 'id' => 'homepage-two-half', + 'before_widget' => '
', + 'after_widget' => '
', + 'before_title' => '

', + 'after_title' => '

' + ]); + // + // Three columns layout register_sidebar([ - 'name' => 'Haut première colonne', // TODO translate - 'id' => 'homepage-top-one-third', - 'before_widget' => '
', + 'name' => '[Trois colonnes] Première colonne', // TODO translate + 'id' => 'homepage-one-third', + 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

' ]); register_sidebar([ - 'name' => 'Haut seconde colonne', // TODO translate - 'id' => 'homepage-top-two-third', - 'before_widget' => '
', + 'name' => '[Trois colonnes] Seconde colonne', // TODO translate + 'id' => 'homepage-two-third', + 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

' ]); register_sidebar([ - 'name' => 'Haut troisième colonne', // TODO translate - 'id' => 'homepage-top-three-third', + 'name' => '[Trois colonnes] Troisième colonne', // TODO translate + 'id' => 'homepage-three-third', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

',