moosicbox_app_native_ui 0.1.1

MoosicBox App UI package
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
#![cfg_attr(feature = "fail-on-warnings", deny(warnings))]
#![warn(clippy::all, clippy::pedantic, clippy::nursery, clippy::cargo)]
#![allow(clippy::multiple_crate_versions)]
#![allow(clippy::branches_sharing_code)]

pub mod albums;
pub mod artists;
pub mod audio_zones;
pub mod formatting;
pub mod play_queue;
pub mod playback_sessions;
pub mod settings;
pub mod state;

use albums::album_cover_img_from_album;
use formatting::TimeFormat;
use hyperchad_actions::{
    ActionType,
    logic::{
        get_height_px_str_id, get_mouse_x_self, get_mouse_y_str_id, get_visibility_str_id,
        get_width_px_self,
    },
};
use hyperchad_transformer_models::{
    AlignItems, JustifyContent, LayoutOverflow, Position, Visibility,
};
use maud::{Markup, html};
use moosicbox_music_models::{AlbumSort, ApiSource, TrackApiSource, api::ApiTrack, id::Id};
use moosicbox_session_models::{ApiSession, ApiUpdateSession};
use play_queue::play_queue;
use serde::{Deserialize, Serialize};
use state::State;

pub static VIZ_HEIGHT: u16 = 35;
pub static VIZ_PADDING: u16 = 5;
pub static FOOTER_BORDER_SIZE: u16 = 3;
pub static FOOTER_HEIGHT: u16 = 100 + VIZ_HEIGHT + VIZ_PADDING * 2 + FOOTER_BORDER_SIZE;
pub static FOOTER_ICON_SIZE: u16 = 25;
pub static CURRENT_ALBUM_SIZE: u16 = 70;

#[macro_export]
macro_rules! public_img {
    ($path:expr $(,)?) => {
        moosicbox_app_native_image::image!(concat!("../../public/img/", $path))
    };
}

#[macro_export]
macro_rules! pre_escaped {
    ($($message:tt)+) => {
        maud::PreEscaped(format!($($message)*))
    };
}

#[derive(Debug, Serialize, Deserialize)]
#[serde(tag = "type")]
pub enum Action {
    RefreshVisualization,
    TogglePlayback,
    PreviousTrack,
    NextTrack,
    SetVolume,
    SeekCurrentTrackPercent,
    FilterAlbums {
        filtered_sources: Vec<TrackApiSource>,
        sort: AlbumSort,
    },
    PlayAlbum {
        album_id: Id,
        api_source: ApiSource,
        version_source: Option<TrackApiSource>,
        sample_rate: Option<u32>,
        bit_depth: Option<u8>,
    },
    AddAlbumToQueue {
        album_id: Id,
        api_source: ApiSource,
        version_source: Option<TrackApiSource>,
        sample_rate: Option<u32>,
        bit_depth: Option<u8>,
    },
    PlayAlbumStartingAtTrackId {
        album_id: Id,
        start_track_id: Id,
        api_source: ApiSource,
        version_source: Option<TrackApiSource>,
        sample_rate: Option<u32>,
        bit_depth: Option<u8>,
    },
    PlayTracks {
        track_ids: Vec<Id>,
        api_source: ApiSource,
    },
}

impl From<Action> for hyperchad_actions::Action {
    fn from(value: Action) -> Self {
        ActionType::Custom {
            action: value.to_string(),
        }
        .into()
    }
}

impl From<Action> for ActionType {
    fn from(value: Action) -> Self {
        Self::Custom {
            action: value.to_string(),
        }
    }
}

impl std::fmt::Display for Action {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str(&serde_json::to_string(self).unwrap())
    }
}

impl<'a> TryFrom<&'a str> for Action {
    type Error = serde_json::Error;

    fn try_from(value: &'a str) -> Result<Self, Self::Error> {
        serde_json::from_str(value)
    }
}

#[must_use]
pub fn sidebar_navigation() -> Markup {
    html! {
        aside sx-width="calc(max(240, min(280, 15%)))" sx-background="#080a0b" {
            div class="navigation-bar" sx-padding=(20) {
                @let size = 36;
                div class="navigation-bar-header" sx-dir="row" sx-align-items="center" sx-height=(size) {
                    @let icon_size = 36;
                    a href="/" sx-dir="row" sx-height=(icon_size) {
                        img
                            sx-width=(icon_size)
                            sx-height=(icon_size)
                            src=(public_img!("icon128.png"));

                        h1 class="navigation-bar-header-home-link-text" sx-font-size=(20) {
                            "MoosicBox"
                        }
                    }
                    @let size = 22;
                    div sx-dir="row" sx-justify-content="end" sx-align-items="center" sx-height=(size) {
                        a href="/settings" sx-dir="row" sx-width=(size + 10) {
                            img
                                sx-width=(size)
                                sx-height=(size)
                                src=(public_img!("settings-gear-white.svg"));
                        }
                        div sx-width=(size + 10) {
                            img
                                sx-width=(size)
                                sx-height=(size)
                                src=(public_img!("chevron-left-white.svg"));
                        }
                    }
                }
                ul {
                    li {
                        a href="/" {
                            "Home"
                        }
                    }
                    li {
                        a href="/downloads" {
                            "Downloads"
                        }
                    }
                }
                h1 class="my-collection-header" sx-font-size=(20) {
                    "My Collection"
                }
                ul {
                    li {
                        a href="/albums" {
                            "Albums"
                        }
                    }
                    li {
                        a href="/artists" {
                            "Artists"
                        }
                    }
                }
            }
        }
    }
}

#[allow(clippy::too_many_lines)]
#[must_use]
pub fn player(state: &State) -> Markup {
    html! {
        div sx-height=(FOOTER_HEIGHT) sx-border-top={(FOOTER_BORDER_SIZE)", #222"} {
            div sx-height=(VIZ_HEIGHT) sx-padding-y=(VIZ_PADDING) sx-dir="row" {
                canvas
                    id="visualization"
                    sx-cursor="pointer"
                    sx-width="100%"
                    sx-height=(VIZ_HEIGHT)
                    fx-click=(get_mouse_x_self().divide(get_width_px_self()).then_pass_to(Action::SeekCurrentTrackPercent))
                    fx-resize=(get_width_px_self().then_pass_to(Action::RefreshVisualization))
                    fx-immediate=(get_width_px_self().then_pass_to(Action::RefreshVisualization))
                {}
            }
            div sx-height=(100) sx-dir="row" {
                div sx-flex=(1) sx-justify-content="center" {
                    (player_current_album_from_state(state, 70))
                }
                div sx-flex=(2) sx-align-items="center" sx-justify-content="center" {
                    @let button_size = 40;
                    @let progress_size = 20;
                    div sx-height=(button_size) sx-dir="row" sx-justify-content="center" {
                        button
                            sx-width=(button_size)
                            sx-height=(button_size)
                            sx-margin-x=(5)
                            sx-dir="row"
                            sx-justify-content="center"
                            sx-align-items="center"
                            sx-background="#181a1b"
                            sx-border-radius="100%"
                            fx-click=(Action::PreviousTrack)
                        {
                            @let icon_size = 18;
                            img
                                sx-width=(icon_size)
                                sx-height=(icon_size)
                                src=(public_img!("previous-button-white.svg"));
                        }
                        (player_play_button_from_state(state))
                        button
                            sx-width=(button_size)
                            sx-height=(button_size)
                            sx-margin-x=(5)
                            sx-dir="row"
                            sx-justify-content="center"
                            sx-align-items="center"
                            sx-background="#181a1b"
                            sx-border-radius="100%"
                            fx-click=(Action::NextTrack)
                        {
                            @let icon_size = 18;
                            img
                                sx-width=(icon_size)
                                sx-height=(icon_size)
                                src=(public_img!("next-button-white.svg"));
                        }
                    }
                    div sx-height=(progress_size) sx-margin-top=(10) {
                        (player_current_progress_from_state(state))
                    }
                }
                div sx-flex=(1) sx-dir="row" sx-justify-content="end" sx-align-items="center" sx-padding-right=(20) {
                    (volume(state, FOOTER_ICON_SIZE))
                    button
                        sx-width=(FOOTER_ICON_SIZE)
                        sx-height=(FOOTER_ICON_SIZE)
                        sx-margin-left=(10)
                        fx-click=(
                            get_visibility_str_id(AUDIO_ZONES_ID)
                                .eq(Visibility::Hidden)
                                .then(ActionType::show_str_id(AUDIO_ZONES_ID))
                                .or_else(ActionType::hide_str_id(AUDIO_ZONES_ID))
                        )
                    {
                        img
                            sx-width=(FOOTER_ICON_SIZE)
                            sx-height=(FOOTER_ICON_SIZE)
                            src=(public_img!("speaker-white.svg"));
                    }
                    button
                        sx-width=(FOOTER_ICON_SIZE)
                        sx-height=(FOOTER_ICON_SIZE)
                        sx-margin-left=(10)
                        fx-click=(
                            get_visibility_str_id(PLAYBACK_SESSIONS_ID)
                                .eq(Visibility::Hidden)
                                .then(ActionType::show_str_id(PLAYBACK_SESSIONS_ID))
                                .or_else(ActionType::hide_str_id(PLAYBACK_SESSIONS_ID))
                        )
                    {
                        img
                            sx-width=(FOOTER_ICON_SIZE)
                            sx-height=(FOOTER_ICON_SIZE)
                            src=(public_img!("sessions-white.svg"));
                    }
                    button
                        fx-click=(
                            get_visibility_str_id("play-queue")
                                .eq(Visibility::Hidden)
                                .then(ActionType::show_str_id("play-queue"))
                                .or_else(ActionType::hide_str_id("play-queue"))
                        )
                        sx-width=(FOOTER_ICON_SIZE)
                        sx-height=(FOOTER_ICON_SIZE)
                        sx-margin-left=(10)
                    {
                        img
                            sx-width=(FOOTER_ICON_SIZE)
                            sx-height=(FOOTER_ICON_SIZE)
                            src=(public_img!("playlist-white.svg"));
                    }
                }
            }
        }
    }
}

pub const VOLUME_SLIDER_CONTAINER_ID: &str = "volume-slider-container";
pub const VOLUME_SLIDER_ID: &str = "volume-slider";
pub const VOLUME_SLIDER_VALUE_CONTAINER_ID: &str = "volume-slider-value-container";
pub const VOLUME_SLIDER_VALUE_ID: &str = "volume-slider-value";

fn volume(state: &State, size: u16) -> Markup {
    let volume_percent = state.player.playback.as_ref().map_or(1.0, |x| x.volume);
    html! {
        div
            id=(VOLUME_SLIDER_CONTAINER_ID)
            sx-width=(size)
            sx-height=(size)
            sx-position="relative"
            fx-hover=(ActionType::show_str_id(VOLUME_SLIDER_ID).delay_off(400))
        {
            button {
                img
                    sx-width=(size)
                    sx-height=(size)
                    src=(public_img!("audio-white.svg"));
            }
            (volume_slider(size, volume_percent))
        }
    }
}

fn volume_slider(size: u16, volume_percent: f64) -> Markup {
    html! {
        div
            id=(VOLUME_SLIDER_ID)
            sx-visibility=(Visibility::Hidden)
            sx-width=(30)
            sx-height=(130)
            sx-padding-y=(15)
            sx-position="absolute"
            sx-bottom=(size)
            sx-left=(0)
            sx-margin-y=(5)
            sx-align-items="center"
            sx-justify-content="center"
            sx-border-radius=(30)
            sx-background="#181a1b"
            sx-cursor="pointer"
            fx-mouse-down=(
                hyperchad_actions::logic::Arithmetic::group(
                    get_height_px_str_id(VOLUME_SLIDER_VALUE_CONTAINER_ID)
                        .minus(get_mouse_y_str_id(VOLUME_SLIDER_VALUE_CONTAINER_ID))
                )
                    .divide(get_height_px_str_id(VOLUME_SLIDER_VALUE_CONTAINER_ID))
                    .clamp(0.0, 1.0)
                    .then_pass_to(Action::SetVolume)
                    .throttle(30)
            )
            fx-hover=(ActionType::show_self().delay_off(400))
        {
            div
                id=(VOLUME_SLIDER_VALUE_CONTAINER_ID)
                sx-position="relative"
                sx-width=(3)
                sx-height="100%"
                sx-border-radius=(30)
                sx-background="#444"
            {
                (volume_slider_value(size, volume_percent))
            }
        }
    }
}

fn volume_slider_value(size: u16, volume_percent: f64) -> Markup {
    let height_percent = volume_percent * 100.0;
    html! {
        div
            id=(VOLUME_SLIDER_VALUE_ID)
            sx-position="absolute"
            sx-bottom=(0)
            sx-left=(0)
            sx-width="100%"
            sx-height=(format!("{height_percent}%"))
            sx-border-radius=(30)
            sx-background="#fff"
        {
            div sx-position="relative" {
                @let slider_top_width = f32::from(size) / 2.5;
                div
                    sx-position="absolute"
                    sx-top=(0)
                    sx-left=(format!("calc(50% - {})", slider_top_width / 2.0))
                    sx-width=(slider_top_width)
                    sx-height=(3)
                    sx-border-radius=(30)
                    sx-background="#fff"
                {}
            }
        }
    }
}

fn player_play_button(playing: bool) -> Markup {
    html! {
        @let button_size = 40;
        button
            id="player-play-button"
            sx-width=(button_size)
            sx-height=(button_size)
            sx-margin-x=(5)
            sx-dir="row"
            sx-justify-content="center"
            sx-align-items="center"
            sx-background="#181a1b"
            sx-border-radius="100%"
            fx-click=(Action::TogglePlayback)
        {
            @let icon_size = 16;
            img
                sx-width=(icon_size)
                sx-height=(icon_size)
                src=(
                    if playing {
                        public_img!("pause-button-white.svg")
                    } else {
                        public_img!("play-button-white.svg")
                    }
                );
        }
    }
}

fn player_play_button_from_state(state: &State) -> Markup {
    state.player.playback.as_ref().map_or_else(
        || player_play_button(false),
        |playback| player_play_button(playback.playing),
    )
}

fn player_current_album(track: &ApiTrack, size: u16) -> Markup {
    html! {
        div id="player-current-playing" sx-dir="row" sx-align-items="center" {
            div sx-width=(size) sx-padding-x=(20) sx-align-items="center" sx-justify-content="center" {
                a href=(pre_escaped!("/albums?albumId={}&source={}", track.album_id, track.api_source)) sx-width=(size) sx-height=(size) {
                    (album_cover_img_from_album(&track.into(), size))
                }
            }
            div sx-justify-content="center" sx-gap=(3) {
                div {
                    a href=(pre_escaped!("/albums?albumId={}&source={}", track.album_id, track.api_source)) { (track.title) }
                }
                div {
                    a href=(pre_escaped!("/artists?artistId={}&source={}", track.artist_id, track.api_source)) { (track.artist) }
                }
                div sx-dir="row" {
                    "Playing from: " a href=(pre_escaped!("/albums?albumId={}&source={}", track.album_id, track.api_source)) { (track.album) }
                }
            }
        }
    }
}

fn player_current_album_from_state(state: &State, size: u16) -> Markup {
    if let Some(playback) = &state.player.playback {
        let track: Option<&ApiTrack> = playback.tracks.get(playback.position as usize);

        if let Some(track) = track {
            return player_current_album(track, size);
        }
    }

    html! {
        div id="player-current-playing" sx-dir="row" {}
    }
}

fn player_current_progress(progress: f64, duration: f64) -> Markup {
    html! {
        div id="player-current-progress" {
            (progress.into_formatted()) " // " (duration.into_formatted())
        }
    }
}

fn player_current_progress_from_state(state: &State) -> Markup {
    if let Some(playback) = &state.player.playback {
        let track: Option<&ApiTrack> = playback.tracks.get(playback.position as usize);

        if let Some(track) = track {
            return player_current_progress(playback.seek, track.duration);
        }
    }

    html! {
        div id="player-current-progress" {}
    }
}

#[must_use]
pub fn session_updated(
    state: &State,
    update: &ApiUpdateSession,
    session: &ApiSession,
) -> Vec<(String, Markup)> {
    let mut partials = vec![];

    if update.position.is_some() || update.playlist.is_some() {
        log::debug!("session_updated: position or playlist updated");
        let track: Option<&ApiTrack> = session
            .playlist
            .tracks
            .get(session.position.unwrap_or(0) as usize);

        if let Some(track) = track {
            log::debug!("session_updated: rendering current playing");
            partials.push((
                "player-current-playing".to_string(),
                player_current_album(track, CURRENT_ALBUM_SIZE),
            ));
        }

        partials.push(("play-queue".to_string(), play_queue(state)));
    }
    if let Some(playing) = update.playing {
        log::debug!("session_updated: rendering play button");
        partials.push((
            "player-play-button".to_string(),
            player_play_button(playing),
        ));
    }
    if let Some(seek) = update.seek {
        let track: Option<&ApiTrack> = session
            .playlist
            .tracks
            .get(session.position.unwrap_or(0) as usize);

        if let Some(track) = track {
            log::debug!("session_updated: rendering current progress");
            partials.push((
                "player-current-progress".to_string(),
                player_current_progress(seek, track.duration),
            ));
        }
    }
    if let Some(volume) = update.volume {
        log::debug!("session_updated: rendering volume");
        partials.push((
            VOLUME_SLIDER_VALUE_ID.to_string(),
            volume_slider_value(FOOTER_ICON_SIZE, volume),
        ));
    }

    partials
}

#[must_use]
pub fn footer(state: &State) -> Markup {
    html! {
        footer sx-height=(FOOTER_HEIGHT) sx-background="#080a0b" {
            (player(state))
        }
    }
}

#[must_use]
pub fn main(slot: &Markup) -> Markup {
    html! {
        main class="main-content" sx-overflow-y="auto" sx-flex-grow=(1) {
            (slot)
        }
    }
}

#[must_use]
pub fn home(state: &State) -> Markup {
    page(
        state,
        &html! {
            "home"
        },
    )
}

#[must_use]
pub fn downloads(state: &State) -> Markup {
    page(
        state,
        &html! {
            "downloads"
        },
    )
}

#[must_use]
pub fn page(state: &State, slot: &Markup) -> Markup {
    html! {
        div id="root" class="dark" sx-width="100%" sx-height="100%" sx-position="relative" sx-color="#fff" {
            section class="navigation-bar-and-main-content" sx-dir="row" sx-height=(format!("calc(100% - {FOOTER_HEIGHT})")) {
                (sidebar_navigation())
                (main(&slot))
            }
            (footer(state))
            (play_queue(state))
            (audio_zones())
            (playback_sessions())
        }
    }
}

pub static AUDIO_ZONES_ID: &str = "audio-zones";
pub static AUDIO_ZONES_CONTENT_ID: &str = "audio-zones-content";

#[must_use]
pub fn audio_zones() -> Markup {
    modal(
        AUDIO_ZONES_ID,
        &html! {
            h1 { "Audio Zones" }
            button { "New" }
        },
        &html! {
            div hx-get=(pre_escaped!("/audio-zones")) hx-trigger="load" {
                "Loading..."
            }
        },
    )
}

pub static PLAYBACK_SESSIONS_ID: &str = "playback-sessions";
pub static PLAYBACK_SESSIONS_CONTENT_ID: &str = "playback-sessions-content";

#[must_use]
pub fn playback_sessions() -> Markup {
    modal(
        PLAYBACK_SESSIONS_ID,
        &html! {
            h1 { "Playback Sessions" }
            button { "New" }
        },
        &html! {
            div hx-get=(pre_escaped!("/playback-sessions")) hx-trigger="load" {
                "Loading..."
            }
        },
    )
}

#[must_use]
pub fn modal(id: &str, header: &Markup, content: &Markup) -> Markup {
    html! {
        div
            id=(id)
            sx-visibility=(Visibility::Hidden)
            sx-dir="row"
            sx-position="fixed"
            sx-width="100%"
            sx-height="100%"
            sx-align-items=(AlignItems::Center)
        {
            div
                sx-flex=(1)
                sx-background="#080a0b"
                sx-margin-x="calc(20vw)"
                sx-min-height="calc(min(90vh, 300))"
                sx-max-height="90vh"
                sx-border-radius=(15)
                fx-click-outside=(
                    get_visibility_str_id(id)
                        .eq(Visibility::Visible)
                        .then(ActionType::hide_str_id(id))
                )
                sx-overflow-y=(LayoutOverflow::Auto)
            {
                div
                    sx-dir="row"
                    sx-background="#080a0b"
                    sx-padding-x=(30)
                    sx-padding-top=(20)
                    sx-border-top-radius=(15)
                    sx-justify-content=(JustifyContent::SpaceBetween)
                    sx-position=(Position::Sticky)
                    sx-top=(0)
                {
                    div sx-dir="row" { (header) }
                    div sx-dir="row" sx-justify-content=(JustifyContent::End) {
                        @let icon_size = 20;
                        button
                            sx-width=(icon_size)
                            sx-height=(icon_size)
                            fx-click=(
                                get_visibility_str_id(id)
                                    .eq(Visibility::Visible)
                                    .then(ActionType::hide_str_id(id))
                            )
                        {
                            img
                                sx-width=(icon_size)
                                sx-height=(icon_size)
                                src=(public_img!("cross-white.svg"));
                        }
                    }
                }
                div
                    sx-padding-x=(30)
                    sx-padding-bottom=(20)
                {
                    (content)
                }
            }
        }
    }
}