Skip to content

Commit

Permalink
update footer
Browse files Browse the repository at this point in the history
  • Loading branch information
koechkevin committed Oct 20, 2023
1 parent 63e89d3 commit 5138321
Show file tree
Hide file tree
Showing 10 changed files with 112 additions and 17 deletions.
1 change: 1 addition & 0 deletions contrib/docker-compose/php/php.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
allow_url_fopen: 1
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ services:
- ./wp-content/themes:/var/www/html/wp-content/themes
- ./wp-content/plugins:/var/www/html/wp-content/plugins
- ./contrib/docker-compose/php/uploads.ini:/usr/local/etc/php/conf.d/uploads.ini
- ./contrib/docker-compose/php/php.ini:/usr/local/etc/php/php.ini

Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@100;400;500;600&display=swap");

.body1,
.root .links .primary,
.root .embed #mc_embed_signup,
Expand Down Expand Up @@ -168,6 +170,10 @@
}
}

.root .links .icon {
color: var(--shades-white, #fff);
}

.root .links>.secondary~.secondary {
margin-top: 10px;
}
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
85 changes: 68 additions & 17 deletions wp-content/plugins/academy-africa/includes/widgets/footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,26 @@ protected function register_controls()
'default' => __('', 'academy-africa'),
]
);

$this->add_control(
'stay_in_touch_text',
[
'label' => __('Stay in Touch', 'academy-africa'),
'type' => \Elementor\Controls_Manager::TEXT,
'default' => __('STAY IN TOUCH', 'academy-africa'),
]
);
$links = new \Elementor\Repeater();

$links->add_control(
'label',
[
'label' => esc_html__('Label', 'academy-africa'),
'type' => \Elementor\Controls_Manager::TEXT,
'default' => 'Link Label',
]
);

$links->add_control(
'page_link',
[
Expand All @@ -71,12 +89,42 @@ protected function register_controls()
]
);

$links->add_control(
'label',
$social_media = new \Elementor\Repeater();
$social_media->add_control(
'type',
[
'label' => esc_html__('Label', 'academy-africa'),
'type' => \Elementor\Controls_Manager::TEXT,
'default' => 'Link Label',
'label' => esc_html__('Type', 'academy-africa'),
'type' => \Elementor\Controls_Manager::SELECT,
'default' => 'github',
'options' => [
'facebook' => esc_html__('Facebook', 'academy-africa'),
'github' => esc_html__('Github', 'academy-africa'),
'slack' => esc_html__('Slack', 'academy-africa'),
'linkedin' => esc_html__('LinkedIn', 'academy-africa'),
'instagram' => esc_html__('Instagram', 'academy-africa'),
'twitter' => esc_html__('Twitter', 'academy-africa'),
]
]
);

$social_media->add_control(
'link',
[
'label' => esc_html__('Page Link', 'academy-africa'),
'type' => \Elementor\Controls_Manager::URL,
'default' => [
'url' => '',
],
]
);

$this->add_control(
'social_media_links',
[
'label' => esc_html__('Social Media Links', 'academy-africa'),
'type' => \Elementor\Controls_Manager::REPEATER,
'fields' => $social_media->get_controls(),
'title_field' => '{{{ type }}}',
]
);

Expand Down Expand Up @@ -107,14 +155,6 @@ protected function register_controls()
'default' => __('Subscribe to the Code for Africa newsletter', 'academy-africa'),
]
);
$this->add_control(
'stay_in_touch_text',
[
'label' => __('Stay in Touch', 'academy-africa'),
'type' => \Elementor\Controls_Manager::TEXT,
'default' => __('STAY IN TOUCH', 'academy-africa'),
]
);
$this->add_control(
'newsletter_embed_code',
[
Expand Down Expand Up @@ -173,9 +213,20 @@ protected function render()
<? echo $site_description ?>
</p>
<div class="connect">
<p <?php echo $this->get_render_attribute_string('stay_in_touch_text'); ?>>
<span style="white-space: nowrap;" <?php echo $this->get_render_attribute_string('stay_in_touch_text'); ?>>
<? echo $stay_in_touch_text ?>
</p>
</span>
<?
if (!empty($settings['social_media_links'])) {
foreach ($settings['social_media_links'] as $item) {
$link = esc_url($item['link']['url']);
$type = esc_html($item['type']);
$icon = dirname(plugin_dir_url(__FILE__)) . ('/assets/images/icons/Type=' . $type . ', Size=24, Color=CurrentColor.svg');
$content = file_get_contents($icon);
echo '<a href="' . $link . '" class="icon">' . $content . '</a>';
}
}
?>
</div>
</div>
</div>
Expand All @@ -201,9 +252,9 @@ protected function render()
</div>
<div class="item">
<div class="embed">
<P class="title" <?php echo $this->get_render_attribute_string('newsletter_signup_text'); ?>>
<p class="title" <?php echo $this->get_render_attribute_string('newsletter_signup_text'); ?>>
<?php echo $settings['newsletter_signup_text']; ?>
</P>
</p>
<div <?php echo $this->get_render_attribute_string('newsletter_embed_code'); ?>>
<?php echo $newsletter_embed_code; ?>
</div>
Expand Down

0 comments on commit 5138321

Please sign in to comment.