Skip to content

Commit

Permalink
partial for "Ravi's remarkable Reward"
Browse files Browse the repository at this point in the history
  • Loading branch information
ilicfilip committed Nov 8, 2024
1 parent f5253b1 commit 97033ad
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 18 deletions.
18 changes: 9 additions & 9 deletions classes/popovers/class-monthly-badges.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ protected function the_content() {
<div class="prpl-widgets-container in-popover">

<div class="prpl-popover-column">
<div class="prpl-widget-wrapper in-popover">
<h3 class="prpl-widget-title"><?php esc_html_e( 'Monthly badges 2024', 'progress-planner' ); ?></h3>
<div class="prpl-ravi-reward-container">
<span class="prpl-ravi-reward-icon">
<?php \progress_planner()->the_asset( 'images/badges/monthly-badge-default.svg' ); ?>
</span>
<p><?php esc_html_e( 'Ravi\'s remarkable Reward', 'progress-planner' ); ?></p>
</div>
</div>
<?php
\progress_planner()->the_view(
'page-widgets/parts/monthly-badge-2024.php',
[
'css_class' => 'prpl-widget-wrapper in-popover',
'title_tag' => 'h3',
]
);
?>

<?php
\progress_planner()->the_view(
Expand Down
26 changes: 26 additions & 0 deletions views/page-widgets/parts/monthly-badge-2024.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php
/**
* Widget view.
*
* @package Progress_Planner
*/

if ( ! defined( 'ABSPATH' ) ) {
exit;
}

$title_tag = isset( $args['title_tag'] ) ? \esc_attr( $args['title_tag'] ) : 'h3';
$css_class = isset( $args['css_class'] ) ? \esc_attr( $args['css_class'] ) : '';
?>

<div class="<?php echo \esc_attr( $css_class ); ?>">
<<?php echo \esc_html( $title_tag ); ?> class="prpl-widget-title">
<?php \esc_html_e( 'Your monthly badge 2024', 'progress-planner' ); ?>
</<?php echo \esc_html( $title_tag ); ?>>
<div class="prpl-ravi-reward-container">
<span class="prpl-ravi-reward-icon">
<?php \progress_planner()->the_asset( 'images/badges/monthly-badge-default.svg' ); ?>
</span>
<p><?php esc_html_e( 'Ravi\'s remarkable Reward', 'progress-planner' ); ?></p>
</div>
</div>
17 changes: 8 additions & 9 deletions views/page-widgets/suggested-tasks.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,14 @@ class="prpl-activities-gauge"

<div class="prpl-widget-content">
<?php if ( 2024 === (int) gmdate( 'Y' ) ) : ?>
<h2 class="prpl-widget-title">
<?php \esc_html_e( 'Your monthly badge 2024', 'progress-planner' ); ?>
</h2>
<div class="prpl-ravi-reward-container">
<span class="prpl-ravi-reward-icon">
<?php \progress_planner()->the_asset( 'images/badges/monthly-badge-default.svg' ); ?>
</span>
<p><?php esc_html_e( 'Ravi\'s remarkable Reward', 'progress-planner' ); ?></p>
</div>
<?php
\progress_planner()->the_view(
'page-widgets/parts/monthly-badge-2024.php',
[
'title_tag' => 'h2',
]
);
?>
<?php else : ?>

<?php
Expand Down

0 comments on commit 97033ad

Please sign in to comment.