oxblade-adminlte 0.1.0

Rust port of jeroennoten/laravel-adminlte: AdminLTE dashboard layouts, menus and plugins for Laravel for Rust.
Documentation
//! Rust port of jeroennoten/laravel-adminlte: adminLTE dashboard layouts, menus and plugins for Laravel for Rust.
//!
//! Upstream: <https://github.com/jeroennoten/Laravel-AdminLTE>
//!
//! ```
//! assert_eq!(oxblade_adminlte::version(), env!("CARGO_PKG_VERSION"));
//! ```
#![forbid(unsafe_code)]
#![deny(missing_docs)]

/// The version of this crate.
///
/// ```
/// assert!(!oxblade_adminlte::version().is_empty());
/// ```
pub fn version() -> &'static str {
    env!("CARGO_PKG_VERSION")
}

#[cfg(test)]
mod tests {
    #[test]
    fn version_is_set() {
        assert_eq!(super::version(), env!("CARGO_PKG_VERSION"));
    }
}

mod layout;
pub use layout::{ColorMode, Layout, LayoutView};

#[cfg(feature = "laravel")]
mod provider;
#[cfg(feature = "laravel")]
pub use provider::AdminLteServiceProvider;

/// Static light/dark/auto initializer, analogous to PHP's no-flash script.
///
/// Serve these bytes as JavaScript and pass that URL as `theme_init_url` to
/// the page. It does not read or save preferences, or call a server endpoint.
///
/// ```
/// assert!(oxblade_adminlte::THEME_INIT_JS.contains("prefers-color-scheme"));
/// ```
pub const THEME_INIT_JS: &str = include_str!("../resources/assets/theme-init.js");

mod url;
pub use url::{InvalidUrl, SafeUrl};

mod menu;
pub use menu::{Menu, MenuBindings, MenuBuilder, MenuEdit, MenuItem, MenuKey};

mod assets;
pub use assets::{AssetConfig, AssetHost, AssetMode, PageAssets, PluginActivation, Plugins};

mod auth;
pub use auth::{AuthForm, AuthFormError, AuthKind};