use crate::components::footer_card::FooterCard;
use crate::components::title_card::TitleCard;
use dioxus::prelude::*;

#[component]
pub fn HomePage(page_title: String, card_title: String, children: Element) -> Element {
    rsx! {
        div { class: "min-h-screen bg-alice-werefox-grey-light dark:bg-alice-werefox-grey font-nerd",
            head {
                title { "{page_title}" }
                link { rel: "icon", href: "/favicon.ico" }
                link { rel: "me", href: "https://yiff.life/@werefox" }
                link { rel: "me", href: "https://dragon.style/@alice" }
            }
            div { class: "container px-4 py-4 mx-auto space-y-4",
                TitleCard { card_title: card_title }
                {children},
                FooterCard {}
            }
        }
    }
}
