Skip to content

Commit a67e2b3

Browse files
committed
style: Update kids mode style
1 parent d725f09 commit a67e2b3

4 files changed

Lines changed: 37 additions & 8 deletions

File tree

assets/core/scss/mixins/_avatars.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ $tutor-avatar-sizes: (
3838
font-size: 'tiny',
3939
icon-size: 12px,
4040
),
41+
28: (
42+
font-size: 'tiny',
43+
icon-size: 12px,
44+
),
4145
32: (
4246
font-size: 'tiny',
4347
icon-size: 16px,

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

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

55
[data-tutor-ui='kids'] {
6+
.tutor-dashboard-nav-mobile-list > li > a,
7+
.tutor-dashboard-nav-mobile-list > li > button {
8+
span {
9+
&:last-of-type {
10+
color: $tutor-text-primary;
11+
font-weight: $tutor-font-weight-medium;
12+
}
13+
}
14+
&.active span {
15+
&:first-of-type {
16+
@include tutor-kids-shadow(false, $tutor-border-brand, $tutor-radius-full, sm);
17+
background-color: $tutor-surface-brand-tertiary;
18+
}
19+
20+
&:last-of-type {
21+
font-weight: $tutor-font-weight-semibold;
22+
}
23+
}
24+
}
25+
626
.tutor-card {
727
@include tutor-kids-shadow(false, $tutor-border-idle, $tutor-radius-5xl, sm);
828
}

components/Constants/Size.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ abstract class Size {
3030
public const SIZE_16 = 16;
3131
public const SIZE_20 = 20;
3232
public const SIZE_24 = 24;
33+
public const SIZE_28 = 28;
3334
public const SIZE_32 = 32;
3435
public const SIZE_40 = 40;
3536
public const SIZE_48 = 48;

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

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,14 @@
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-
?>
56+
<span class="tutor-flex-center tutor-p-2">
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>
6264
<span class="tutor-tiny"><?php echo esc_html( $menu_title ); ?></span>
6365
</a>
6466
</li>
@@ -70,7 +72,7 @@
7072
<?php
7173
Avatar::make()
7274
->user( get_current_user_id() )
73-
->size( Size::SIZE_20 )
75+
->size( Size::SIZE_28 )
7476
->render();
7577
?>
7678
<span class="tutor-tiny"><?php esc_html_e( 'Profile', 'tutor' ); ?></span>
@@ -87,7 +89,9 @@
8789
:aria-expanded="open ? 'true' : 'false'"
8890
aria-haspopup="true"
8991
>
90-
<?php SvgIcon::make()->name( Icon::THREE_DOTS_VERTICAL )->size( 16 )->render(); ?>
92+
<span class="tutor-flex-center tutor-p-2">
93+
<?php SvgIcon::make()->name( Icon::ELLIPSES )->size( 20 )->render(); ?>
94+
</span>
9195
<span class="tutor-tiny"><?php esc_html_e( 'More', 'tutor' ); ?></span>
9296
</button>
9397
<!-- Popover panel -->

0 commit comments

Comments
 (0)