use crate::components::back_button::*;
use crate::components::footer_card::*;
use crate::components::title_card::*;
use crate::info_app::Route;
use dioxus::prelude::*;

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