Add initial commit
Copied from https://github.com/vsquad-gitea/pool-elo
This commit is contained in:
22
src/templates/mod.rs
Normal file
22
src/templates/mod.rs
Normal file
@@ -0,0 +1,22 @@
|
||||
pub mod add_game_form;
|
||||
pub mod global_state;
|
||||
pub mod index;
|
||||
pub mod one_v_one_board;
|
||||
pub mod overall_board;
|
||||
|
||||
#[cfg(client)]
|
||||
use perseus::utils::get_path_prefix_client;
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn get_api_path(path: &str) -> String {
|
||||
#[cfg(engine)]
|
||||
{
|
||||
path.to_string()
|
||||
}
|
||||
#[cfg(client)]
|
||||
{
|
||||
let origin = web_sys::window().unwrap().origin();
|
||||
let base_path = get_path_prefix_client();
|
||||
format!("{}{}{}", origin, base_path, path)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user