iuna

iuna

iuna - experimental mainnet-candidate protocol
git clone https://getiuna.org/git/iuna.git
Log | Files | Refs | README | LICENSE

static_assets.rs (916B)


      1 use axum::{
      2     http::header,
      3     response::{Html, IntoResponse},
      4 };
      5 
      6 use super::INDEX_HTML;
      7 
      8 pub(super) async fn index() -> Html<&'static str> {
      9     Html(INDEX_HTML)
     10 }
     11 
     12 pub(super) async fn favicon() -> impl IntoResponse {
     13     (
     14         [
     15             (header::CONTENT_TYPE, "image/x-icon"),
     16             (header::CACHE_CONTROL, "public, max-age=86400"),
     17         ],
     18         include_bytes!("../../../src-tauri/icons/icon.ico").as_slice(),
     19     )
     20 }
     21 
     22 pub(super) async fn alpine_js() -> impl IntoResponse {
     23     (
     24         [(
     25             header::CONTENT_TYPE,
     26             "application/javascript; charset=utf-8",
     27         )],
     28         include_str!("../../../www/assets/alpine.min.js"),
     29     )
     30 }
     31 
     32 pub(super) async fn app_js() -> impl IntoResponse {
     33     (
     34         [(
     35             header::CONTENT_TYPE,
     36             "application/javascript; charset=utf-8",
     37         )],
     38         include_str!("../../../www/assets/iuna-ui.js"),
     39     )
     40 }