euv-example 0.5.31

An example application demonstrating the euv UI framework with reactive signals, custom components, and WebAssembly.
Documentation
use crate::*;

/// A home page component displaying the euv version information.
///
/// # Returns
///
/// - `VirtualNode` - The home page virtual DOM tree.
#[component]
pub(crate) fn page_home(node: VirtualNode<PageHomeProps>) -> VirtualNode {
    let PageHomeProps = node.try_get_props().unwrap_or_default();
    html! {
        div {
            class: c_page_container()
            page_header {
                title: "Home"
                subtitle: EUV_DESCRIPTION
            }
            my_card {
                title: "Package Info"
                div {
                    class: c_info_row()
                    span {
                        class: c_info_label()
                        "Name:"
                    }
                    span {
                        class: c_info_value()
                        EUV_PACKAGE_NAME
                    }
                }
                div {
                    class: c_info_row()
                    span {
                        class: c_info_label()
                        "Version:"
                    }
                    span {
                        class: c_info_value()
                        EUV_VERSION
                    }
                }
                div {
                    class: c_info_row()
                    span {
                        class: c_info_label()
                        "Edition:"
                    }
                    span {
                        class: c_info_value()
                        EUV_EDITION
                    }
                }
                div {
                    class: c_info_row()
                    span {
                        class: c_info_label()
                        "Repository:"
                    }
                    a {
                        class: c_info_link()
                        href: EUV_REPOSITORY
                        target: "_blank"
                        EUV_REPOSITORY_NAME
                    }
                }
                div {
                    class: c_info_row()
                    span {
                        class: c_info_label()
                        "Authors:"
                    }
                    span {
                        class: c_info_value()
                        EUV_AUTHORS
                    }
                }
                div {
                    class: c_info_row()
                    span {
                        class: c_info_label()
                        "License:"
                    }
                    span {
                        class: c_info_value()
                        EUV_LICENSE
                    }
                }
            }
            my_card {
                title: "Build Info"
                div {
                    class: c_info_row()
                    span {
                        class: c_info_label()
                        "Build Date:"
                    }
                    span {
                        class: c_info_value()
                        EUV_BUILD_DATE
                    }
                }
                div {
                    class: c_info_row()
                    span {
                        class: c_info_label()
                        "Build Clock:"
                    }
                    span {
                        class: c_info_value()
                        EUV_BUILD_CLOCK
                    }
                }
                div {
                    class: c_info_row()
                    span {
                        class: c_info_label()
                        "Build Timestamp:"
                    }
                    span {
                        class: c_info_value()
                        EUV_BUILD_TIMESTAMP
                    }
                }
            }
        }
    }
}