🚚 Remove 'pt' prefix for clarity and decoupling
This commit is contained in:
parent
e7744cbb93
commit
1dfc789172
24 changed files with 729 additions and 734 deletions
|
|
@ -54,7 +54,7 @@ impl ComponentTrait for Item {
|
|||
match self.item_type() {
|
||||
ItemType::Void => PrepareMarkup::None,
|
||||
ItemType::Label(label) => PrepareMarkup::With(html! {
|
||||
li class="pt-menu__label" {
|
||||
li class="menu__label" {
|
||||
span title=[description] {
|
||||
(left_icon)
|
||||
(label.escaped(cx.langid()))
|
||||
|
|
@ -63,7 +63,7 @@ impl ComponentTrait for Item {
|
|||
}
|
||||
}),
|
||||
ItemType::Link(label, path) => PrepareMarkup::With(html! {
|
||||
li class="pt-menu__link" {
|
||||
li class="menu__link" {
|
||||
a href=(path(cx)) title=[description] {
|
||||
(left_icon)
|
||||
(label.escaped(cx.langid()))
|
||||
|
|
@ -72,7 +72,7 @@ impl ComponentTrait for Item {
|
|||
}
|
||||
}),
|
||||
ItemType::LinkBlank(label, path) => PrepareMarkup::With(html! {
|
||||
li class="pt-menu__link" {
|
||||
li class="menu__link" {
|
||||
a href=(path(cx)) title=[description] target="_blank" {
|
||||
(left_icon)
|
||||
(label.escaped(cx.langid()))
|
||||
|
|
@ -81,28 +81,28 @@ impl ComponentTrait for Item {
|
|||
}
|
||||
}),
|
||||
ItemType::Html(content) => PrepareMarkup::With(html! {
|
||||
li class="pt-menu__html" {
|
||||
li class="menu__html" {
|
||||
(content.render(cx))
|
||||
}
|
||||
}),
|
||||
ItemType::Submenu(label, submenu) => PrepareMarkup::With(html! {
|
||||
li class="pt-menu__children" {
|
||||
li class="menu__children" {
|
||||
a href="#" title=[description] {
|
||||
(left_icon)
|
||||
(label.escaped(cx.langid())) i class="pt-menu__icon bi-chevron-down" {}
|
||||
(label.escaped(cx.langid())) i class="menu__icon bi-chevron-down" {}
|
||||
}
|
||||
div class="pt-menu__subs" {
|
||||
div class="menu__subs" {
|
||||
(submenu.render(cx))
|
||||
}
|
||||
}
|
||||
}),
|
||||
ItemType::Megamenu(label, megamenu) => PrepareMarkup::With(html! {
|
||||
li class="pt-menu__children" {
|
||||
li class="menu__children" {
|
||||
a href="#" title=[description] {
|
||||
(left_icon)
|
||||
(label.escaped(cx.langid())) i class="pt-menu__icon bi-chevron-down" {}
|
||||
(label.escaped(cx.langid())) i class="menu__icon bi-chevron-down" {}
|
||||
}
|
||||
div class="pt-menu__subs pt-menu__mega" {
|
||||
div class="menu__subs menu__mega" {
|
||||
(megamenu.render(cx))
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ impl ComponentTrait for Megamenu {
|
|||
|
||||
fn prepare_component(&self, cx: &mut Context) -> PrepareMarkup {
|
||||
PrepareMarkup::With(html! {
|
||||
div id=[self.id()] class="pt-menu__groups" {
|
||||
div id=[self.id()] class="menu__groups" {
|
||||
(self.groups().render(cx))
|
||||
}
|
||||
})
|
||||
|
|
|
|||
|
|
@ -33,28 +33,28 @@ impl ComponentTrait for Menu {
|
|||
cx.set_param::<bool>(PARAM_BASE_INCLUDE_ICONS, true);
|
||||
|
||||
PrepareMarkup::With(html! {
|
||||
div id=[self.id()] class="pt-menu__container" {
|
||||
div class="pt-menu__wrapper" {
|
||||
div class="pt-menu__main" {
|
||||
div class="pt-menu__overlay" {}
|
||||
nav class="pt-menu__nav" {
|
||||
div class="pt-menu__header" {
|
||||
button type="button" class="pt-menu__arrow" {
|
||||
div id=[self.id()] class="menu__container" {
|
||||
div class="menu__inner" {
|
||||
div class="menu__main" {
|
||||
div class="menu__overlay" {}
|
||||
nav class="menu__nav" {
|
||||
div class="menu__header" {
|
||||
button type="button" class="menu__arrow" {
|
||||
i class="bi-chevron-left" {}
|
||||
}
|
||||
div class="pt-menu__title" {}
|
||||
button type="button" class="pt-menu__close" {
|
||||
div class="menu__title" {}
|
||||
button type="button" class="menu__close" {
|
||||
i class="bi-x" {}
|
||||
}
|
||||
}
|
||||
ul class="pt-menu__section" {
|
||||
ul class="menu__section" {
|
||||
(self.items().render(cx))
|
||||
}
|
||||
}
|
||||
}
|
||||
button
|
||||
type="button"
|
||||
class="pt-menu__trigger"
|
||||
class="menu__trigger"
|
||||
title=[L10n::l("menu_toggle").using(cx.langid())]
|
||||
{
|
||||
span {} span {} span {}
|
||||
|
|
|
|||
|
|
@ -31,9 +31,9 @@ impl ComponentTrait for Submenu {
|
|||
|
||||
fn prepare_component(&self, cx: &mut Context) -> PrepareMarkup {
|
||||
PrepareMarkup::With(html! {
|
||||
div id=[self.id()] class="pt-menu__items" {
|
||||
div id=[self.id()] class="menu__items" {
|
||||
@if let Some(title) = self.title().using(cx.langid()) {
|
||||
h4 class="pt-menu__title" { (title) }
|
||||
h4 class="menu__title" { (title) }
|
||||
}
|
||||
ul {
|
||||
(self.items().render(cx))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue