💥 Renombra "pub_handle" por "define_handle"
This commit is contained in:
parent
c8e444c82a
commit
f95bf8eeb3
34 changed files with 38 additions and 38 deletions
|
|
@ -1,6 +1,6 @@
|
|||
use pagetop::prelude::*;
|
||||
|
||||
pub_handle!(APP_DRUST);
|
||||
define_handle!(APP_DRUST);
|
||||
|
||||
struct Drust;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
use pagetop::prelude::*;
|
||||
|
||||
pub_handle!(MODULE_ADMIN);
|
||||
define_handle!(MODULE_ADMIN);
|
||||
|
||||
pub_locale!("src/locales");
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
use pagetop::prelude::*;
|
||||
|
||||
pub_handle!(THEME_ALINER);
|
||||
define_handle!(THEME_ALINER);
|
||||
|
||||
include!(concat!(env!("OUT_DIR"), "/aliner.rs"));
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
use pagetop::prelude::*;
|
||||
|
||||
pub_handle!(THEME_BOOTSIER);
|
||||
define_handle!(THEME_BOOTSIER);
|
||||
|
||||
pub_locale!("src/locales");
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
use pagetop::prelude::*;
|
||||
use pagetop_minimal::component::*;
|
||||
|
||||
pub_handle!(THEME_BULMIX);
|
||||
define_handle!(THEME_BULMIX);
|
||||
|
||||
include!(concat!(env!("OUT_DIR"), "/bulmix.rs"));
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
use pagetop::prelude::*;
|
||||
use pagetop_minimal::component::*;
|
||||
|
||||
pub_handle!(MODULE_DEMOHOME);
|
||||
define_handle!(MODULE_DEMOHOME);
|
||||
|
||||
pub_locale!("src/locales");
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
use pagetop::prelude::*;
|
||||
|
||||
pub_handle!(MODULE_JQUERY);
|
||||
define_handle!(MODULE_JQUERY);
|
||||
|
||||
include!(concat!(env!("OUT_DIR"), "/jquery.rs"));
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
use pagetop::prelude::*;
|
||||
|
||||
pub_handle!(COMPONENT_MEGAMENUITEM);
|
||||
define_handle!(COMPONENT_MEGAMENUITEM);
|
||||
|
||||
#[derive(Default)]
|
||||
pub enum MegaMenuItemType {
|
||||
|
|
@ -148,7 +148,7 @@ impl MegaMenuItem {
|
|||
|
||||
// MegaMenu.
|
||||
|
||||
pub_handle!(COMPONENT_MEGAMENU);
|
||||
define_handle!(COMPONENT_MEGAMENU);
|
||||
|
||||
hook_before_render_component!(HOOK_BEFORE_RENDER_MENU, MegaMenu);
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ use pagetop::prelude::*;
|
|||
|
||||
pub mod component;
|
||||
|
||||
pub_handle!(MODULE_MEGAMENU);
|
||||
define_handle!(MODULE_MEGAMENU);
|
||||
|
||||
include!(concat!(env!("OUT_DIR"), "/megamenu.rs"));
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ use pagetop::prelude::*;
|
|||
|
||||
use crate::component::Icon;
|
||||
|
||||
pub_handle!(COMPONENT_ANCHOR);
|
||||
define_handle!(COMPONENT_ANCHOR);
|
||||
|
||||
#[derive(Default)]
|
||||
pub enum AnchorType {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
use pagetop::prelude::*;
|
||||
|
||||
pub_handle!(COMPONENT_BLOCK);
|
||||
define_handle!(COMPONENT_BLOCK);
|
||||
|
||||
hook_before_render_component!(HOOK_BEFORE_RENDER_BLOCK, Block);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
use pagetop::prelude::*;
|
||||
|
||||
pub_handle!(COMPONENT_CONTAINER);
|
||||
define_handle!(COMPONENT_CONTAINER);
|
||||
|
||||
hook_before_render_component!(HOOK_BEFORE_RENDER_CONTAINER, Container);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
use pagetop::prelude::*;
|
||||
|
||||
pub_handle!(COMPONENT_BUTTON);
|
||||
define_handle!(COMPONENT_BUTTON);
|
||||
|
||||
#[derive(Default)]
|
||||
pub enum ButtonType {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
use pagetop::prelude::*;
|
||||
|
||||
pub_handle!(COMPONENT_DATE);
|
||||
define_handle!(COMPONENT_DATE);
|
||||
|
||||
#[rustfmt::skip]
|
||||
#[derive(Default)]
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
use pagetop::prelude::*;
|
||||
|
||||
pub_handle!(COMPONENT_FORM);
|
||||
define_handle!(COMPONENT_FORM);
|
||||
|
||||
hook_before_render_component!(HOOK_BEFORE_RENDER_FORM, Form);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
use pagetop::prelude::*;
|
||||
|
||||
pub_handle!(COMPONENT_HIDDEN);
|
||||
define_handle!(COMPONENT_HIDDEN);
|
||||
|
||||
#[rustfmt::skip]
|
||||
#[derive(Default)]
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
use pagetop::prelude::*;
|
||||
|
||||
pub_handle!(COMPONENT_INPUT);
|
||||
define_handle!(COMPONENT_INPUT);
|
||||
|
||||
#[derive(Default)]
|
||||
pub enum InputType {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
use pagetop::prelude::*;
|
||||
|
||||
pub_handle!(COMPONENT_COLUMN);
|
||||
define_handle!(COMPONENT_COLUMN);
|
||||
|
||||
hook_before_render_component!(HOOK_BEFORE_RENDER_COLUMN, Column);
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ use pagetop::prelude::*;
|
|||
|
||||
use crate::component::grid;
|
||||
|
||||
pub_handle!(COMPONENT_ROW);
|
||||
define_handle!(COMPONENT_ROW);
|
||||
|
||||
hook_before_render_component!(HOOK_BEFORE_RENDER_ROW, Row);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
use pagetop::prelude::*;
|
||||
|
||||
pub_handle!(COMPONENT_HEADING);
|
||||
define_handle!(COMPONENT_HEADING);
|
||||
|
||||
#[derive(Default)]
|
||||
pub enum HeadingType {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
use pagetop::prelude::*;
|
||||
|
||||
pub_handle!(COMPONENT_HTML);
|
||||
define_handle!(COMPONENT_HTML);
|
||||
|
||||
#[rustfmt::skip]
|
||||
#[derive(Default)]
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
use pagetop::prelude::*;
|
||||
|
||||
pub_handle!(COMPONENT_ICON);
|
||||
define_handle!(COMPONENT_ICON);
|
||||
|
||||
#[rustfmt::skip]
|
||||
#[derive(Default)]
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
use pagetop::prelude::*;
|
||||
|
||||
pub_handle!(COMPONENT_IMAGE);
|
||||
define_handle!(COMPONENT_IMAGE);
|
||||
|
||||
#[rustfmt::skip]
|
||||
#[derive(Default)]
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ use pagetop::prelude::*;
|
|||
|
||||
use crate::component::Html;
|
||||
|
||||
pub_handle!(COMPONENT_PARAGRAPH);
|
||||
define_handle!(COMPONENT_PARAGRAPH);
|
||||
|
||||
#[derive(Default)]
|
||||
pub enum ParagraphDisplay {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ use pagetop::prelude::*;
|
|||
pub mod component;
|
||||
pub mod module;
|
||||
|
||||
pub_handle!(MODULE_MINIMAL);
|
||||
define_handle!(MODULE_MINIMAL);
|
||||
|
||||
include!(concat!(env!("OUT_DIR"), "/minimal.rs"));
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
use pagetop::prelude::*;
|
||||
|
||||
pub_handle!(MODULE_MENU);
|
||||
define_handle!(MODULE_MENU);
|
||||
|
||||
pub_locale!("src/module/menu/locales");
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
use pagetop::prelude::*;
|
||||
|
||||
pub_handle!(MODULE_NODE);
|
||||
define_handle!(MODULE_NODE);
|
||||
|
||||
pub_locale!("src/locales");
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
use pagetop::prelude::*;
|
||||
use pagetop_minimal::component::*;
|
||||
|
||||
pub_handle!(MODULE_USER);
|
||||
define_handle!(MODULE_USER);
|
||||
|
||||
pub_locale!("src/locales");
|
||||
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@ use crate::html::Favicon;
|
|||
use crate::response::page::Page;
|
||||
use crate::server;
|
||||
use crate::util::Handle;
|
||||
use crate::{pub_handle, serve_static_files};
|
||||
use crate::{define_handle, serve_static_files};
|
||||
|
||||
pub_handle!(THEME_BASIC);
|
||||
define_handle!(THEME_BASIC);
|
||||
|
||||
include!(concat!(env!("OUT_DIR"), "/theme.rs"));
|
||||
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ pub fn component_mut<C: 'static>(component: &mut dyn ComponentTrait) -> &mut C {
|
|||
macro_rules! hook_before_render_component {
|
||||
( $ACTION_HANDLE:ident, $Component:ty ) => {
|
||||
$crate::paste! {
|
||||
$crate::pub_handle!($ACTION_HANDLE);
|
||||
$crate::define_handle!($ACTION_HANDLE);
|
||||
|
||||
type Action = fn(&$Component, &mut RenderContext);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
use crate::core::component::{AnyComponent, ComponentTrait, RenderContext};
|
||||
use crate::html::{html, Markup};
|
||||
use crate::pub_handle;
|
||||
use crate::define_handle;
|
||||
use crate::util::Handle;
|
||||
|
||||
pub_handle!(HTML_MARKUP);
|
||||
define_handle!(HTML_MARKUP);
|
||||
|
||||
pub struct HtmlMarkup {
|
||||
pub markup: Markup,
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
pub use crate::{concat_string, fn_builder, LazyStatic, ResultExt};
|
||||
|
||||
// Macros.
|
||||
pub use crate::{args, paste, define_config, pub_handle, pub_locale, serve_static_files};
|
||||
pub use crate::{args, paste, define_config, define_handle, pub_locale, serve_static_files};
|
||||
|
||||
// Helpers.
|
||||
pub use crate::util;
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
use super::Page;
|
||||
use crate::core::hook::{AnyHookAction, HookActionTrait};
|
||||
use crate::pub_handle;
|
||||
use crate::define_handle;
|
||||
use crate::util::Handle;
|
||||
|
||||
pub_handle!(HOOK_BEFORE_RENDER_PAGE);
|
||||
define_handle!(HOOK_BEFORE_RENDER_PAGE);
|
||||
|
||||
type Hook = fn(&mut Page);
|
||||
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ pub const fn handle(
|
|||
}
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! pub_handle {
|
||||
macro_rules! define_handle {
|
||||
( $HANDLE:ident ) => {
|
||||
pub const $HANDLE: $crate::util::Handle =
|
||||
$crate::util::handle(module_path!(), file!(), line!(), column!());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue