承接 proteusthemes/sticky-menu 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

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

  1. require this package in your composer.json file: "proteusthemes/sticky-menu",
  2. run composer update,
  3. import the basic SCSS file into the theme (in style.scss file): @import '../../vendor/proteusthemes/sticky-menu/assets/scss/sticky-menu-minimal';,
  4. require the js file in the theme (in main.js file). Just add this path to the require call: 'vendor/proteusthemes/sticky-menu/assets/js/sticky-menu',
  5. run grunt build, to generate new style.css file (with sticky menu css),
  6. insert js-sticky-mobile-option and js-sticky-desktop-option classes, to the HTML elements, from which the sticky menu will be active. Example: add js-sticky-mobile-option class to hamburger button and add the js-sticky-desktop-option class to the nav element in header. When the browser window top will scroll to these elements, the sticky menu will be activated,
  7. use the pt-sticky-menu/theme_panel filter to set the panel, to which the sticky menu will be attached in the customizer,
  8. 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 is btn-primary,
  • pt-sticky-menu/cta_button_class, CTA button class, default is btn-primary.

统计信息

  • 总下载量: 2.95k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 2
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-2.0-or-later
  • 更新时间: 2016-07-12

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固