🎉 [megamenu] Nuevo componente para PageTop
This commit is contained in:
parent
8ec2c698c8
commit
b02c729864
19 changed files with 184 additions and 105 deletions
23
pagetop-megamenu/Cargo.toml
Normal file
23
pagetop-megamenu/Cargo.toml
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
[package]
|
||||
name = "pagetop-megamenu"
|
||||
version = "0.0.1"
|
||||
edition = "2021"
|
||||
|
||||
authors = [
|
||||
"Manuel Cillero <manuel@cillero.es>"
|
||||
]
|
||||
description = """\
|
||||
Component MegaMenu for PageTop applications.\
|
||||
"""
|
||||
homepage = "https://pagetop.cillero.es"
|
||||
repository = "https://github.com/manuelcillero/pagetop"
|
||||
license = "Apache-2.0 OR MIT"
|
||||
|
||||
[dependencies]
|
||||
pagetop = { path = "../pagetop", version = "0.0" }
|
||||
pagetop-jquery = { path = "../pagetop-jquery", version = "0.0" }
|
||||
static-files = "0.2.3"
|
||||
maud = "0.24.0"
|
||||
|
||||
[build-dependencies]
|
||||
pagetop-build = { path = "../pagetop-build", version = "0.0" }
|
||||
26
pagetop-megamenu/README.md
Normal file
26
pagetop-megamenu/README.md
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
Componente MegaMenu para aplicaciones desarrolladas con **PageTop**.
|
||||
|
||||
[PageTop](https://github.com/manuelcillero/pagetop/tree/main/pagetop), es un entorno de desarrollo
|
||||
basado en algunos de los *crates* más estables y populares del ecosistema Rust para proporcionar
|
||||
APIs, patrones de desarrollo y buenas prácticas para la creación de soluciones web SSR (*Server-Side
|
||||
Rendering*).
|
||||
|
||||
|
||||
# 🚧 Advertencia
|
||||
|
||||
**PageTop** sólo libera actualmente versiones de desarrollo. La API no es estable y los cambios son
|
||||
constantes. No puede considerarse preparado hasta que se libere la versión **0.1.0**.
|
||||
|
||||
|
||||
# 📜 Licencia
|
||||
|
||||
Este proyecto tiene licencia, de hecho tiene dos, puedes aplicar cualquiera de las siguientes a tu
|
||||
elección:
|
||||
|
||||
* Licencia Apache versión 2.0
|
||||
([LICENSE-APACHE](https://github.com/manuelcillero/pagetop/blob/main/LICENSE-APACHE) o
|
||||
[http://www.apache.org/licenses/LICENSE-2.0]).
|
||||
|
||||
* Licencia MIT
|
||||
([LICENSE-MIT](https://github.com/manuelcillero/pagetop/blob/main/LICENSE-MIT) o
|
||||
[http://opensource.org/licenses/MIT]).
|
||||
3
pagetop-megamenu/build.rs
Normal file
3
pagetop-megamenu/build.rs
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
fn main() -> std::io::Result<()> {
|
||||
pagetop_build::bundle_resources("./static", "mengamenu", None)
|
||||
}
|
||||
279
pagetop-megamenu/src/component.rs
Normal file
279
pagetop-megamenu/src/component.rs
Normal file
|
|
@ -0,0 +1,279 @@
|
|||
use pagetop::prelude::*;
|
||||
|
||||
pub_handle!(COMPONENT_MEGAMENUITEM);
|
||||
|
||||
#[derive(Default)]
|
||||
pub enum MegaMenuItemType {
|
||||
#[default]
|
||||
Void,
|
||||
Label(String),
|
||||
Link(String, String),
|
||||
LinkBlank(String, String),
|
||||
Html(Markup),
|
||||
Submenu(String, MegaMenu),
|
||||
Separator,
|
||||
}
|
||||
|
||||
// MegaMenuItem.
|
||||
|
||||
#[rustfmt::skip]
|
||||
#[derive(Default)]
|
||||
pub struct MegaMenuItem {
|
||||
weight : isize,
|
||||
renderable: Renderable,
|
||||
item_type : MegaMenuItemType,
|
||||
}
|
||||
|
||||
impl ComponentTrait for MegaMenuItem {
|
||||
fn new() -> Self {
|
||||
MegaMenuItem::default()
|
||||
}
|
||||
|
||||
fn handle(&self) -> Handle {
|
||||
COMPONENT_MEGAMENUITEM
|
||||
}
|
||||
|
||||
fn weight(&self) -> isize {
|
||||
self.weight
|
||||
}
|
||||
|
||||
fn is_renderable(&self, rcx: &RenderContext) -> bool {
|
||||
(self.renderable.check)(rcx)
|
||||
}
|
||||
|
||||
fn default_render(&self, rcx: &mut RenderContext) -> Markup {
|
||||
match self.item_type() {
|
||||
MegaMenuItemType::Void => html! {},
|
||||
|
||||
MegaMenuItemType::Label(label) => html! {
|
||||
li class="label" { a href="#" { (label) } }
|
||||
},
|
||||
MegaMenuItemType::Link(label, path) => html! {
|
||||
li class="link" { a href=(path) { (label) } }
|
||||
},
|
||||
MegaMenuItemType::LinkBlank(label, path) => html! {
|
||||
li class="link_blank" {
|
||||
a href=(path) target="_blank" { (label) }
|
||||
}
|
||||
},
|
||||
MegaMenuItemType::Html(html) => html! {
|
||||
li class="html" { (*html) }
|
||||
},
|
||||
MegaMenuItemType::Submenu(label, menu) => html! {
|
||||
li class="submenu" {
|
||||
a href="#" { (label) }
|
||||
ul {
|
||||
(menu.items().render(rcx))
|
||||
}
|
||||
}
|
||||
},
|
||||
MegaMenuItemType::Separator => html! {
|
||||
li class="separator" { }
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
fn as_ref_any(&self) -> &dyn AnyComponent {
|
||||
self
|
||||
}
|
||||
|
||||
fn as_mut_any(&mut self) -> &mut dyn AnyComponent {
|
||||
self
|
||||
}
|
||||
}
|
||||
|
||||
impl MegaMenuItem {
|
||||
pub fn label(label: &str) -> Self {
|
||||
MegaMenuItem {
|
||||
item_type: MegaMenuItemType::Label(label.to_owned()),
|
||||
..Default::default()
|
||||
}
|
||||
}
|
||||
|
||||
pub fn link(label: &str, path: &str) -> Self {
|
||||
MegaMenuItem {
|
||||
item_type: MegaMenuItemType::Link(label.to_owned(), path.to_owned()),
|
||||
..Default::default()
|
||||
}
|
||||
}
|
||||
|
||||
pub fn link_blank(label: &str, path: &str) -> Self {
|
||||
MegaMenuItem {
|
||||
item_type: MegaMenuItemType::LinkBlank(label.to_owned(), path.to_owned()),
|
||||
..Default::default()
|
||||
}
|
||||
}
|
||||
|
||||
pub fn html(html: Markup) -> Self {
|
||||
MegaMenuItem {
|
||||
item_type: MegaMenuItemType::Html(html),
|
||||
..Default::default()
|
||||
}
|
||||
}
|
||||
|
||||
pub fn submenu(label: &str, menu: MegaMenu) -> Self {
|
||||
MegaMenuItem {
|
||||
item_type: MegaMenuItemType::Submenu(label.to_owned(), menu),
|
||||
..Default::default()
|
||||
}
|
||||
}
|
||||
|
||||
pub fn separator() -> Self {
|
||||
MegaMenuItem {
|
||||
item_type: MegaMenuItemType::Separator,
|
||||
..Default::default()
|
||||
}
|
||||
}
|
||||
|
||||
// MegaMenuItem BUILDER.
|
||||
|
||||
#[fn_builder]
|
||||
pub fn alter_weight(&mut self, weight: isize) -> &mut Self {
|
||||
self.weight = weight;
|
||||
self
|
||||
}
|
||||
|
||||
#[fn_builder]
|
||||
pub fn alter_renderable(&mut self, check: IsRenderable) -> &mut Self {
|
||||
self.renderable.check = check;
|
||||
self
|
||||
}
|
||||
|
||||
// MegaMenuItem GETTERS.
|
||||
|
||||
pub fn item_type(&self) -> &MegaMenuItemType {
|
||||
&self.item_type
|
||||
}
|
||||
}
|
||||
|
||||
// MegaMenu.
|
||||
|
||||
pub_handle!(COMPONENT_MEGAMENU);
|
||||
|
||||
hook_before_render_component!(HOOK_BEFORE_RENDER_MENU, MegaMenu);
|
||||
|
||||
#[rustfmt::skip]
|
||||
#[derive(Default)]
|
||||
pub struct MegaMenu {
|
||||
weight : isize,
|
||||
renderable: Renderable,
|
||||
id : IdentifierValue,
|
||||
classes : Classes,
|
||||
items : ComponentsBundle,
|
||||
template : String,
|
||||
}
|
||||
|
||||
impl ComponentTrait for MegaMenu {
|
||||
fn new() -> Self {
|
||||
MegaMenu::default().with_classes(ClassesOp::SetDefault, "sm sm-clean")
|
||||
}
|
||||
|
||||
fn handle(&self) -> Handle {
|
||||
COMPONENT_MEGAMENU
|
||||
}
|
||||
|
||||
fn weight(&self) -> isize {
|
||||
self.weight
|
||||
}
|
||||
|
||||
fn is_renderable(&self, rcx: &RenderContext) -> bool {
|
||||
(self.renderable.check)(rcx)
|
||||
}
|
||||
|
||||
fn before_render(&mut self, rcx: &mut RenderContext) {
|
||||
before_render_inline(self, rcx);
|
||||
}
|
||||
|
||||
fn default_render(&self, rcx: &mut RenderContext) -> Markup {
|
||||
rcx.alter(ContextOp::AddStyleSheet(
|
||||
StyleSheet::located("/megamenu/css/menu.css").with_version("1.1.1"),
|
||||
))
|
||||
.alter(ContextOp::AddStyleSheet(
|
||||
StyleSheet::located("/megamenu/css/menu-clean.css").with_version("1.1.1"),
|
||||
))
|
||||
.alter(ContextOp::AddJavaScript(
|
||||
JavaScript::located("/megamenu/js/menu.min.js").with_version("1.1.1"),
|
||||
));
|
||||
pagetop_jquery::JQuery::add_jquery(rcx);
|
||||
|
||||
let id = rcx.required_id::<MegaMenu>(self.id());
|
||||
|
||||
html! {
|
||||
ul id=(id) class=[self.classes().get()] {
|
||||
(self.items().render(rcx))
|
||||
}
|
||||
script type="text/javascript" defer {
|
||||
"jQuery(function(){jQuery('#" (id) "').smartmenus({"
|
||||
"hideTimeout: 0,"
|
||||
"showTimeout: 80,"
|
||||
"});});"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn as_ref_any(&self) -> &dyn AnyComponent {
|
||||
self
|
||||
}
|
||||
|
||||
fn as_mut_any(&mut self) -> &mut dyn AnyComponent {
|
||||
self
|
||||
}
|
||||
}
|
||||
|
||||
impl MegaMenu {
|
||||
// MegaMenu BUILDER.
|
||||
|
||||
#[fn_builder]
|
||||
pub fn alter_weight(&mut self, weight: isize) -> &mut Self {
|
||||
self.weight = weight;
|
||||
self
|
||||
}
|
||||
|
||||
#[fn_builder]
|
||||
pub fn alter_renderable(&mut self, check: IsRenderable) -> &mut Self {
|
||||
self.renderable.check = check;
|
||||
self
|
||||
}
|
||||
|
||||
#[fn_builder]
|
||||
pub fn alter_id(&mut self, id: &str) -> &mut Self {
|
||||
self.id.alter_value(id);
|
||||
self
|
||||
}
|
||||
|
||||
#[fn_builder]
|
||||
pub fn alter_classes(&mut self, op: ClassesOp, classes: &str) -> &mut Self {
|
||||
self.classes.alter_value(op, classes);
|
||||
self
|
||||
}
|
||||
|
||||
#[fn_builder]
|
||||
pub fn alter_item(&mut self, item: MegaMenuItem) -> &mut Self {
|
||||
self.items.add(item);
|
||||
self
|
||||
}
|
||||
|
||||
#[fn_builder]
|
||||
pub fn alter_template(&mut self, template: &str) -> &mut Self {
|
||||
self.template = template.to_owned();
|
||||
self
|
||||
}
|
||||
|
||||
// MegaMenu GETTERS.
|
||||
|
||||
pub fn id(&self) -> &IdentifierValue {
|
||||
&self.id
|
||||
}
|
||||
|
||||
pub fn classes(&self) -> &Classes {
|
||||
&self.classes
|
||||
}
|
||||
|
||||
pub fn items(&self) -> &ComponentsBundle {
|
||||
&self.items
|
||||
}
|
||||
|
||||
pub fn template(&self) -> &str {
|
||||
self.template.as_str()
|
||||
}
|
||||
}
|
||||
23
pagetop-megamenu/src/lib.rs
Normal file
23
pagetop-megamenu/src/lib.rs
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
use pagetop::prelude::*;
|
||||
|
||||
pub mod component;
|
||||
|
||||
pub_handle!(MODULE_MEGAMENU);
|
||||
|
||||
include!(concat!(env!("OUT_DIR"), "/megamenu.rs"));
|
||||
|
||||
pub struct MegaMenu;
|
||||
|
||||
impl ModuleTrait for MegaMenu {
|
||||
fn handle(&self) -> Handle {
|
||||
MODULE_MEGAMENU
|
||||
}
|
||||
|
||||
fn dependencies(&self) -> Vec<ModuleStaticRef> {
|
||||
vec![&pagetop_jquery::JQuery]
|
||||
}
|
||||
|
||||
fn configure_service(&self, cfg: &mut server::web::ServiceConfig) {
|
||||
serve_static_files!(cfg, "/megamenu", bundle_megamenu);
|
||||
}
|
||||
}
|
||||
333
pagetop-megamenu/static/css/menu-blue.css
Normal file
333
pagetop-megamenu/static/css/menu-blue.css
Normal file
|
|
@ -0,0 +1,333 @@
|
|||
@import url(https://fonts.googleapis.com/css?family=PT+Sans+Narrow:400,700);
|
||||
.sm-blue {
|
||||
background: transparent;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
.sm-blue a, .sm-blue a:hover, .sm-blue a:focus, .sm-blue a:active {
|
||||
padding: 10px 20px;
|
||||
/* make room for the toggle button (sub indicator) */
|
||||
padding-right: 58px;
|
||||
background: #3092c0;
|
||||
background-image: linear-gradient(to bottom, #3298c8, #2e8cb8);
|
||||
color: #fff;
|
||||
font-family: "PT Sans Narrow", "Arial Narrow", Arial, Helvetica, sans-serif;
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
line-height: 23px;
|
||||
text-decoration: none;
|
||||
text-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
.sm-blue a.current {
|
||||
background: #006892;
|
||||
background-image: linear-gradient(to bottom, #006188, #006f9c);
|
||||
color: #fff;
|
||||
}
|
||||
.sm-blue a.disabled {
|
||||
color: #a1d1e8;
|
||||
}
|
||||
.sm-blue a .sub-arrow {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
margin-top: -17px;
|
||||
left: auto;
|
||||
right: 4px;
|
||||
width: 34px;
|
||||
height: 34px;
|
||||
overflow: hidden;
|
||||
font: bold 16px/34px monospace !important;
|
||||
text-align: center;
|
||||
text-shadow: none;
|
||||
background: rgba(0, 0, 0, 0.1);
|
||||
border-radius: 4px;
|
||||
}
|
||||
.sm-blue a .sub-arrow::before {
|
||||
content: '+';
|
||||
}
|
||||
.sm-blue a.highlighted .sub-arrow::before {
|
||||
content: '-';
|
||||
}
|
||||
.sm-blue > li:first-child > a, .sm-blue > li:first-child > :not(ul) a {
|
||||
border-radius: 8px 8px 0 0;
|
||||
}
|
||||
.sm-blue > li:last-child > a, .sm-blue > li:last-child > *:not(ul) a, .sm-blue > li:last-child > ul, .sm-blue > li:last-child > ul > li:last-child > a, .sm-blue > li:last-child > ul > li:last-child > *:not(ul) a, .sm-blue > li:last-child > ul > li:last-child > ul, .sm-blue > li:last-child > ul > li:last-child > ul > li:last-child > a, .sm-blue > li:last-child > ul > li:last-child > ul > li:last-child > *:not(ul) a, .sm-blue > li:last-child > ul > li:last-child > ul > li:last-child > ul, .sm-blue > li:last-child > ul > li:last-child > ul > li:last-child > ul > li:last-child > a, .sm-blue > li:last-child > ul > li:last-child > ul > li:last-child > ul > li:last-child > *:not(ul) a, .sm-blue > li:last-child > ul > li:last-child > ul > li:last-child > ul > li:last-child > ul, .sm-blue > li:last-child > ul > li:last-child > ul > li:last-child > ul > li:last-child > ul > li:last-child > a, .sm-blue > li:last-child > ul > li:last-child > ul > li:last-child > ul > li:last-child > ul > li:last-child > *:not(ul) a, .sm-blue > li:last-child > ul > li:last-child > ul > li:last-child > ul > li:last-child > ul > li:last-child > ul {
|
||||
border-radius: 0 0 8px 8px;
|
||||
}
|
||||
.sm-blue > li:last-child > a.highlighted, .sm-blue > li:last-child > *:not(ul) a.highlighted, .sm-blue > li:last-child > ul > li:last-child > a.highlighted, .sm-blue > li:last-child > ul > li:last-child > *:not(ul) a.highlighted, .sm-blue > li:last-child > ul > li:last-child > ul > li:last-child > a.highlighted, .sm-blue > li:last-child > ul > li:last-child > ul > li:last-child > *:not(ul) a.highlighted, .sm-blue > li:last-child > ul > li:last-child > ul > li:last-child > ul > li:last-child > a.highlighted, .sm-blue > li:last-child > ul > li:last-child > ul > li:last-child > ul > li:last-child > *:not(ul) a.highlighted, .sm-blue > li:last-child > ul > li:last-child > ul > li:last-child > ul > li:last-child > ul > li:last-child > a.highlighted, .sm-blue > li:last-child > ul > li:last-child > ul > li:last-child > ul > li:last-child > ul > li:last-child > *:not(ul) a.highlighted {
|
||||
border-radius: 0;
|
||||
}
|
||||
.sm-blue ul {
|
||||
background: #fff;
|
||||
}
|
||||
.sm-blue ul ul {
|
||||
background: rgba(102, 102, 102, 0.1);
|
||||
}
|
||||
.sm-blue ul a, .sm-blue ul a:hover, .sm-blue ul a:focus, .sm-blue ul a:active {
|
||||
background: transparent;
|
||||
color: #2b82ac;
|
||||
font-size: 16px;
|
||||
text-shadow: none;
|
||||
border-left: 8px solid transparent;
|
||||
}
|
||||
.sm-blue ul a.current {
|
||||
background: #006892;
|
||||
background-image: linear-gradient(to bottom, #006188, #006f9c);
|
||||
color: #fff;
|
||||
}
|
||||
.sm-blue ul a.disabled {
|
||||
color: #b3b3b3;
|
||||
}
|
||||
.sm-blue ul ul a,
|
||||
.sm-blue ul ul a:hover,
|
||||
.sm-blue ul ul a:focus,
|
||||
.sm-blue ul ul a:active {
|
||||
border-left: 16px solid transparent;
|
||||
}
|
||||
.sm-blue ul ul ul a,
|
||||
.sm-blue ul ul ul a:hover,
|
||||
.sm-blue ul ul ul a:focus,
|
||||
.sm-blue ul ul ul a:active {
|
||||
border-left: 24px solid transparent;
|
||||
}
|
||||
.sm-blue ul ul ul ul a,
|
||||
.sm-blue ul ul ul ul a:hover,
|
||||
.sm-blue ul ul ul ul a:focus,
|
||||
.sm-blue ul ul ul ul a:active {
|
||||
border-left: 32px solid transparent;
|
||||
}
|
||||
.sm-blue ul ul ul ul ul a,
|
||||
.sm-blue ul ul ul ul ul a:hover,
|
||||
.sm-blue ul ul ul ul ul a:focus,
|
||||
.sm-blue ul ul ul ul ul a:active {
|
||||
border-left: 40px solid transparent;
|
||||
}
|
||||
.sm-blue ul li {
|
||||
border-top: 1px solid rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
.sm-blue ul li:first-child {
|
||||
border-top: 0;
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
/* Switch to desktop layout
|
||||
-----------------------------------------------
|
||||
These transform the menu tree from
|
||||
collapsible to desktop (navbar + dropdowns)
|
||||
-----------------------------------------------*/
|
||||
/* start... (it's not recommended editing these rules) */
|
||||
.sm-blue ul {
|
||||
position: absolute;
|
||||
width: 12em;
|
||||
}
|
||||
|
||||
.sm-blue li {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.sm-blue.sm-rtl li {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.sm-blue ul li, .sm-blue.sm-rtl ul li, .sm-blue.sm-vertical li {
|
||||
float: none;
|
||||
}
|
||||
|
||||
.sm-blue a {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.sm-blue ul a, .sm-blue.sm-vertical a {
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
.sm-blue .sm-nowrap > li > a, .sm-blue .sm-nowrap > li > :not(ul) a {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
/* ...end */
|
||||
.sm-blue {
|
||||
background: #3092c0;
|
||||
background-image: linear-gradient(to bottom, #3298c8, #2e8cb8);
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
.sm-blue a, .sm-blue a:hover, .sm-blue a:focus, .sm-blue a:active, .sm-blue a.highlighted {
|
||||
padding: 13px 24px;
|
||||
background: #3092c0;
|
||||
background-image: linear-gradient(to bottom, #3298c8, #2e8cb8);
|
||||
color: #fff;
|
||||
}
|
||||
.sm-blue a:hover, .sm-blue a:focus, .sm-blue a:active, .sm-blue a.highlighted {
|
||||
background: #2b82ac;
|
||||
background-image: linear-gradient(to bottom, #2d89b4, #297ca3);
|
||||
}
|
||||
.sm-blue a.current {
|
||||
background: #006892;
|
||||
background-image: linear-gradient(to bottom, #006188, #006f9c);
|
||||
color: #fff;
|
||||
}
|
||||
.sm-blue a.disabled {
|
||||
background: #3092c0;
|
||||
background-image: linear-gradient(to bottom, #3298c8, #2e8cb8);
|
||||
color: #a1d1e8;
|
||||
}
|
||||
.sm-blue a .sub-arrow {
|
||||
top: auto;
|
||||
margin-top: 0;
|
||||
bottom: 2px;
|
||||
left: 50%;
|
||||
margin-left: -5px;
|
||||
right: auto;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-width: 5px;
|
||||
border-style: solid dashed dashed dashed;
|
||||
border-color: #a1d1e8 transparent transparent transparent;
|
||||
background: transparent;
|
||||
border-radius: 0;
|
||||
}
|
||||
.sm-blue a .sub-arrow::before {
|
||||
display: none;
|
||||
}
|
||||
.sm-blue > li:first-child > a, .sm-blue > li:first-child > :not(ul) a {
|
||||
border-radius: 8px 0 0 8px;
|
||||
}
|
||||
.sm-blue > li:last-child > a, .sm-blue > li:last-child > :not(ul) a {
|
||||
border-radius: 0 8px 8px 0 !important;
|
||||
}
|
||||
.sm-blue > li {
|
||||
border-left: 1px solid #2b82ac;
|
||||
}
|
||||
.sm-blue > li:first-child {
|
||||
border-left: 0;
|
||||
}
|
||||
.sm-blue ul {
|
||||
border: 1px solid #a8a8a8;
|
||||
padding: 7px 0;
|
||||
background: #fff;
|
||||
border-radius: 0 0 4px 4px !important;
|
||||
box-shadow: 0 5px 12px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
.sm-blue ul ul {
|
||||
border-radius: 4px !important;
|
||||
background: #fff;
|
||||
}
|
||||
.sm-blue ul a, .sm-blue ul a:hover, .sm-blue ul a:focus, .sm-blue ul a:active, .sm-blue ul a.highlighted {
|
||||
border: 0 !important;
|
||||
padding: 9px 23px;
|
||||
background: transparent;
|
||||
color: #2b82ac;
|
||||
border-radius: 0 !important;
|
||||
}
|
||||
.sm-blue ul a:hover, .sm-blue ul a:focus, .sm-blue ul a:active, .sm-blue ul a.highlighted {
|
||||
background: #3092c0;
|
||||
background-image: linear-gradient(to bottom, #3298c8, #2e8cb8);
|
||||
color: #fff;
|
||||
}
|
||||
.sm-blue ul a.current {
|
||||
background: #006892;
|
||||
background-image: linear-gradient(to bottom, #006188, #006f9c);
|
||||
color: #fff;
|
||||
}
|
||||
.sm-blue ul a.disabled {
|
||||
background: #fff;
|
||||
color: #b3b3b3;
|
||||
}
|
||||
.sm-blue ul a .sub-arrow {
|
||||
top: 50%;
|
||||
margin-top: -5px;
|
||||
bottom: auto;
|
||||
left: auto;
|
||||
margin-left: 0;
|
||||
right: 10px;
|
||||
border-style: dashed dashed dashed solid;
|
||||
border-color: transparent transparent transparent #a1d1e8;
|
||||
}
|
||||
.sm-blue ul li {
|
||||
border: 0;
|
||||
}
|
||||
.sm-blue .scroll-up,
|
||||
.sm-blue .scroll-down {
|
||||
position: absolute;
|
||||
display: none;
|
||||
visibility: hidden;
|
||||
overflow: hidden;
|
||||
background: #fff;
|
||||
height: 20px;
|
||||
}
|
||||
.sm-blue .scroll-up-arrow,
|
||||
.sm-blue .scroll-down-arrow {
|
||||
position: absolute;
|
||||
top: -2px;
|
||||
left: 50%;
|
||||
margin-left: -8px;
|
||||
width: 0;
|
||||
height: 0;
|
||||
overflow: hidden;
|
||||
border-width: 8px;
|
||||
border-style: dashed dashed solid dashed;
|
||||
border-color: transparent transparent #2b82ac transparent;
|
||||
}
|
||||
.sm-blue .scroll-down-arrow {
|
||||
top: 6px;
|
||||
border-style: solid dashed dashed dashed;
|
||||
border-color: #2b82ac transparent transparent transparent;
|
||||
}
|
||||
.sm-blue.sm-rtl.sm-vertical a .sub-arrow {
|
||||
right: auto;
|
||||
left: 10px;
|
||||
border-style: dashed solid dashed dashed;
|
||||
border-color: transparent #a1d1e8 transparent transparent;
|
||||
}
|
||||
.sm-blue.sm-rtl > li:first-child > a, .sm-blue.sm-rtl > li:first-child > :not(ul) a {
|
||||
border-radius: 0 8px 8px 0;
|
||||
}
|
||||
.sm-blue.sm-rtl > li:last-child > a, .sm-blue.sm-rtl > li:last-child > :not(ul) a {
|
||||
border-radius: 8px 0 0 8px !important;
|
||||
}
|
||||
.sm-blue.sm-rtl > li:first-child {
|
||||
border-left: 1px solid #2b82ac;
|
||||
}
|
||||
.sm-blue.sm-rtl > li:last-child {
|
||||
border-left: 0;
|
||||
}
|
||||
.sm-blue.sm-rtl ul a .sub-arrow {
|
||||
right: auto;
|
||||
left: 10px;
|
||||
border-style: dashed solid dashed dashed;
|
||||
border-color: transparent #a1d1e8 transparent transparent;
|
||||
}
|
||||
.sm-blue.sm-vertical {
|
||||
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
.sm-blue.sm-vertical a {
|
||||
padding: 9px 23px;
|
||||
}
|
||||
.sm-blue.sm-vertical a .sub-arrow {
|
||||
top: 50%;
|
||||
margin-top: -5px;
|
||||
bottom: auto;
|
||||
left: auto;
|
||||
margin-left: 0;
|
||||
right: 10px;
|
||||
border-style: dashed dashed dashed solid;
|
||||
border-color: transparent transparent transparent #a1d1e8;
|
||||
}
|
||||
.sm-blue.sm-vertical > li:first-child > a, .sm-blue.sm-vertical > li:first-child > :not(ul) a {
|
||||
border-radius: 8px 8px 0 0;
|
||||
}
|
||||
.sm-blue.sm-vertical > li:last-child > a, .sm-blue.sm-vertical > li:last-child > :not(ul) a {
|
||||
border-radius: 0 0 8px 8px !important;
|
||||
}
|
||||
.sm-blue.sm-vertical > li {
|
||||
border-left: 0 !important;
|
||||
}
|
||||
.sm-blue.sm-vertical ul {
|
||||
border-radius: 4px !important;
|
||||
}
|
||||
.sm-blue.sm-vertical ul a {
|
||||
padding: 9px 23px;
|
||||
}
|
||||
}
|
||||
|
||||
/*# sourceMappingURL=sm-blue.css.map */
|
||||
327
pagetop-megamenu/static/css/menu-clean.css
Normal file
327
pagetop-megamenu/static/css/menu-clean.css
Normal file
|
|
@ -0,0 +1,327 @@
|
|||
.sm-clean {
|
||||
background: #eeeeee;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.sm-clean a, .sm-clean a:hover, .sm-clean a:focus, .sm-clean a:active {
|
||||
padding: 13px 20px;
|
||||
/* make room for the toggle button (sub indicator) */
|
||||
padding-right: 58px;
|
||||
color: #555555;
|
||||
font-family: "Lucida Sans Unicode", "Lucida Sans", "Lucida Grande", Arial, sans-serif;
|
||||
font-size: 18px;
|
||||
font-weight: normal;
|
||||
line-height: 17px;
|
||||
text-decoration: none;
|
||||
}
|
||||
.sm-clean a.current {
|
||||
color: #D23600;
|
||||
}
|
||||
.sm-clean a.disabled {
|
||||
color: #bbbbbb;
|
||||
}
|
||||
.sm-clean a .sub-arrow {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
margin-top: -17px;
|
||||
left: auto;
|
||||
right: 4px;
|
||||
width: 34px;
|
||||
height: 34px;
|
||||
overflow: hidden;
|
||||
font: bold 16px/34px monospace !important;
|
||||
text-align: center;
|
||||
text-shadow: none;
|
||||
background: rgba(255, 255, 255, 0.5);
|
||||
border-radius: 5px;
|
||||
}
|
||||
.sm-clean a .sub-arrow::before {
|
||||
content: '+';
|
||||
}
|
||||
.sm-clean a.highlighted .sub-arrow::before {
|
||||
content: '-';
|
||||
}
|
||||
.sm-clean > li:first-child > a, .sm-clean > li:first-child > :not(ul) a {
|
||||
border-radius: 5px 5px 0 0;
|
||||
}
|
||||
.sm-clean > li:last-child > a, .sm-clean > li:last-child > *:not(ul) a, .sm-clean > li:last-child > ul, .sm-clean > li:last-child > ul > li:last-child > a, .sm-clean > li:last-child > ul > li:last-child > *:not(ul) a, .sm-clean > li:last-child > ul > li:last-child > ul, .sm-clean > li:last-child > ul > li:last-child > ul > li:last-child > a, .sm-clean > li:last-child > ul > li:last-child > ul > li:last-child > *:not(ul) a, .sm-clean > li:last-child > ul > li:last-child > ul > li:last-child > ul, .sm-clean > li:last-child > ul > li:last-child > ul > li:last-child > ul > li:last-child > a, .sm-clean > li:last-child > ul > li:last-child > ul > li:last-child > ul > li:last-child > *:not(ul) a, .sm-clean > li:last-child > ul > li:last-child > ul > li:last-child > ul > li:last-child > ul, .sm-clean > li:last-child > ul > li:last-child > ul > li:last-child > ul > li:last-child > ul > li:last-child > a, .sm-clean > li:last-child > ul > li:last-child > ul > li:last-child > ul > li:last-child > ul > li:last-child > *:not(ul) a, .sm-clean > li:last-child > ul > li:last-child > ul > li:last-child > ul > li:last-child > ul > li:last-child > ul {
|
||||
border-radius: 0 0 5px 5px;
|
||||
}
|
||||
.sm-clean > li:last-child > a.highlighted, .sm-clean > li:last-child > *:not(ul) a.highlighted, .sm-clean > li:last-child > ul > li:last-child > a.highlighted, .sm-clean > li:last-child > ul > li:last-child > *:not(ul) a.highlighted, .sm-clean > li:last-child > ul > li:last-child > ul > li:last-child > a.highlighted, .sm-clean > li:last-child > ul > li:last-child > ul > li:last-child > *:not(ul) a.highlighted, .sm-clean > li:last-child > ul > li:last-child > ul > li:last-child > ul > li:last-child > a.highlighted, .sm-clean > li:last-child > ul > li:last-child > ul > li:last-child > ul > li:last-child > *:not(ul) a.highlighted, .sm-clean > li:last-child > ul > li:last-child > ul > li:last-child > ul > li:last-child > ul > li:last-child > a.highlighted, .sm-clean > li:last-child > ul > li:last-child > ul > li:last-child > ul > li:last-child > ul > li:last-child > *:not(ul) a.highlighted {
|
||||
border-radius: 0;
|
||||
}
|
||||
.sm-clean li {
|
||||
border-top: 1px solid rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
.sm-clean > li:first-child {
|
||||
border-top: 0;
|
||||
}
|
||||
.sm-clean ul {
|
||||
background: rgba(162, 162, 162, 0.1);
|
||||
}
|
||||
.sm-clean ul a, .sm-clean ul a:hover, .sm-clean ul a:focus, .sm-clean ul a:active {
|
||||
font-size: 16px;
|
||||
border-left: 8px solid transparent;
|
||||
}
|
||||
.sm-clean ul ul a,
|
||||
.sm-clean ul ul a:hover,
|
||||
.sm-clean ul ul a:focus,
|
||||
.sm-clean ul ul a:active {
|
||||
border-left: 16px solid transparent;
|
||||
}
|
||||
.sm-clean ul ul ul a,
|
||||
.sm-clean ul ul ul a:hover,
|
||||
.sm-clean ul ul ul a:focus,
|
||||
.sm-clean ul ul ul a:active {
|
||||
border-left: 24px solid transparent;
|
||||
}
|
||||
.sm-clean ul ul ul ul a,
|
||||
.sm-clean ul ul ul ul a:hover,
|
||||
.sm-clean ul ul ul ul a:focus,
|
||||
.sm-clean ul ul ul ul a:active {
|
||||
border-left: 32px solid transparent;
|
||||
}
|
||||
.sm-clean ul ul ul ul ul a,
|
||||
.sm-clean ul ul ul ul ul a:hover,
|
||||
.sm-clean ul ul ul ul ul a:focus,
|
||||
.sm-clean ul ul ul ul ul a:active {
|
||||
border-left: 40px solid transparent;
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
/* Switch to desktop layout
|
||||
-----------------------------------------------
|
||||
These transform the menu tree from
|
||||
collapsible to desktop (navbar + dropdowns)
|
||||
-----------------------------------------------*/
|
||||
/* start... (it's not recommended editing these rules) */
|
||||
.sm-clean ul {
|
||||
position: absolute;
|
||||
width: 12em;
|
||||
}
|
||||
|
||||
.sm-clean li {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.sm-clean.sm-rtl li {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.sm-clean ul li, .sm-clean.sm-rtl ul li, .sm-clean.sm-vertical li {
|
||||
float: none;
|
||||
}
|
||||
|
||||
.sm-clean a {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.sm-clean ul a, .sm-clean.sm-vertical a {
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
.sm-clean .sm-nowrap > li > a, .sm-clean .sm-nowrap > li > :not(ul) a {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
/* ...end */
|
||||
.sm-clean {
|
||||
padding: 0 10px;
|
||||
background: #eeeeee;
|
||||
border-radius: 100px;
|
||||
}
|
||||
.sm-clean a, .sm-clean a:hover, .sm-clean a:focus, .sm-clean a:active, .sm-clean a.highlighted {
|
||||
padding: 12px 12px;
|
||||
color: #555555;
|
||||
border-radius: 0 !important;
|
||||
}
|
||||
.sm-clean a:hover, .sm-clean a:focus, .sm-clean a:active, .sm-clean a.highlighted {
|
||||
color: #D23600;
|
||||
}
|
||||
.sm-clean a.current {
|
||||
color: #D23600;
|
||||
}
|
||||
.sm-clean a.disabled {
|
||||
color: #bbbbbb;
|
||||
}
|
||||
.sm-clean a.has-submenu {
|
||||
padding-right: 24px;
|
||||
}
|
||||
.sm-clean a .sub-arrow {
|
||||
top: 50%;
|
||||
margin-top: -2px;
|
||||
right: 12px;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-width: 4px;
|
||||
border-style: solid dashed dashed dashed;
|
||||
border-color: #555555 transparent transparent transparent;
|
||||
background: transparent;
|
||||
border-radius: 0;
|
||||
}
|
||||
.sm-clean a .sub-arrow::before {
|
||||
display: none;
|
||||
}
|
||||
.sm-clean li {
|
||||
border-top: 0;
|
||||
}
|
||||
.sm-clean > li > ul::before,
|
||||
.sm-clean > li > ul::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: -18px;
|
||||
left: 30px;
|
||||
width: 0;
|
||||
height: 0;
|
||||
overflow: hidden;
|
||||
border-width: 9px;
|
||||
border-style: dashed dashed solid dashed;
|
||||
border-color: transparent transparent #bbbbbb transparent;
|
||||
}
|
||||
.sm-clean > li > ul::after {
|
||||
top: -16px;
|
||||
left: 31px;
|
||||
border-width: 8px;
|
||||
border-color: transparent transparent #fff transparent;
|
||||
}
|
||||
.sm-clean ul {
|
||||
border: 1px solid #bbbbbb;
|
||||
padding: 5px 0;
|
||||
background: #fff;
|
||||
border-radius: 5px !important;
|
||||
box-shadow: 0 5px 9px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
.sm-clean ul a, .sm-clean ul a:hover, .sm-clean ul a:focus, .sm-clean ul a:active, .sm-clean ul a.highlighted {
|
||||
border: 0 !important;
|
||||
padding: 10px 20px;
|
||||
color: #555555;
|
||||
}
|
||||
.sm-clean ul a:hover, .sm-clean ul a:focus, .sm-clean ul a:active, .sm-clean ul a.highlighted {
|
||||
background: #eeeeee;
|
||||
color: #D23600;
|
||||
}
|
||||
.sm-clean ul a.current {
|
||||
color: #D23600;
|
||||
}
|
||||
.sm-clean ul a.disabled {
|
||||
background: #fff;
|
||||
color: #cccccc;
|
||||
}
|
||||
.sm-clean ul a.has-submenu {
|
||||
padding-right: 20px;
|
||||
}
|
||||
.sm-clean ul a .sub-arrow {
|
||||
right: 8px;
|
||||
top: 50%;
|
||||
margin-top: -5px;
|
||||
border-width: 5px;
|
||||
border-style: dashed dashed dashed solid;
|
||||
border-color: transparent transparent transparent #555555;
|
||||
}
|
||||
.sm-clean .scroll-up,
|
||||
.sm-clean .scroll-down {
|
||||
position: absolute;
|
||||
display: none;
|
||||
visibility: hidden;
|
||||
overflow: hidden;
|
||||
background: #fff;
|
||||
height: 20px;
|
||||
}
|
||||
.sm-clean .scroll-up:hover,
|
||||
.sm-clean .scroll-down:hover {
|
||||
background: #eeeeee;
|
||||
}
|
||||
.sm-clean .scroll-up:hover .scroll-up-arrow {
|
||||
border-color: transparent transparent #D23600 transparent;
|
||||
}
|
||||
.sm-clean .scroll-down:hover .scroll-down-arrow {
|
||||
border-color: #D23600 transparent transparent transparent;
|
||||
}
|
||||
.sm-clean .scroll-up-arrow,
|
||||
.sm-clean .scroll-down-arrow {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 50%;
|
||||
margin-left: -6px;
|
||||
width: 0;
|
||||
height: 0;
|
||||
overflow: hidden;
|
||||
border-width: 6px;
|
||||
border-style: dashed dashed solid dashed;
|
||||
border-color: transparent transparent #555555 transparent;
|
||||
}
|
||||
.sm-clean .scroll-down-arrow {
|
||||
top: 8px;
|
||||
border-style: solid dashed dashed dashed;
|
||||
border-color: #555555 transparent transparent transparent;
|
||||
}
|
||||
.sm-clean.sm-rtl a.has-submenu {
|
||||
padding-right: 12px;
|
||||
padding-left: 24px;
|
||||
}
|
||||
.sm-clean.sm-rtl a .sub-arrow {
|
||||
right: auto;
|
||||
left: 12px;
|
||||
}
|
||||
.sm-clean.sm-rtl.sm-vertical a.has-submenu {
|
||||
padding: 10px 20px;
|
||||
}
|
||||
.sm-clean.sm-rtl.sm-vertical a .sub-arrow {
|
||||
right: auto;
|
||||
left: 8px;
|
||||
border-style: dashed solid dashed dashed;
|
||||
border-color: transparent #555555 transparent transparent;
|
||||
}
|
||||
.sm-clean.sm-rtl > li > ul::before {
|
||||
left: auto;
|
||||
right: 30px;
|
||||
}
|
||||
.sm-clean.sm-rtl > li > ul::after {
|
||||
left: auto;
|
||||
right: 31px;
|
||||
}
|
||||
.sm-clean.sm-rtl ul a.has-submenu {
|
||||
padding: 10px 20px !important;
|
||||
}
|
||||
.sm-clean.sm-rtl ul a .sub-arrow {
|
||||
right: auto;
|
||||
left: 8px;
|
||||
border-style: dashed solid dashed dashed;
|
||||
border-color: transparent #555555 transparent transparent;
|
||||
}
|
||||
.sm-clean.sm-vertical {
|
||||
padding: 10px 0;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.sm-clean.sm-vertical a {
|
||||
padding: 10px 20px;
|
||||
}
|
||||
.sm-clean.sm-vertical a:hover, .sm-clean.sm-vertical a:focus, .sm-clean.sm-vertical a:active, .sm-clean.sm-vertical a.highlighted {
|
||||
background: #fff;
|
||||
}
|
||||
.sm-clean.sm-vertical a.disabled {
|
||||
background: #eeeeee;
|
||||
}
|
||||
.sm-clean.sm-vertical a .sub-arrow {
|
||||
right: 8px;
|
||||
top: 50%;
|
||||
margin-top: -5px;
|
||||
border-width: 5px;
|
||||
border-style: dashed dashed dashed solid;
|
||||
border-color: transparent transparent transparent #555555;
|
||||
}
|
||||
.sm-clean.sm-vertical > li > ul::before,
|
||||
.sm-clean.sm-vertical > li > ul::after {
|
||||
display: none;
|
||||
}
|
||||
.sm-clean.sm-vertical ul a {
|
||||
padding: 10px 20px;
|
||||
}
|
||||
.sm-clean.sm-vertical ul a:hover, .sm-clean.sm-vertical ul a:focus, .sm-clean.sm-vertical ul a:active, .sm-clean.sm-vertical ul a.highlighted {
|
||||
background: #eeeeee;
|
||||
}
|
||||
.sm-clean.sm-vertical ul a.disabled {
|
||||
background: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
/*# sourceMappingURL=sm-clean.css.map */
|
||||
331
pagetop-megamenu/static/css/menu-mint.css
Normal file
331
pagetop-megamenu/static/css/menu-mint.css
Normal file
|
|
@ -0,0 +1,331 @@
|
|||
.sm-mint {
|
||||
border-top: 2px solid #8db863;
|
||||
border-bottom: 2px solid #8db863;
|
||||
background: #fff;
|
||||
}
|
||||
.sm-mint a, .sm-mint a:hover, .sm-mint a:focus, .sm-mint a:active {
|
||||
padding: 13px 20px;
|
||||
/* make room for the toggle button (sub indicator) */
|
||||
padding-right: 58px;
|
||||
color: #333;
|
||||
font-family: Arial, sans-serif;
|
||||
font-size: 16px;
|
||||
font-weight: normal;
|
||||
line-height: 17px;
|
||||
text-decoration: none;
|
||||
}
|
||||
.sm-mint a.current {
|
||||
font-weight: bold;
|
||||
}
|
||||
.sm-mint a.disabled {
|
||||
color: #cccccc;
|
||||
}
|
||||
.sm-mint a .sub-arrow {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
margin-top: -17px;
|
||||
left: auto;
|
||||
right: 4px;
|
||||
width: 34px;
|
||||
height: 34px;
|
||||
overflow: hidden;
|
||||
font: bold 14px/34px monospace !important;
|
||||
text-align: center;
|
||||
text-shadow: none;
|
||||
background: rgba(141, 184, 99, 0.2);
|
||||
border-radius: 4px;
|
||||
}
|
||||
.sm-mint a .sub-arrow::before {
|
||||
content: '+';
|
||||
}
|
||||
.sm-mint a.highlighted .sub-arrow::before {
|
||||
content: '-';
|
||||
}
|
||||
.sm-mint li {
|
||||
border-top: 1px solid rgba(141, 184, 99, 0.2);
|
||||
}
|
||||
.sm-mint > li:first-child {
|
||||
border-top: 0;
|
||||
}
|
||||
.sm-mint ul {
|
||||
background: rgba(141, 184, 99, 0.2);
|
||||
}
|
||||
.sm-mint ul a, .sm-mint ul a:hover, .sm-mint ul a:focus, .sm-mint ul a:active {
|
||||
font-size: 14px;
|
||||
border-left: 8px solid transparent;
|
||||
}
|
||||
.sm-mint ul ul a,
|
||||
.sm-mint ul ul a:hover,
|
||||
.sm-mint ul ul a:focus,
|
||||
.sm-mint ul ul a:active {
|
||||
border-left: 16px solid transparent;
|
||||
}
|
||||
.sm-mint ul ul ul a,
|
||||
.sm-mint ul ul ul a:hover,
|
||||
.sm-mint ul ul ul a:focus,
|
||||
.sm-mint ul ul ul a:active {
|
||||
border-left: 24px solid transparent;
|
||||
}
|
||||
.sm-mint ul ul ul ul a,
|
||||
.sm-mint ul ul ul ul a:hover,
|
||||
.sm-mint ul ul ul ul a:focus,
|
||||
.sm-mint ul ul ul ul a:active {
|
||||
border-left: 32px solid transparent;
|
||||
}
|
||||
.sm-mint ul ul ul ul ul a,
|
||||
.sm-mint ul ul ul ul ul a:hover,
|
||||
.sm-mint ul ul ul ul ul a:focus,
|
||||
.sm-mint ul ul ul ul ul a:active {
|
||||
border-left: 40px solid transparent;
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
/* Switch to desktop layout
|
||||
-----------------------------------------------
|
||||
These transform the menu tree from
|
||||
collapsible to desktop (navbar + dropdowns)
|
||||
-----------------------------------------------*/
|
||||
/* start... (it's not recommended editing these rules) */
|
||||
.sm-mint ul {
|
||||
position: absolute;
|
||||
width: 12em;
|
||||
}
|
||||
|
||||
.sm-mint li {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.sm-mint.sm-rtl li {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.sm-mint ul li, .sm-mint.sm-rtl ul li, .sm-mint.sm-vertical li {
|
||||
float: none;
|
||||
}
|
||||
|
||||
.sm-mint a {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.sm-mint ul a, .sm-mint.sm-vertical a {
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
.sm-mint .sm-nowrap > li > a, .sm-mint .sm-nowrap > li > :not(ul) a {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
/* ...end */
|
||||
.sm-mint {
|
||||
border-top: 0;
|
||||
background: transparent;
|
||||
}
|
||||
.sm-mint a, .sm-mint a:hover, .sm-mint a:focus, .sm-mint a:active, .sm-mint a.highlighted {
|
||||
padding: 11px 20px;
|
||||
color: #333;
|
||||
border-radius: 4px 4px 0 0;
|
||||
}
|
||||
.sm-mint a:hover, .sm-mint a:focus, .sm-mint a:active {
|
||||
background: #8db863;
|
||||
color: #fff;
|
||||
}
|
||||
.sm-mint a.highlighted {
|
||||
background: #F6FFED;
|
||||
color: #333;
|
||||
box-shadow: 0 4px 3px rgba(0, 0, 0, 0.25);
|
||||
}
|
||||
.sm-mint a.disabled {
|
||||
background: transparent;
|
||||
color: #cccccc;
|
||||
box-shadow: none;
|
||||
}
|
||||
.sm-mint a.has-submenu {
|
||||
padding-right: 34px;
|
||||
}
|
||||
.sm-mint a .sub-arrow {
|
||||
top: 50%;
|
||||
margin-top: -3px;
|
||||
right: 20px;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-width: 6px 4.02px 0 4.02px;
|
||||
border-style: solid dashed dashed dashed;
|
||||
border-color: #8db863 transparent transparent transparent;
|
||||
background: transparent;
|
||||
border-radius: 0;
|
||||
}
|
||||
.sm-mint a:hover .sub-arrow, .sm-mint a:focus .sub-arrow, .sm-mint a:active .sub-arrow {
|
||||
border-color: #fff transparent transparent transparent;
|
||||
}
|
||||
.sm-mint a.highlighted .sub-arrow {
|
||||
border-color: #8db863 transparent transparent transparent;
|
||||
}
|
||||
.sm-mint a.disabled .sub-arrow {
|
||||
border-color: #8db863 transparent transparent transparent;
|
||||
}
|
||||
.sm-mint a .sub-arrow::before {
|
||||
display: none;
|
||||
}
|
||||
.sm-mint li {
|
||||
border-top: 0;
|
||||
}
|
||||
.sm-mint ul {
|
||||
border: 0;
|
||||
padding: 8px 0;
|
||||
background: #F6FFED;
|
||||
border-radius: 0 4px 4px 4px;
|
||||
box-shadow: 0 4px 3px rgba(0, 0, 0, 0.25);
|
||||
}
|
||||
.sm-mint ul ul {
|
||||
border-radius: 4px;
|
||||
}
|
||||
.sm-mint ul a, .sm-mint ul a:hover, .sm-mint ul a:focus, .sm-mint ul a:active, .sm-mint ul a.highlighted {
|
||||
border: 0 !important;
|
||||
padding: 10px 20px;
|
||||
color: #333;
|
||||
border-radius: 0;
|
||||
}
|
||||
.sm-mint ul a:hover, .sm-mint ul a:focus, .sm-mint ul a:active, .sm-mint ul a.highlighted {
|
||||
background: #8db863;
|
||||
color: #fff;
|
||||
box-shadow: none;
|
||||
}
|
||||
.sm-mint ul a.disabled {
|
||||
background: transparent;
|
||||
color: #b3b3b3;
|
||||
}
|
||||
.sm-mint ul a.has-submenu {
|
||||
padding-right: 20px;
|
||||
}
|
||||
.sm-mint ul a .sub-arrow {
|
||||
right: 10px;
|
||||
margin-top: -4.02px;
|
||||
border-width: 4.02px 0 4.02px 6px;
|
||||
border-style: dashed dashed dashed solid;
|
||||
border-color: transparent transparent transparent #8db863;
|
||||
}
|
||||
.sm-mint ul a:hover .sub-arrow, .sm-mint ul a:focus .sub-arrow, .sm-mint ul a:active .sub-arrow, .sm-mint ul a.highlighted .sub-arrow {
|
||||
border-color: transparent transparent transparent #fff;
|
||||
}
|
||||
.sm-mint ul a.disabled .sub-arrow {
|
||||
border-color: transparent transparent transparent #8db863;
|
||||
}
|
||||
.sm-mint .scroll-up,
|
||||
.sm-mint .scroll-down {
|
||||
position: absolute;
|
||||
display: none;
|
||||
visibility: hidden;
|
||||
overflow: hidden;
|
||||
background: #F6FFED;
|
||||
height: 20px;
|
||||
}
|
||||
.sm-mint .scroll-up-arrow,
|
||||
.sm-mint .scroll-down-arrow {
|
||||
position: absolute;
|
||||
top: 6px;
|
||||
left: 50%;
|
||||
margin-left: -8px;
|
||||
width: 0;
|
||||
height: 0;
|
||||
overflow: hidden;
|
||||
border-width: 0 6px 8px 6px;
|
||||
border-style: dashed dashed solid dashed;
|
||||
border-color: transparent transparent #8db863 transparent;
|
||||
}
|
||||
.sm-mint .scroll-down-arrow {
|
||||
border-width: 8px 6px 0 6px;
|
||||
border-style: solid dashed dashed dashed;
|
||||
border-color: #8db863 transparent transparent transparent;
|
||||
}
|
||||
.sm-mint.sm-rtl a.has-submenu {
|
||||
padding-right: 20px;
|
||||
padding-left: 34px;
|
||||
}
|
||||
.sm-mint.sm-rtl a .sub-arrow {
|
||||
right: auto;
|
||||
left: 20px;
|
||||
}
|
||||
.sm-mint.sm-rtl.sm-vertical {
|
||||
border-right: 0;
|
||||
border-left: 2px solid #8db863;
|
||||
}
|
||||
.sm-mint.sm-rtl.sm-vertical a {
|
||||
border-radius: 0 4px 4px 0;
|
||||
}
|
||||
.sm-mint.sm-rtl.sm-vertical a.has-submenu {
|
||||
padding: 10px 20px;
|
||||
}
|
||||
.sm-mint.sm-rtl.sm-vertical a .sub-arrow {
|
||||
right: auto;
|
||||
left: 10px;
|
||||
border-width: 4.02px 6px 4.02px 0;
|
||||
border-style: dashed solid dashed dashed;
|
||||
border-color: transparent #8db863 transparent transparent;
|
||||
}
|
||||
.sm-mint.sm-rtl.sm-vertical a:hover .sub-arrow, .sm-mint.sm-rtl.sm-vertical a:focus .sub-arrow, .sm-mint.sm-rtl.sm-vertical a:active .sub-arrow, .sm-mint.sm-rtl.sm-vertical a.highlighted .sub-arrow {
|
||||
border-color: transparent #fff transparent transparent;
|
||||
}
|
||||
.sm-mint.sm-rtl.sm-vertical a.disabled .sub-arrow {
|
||||
border-color: transparent #8db863 transparent transparent;
|
||||
}
|
||||
.sm-mint.sm-rtl ul {
|
||||
border-radius: 4px 0 4px 4px;
|
||||
}
|
||||
.sm-mint.sm-rtl ul a {
|
||||
border-radius: 0 !important;
|
||||
}
|
||||
.sm-mint.sm-rtl ul a.has-submenu {
|
||||
padding: 10px 20px !important;
|
||||
}
|
||||
.sm-mint.sm-rtl ul a .sub-arrow {
|
||||
right: auto;
|
||||
left: 10px;
|
||||
border-width: 4.02px 6px 4.02px 0;
|
||||
border-style: dashed solid dashed dashed;
|
||||
border-color: transparent #8db863 transparent transparent;
|
||||
}
|
||||
.sm-mint.sm-rtl ul a:hover .sub-arrow, .sm-mint.sm-rtl ul a:focus .sub-arrow, .sm-mint.sm-rtl ul a:active .sub-arrow, .sm-mint.sm-rtl ul a.highlighted .sub-arrow {
|
||||
border-color: transparent #fff transparent transparent;
|
||||
}
|
||||
.sm-mint.sm-rtl ul a.disabled .sub-arrow {
|
||||
border-color: transparent #8db863 transparent transparent;
|
||||
}
|
||||
.sm-mint.sm-vertical {
|
||||
border-bottom: 0;
|
||||
border-right: 2px solid #8db863;
|
||||
}
|
||||
.sm-mint.sm-vertical a {
|
||||
padding: 10px 20px;
|
||||
border-radius: 4px 0 0 4px;
|
||||
}
|
||||
.sm-mint.sm-vertical a:hover, .sm-mint.sm-vertical a:focus, .sm-mint.sm-vertical a:active, .sm-mint.sm-vertical a.highlighted {
|
||||
background: #8db863;
|
||||
color: #fff;
|
||||
box-shadow: none;
|
||||
}
|
||||
.sm-mint.sm-vertical a.disabled {
|
||||
background: transparent;
|
||||
color: #cccccc;
|
||||
}
|
||||
.sm-mint.sm-vertical a .sub-arrow {
|
||||
right: 10px;
|
||||
margin-top: -4.02px;
|
||||
border-width: 4.02px 0 4.02px 6px;
|
||||
border-style: dashed dashed dashed solid;
|
||||
border-color: transparent transparent transparent #8db863;
|
||||
}
|
||||
.sm-mint.sm-vertical a:hover .sub-arrow, .sm-mint.sm-vertical a:focus .sub-arrow, .sm-mint.sm-vertical a:active .sub-arrow, .sm-mint.sm-vertical a.highlighted .sub-arrow {
|
||||
border-color: transparent transparent transparent #fff;
|
||||
}
|
||||
.sm-mint.sm-vertical a.disabled .sub-arrow {
|
||||
border-color: transparent transparent transparent #8db863;
|
||||
}
|
||||
.sm-mint.sm-vertical ul {
|
||||
border-radius: 4px !important;
|
||||
}
|
||||
.sm-mint.sm-vertical ul a {
|
||||
padding: 10px 20px;
|
||||
}
|
||||
}
|
||||
|
||||
/*# sourceMappingURL=sm-mint.css.map */
|
||||
249
pagetop-megamenu/static/css/menu-simple.css
Normal file
249
pagetop-megamenu/static/css/menu-simple.css
Normal file
|
|
@ -0,0 +1,249 @@
|
|||
.sm-simple {
|
||||
border: 1px solid #bbbbbb;
|
||||
background: #fff;
|
||||
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
.sm-simple a, .sm-simple a:hover, .sm-simple a:focus, .sm-simple a:active {
|
||||
padding: 13px 20px;
|
||||
/* make room for the toggle button (sub indicator) */
|
||||
padding-right: 58px;
|
||||
color: #555555;
|
||||
font-family: "Lucida Sans Unicode", "Lucida Sans", "Lucida Grande", Arial, sans-serif;
|
||||
font-size: 16px;
|
||||
font-weight: normal;
|
||||
line-height: 17px;
|
||||
text-decoration: none;
|
||||
}
|
||||
.sm-simple a.current {
|
||||
background: #555555;
|
||||
color: #fff;
|
||||
}
|
||||
.sm-simple a.disabled {
|
||||
color: #cccccc;
|
||||
}
|
||||
.sm-simple a .sub-arrow {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
margin-top: -17px;
|
||||
left: auto;
|
||||
right: 4px;
|
||||
width: 34px;
|
||||
height: 34px;
|
||||
overflow: hidden;
|
||||
font: bold 14px/34px monospace !important;
|
||||
text-align: center;
|
||||
text-shadow: none;
|
||||
background: rgba(0, 0, 0, 0.08);
|
||||
}
|
||||
.sm-simple a .sub-arrow::before {
|
||||
content: '+';
|
||||
}
|
||||
.sm-simple a.highlighted .sub-arrow::before {
|
||||
content: '-';
|
||||
}
|
||||
.sm-simple li {
|
||||
border-top: 1px solid rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
.sm-simple > li:first-child {
|
||||
border-top: 0;
|
||||
}
|
||||
.sm-simple ul {
|
||||
background: rgba(179, 179, 179, 0.1);
|
||||
}
|
||||
.sm-simple ul a, .sm-simple ul a:hover, .sm-simple ul a:focus, .sm-simple ul a:active {
|
||||
font-size: 14px;
|
||||
border-left: 8px solid transparent;
|
||||
}
|
||||
.sm-simple ul ul a,
|
||||
.sm-simple ul ul a:hover,
|
||||
.sm-simple ul ul a:focus,
|
||||
.sm-simple ul ul a:active {
|
||||
border-left: 16px solid transparent;
|
||||
}
|
||||
.sm-simple ul ul ul a,
|
||||
.sm-simple ul ul ul a:hover,
|
||||
.sm-simple ul ul ul a:focus,
|
||||
.sm-simple ul ul ul a:active {
|
||||
border-left: 24px solid transparent;
|
||||
}
|
||||
.sm-simple ul ul ul ul a,
|
||||
.sm-simple ul ul ul ul a:hover,
|
||||
.sm-simple ul ul ul ul a:focus,
|
||||
.sm-simple ul ul ul ul a:active {
|
||||
border-left: 32px solid transparent;
|
||||
}
|
||||
.sm-simple ul ul ul ul ul a,
|
||||
.sm-simple ul ul ul ul ul a:hover,
|
||||
.sm-simple ul ul ul ul ul a:focus,
|
||||
.sm-simple ul ul ul ul ul a:active {
|
||||
border-left: 40px solid transparent;
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
/* Switch to desktop layout
|
||||
-----------------------------------------------
|
||||
These transform the menu tree from
|
||||
collapsible to desktop (navbar + dropdowns)
|
||||
-----------------------------------------------*/
|
||||
/* start... (it's not recommended editing these rules) */
|
||||
.sm-simple ul {
|
||||
position: absolute;
|
||||
width: 12em;
|
||||
}
|
||||
|
||||
.sm-simple li {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.sm-simple.sm-rtl li {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.sm-simple ul li, .sm-simple.sm-rtl ul li, .sm-simple.sm-vertical li {
|
||||
float: none;
|
||||
}
|
||||
|
||||
.sm-simple a {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.sm-simple ul a, .sm-simple.sm-vertical a {
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
.sm-simple .sm-nowrap > li > a, .sm-simple .sm-nowrap > li > :not(ul) a {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
/* ...end */
|
||||
.sm-simple {
|
||||
background: #fff;
|
||||
}
|
||||
.sm-simple a, .sm-simple a:hover, .sm-simple a:focus, .sm-simple a:active, .sm-simple a.highlighted {
|
||||
padding: 11px 20px;
|
||||
color: #555555;
|
||||
}
|
||||
.sm-simple a:hover, .sm-simple a:focus, .sm-simple a:active, .sm-simple a.highlighted {
|
||||
background: #eeeeee;
|
||||
}
|
||||
.sm-simple a.current {
|
||||
background: #555555;
|
||||
color: #fff;
|
||||
}
|
||||
.sm-simple a.disabled {
|
||||
background: #fff;
|
||||
color: #cccccc;
|
||||
}
|
||||
.sm-simple a.has-submenu {
|
||||
padding-right: 32px;
|
||||
}
|
||||
.sm-simple a .sub-arrow {
|
||||
top: 50%;
|
||||
margin-top: -8px;
|
||||
right: 20px;
|
||||
width: 8px;
|
||||
height: 16px;
|
||||
font: 14px/16px monospace !important;
|
||||
background: transparent;
|
||||
}
|
||||
.sm-simple a.highlighted .sub-arrow::before {
|
||||
content: '+';
|
||||
}
|
||||
.sm-simple > li {
|
||||
border-top: 0;
|
||||
border-left: 1px solid #eeeeee;
|
||||
}
|
||||
.sm-simple > li:first-child {
|
||||
border-left: 0;
|
||||
}
|
||||
.sm-simple ul {
|
||||
border: 1px solid #bbbbbb;
|
||||
background: #fff;
|
||||
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
.sm-simple ul a {
|
||||
border: 0 !important;
|
||||
}
|
||||
.sm-simple ul a.has-submenu {
|
||||
padding-right: 20px;
|
||||
}
|
||||
.sm-simple ul a .sub-arrow {
|
||||
left: 8px;
|
||||
right: auto;
|
||||
}
|
||||
.sm-simple ul > li {
|
||||
border-left: 0;
|
||||
border-top: 1px solid #eeeeee;
|
||||
}
|
||||
.sm-simple ul > li:first-child {
|
||||
border-top: 0;
|
||||
}
|
||||
.sm-simple .scroll-up,
|
||||
.sm-simple .scroll-down {
|
||||
position: absolute;
|
||||
display: none;
|
||||
visibility: hidden;
|
||||
overflow: hidden;
|
||||
background: #fff;
|
||||
height: 20px;
|
||||
}
|
||||
.sm-simple .scroll-up-arrow,
|
||||
.sm-simple .scroll-down-arrow {
|
||||
position: absolute;
|
||||
top: -2px;
|
||||
left: 50%;
|
||||
margin-left: -8px;
|
||||
width: 0;
|
||||
height: 0;
|
||||
overflow: hidden;
|
||||
border-width: 8px;
|
||||
border-style: dashed dashed solid dashed;
|
||||
border-color: transparent transparent #555555 transparent;
|
||||
}
|
||||
.sm-simple .scroll-down-arrow {
|
||||
top: 6px;
|
||||
border-style: solid dashed dashed dashed;
|
||||
border-color: #555555 transparent transparent transparent;
|
||||
}
|
||||
.sm-simple.sm-rtl a.has-submenu {
|
||||
padding-right: 20px;
|
||||
padding-left: 32px;
|
||||
}
|
||||
.sm-simple.sm-rtl a .sub-arrow {
|
||||
left: 20px;
|
||||
right: auto;
|
||||
}
|
||||
.sm-simple.sm-rtl.sm-vertical a.has-submenu {
|
||||
padding: 11px 20px;
|
||||
}
|
||||
.sm-simple.sm-rtl.sm-vertical a .sub-arrow {
|
||||
left: auto;
|
||||
right: 8px;
|
||||
}
|
||||
.sm-simple.sm-rtl > li:first-child {
|
||||
border-left: 1px solid #eeeeee;
|
||||
}
|
||||
.sm-simple.sm-rtl > li:last-child {
|
||||
border-left: 0;
|
||||
}
|
||||
.sm-simple.sm-rtl ul a.has-submenu {
|
||||
padding: 11px 20px;
|
||||
}
|
||||
.sm-simple.sm-rtl ul a .sub-arrow {
|
||||
left: auto;
|
||||
right: 8px;
|
||||
}
|
||||
.sm-simple.sm-vertical a .sub-arrow {
|
||||
left: 8px;
|
||||
right: auto;
|
||||
}
|
||||
.sm-simple.sm-vertical li {
|
||||
border-left: 0;
|
||||
border-top: 1px solid #eeeeee;
|
||||
}
|
||||
.sm-simple.sm-vertical > li:first-child {
|
||||
border-top: 0;
|
||||
}
|
||||
}
|
||||
|
||||
/*# sourceMappingURL=sm-simple.css.map */
|
||||
58
pagetop-megamenu/static/css/menu.css
Normal file
58
pagetop-megamenu/static/css/menu.css
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
.sm {
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
z-index: 9999;
|
||||
-webkit-tap-highlight-color: rgba(0,0,0,0);
|
||||
}
|
||||
.sm,
|
||||
.sm ul,
|
||||
.sm li {
|
||||
display: block;
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
line-height: normal;
|
||||
direction: ltr;
|
||||
text-align: left;
|
||||
}
|
||||
.sm-rtl,
|
||||
.sm-rtl ul,
|
||||
.sm-rtl li {
|
||||
direction: rtl;
|
||||
text-align: right;
|
||||
}
|
||||
.sm > li > h1,
|
||||
.sm > li > h2,
|
||||
.sm > li > h3,
|
||||
.sm > li > h4,
|
||||
.sm > li > h5,
|
||||
.sm > li > h6 {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.sm ul {
|
||||
display: none;
|
||||
}
|
||||
.sm li,
|
||||
.sm a {
|
||||
position: relative;
|
||||
}
|
||||
.sm a {
|
||||
display: block;
|
||||
}
|
||||
.sm a.disabled {
|
||||
cursor: default;
|
||||
}
|
||||
.sm::after {
|
||||
content: "";
|
||||
display: block;
|
||||
height: 0;
|
||||
font: 0px/0 serif;
|
||||
clear: both;
|
||||
overflow: hidden;
|
||||
}
|
||||
.sm *,
|
||||
.sm *::before,
|
||||
.sm *::after {
|
||||
box-sizing: inherit;
|
||||
}
|
||||
3
pagetop-megamenu/static/js/menu.min.js
vendored
Normal file
3
pagetop-megamenu/static/js/menu.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue