proteusthemes/sticky-menu
Composer 安装命令:
composer require proteusthemes/sticky-menu
包简介
Sticky menu PHP composer package for all newer PT themes.
README 文档
README
This is a composer package for the PT Sticky Menu, also available on the packagist repository: https://packagist.org/packages/proteusthemes/sticky-menu.
How it works
In customizer under Theme Options -> Sticky menu you will find the settings for the sticky menu:
- enable/disable sticky menu checkbox,
- featured page button settings,
- sticky menu container background color.
The sticky menu will be displayed only when the user scrolls up, otherwise it will remain hidden.
Instructions
- require this package in your composer.json file: "proteusthemes/sticky-menu",
- run
composer update, - import the basic SCSS file into the theme (in style.scss file):
@import '../../vendor/proteusthemes/sticky-menu/assets/scss/sticky-menu-minimal';, - require the js file in the theme (in main.js file). Just add this path to the
requirecall:'vendor/proteusthemes/sticky-menu/assets/js/sticky-menu', - run
grunt build, to generate new style.css file (with sticky menu css), - insert
js-sticky-mobile-optionandjs-sticky-desktop-optionclasses, to the HTML elements, from which the sticky menu will be active. Example: addjs-sticky-mobile-optionclass to hamburger button and add thejs-sticky-desktop-optionclass to the nav element in header. When the browser window top will scroll to these elements, the sticky menu will be activated, - use the
pt-sticky-menu/theme_panelfilter to set the panel, to which the sticky menu will be attached in the customizer, - instantiate the sticky menu class (take a look at the /inc/theme-sticky-menu.php file in Auto theme, which is then required in functions.php)
That should be it. Now you just have to style the sticky menu according to the theme style.
Filters
There are a few filters, which you can use to modify the behavior of the sticky menu:
pt-sticky-menu/settings_default, used for specifying the default customizer settings,pt-sticky-menu/logo_mod_names, change the theme_mod names for the logos,pt-sticky-menu/theme_menu_location, change menu location name used for the sticky menu,pt-sticky-menu/cta_html_output, change the CTA HTML output,pt-sticky-menu/theme_panel, change the customizer panel name, to which the Sticky Menu section will be attached,pt-sticky-menu/mobile_menu_button_class, mobile menu button class, default isbtn-primary,pt-sticky-menu/cta_button_class, CTA button class, default isbtn-primary.
proteusthemes/sticky-menu 适用场景与选型建议
proteusthemes/sticky-menu 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 3.01k 次下载、GitHub Stars 达 1, 最近一次更新时间为 2016 年 07 月 12 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「menu」 「theme」 「wordpress」 「wp」 「sticky」 「customizer」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 proteusthemes/sticky-menu 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 proteusthemes/sticky-menu 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 proteusthemes/sticky-menu 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A Symfony extension to get active class base on current bundle/controller/action
A Bootstrap 4.x base theme for SilverStripe
Lucency Theme
Selectize Theme for Bootstrap 4
Yii2 DynaTree Menu widget uses Dynamic tree view control jquery.dynatree.js
Create simple top navigation for laravel
统计信息
- 总下载量: 3.01k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 13
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-2.0-or-later
- 更新时间: 2016-07-12