当前位置: 首页 > news >正文

shopify模块新增内容或图片

1、后台找到指定的liquid页面,在该页面下方{% schema %} 新增需求

2、添加轮播图功能

        {% comment %} 轮播代码 {% endcomment %}{% if block.settings.enable_slider %}<divclass="size-guide-slider swiper"data-slides-per-view="{{ block.settings.slides_per_view | default: 2 }}"><div class="swiper-wrapper">{% for slide in section.blocks %}{% if slide.type == 'slide' %}<div class="swiper-slide">{% if slide.settings.slide_image %}<imgsrc="{{ slide.settings.slide_image | image_url: width: 2000 }}"alt="{{ slide.settings.slide_title }}"loading="lazy"width="{{ slide.settings.slide_image.width }}"height="{{ slide.settings.slide_image.height }}">{% endif %}{% if slide.settings.slide_title != blank %}<div class="slide-title">{{ slide.settings.slide_title }}</div>{% endif %}</div>{% endif %}{% endfor %}</div><div class="swiper-pagination"></div><div class="swiper-button-prev"></div><div class="swiper-button-next"></div></div>{% endif %}

3、补充JQ


<script type="text/javascript" defer="">document.addEventListener('DOMContentLoaded', function () {(() => {const node = document.querySelector('#shopify-section-{{section.id}}');const carousels = node.querySelectorAll('[carousel]');let swipers = [];carousels.forEach((carousel, i) => {const swiper = new Swiper(carousel, {allowTouchMove: false,loop: true,});swipers.push(swiper);});const contentCarousel = node.querySelector('[content]');const prevEl = node.querySelector('[prev]');const nextEl = node.querySelector('[next]');const swiper = new Swiper(contentCarousel, {effect: 'fade',loop: true,fadeEffect: {crossFade: true,},navigation: {nextEl: nextEl,prevEl: prevEl,},});swiper.controller.control = swipers;swiper.controller.control = swipers;swiper.controller.control = swipers;})();});document.addEventListener('DOMContentLoaded', function () {// Function to initialize tabsfunction initializeTabs() {// Get all tab headersconst tabHeaders = document.querySelectorAll('.tab-header');// Get all tab content elementsconst tabContents = document.querySelectorAll('.tab-content');// Add click event listener to each tab headertabHeaders.forEach(function (header) {header.addEventListener('click', function () {// Remove 'active' class from all headers and contentstabHeaders.forEach(function (item) {item.classList.remove('active');});tabContents.forEach(function (content) {content.classList.remove('active');});// Add 'active' class to the clicked header and corresponding contentthis.classList.add('active');document.getElementById(this.getAttribute('data-tab')).classList.add('active');});});}// Initialize tabs when the document is readyinitializeTabs();// Initialize size guide sliderconst sizeGuideSlider = new Swiper('.size-guide-slider', {slidesPerView: parseInt(document.querySelector('.size-guide-slider').dataset.slidesPerView),slidesPerGroup: parseInt(document.querySelector('.size-guide-slider').dataset.slidesPerView),spaceBetween: 30,slidesPerGroup: 2,loop: false,pagination: {el: '.swiper-pagination',clickable: true,},navigation: {nextEl: '.swiper-button-next',prevEl: '.swiper-button-prev',},});});
</script>
后台的tab 模块区域 ,
{% schema %}
{"name": "Tab Content","settings": [{"type": "url","id": "video_url","label": "Video URL","info": "Enter the URL of the video you want to display."},{"type": "image_picker","id": "cover_image","label": "Cover Image","info": "Select the cover image that appears before the video plays."}],"blocks": [{"type": "FAQ","name": "FAQ","limit": 1,"settings": [{"type": "text","id": "tab_title","label": "Tab Title"},{"type": "image_picker","id": "icon_image","label": "Tab Icon"},{"type": "number","id": "icon_width","label": "Icon Width","info": "Enter the width of the icon in pixels.","default": 50},{"type": "number","id": "icon_height","label": "Icon Height","info": "Enter the height of the icon in pixels.","default": 50}]},{"type": "faq_item","name": "FAQ Item","limit": 20, // 可以限制 FAQ 项的数量"settings": [{"type": "text","id": "question","label": "Question","default": "Do you ship overseas?"},{"type": "richtext","id": "answer","label": "Answer","default": "<p>Yes, we ship all over the world. Shipping costs will apply, and will be added at checkout. We run discounts and promotions all year, so stay tuned for exclusive deals.</p>"}]},{"type": "size_guide","name": "Size Help","limit": 1,"settings": [{"type": "checkbox","id": "enable_slider","label": "Enable Image Slider","default": false},{"type": "range","id": "slides_per_view", // 一屏幕显示几个"min": 1,"max": 4,"step": 1,"label": "Slides Per View","default": 2},{"type": "text","id": "tab_title","label": "Tab Title"},{"type": "image_picker","id": "icon_image","label": "Tab Icon"},{"type": "number","id": "icon_width","label": "Icon Width","info": "Enter the width of the icon in pixels.","default": 50},{"type": "number","id": "icon_height","label": "Icon Height","info": "Enter the height of the icon in pixels.","default": 50},{"type": "richtext","id": "size_help_text","label": "Size help text"},{"type": "image_picker","id": "size_guide_image","label": "Size help image"},{"type": "video","id": "video","label": "Size help video"},{"type": "checkbox","id": "enable_video_looping","label": "Enable video looping"}]},{"type": "slide","name": "Slider Image", // 轮播图"settings": [{"type": "image_picker","id": "slide_image","label": "Slide Image"},{"type": "text","id": "slide_title","label": "Slide Title","default": "Slide Title"}]},{"type": "help_text_item","name": "Help Text Item","limit": 20, // 可以限制 FAQ 项的数量"settings": [{"type": "text","id": "helpText","label": "title","default": "title"},{"type": "richtext","id": "helpContent","label": "content","default": "<p>conent</p>"}]},{"type": "materials_care","name": "Materials and Care","limit": 1,"settings": [{"type": "text","id": "tab_title","label": "Tab Title"},{"type": "image_picker","id": "icon_image","label": "Tab Icon"},{"type": "number","id": "icon_width","label": "Icon Width","info": "Enter the width of the icon in pixels.","default": 50},{"type": "number","id": "icon_height","label": "Icon Height","info": "Enter the height of the icon in pixels.","default": 50},{"type": "header","content": "Material content"},{"type": "text","id": "material_title","label": "Title"},{"type": "richtext","id": "material_content","label": "Content"},{"type": "header","content": "Care"},{"type": "text","id": "care_title","label": "Title"},{"type": "richtext","id": "care_content","label": "Content"}]}]
}
{% endschema %}

4、后台效果:
在这里插入图片描述

相关文章:

shopify模块新增内容或图片

1、后台找到指定的liquid页面&#xff0c;在该页面下方{% schema %} 新增需求 2、添加轮播图功能 {% comment %} 轮播代码 {% endcomment %}{% if block.settings.enable_slider %}<divclass"size-guide-slider swiper"data-slides-per-view"{{ block.setti…...

【EMNLP2024】基于多轮课程学习的大语言模型蒸馏算法 TAPIR

近日&#xff0c;阿里云人工智能平台PAI与复旦大学王鹏教授团队合作&#xff0c;在自然语言处理顶级会议EMNLP 2024 上发表论文《Distilling Instruction-following Abilities of Large Language Models with Task-aware Curriculum Planning》。文章提出了一个名为 TAPIR 的知…...

置信传播算法复现

本文所涉及所有资源均在 传知代码平台 可获取。 目录 一.背景及意义介绍 1. 实际应用广泛 2. 理论研究重要性...

【在Linux世界中追寻伟大的One Piece】poll代码改写

目录 1 -> poll代码改写 1 -> poll代码改写 结合select代码&#xff0c;将select server更改成为pollserver&#xff0c;不是一件困难的事情。 #pragma once#include <iostream> #include <string> #include <poll.h> #include <memory> #inc…...

C++builder中的人工智能(17):神经网络中的自我规则非单调(Mish)激活函数

在这篇文章中&#xff0c;我们将探讨自我规则非单调激活函数——Mish在神经网络中的应用。了解Mish函数的工作原理&#xff0c;将有助于您在使用C IDE构建C应用程序时更加得心应手。 目录 神经网络中的激活函数是什么&#xff1f;能在C中创建激活函数吗&#xff1f;自我规则非…...

Java 的 Scanner 类:控制台输入与文件扫描

Java 的 Scanner 类是一个非常方便的工具类&#xff0c;主要用于从控制台或文件中扫描输入数据。虽然它也可以用于扫描文件内容&#xff0c;但我们通常更喜欢它用于控制台输入&#xff0c;因为扫描文件可以通过文件流来完成。接下来&#xff0c;我们将通过几个简单的示例来讲解…...

使用纯HTML和CSS绘制圣诞树:打造网页中的冬日奇景

### HTML & CSS 实现节日圣诞树&#xff1a;一步步打造你的冬季主题网页 在这篇文章中&#xff0c;我们将使用纯HTML和CSS创建一棵节日圣诞树。通过简单的代码&#xff0c;您可以在网页上实现一棵带有星星、彩球装饰的圣诞树&#xff0c;为网站增添节日氛围。 ### 实现思…...

深度学习-图像评分实验(TensorFlow框架运用、读取处理图片、模型建构)

目录 0、实验准备 ①实验环境 ②需要下载的安装包 ③注意事项&#xff08;很关键&#xff0c;否则后面内容看不懂&#xff09; ④容易出现的问题 1、查看数据并读取数据。 2、PIL库里的Image包进行读取&#xff08;.resize更改图片尺寸&#xff0c;并将原始数据归一化处…...

羲和数据集收集器0.9

为了进一步完善代码,增强其文字抓取能力和文件读取能力,我们做以下改进: 增强 DOCX 文档的文本提取:不仅提取段落和文本框内容,还提取表格中的文本。 增强 PDF 文档的文本提取:不仅提取页面文本和注释,还提取表格中的文本。 优化文本清理:确保文本清理更加彻底,避免不…...

哈尔滨等保测评常见误区破解:避免陷入安全盲区

在当今信息化社会&#xff0c;网络安全已成为各行各业不可忽视的重要议题。等级保护&#xff08;简称“等保”&#xff09;作为我国网络安全的基本制度&#xff0c;旨在通过划分不同安全保护等级&#xff0c;对信息系统实施分等级的安全保护。然而&#xff0c;在实施等保测评的…...

Python学习------第四天

Python的判断语句 一、布尔类型和比较运算符 二、 if语句的基本格式 if语句注意空格缩进&#xff01;&#xff01;&#xff01; if else python判断语句的嵌套用法&#xff1a;...

【Django】配置文件 settings.py

【Django】配置文件 settings.py 和Flask框架不同&#xff0c;Django框架项目在创建的时会默认生成配置文件settings.py&#xff0c;在深入学习Django框架前&#xff0c;我们先简单了解settings.py文件内非注释代码&#xff0c; from pathlib import Path BASE_DIR Path(__f…...

量化交易系统开发-实时行情自动化交易-Okex K线数据

19年创业做过一年的量化交易但没有成功&#xff0c;作为交易系统的开发人员积累了一些经验&#xff0c;最近想重新研究交易系统&#xff0c;一边整理一边写出来一些思考供大家参考&#xff0c;也希望跟做量化的朋友有更多的交流和合作。 接下来聊聊基于Okex交易所API获取K线数…...

【基于轻量型架构的WEB开发】课程 12.5 数据回写 Java EE企业级应用开发教程 Spring+SpringMVC+MyBatis

12.5 数据回写 12.5.1 普通字符串的回写 接下来通过HttpServletResponse输出数据的案例&#xff0c;演示普通字符串的回写&#xff0c;案例具体实现步骤如下。 1 创建一个数据回写类DataController&#xff0c;在DataController类中定义 showDataByResponse()方法&#xff…...

apache-seata-2.1.0 AT模式使用篇(配置简单)

最近在研究seata的AT模式&#xff0c;先在本地搭建了一个演示demo&#xff0c;看看seata是如何使用的。在网上搜的demo&#xff0c;配置相对来说都比较多。我最终搭建的版本&#xff0c;配置较少&#xff0c;所以写篇文章分享下&#xff0c;希望能帮到对seata感兴趣的小伙伴。先…...

(金蝶云星空)客户端追踪SQL

快捷键 ShitfCtryAltM 点击开始、最后操作功能、然后查看报告 SQL报告...

OAK相机:纯视觉SLAM在夜晚的应用

哈喽&#xff0c;OAK的朋友们&#xff0c;大家好啊&#xff0c;今天这个视频主要想分享一下袁博士团队用我们的OAK相机产出的新成果 在去年过山车SLAM的演示中&#xff0c;袁博士团队就展示了纯视觉SLAM在完全黑暗的环境中的极高鲁棒性。 现在袁博士团队进一步挖掘了纯视觉的潜…...

发送方确认

在使用RabbitMQ的时候&#xff0c;可以通过消息持久化来解决因为服务器的异常而导致的消息就是&#xff0c;但是还有一个问题&#xff0c;当消息的生产者将消息发送出去之后&#xff0c;消息到底有没有正确地到达服务器呢&#xff1f;如果消息在到达服务器之前已经丢失&#xf…...

如何使用HighBuilder前端开发神器

一&#xff0c;前言 前端开发是网页和应用程序设计与开发中的一个重要分支&#xff0c;直接涉及用户界面的构建和用户与网页的交互。前端是用户在浏览器中看到的部分&#xff0c;负责为用户提供良好的体验。 二&#xff0c;前段介绍 1. 前端的组成 前端开发主要由三个核心技…...

发现了NitroShare的一个bug

NitroShare 是一个跨平台的局域网开源网络文件传输应用程序&#xff0c;它利用广播发现机制在本地网络中找到其他安装了 NitroShare 的设备&#xff0c;从而实现这些设备之间的文件和文件夹发送。 NitroShare 支持 Windows、macOS 和 Linux 操作系统。 NitroShare允许我们为…...

Golang 面试经典题:map 的 key 可以是什么类型?哪些不可以?

Golang 面试经典题&#xff1a;map 的 key 可以是什么类型&#xff1f;哪些不可以&#xff1f; 在 Golang 的面试中&#xff0c;map 类型的使用是一个常见的考点&#xff0c;其中对 key 类型的合法性 是一道常被提及的基础却很容易被忽视的问题。本文将带你深入理解 Golang 中…...

三维GIS开发cesium智慧地铁教程(5)Cesium相机控制

一、环境搭建 <script src"../cesium1.99/Build/Cesium/Cesium.js"></script> <link rel"stylesheet" href"../cesium1.99/Build/Cesium/Widgets/widgets.css"> 关键配置点&#xff1a; 路径验证&#xff1a;确保相对路径.…...

基于当前项目通过npm包形式暴露公共组件

1.package.sjon文件配置 其中xh-flowable就是暴露出去的npm包名 2.创建tpyes文件夹&#xff0c;并新增内容 3.创建package文件夹...

成都鼎讯硬核科技!雷达目标与干扰模拟器,以卓越性能制胜电磁频谱战

在现代战争中&#xff0c;电磁频谱已成为继陆、海、空、天之后的 “第五维战场”&#xff0c;雷达作为电磁频谱领域的关键装备&#xff0c;其干扰与抗干扰能力的较量&#xff0c;直接影响着战争的胜负走向。由成都鼎讯科技匠心打造的雷达目标与干扰模拟器&#xff0c;凭借数字射…...

深度学习习题2

1.如果增加神经网络的宽度&#xff0c;精确度会增加到一个特定阈值后&#xff0c;便开始降低。造成这一现象的可能原因是什么&#xff1f; A、即使增加卷积核的数量&#xff0c;只有少部分的核会被用作预测 B、当卷积核数量增加时&#xff0c;神经网络的预测能力会降低 C、当卷…...

JVM虚拟机:内存结构、垃圾回收、性能优化

1、JVM虚拟机的简介 Java 虚拟机(Java Virtual Machine 简称:JVM)是运行所有 Java 程序的抽象计算机,是 Java 语言的运行环境,实现了 Java 程序的跨平台特性。JVM 屏蔽了与具体操作系统平台相关的信息,使得 Java 程序只需生成在 JVM 上运行的目标代码(字节码),就可以…...

PHP 8.5 即将发布:管道操作符、强力调试

前不久&#xff0c;PHP宣布了即将在 2025 年 11 月 20 日 正式发布的 PHP 8.5&#xff01;作为 PHP 语言的又一次重要迭代&#xff0c;PHP 8.5 承诺带来一系列旨在提升代码可读性、健壮性以及开发者效率的改进。而更令人兴奋的是&#xff0c;借助强大的本地开发环境 ServBay&am…...

tomcat入门

1 tomcat 是什么 apache开发的web服务器可以为java web程序提供运行环境tomcat是一款高效&#xff0c;稳定&#xff0c;易于使用的web服务器tomcathttp服务器Servlet服务器 2 tomcat 目录介绍 -bin #存放tomcat的脚本 -conf #存放tomcat的配置文件 ---catalina.policy #to…...

Chrome 浏览器前端与客户端双向通信实战

Chrome 前端&#xff08;即页面 JS / Web UI&#xff09;与客户端&#xff08;C 后端&#xff09;的交互机制&#xff0c;是 Chromium 架构中非常核心的一环。下面我将按常见场景&#xff0c;从通道、流程、技术栈几个角度做一套完整的分析&#xff0c;特别适合你这种在分析和改…...

DBLP数据库是什么?

DBLP&#xff08;Digital Bibliography & Library Project&#xff09;Computer Science Bibliography是全球著名的计算机科学出版物的开放书目数据库。DBLP所收录的期刊和会议论文质量较高&#xff0c;数据库文献更新速度很快&#xff0c;很好地反映了国际计算机科学学术研…...