Skip to content

Commit dcfc3ec

Browse files
authored
Merge pull request #2720 from themeum/fix/nav-mobile
💅 Update kids mode nav style
2 parents ac52fc9 + 00a2074 commit dcfc3ec

3 files changed

Lines changed: 48 additions & 16 deletions

File tree

assets/src/scss/frontend/dashboard/layout/_nav-mobile.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,18 @@
3939
&.active,
4040
&.active span {
4141
color: $tutor-text-brand;
42+
font-weight: $tutor-font-weight-medium;
4243
}
4344

4445
&:hover,
4546
&:focus {
4647
background-color: transparent;
4748
color: $tutor-text-brand;
4849
}
50+
51+
.tutor-dashboard-nav-mobile-icon {
52+
@include tutor-flex-center;
53+
}
4954
}
5055
}
5156
}

assets/src/scss/frontend/kids/_dashboard.scss

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,27 @@
33
@use './mixins' as *;
44

55
[data-tutor-ui='kids'] {
6+
.tutor-dashboard-nav-mobile-list {
7+
.tutor-dashboard-nav-mobile-icon {
8+
padding: $tutor-spacing-2;
9+
}
10+
11+
.tutor-dashboard-nav-mobile-text {
12+
color: $tutor-text-primary;
13+
font-weight: $tutor-font-weight-medium;
14+
}
15+
16+
.active {
17+
.tutor-dashboard-nav-mobile-icon {
18+
@include tutor-kids-shadow(false, $tutor-border-brand, $tutor-radius-full, sm);
19+
background-color: $tutor-surface-brand-tertiary;
20+
}
21+
.tutor-dashboard-nav-mobile-text {
22+
font-weight: $tutor-font-weight-semibold;
23+
}
24+
}
25+
}
26+
627
.tutor-card {
728
@include tutor-kids-shadow(false, $tutor-border-idle, $tutor-radius-5xl, sm);
829
}

templates/dashboard/components/sidebar-nav-mobile.php

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -53,27 +53,31 @@
5353
?>
5454
<li>
5555
<a class="<?php echo esc_attr( $active_class ); ?>" href="<?php echo esc_url( $menu_link ?? '#' ); ?>">
56-
<?php
57-
SvgIcon::make()
58-
->name( ( $is_active_menu && ! tutor_utils()->is_kids_mode() ) ? $active_icon_name : $menu_icon_name )
59-
->size( Size::SIZE_20 )
60-
->render();
61-
?>
62-
<span class="tutor-tiny"><?php echo esc_html( $menu_title ); ?></span>
56+
<span class="tutor-dashboard-nav-mobile-icon">
57+
<?php
58+
SvgIcon::make()
59+
->name( ( $is_active_menu && ! tutor_utils()->is_kids_mode() ) ? $active_icon_name : $menu_icon_name )
60+
->size( Size::SIZE_20 )
61+
->render();
62+
?>
63+
</span>
64+
<span class="tutor-tiny tutor-dashboard-nav-mobile-text"><?php echo esc_html( $menu_title ); ?></span>
6365
</a>
6466
</li>
6567
<?php
6668
}
6769
?>
6870
<li>
6971
<a href="<?php echo esc_url( Dashboard::get_account_page_url( 'profile' ) ); ?>">
70-
<?php
71-
Avatar::make()
72-
->user( get_current_user_id() )
73-
->size( Size::SIZE_20 )
74-
->render();
75-
?>
76-
<span class="tutor-tiny"><?php esc_html_e( 'Profile', 'tutor' ); ?></span>
72+
<div class="tutor-dashboard-nav-mobile-icon">
73+
<?php
74+
Avatar::make()
75+
->user( get_current_user_id() )
76+
->size( Size::SIZE_20 )
77+
->render();
78+
?>
79+
</div>
80+
<span class="tutor-tiny tutor-dashboard-nav-mobile-text"><?php esc_html_e( 'Profile', 'tutor' ); ?></span>
7781
</a>
7882
</li>
7983
<?php
@@ -87,8 +91,10 @@
8791
:aria-expanded="open ? 'true' : 'false'"
8892
aria-haspopup="true"
8993
>
90-
<?php SvgIcon::make()->name( Icon::THREE_DOTS_VERTICAL )->size( 16 )->render(); ?>
91-
<span class="tutor-tiny"><?php esc_html_e( 'More', 'tutor' ); ?></span>
94+
<span class="tutor-dashboard-nav-mobile-icon">
95+
<?php SvgIcon::make()->name( Icon::ELLIPSES )->size( 20 )->render(); ?>
96+
</span>
97+
<span class="tutor-tiny tutor-dashboard-nav-mobile-text"><?php esc_html_e( 'More', 'tutor' ); ?></span>
9298
</button>
9399
<!-- Popover panel -->
94100
<div

0 commit comments

Comments
 (0)