移动和台式机的不同菜单
我希望为我的Shopify网站设置不同的菜单和台式设备。
这是我的Shopify标题代码:
<div class="header-container" data-section-type="header" itemscope itemtype="http://schema.org/Organization" data-cc-animate data-is-sticky="{{ section.settings.sticky_header }}">
{%- assign featured_links = section.settings.nav_featured_link | split: ', ' -%}
<div class="page-header {% if section.settings.logo_location == "links" %}layout-nav{% else %}layout-{{ section.settings.header_layout }}{% endif %} using-compact-mobile-logo">
<div class="toolbar-container">
<div class="container">
<div id="toolbar" class="toolbar cf
{% if section.settings.header_layout == 'center' %}toolbar--three-cols-xs{% else %}toolbar--two-cols-xs{% endif %}
{% if section.settings.logo_location == 'toolbar' and section.settings.header_layout == 'center' %}toolbar--three-cols{% else %}toolbar--two-cols{% endif %}
{% if section.settings.search_text_box_large and section.settings.search_bar != "icon" %}toolbar--text-box-large{% endif %}">
<div class="toolbar-left {% if section.settings.logo == blank %}toolbar--text-logo{% endif %}
{% if align_search_left %}toolbar-left--search-left{% endif %}">
<div class="mobile-toolbar">
<a class="toggle-mob-nav" href="#" aria-controls="mobile-nav" aria-label="{{ 'layout.header.open_mobile_nav_aria_label' | t | escape }}">
<span></span>
<span></span>
<span></span>
</a>
</div>
这是允许用户选择手机菜单的主题设置。
{%- assign featured_links = section.settings.nav_featured_link | split: ', ' -%}
那么,如何为桌面用户创建或设置不同的菜单?
I want so set different menu for mobile and desktop devices for my shopify website.
Here is my shopify header code:
<div class="header-container" data-section-type="header" itemscope itemtype="http://schema.org/Organization" data-cc-animate data-is-sticky="{{ section.settings.sticky_header }}">
{%- assign featured_links = section.settings.nav_featured_link | split: ', ' -%}
<div class="page-header {% if section.settings.logo_location == "links" %}layout-nav{% else %}layout-{{ section.settings.header_layout }}{% endif %} using-compact-mobile-logo">
<div class="toolbar-container">
<div class="container">
<div id="toolbar" class="toolbar cf
{% if section.settings.header_layout == 'center' %}toolbar--three-cols-xs{% else %}toolbar--two-cols-xs{% endif %}
{% if section.settings.logo_location == 'toolbar' and section.settings.header_layout == 'center' %}toolbar--three-cols{% else %}toolbar--two-cols{% endif %}
{% if section.settings.search_text_box_large and section.settings.search_bar != "icon" %}toolbar--text-box-large{% endif %}">
<div class="toolbar-left {% if section.settings.logo == blank %}toolbar--text-logo{% endif %}
{% if align_search_left %}toolbar-left--search-left{% endif %}">
<div class="mobile-toolbar">
<a class="toggle-mob-nav" href="#" aria-controls="mobile-nav" aria-label="{{ 'layout.header.open_mobile_nav_aria_label' | t | escape }}">
<span></span>
<span></span>
<span></span>
</a>
</div>
This is the theme settings that allow user to chose a menu for the mobile.
{%- assign featured_links = section.settings.nav_featured_link | split: ', ' -%}
so how do i create or set different menu for desktop users too?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)