Rename horizontalgallery block to horizontal-gallery
All checks were successful
Deploy / Deploy to Production (push) Successful in 13s
All checks were successful
Deploy / Deploy to Production (push) Successful in 13s
- Follow Kirby naming convention with dashes - Update all references (blueprint, snippet, plugin registration) - Rebuild plugin with new name Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
a01323be39
commit
6d71b353f3
6 changed files with 8 additions and 8 deletions
|
|
@ -46,12 +46,12 @@ tabs:
|
||||||
- "1/1"
|
- "1/1"
|
||||||
- "1/2, 1/2"
|
- "1/2, 1/2"
|
||||||
fieldsets:
|
fieldsets:
|
||||||
- text
|
|
||||||
- heading
|
- heading
|
||||||
|
- text
|
||||||
- image
|
- image
|
||||||
- video
|
|
||||||
- beforeafter
|
- beforeafter
|
||||||
- horizontalgallery
|
- video
|
||||||
|
- horizontal-gallery
|
||||||
- width: 1/6
|
- width: 1/6
|
||||||
fields:
|
fields:
|
||||||
emptyRight:
|
emptyRight:
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
name: Galerie horizontale
|
name: Galerie horizontale
|
||||||
icon: images
|
icon: images
|
||||||
preview: horizontalgallery
|
preview: horizontal-gallery
|
||||||
fields:
|
fields:
|
||||||
images:
|
images:
|
||||||
label: Images
|
label: Images
|
||||||
|
|
@ -1 +1 @@
|
||||||
(function(){"use strict";function r(l,e,t,a,n,s,v,d){var i=typeof l=="function"?l.options:l;return e&&(i.render=e,i.staticRenderFns=t,i._compiled=!0),i._scopeId="data-v-"+s,{exports:l,options:i}}const o={__name:"HorizontalGalleryBlock",props:{content:Object},setup(l){const e=l,t=Vue.computed(()=>{var a;return!((a=e.content)!=null&&a.images)||!e.content.images.length?[]:e.content.images.map(n=>({url:n.url,caption:n.text||n.caption||null}))});return{__sfc:!0,props:e,images:t}}};var c=function(){var e=this,t=e._self._c,a=e._self._setupProxy;return t("div",{staticClass:"hgallery-preview",on:{click:function(n){return e.$emit("open")}}},[t("div",{staticClass:"hgallery-preview__container"},[t("div",{staticClass:"hgallery-preview__gallery"},[a.images.length>0?t("div",{staticClass:"hgallery-preview__scroll"},e._l(a.images,function(n,s){return t("div",{key:s,staticClass:"hgallery-preview__slide"},[t("img",{attrs:{src:n.url,alt:n.caption||"Image"}}),n.caption?t("p",{staticClass:"hgallery-preview__caption"},[e._v(" "+e._s(n.caption)+" ")]):e._e()])}),0):t("div",{staticClass:"hgallery-preview__empty"},[e._v(" Aucune image sélectionnée ")])]),e.content.text?t("div",{staticClass:"hgallery-preview__text"},[t("div",{domProps:{innerHTML:e._s(e.content.text)}})]):e._e()])])},_=[],p=r(o,c,_,!1,null,"9cf511cf");const u=p.exports;window.panel.plugin("index/horizontal-gallery",{blocks:{horizontalgallery:u}})})();
|
(function(){"use strict";function r(l,e,t,a,n,s,v,d){var i=typeof l=="function"?l.options:l;return e&&(i.render=e,i.staticRenderFns=t,i._compiled=!0),i._scopeId="data-v-"+s,{exports:l,options:i}}const o={__name:"HorizontalGalleryBlock",props:{content:Object},setup(l){const e=l,t=Vue.computed(()=>{var a;return!((a=e.content)!=null&&a.images)||!e.content.images.length?[]:e.content.images.map(n=>({url:n.url,caption:n.text||n.caption||null}))});return{__sfc:!0,props:e,images:t}}};var c=function(){var e=this,t=e._self._c,a=e._self._setupProxy;return t("div",{staticClass:"hgallery-preview",on:{click:function(n){return e.$emit("open")}}},[t("div",{staticClass:"hgallery-preview__container"},[t("div",{staticClass:"hgallery-preview__gallery"},[a.images.length>0?t("div",{staticClass:"hgallery-preview__scroll"},e._l(a.images,function(n,s){return t("div",{key:s,staticClass:"hgallery-preview__slide"},[t("img",{attrs:{src:n.url,alt:n.caption||"Image"}}),n.caption?t("p",{staticClass:"hgallery-preview__caption"},[e._v(" "+e._s(n.caption)+" ")]):e._e()])}),0):t("div",{staticClass:"hgallery-preview__empty"},[e._v(" Aucune image sélectionnée ")])]),e.content.text?t("div",{staticClass:"hgallery-preview__text"},[t("div",{domProps:{innerHTML:e._s(e.content.text)}})]):e._e()])])},_=[],p=r(o,c,_,!1,null,"9cf511cf");const u=p.exports;window.panel.plugin("index/horizontal-gallery",{blocks:{"horizontal-gallery":u}})})();
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,9 @@
|
||||||
|
|
||||||
Kirby::plugin('index/horizontal-gallery', [
|
Kirby::plugin('index/horizontal-gallery', [
|
||||||
'blueprints' => [
|
'blueprints' => [
|
||||||
'blocks/horizontalgallery' => __DIR__ . '/blueprints/blocks/horizontalgallery.yml'
|
'blocks/horizontal-gallery' => __DIR__ . '/blueprints/blocks/horizontal-gallery.yml'
|
||||||
],
|
],
|
||||||
'snippets' => [
|
'snippets' => [
|
||||||
'blocks/horizontalgallery' => __DIR__ . '/snippets/blocks/horizontalgallery.php'
|
'blocks/horizontal-gallery' => __DIR__ . '/snippets/blocks/horizontal-gallery.php'
|
||||||
]
|
]
|
||||||
]);
|
]);
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,6 @@ import HorizontalGalleryBlock from "./components/HorizontalGalleryBlock.vue";
|
||||||
|
|
||||||
window.panel.plugin("index/horizontal-gallery", {
|
window.panel.plugin("index/horizontal-gallery", {
|
||||||
blocks: {
|
blocks: {
|
||||||
horizontalgallery: HorizontalGalleryBlock
|
"horizontal-gallery": HorizontalGalleryBlock
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue