heimrichhannot/contao-buttermenu-bundle 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

heimrichhannot/contao-buttermenu-bundle

Composer 安装命令:

composer require heimrichhannot/contao-buttermenu-bundle

包简介

A smooth animated navigation menu for contao with hover dropdown (big screens for instance) and off-canvas (mobile for instance) modes.

README 文档

README

A smooth animated navigation menu for contao with hover dropdown (big screens for instance) and off-canvas (mobile for instance) modes.

Technical Instructions

  • Attach the butter menu to your navigation front end module by using the nav_buttermenu_default template.
  • Enable contao-buttermenu-bundle as active entry at the page setting (Encore Fieldset)
  • Add @import "~contao-buttermenu/scss/_buttermenu"; to your project scss file and adjust variables before if required

Styling

By default no styles are generated, set $bm-menu-generate-classes to true to style butter menu with defaults, otherwise use the provided mixins as stated below.

Required mixins for the default mode (include inside your media queries):

@include media-breakpoint-up(md) {
	@include bm-default(theme-color('primary'));
}

Required mixins for the compact off-canvas mode (include this inside your media queries):

// .header_compact.scss
@include media-breakpoint-down(sm) {
	@include bm-compact-basics();
	@include bm-compact-backdrop();
	@include bm-compact-default(theme-color('primary'));
}

Using the compact off-canvas mode

If you have data-bm-compact-mode set to off-canvas on your nav_buttermenu_default template, you will need an canvas wrapper and for sure an burger menu. The example below shows how it can work:

<div class="header-static">
	<a href="/" class="header-brand">
		<img src="logo.png" alt="logo"
	</a>
	<button class="hamburger hamburger--spin" type="button" data-bm-compact-toggle=".bm-compact-canvas" aria-controls=".header-collapse" aria-expanded="false">
	  <span class="hamburger-box">
	    <span class="hamburger-inner"></span>
	  </span>
	</button>
</div>
<div class="header-collapse bm-compact-canvas" aria-hidden="false">
	<div class="header-language">
		<!-- Optional: Change language module can be here by using {{insert_module::x}} -->
	</div>
	<div class="header-meta">
		<!-- Optional: Meta navigation can be here by using {{insert_module::x}} -->
	</div>
	<div class="header-navbar bm-compact-scroll">
		<!-- Required: Insert your Navigation menu module with attached nav_buttermenu_default here by using {{insert_module::x}} -->
	</div>
</div>

We recommend using animated Hamburger icons from Jonathan Suh. The is-active will be added automatically upon off-canvas menu is opened.

Settings

Attribute Scope Default Description
data-bm-parent-muted bm-menu touch Change to click, touch or both to prevent click on parent dropdown links
data-bm-min-left bm-menu 15 Minimum offset to left side of viewport.
data-bm-min-right bm-menu 15 Minimum offset to left side of viewport.
data-bm-columns bm-menu 2 Column count. Limit height for ul > li inside dropdowns to provide flexbox column support with proper height calculation.
data-bm-column-min bm-menu 5 Activate columns from data-bm-columns only if more than provided list item count.
data-bm-compact-breakpoint bm-menu 768 The viewport breakpoint width below buttermenu will work in mobile compact mode.
data-bm-arrow-alignment bm-menu center Change to left, right or center to align arrow with navigation text.
data-bm-compact-mode bm-menu off-canvas Change to default for normal hover/touch dropdown-toggle, or to off-canvas for an mobile menu with burger menu.
data-bm-compact-canvas bm-menu null Declare the css-selector for the canvas container e.g. .bm-compact-canvas
data-bm-compact-toggle any off-canvas open/close trigger null Declare the off-canvas container css selector e.g. .bm-compact-canvas on any open/close trigger like the burger menu button.
data-bm-compact-show-current bm-menu false If tru, upon open buttermenu in compact mode current active submenu is active (set to false for proper accessibility support)

heimrichhannot/contao-buttermenu-bundle 适用场景与选型建议

heimrichhannot/contao-buttermenu-bundle 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 524 次下载、GitHub Stars 达 3, 最近一次更新时间为 2018 年 10 月 24 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 heimrichhannot/contao-buttermenu-bundle 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 heimrichhannot/contao-buttermenu-bundle 我们能提供哪些服务?
定制开发 / 二次开发

基于 heimrichhannot/contao-buttermenu-bundle 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 524
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 5
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: LGPL-3.0-or-later
  • 更新时间: 2018-10-24