diff --git a/src/templates/items-list/layouts/slider/bullets.php b/templates/items-list/layouts/slider/bullets.php
similarity index 82%
rename from src/templates/items-list/layouts/slider/bullets.php
rename to templates/items-list/layouts/slider/bullets.php
index 8af2caaa..b66e1c9d 100644
--- a/src/templates/items-list/layouts/slider/bullets.php
+++ b/templates/items-list/layouts/slider/bullets.php
@@ -5,11 +5,11 @@
* @var $options
* @var $style_options
*
- * @package @@plugin_name
+ * @package visual-portfolio
*/
if ( ! defined( 'ABSPATH' ) ) {
- exit;
+ exit;
}
?>
diff --git a/templates/items-list/layouts/slider/thumbnails.php b/templates/items-list/layouts/slider/thumbnails.php
new file mode 100644
index 00000000..a8df9443
--- /dev/null
+++ b/templates/items-list/layouts/slider/thumbnails.php
@@ -0,0 +1,45 @@
+
+
+
diff --git a/templates/items-list/pagination/_variables.scss b/templates/items-list/pagination/_variables.scss
new file mode 100644
index 00000000..dd4d608b
--- /dev/null
+++ b/templates/items-list/pagination/_variables.scss
@@ -0,0 +1,27 @@
+/**
+ * Pagination Default CSS Variables
+ */
+.vp-pagination__style-default {
+ // Items.
+ --vp-pagination-default--items__gap: 10px;
+ --vp-pagination-default--items__min-width: 40px;
+ --vp-pagination-default--items__padding-v: 0.7em;
+ --vp-pagination-default--items__padding-h: 1.3em;
+ --vp-pagination-default--items__font-size: 0.9em;
+ --vp-pagination-default--items__font-weight: 600;
+ --vp-pagination-default--items__line-height: 1.4;
+ --vp-pagination-default--items__text-decoration: none;
+ --vp-pagination-default--items__text-transform: uppercase;
+ --vp-pagination-default--items__letter-spacing: 0.015em;
+ --vp-pagination-default--items__color: var(--vp-color-gray);
+ --vp-pagination-default--items__background-color: var(--vp-color-gray-lighten);
+ --vp-pagination-default--items__border-radius: var(--vp-border-radius);
+ --vp-pagination-default--items-hover__color: var(--vp-color-gray-darken);
+ --vp-pagination-default--items-hover__background-color: var(--vp-color-gray-light);
+ --vp-pagination-default--items-active__color: #fff;
+ --vp-pagination-default--items-active__background-color: var(--vp-color-brand);
+
+ // Transitions.
+ --vp-pagination-default-transition-duration: var(--vp-interactive__transition-duration);
+ --vp-pagination-default-transition-easing: var(--vp-interactive__transition-easing);
+}
diff --git a/templates/items-list/pagination/infinite.php b/templates/items-list/pagination/infinite.php
new file mode 100644
index 00000000..332e83ff
--- /dev/null
+++ b/templates/items-list/pagination/infinite.php
@@ -0,0 +1,24 @@
+
+
+
diff --git a/templates/items-list/pagination/load-more.php b/templates/items-list/pagination/load-more.php
new file mode 100644
index 00000000..41bc0b85
--- /dev/null
+++ b/templates/items-list/pagination/load-more.php
@@ -0,0 +1,24 @@
+
+
+
diff --git a/templates/items-list/pagination/minimal/_variables.scss b/templates/items-list/pagination/minimal/_variables.scss
new file mode 100644
index 00000000..2ab63b0e
--- /dev/null
+++ b/templates/items-list/pagination/minimal/_variables.scss
@@ -0,0 +1,29 @@
+/**
+ * Pagination Minimal CSS Variables
+ */
+.vp-pagination__style-minimal {
+ // Items.
+ --vp-pagination-minimal--items__padding-v: 0.7em;
+ --vp-pagination-minimal--items__padding-h: 1em;
+ --vp-pagination-minimal--items__font-size: 0.9em;
+ --vp-pagination-minimal--items__font-weight: 600;
+ --vp-pagination-minimal--items__line-height: 1.4;
+ --vp-pagination-minimal--items__text-decoration: none;
+ --vp-pagination-minimal--items__text-transform: uppercase;
+ --vp-pagination-minimal--items__letter-spacing: 0.015em;
+ --vp-pagination-minimal--items__color: inherit;
+ --vp-pagination-minimal--items-hover__color: var(--vp-color-brand);
+ --vp-pagination-minimal--items-active__color: var(--vp-color-brand);
+
+ // Items Paged.
+ --vp-pagination-minimal-paged--items-active__padding-v: var(--vp-pagination-minimal--items__padding-v);
+ --vp-pagination-minimal-paged--items-active__padding-h: var(--vp-pagination-minimal--items__padding-v);
+ --vp-pagination-minimal-paged--items-active__margin-h: calc(var(--vp-pagination-minimal--items__padding-h) / 3);
+ --vp-pagination-minimal-paged--items-active__color: #fff;
+ --vp-pagination-minimal-paged--items-active__background-color: var(--vp-color-brand);
+ --vp-pagination-minimal-paged--items-active__border-radius: 50%;
+
+ // Transitions.
+ --vp-pagination-minimal-transition-duration: var(--vp-interactive__transition-duration);
+ --vp-pagination-minimal-transition-easing: var(--vp-interactive__transition-easing);
+}
diff --git a/templates/items-list/pagination/minimal/infinite.php b/templates/items-list/pagination/minimal/infinite.php
new file mode 100644
index 00000000..1209f5c6
--- /dev/null
+++ b/templates/items-list/pagination/minimal/infinite.php
@@ -0,0 +1,24 @@
+
+
+
diff --git a/templates/items-list/pagination/minimal/load-more.php b/templates/items-list/pagination/minimal/load-more.php
new file mode 100644
index 00000000..e14b0cc6
--- /dev/null
+++ b/templates/items-list/pagination/minimal/load-more.php
@@ -0,0 +1,24 @@
+
+
+
diff --git a/templates/items-list/pagination/minimal/paged.php b/templates/items-list/pagination/minimal/paged.php
new file mode 100644
index 00000000..eefe200c
--- /dev/null
+++ b/templates/items-list/pagination/minimal/paged.php
@@ -0,0 +1,42 @@
+
+
+
diff --git a/templates/items-list/pagination/minimal/style-rtl.css b/templates/items-list/pagination/minimal/style-rtl.css
new file mode 100644
index 00000000..cba803a3
--- /dev/null
+++ b/templates/items-list/pagination/minimal/style-rtl.css
@@ -0,0 +1 @@
+.vp-pagination__style-minimal{--vp-pagination-minimal--items__padding-v:0.7em;--vp-pagination-minimal--items__padding-h:1em;--vp-pagination-minimal--items__font-size:0.9em;--vp-pagination-minimal--items__font-weight:600;--vp-pagination-minimal--items__line-height:1.4;--vp-pagination-minimal--items__text-decoration:none;--vp-pagination-minimal--items__text-transform:uppercase;--vp-pagination-minimal--items__letter-spacing:0.015em;--vp-pagination-minimal--items__color:inherit;--vp-pagination-minimal--items-hover__color:var(--vp-color-brand);--vp-pagination-minimal--items-active__color:var(--vp-color-brand);--vp-pagination-minimal-paged--items-active__padding-v:var(--vp-pagination-minimal--items__padding-v);--vp-pagination-minimal-paged--items-active__padding-h:var(--vp-pagination-minimal--items__padding-v);--vp-pagination-minimal-paged--items-active__margin-h:calc(var(--vp-pagination-minimal--items__padding-h)/3);--vp-pagination-minimal-paged--items-active__color:#fff;--vp-pagination-minimal-paged--items-active__background-color:var(--vp-color-brand);--vp-pagination-minimal-paged--items-active__border-radius:50%;--vp-pagination-minimal-transition-duration:var(--vp-interactive__transition-duration);--vp-pagination-minimal-transition-easing:var(--vp-interactive__transition-easing);display:flex;flex-wrap:wrap}.vp-pagination__style-minimal .vp-pagination__item a{box-shadow:none;outline:none}.vp-portfolio__layout-elements-align-left .vp-pagination__style-minimal{justify-content:flex-start}.vp-portfolio__layout-elements-align-center .vp-pagination__style-minimal{justify-content:center}.vp-portfolio__layout-elements-align-right .vp-pagination__style-minimal{justify-content:flex-end}.vp-pagination__style-minimal .vp-pagination__item{flex:0 0 auto;text-align:center}.vp-pagination__style-minimal .vp-pagination__item>*{color:var(--vp-pagination-minimal--items__color);display:block;font-size:var(--vp-pagination-minimal--items__font-size);font-weight:var(--vp-pagination-minimal--items__font-weight);letter-spacing:var(--vp-pagination-minimal--items__letter-spacing);line-height:var(--vp-pagination-minimal--items__line-height);padding:var(--vp-pagination-minimal--items__padding-v) var(--vp-pagination-minimal--items__padding-h);-webkit-text-decoration:var(--vp-pagination-minimal--items__text-decoration);text-decoration:var(--vp-pagination-minimal--items__text-decoration);text-transform:var(--vp-pagination-minimal--items__text-transform);transition:var(--vp-pagination-minimal-transition-duration) color var(--vp-pagination-minimal-transition-easing)}.vp-pagination__style-minimal .vp-pagination__item>a:focus,.vp-pagination__style-minimal .vp-pagination__item>a:hover{color:var(--vp-pagination-minimal--items-hover__color)}.vp-pagination__style-minimal .vp-pagination__item.vp-pagination__item-active{--vp-pagination-minimal--items__color:var(--vp-pagination-minimal--items-active__color);--vp-pagination-minimal--items-hover__color:var(--vp-pagination-minimal--items-active__color)}.vp-pagination__style-minimal .vp-pagination__item.vp-pagination__item-active>*{cursor:default}.vp-pagination__style-minimal .vp-pagination__load-more>.vp-pagination__load-more-loading,.vp-pagination__style-minimal .vp-pagination__load-more>.vp-pagination__load-more-no-more,.vp-pagination__style-minimal.vp-pagination__no-more .vp-pagination__load-more>span,.vp-portfolio__loading .vp-pagination__style-minimal .vp-pagination__load-more>span,.vp-portfolio__loading .vp-pagination__style-minimal.vp-pagination__no-more .vp-pagination__load-more>.vp-pagination__load-more-no-more{display:none}.vp-pagination__style-minimal .vp-pagination__load-more>span,.vp-pagination__style-minimal.vp-pagination__no-more .vp-pagination__load-more>.vp-pagination__load-more-no-more,.vp-portfolio__loading .vp-pagination__style-minimal .vp-pagination__load-more>.vp-pagination__load-more-loading{display:block}.vp-pagination__style-minimal.vp-pagination__no-more .vp-pagination__load-more,.vp-portfolio__loading .vp-pagination__style-minimal .vp-pagination__load-more{background-color:transparent;border:none;cursor:default;pointer-events:none;transition:none}.vp-pagination__style-minimal.vp-pagination__no-more .vp-pagination__load-more{opacity:.5}.vp-pagination__style-minimal[data-vp-pagination-type=paged] .vp-pagination__item-active{margin-right:var(--vp-pagination-minimal-paged--items-active__margin-h);margin-left:var(--vp-pagination-minimal-paged--items-active__margin-h);position:relative}.vp-pagination__style-minimal[data-vp-pagination-type=paged] .vp-pagination__item-active>img{height:100%;max-width:none;opacity:0;padding:0;text-align:right;width:auto}.vp-pagination__style-minimal[data-vp-pagination-type=paged] .vp-pagination__item-active>img+span{align-items:center;background-color:var(--vp-pagination-minimal-paged--items-active__background-color);border-radius:var(--vp-pagination-minimal-paged--items-active__border-radius);color:var(--vp-pagination-minimal-paged--items-active__color);display:flex;height:100%;justify-content:center;min-width:0;padding:var(--vp-pagination-minimal-paged--items-active__padding-v) var(--vp-pagination-minimal-paged--items-active__padding-h);position:absolute;top:0;width:100%}
diff --git a/templates/items-list/pagination/minimal/style.css b/templates/items-list/pagination/minimal/style.css
new file mode 100644
index 00000000..327ad66f
--- /dev/null
+++ b/templates/items-list/pagination/minimal/style.css
@@ -0,0 +1 @@
+.vp-pagination__style-minimal{--vp-pagination-minimal--items__padding-v:0.7em;--vp-pagination-minimal--items__padding-h:1em;--vp-pagination-minimal--items__font-size:0.9em;--vp-pagination-minimal--items__font-weight:600;--vp-pagination-minimal--items__line-height:1.4;--vp-pagination-minimal--items__text-decoration:none;--vp-pagination-minimal--items__text-transform:uppercase;--vp-pagination-minimal--items__letter-spacing:0.015em;--vp-pagination-minimal--items__color:inherit;--vp-pagination-minimal--items-hover__color:var(--vp-color-brand);--vp-pagination-minimal--items-active__color:var(--vp-color-brand);--vp-pagination-minimal-paged--items-active__padding-v:var(--vp-pagination-minimal--items__padding-v);--vp-pagination-minimal-paged--items-active__padding-h:var(--vp-pagination-minimal--items__padding-v);--vp-pagination-minimal-paged--items-active__margin-h:calc(var(--vp-pagination-minimal--items__padding-h)/3);--vp-pagination-minimal-paged--items-active__color:#fff;--vp-pagination-minimal-paged--items-active__background-color:var(--vp-color-brand);--vp-pagination-minimal-paged--items-active__border-radius:50%;--vp-pagination-minimal-transition-duration:var(--vp-interactive__transition-duration);--vp-pagination-minimal-transition-easing:var(--vp-interactive__transition-easing);display:flex;flex-wrap:wrap}.vp-pagination__style-minimal .vp-pagination__item a{box-shadow:none;outline:none}.vp-portfolio__layout-elements-align-left .vp-pagination__style-minimal{justify-content:flex-start}.vp-portfolio__layout-elements-align-center .vp-pagination__style-minimal{justify-content:center}.vp-portfolio__layout-elements-align-right .vp-pagination__style-minimal{justify-content:flex-end}.vp-pagination__style-minimal .vp-pagination__item{flex:0 0 auto;text-align:center}.vp-pagination__style-minimal .vp-pagination__item>*{color:var(--vp-pagination-minimal--items__color);display:block;font-size:var(--vp-pagination-minimal--items__font-size);font-weight:var(--vp-pagination-minimal--items__font-weight);letter-spacing:var(--vp-pagination-minimal--items__letter-spacing);line-height:var(--vp-pagination-minimal--items__line-height);padding:var(--vp-pagination-minimal--items__padding-v) var(--vp-pagination-minimal--items__padding-h);-webkit-text-decoration:var(--vp-pagination-minimal--items__text-decoration);text-decoration:var(--vp-pagination-minimal--items__text-decoration);text-transform:var(--vp-pagination-minimal--items__text-transform);transition:var(--vp-pagination-minimal-transition-duration) color var(--vp-pagination-minimal-transition-easing)}.vp-pagination__style-minimal .vp-pagination__item>a:focus,.vp-pagination__style-minimal .vp-pagination__item>a:hover{color:var(--vp-pagination-minimal--items-hover__color)}.vp-pagination__style-minimal .vp-pagination__item.vp-pagination__item-active{--vp-pagination-minimal--items__color:var(--vp-pagination-minimal--items-active__color);--vp-pagination-minimal--items-hover__color:var(--vp-pagination-minimal--items-active__color)}.vp-pagination__style-minimal .vp-pagination__item.vp-pagination__item-active>*{cursor:default}.vp-pagination__style-minimal .vp-pagination__load-more>.vp-pagination__load-more-loading,.vp-pagination__style-minimal .vp-pagination__load-more>.vp-pagination__load-more-no-more,.vp-pagination__style-minimal.vp-pagination__no-more .vp-pagination__load-more>span,.vp-portfolio__loading .vp-pagination__style-minimal .vp-pagination__load-more>span,.vp-portfolio__loading .vp-pagination__style-minimal.vp-pagination__no-more .vp-pagination__load-more>.vp-pagination__load-more-no-more{display:none}.vp-pagination__style-minimal .vp-pagination__load-more>span,.vp-pagination__style-minimal.vp-pagination__no-more .vp-pagination__load-more>.vp-pagination__load-more-no-more,.vp-portfolio__loading .vp-pagination__style-minimal .vp-pagination__load-more>.vp-pagination__load-more-loading{display:block}.vp-pagination__style-minimal.vp-pagination__no-more .vp-pagination__load-more,.vp-portfolio__loading .vp-pagination__style-minimal .vp-pagination__load-more{background-color:transparent;border:none;cursor:default;pointer-events:none;transition:none}.vp-pagination__style-minimal.vp-pagination__no-more .vp-pagination__load-more{opacity:.5}.vp-pagination__style-minimal[data-vp-pagination-type=paged] .vp-pagination__item-active{margin-left:var(--vp-pagination-minimal-paged--items-active__margin-h);margin-right:var(--vp-pagination-minimal-paged--items-active__margin-h);position:relative}.vp-pagination__style-minimal[data-vp-pagination-type=paged] .vp-pagination__item-active>img{height:100%;max-width:none;opacity:0;padding:0;text-align:left;width:auto}.vp-pagination__style-minimal[data-vp-pagination-type=paged] .vp-pagination__item-active>img+span{align-items:center;background-color:var(--vp-pagination-minimal-paged--items-active__background-color);border-radius:var(--vp-pagination-minimal-paged--items-active__border-radius);color:var(--vp-pagination-minimal-paged--items-active__color);display:flex;height:100%;justify-content:center;min-width:0;padding:var(--vp-pagination-minimal-paged--items-active__padding-v) var(--vp-pagination-minimal-paged--items-active__padding-h);position:absolute;top:0;width:100%}
diff --git a/templates/items-list/pagination/minimal/style.scss b/templates/items-list/pagination/minimal/style.scss
new file mode 100644
index 00000000..0e1837fd
--- /dev/null
+++ b/templates/items-list/pagination/minimal/style.scss
@@ -0,0 +1,131 @@
+@import "./variables";
+
+/**
+ * Minimal pagination style
+ */
+.vp-pagination__style-minimal {
+ display: flex;
+ flex-wrap: wrap;
+
+ .vp-pagination__item a {
+ outline: none;
+ box-shadow: none;
+ }
+
+ // align
+ .vp-portfolio__layout-elements-align-left & {
+ justify-content: flex-start;
+ }
+
+ .vp-portfolio__layout-elements-align-center & {
+ justify-content: center;
+ }
+
+ .vp-portfolio__layout-elements-align-right & {
+ justify-content: flex-end;
+ }
+
+ .vp-pagination__item {
+ flex: 0 0 auto;
+ text-align: center;
+
+ > * {
+ display: block;
+ padding: var(--vp-pagination-minimal--items__padding-v) var(--vp-pagination-minimal--items__padding-h);
+ font-size: var(--vp-pagination-minimal--items__font-size);
+ font-weight: var(--vp-pagination-minimal--items__font-weight);
+ line-height: var(--vp-pagination-minimal--items__line-height);
+ color: var(--vp-pagination-minimal--items__color);
+ text-decoration: var(--vp-pagination-minimal--items__text-decoration);
+ text-transform: var(--vp-pagination-minimal--items__text-transform);
+ letter-spacing: var(--vp-pagination-minimal--items__letter-spacing);
+ transition: var(--vp-pagination-minimal-transition-duration) color var(--vp-pagination-minimal-transition-easing);
+ }
+
+ > a:hover,
+ > a:focus {
+ color: var(--vp-pagination-minimal--items-hover__color);
+ }
+
+ &.vp-pagination__item-active {
+ --vp-pagination-minimal--items__color: var(--vp-pagination-minimal--items-active__color);
+ --vp-pagination-minimal--items-hover__color: var(--vp-pagination-minimal--items-active__color);
+
+ > * {
+ cursor: default;
+ }
+ }
+ }
+
+ // show/hide labels
+ .vp-pagination__load-more > .vp-pagination__load-more-no-more,
+ .vp-pagination__load-more > .vp-pagination__load-more-loading,
+ .vp-portfolio__loading & .vp-pagination__load-more > span,
+ &.vp-pagination__no-more .vp-pagination__load-more > span,
+ .vp-portfolio__loading &.vp-pagination__no-more .vp-pagination__load-more > .vp-pagination__load-more-no-more {
+ display: none;
+ }
+
+ .vp-pagination__load-more > span,
+ .vp-portfolio__loading & .vp-pagination__load-more > .vp-pagination__load-more-loading,
+ &.vp-pagination__no-more .vp-pagination__load-more > .vp-pagination__load-more-no-more {
+ display: block;
+ }
+
+ // disable no more and loading buttons
+ &.vp-pagination__no-more .vp-pagination__load-more,
+ .vp-portfolio__loading & .vp-pagination__load-more {
+ pointer-events: none;
+ cursor: default;
+ background-color: transparent;
+ border: none;
+ transition: none;
+ }
+
+ &.vp-pagination__no-more .vp-pagination__load-more {
+ opacity: 0.5;
+ }
+
+ // Paged.
+ &[data-vp-pagination-type="paged"] .vp-pagination__item-active {
+ position: relative;
+ margin-right: var(--vp-pagination-minimal-paged--items-active__margin-h);
+ margin-left: var(--vp-pagination-minimal-paged--items-active__margin-h);
+
+ // We use this image for the hack to make active item circle instead of square.
+ //
added in script /assets/js/pagination-minimal-paged.js
+ > img {
+ width: auto;
+ max-width: none;
+ height: 100%;
+ padding: 0;
+ text-align: left;
+ opacity: 0;
+
+ + span {
+ position: absolute;
+ top: 0;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ width: 100%;
+ min-width: 0;
+ height: 100%;
+ padding: var(--vp-pagination-minimal-paged--items-active__padding-v) var(--vp-pagination-minimal-paged--items-active__padding-h);
+ color: var(--vp-pagination-minimal-paged--items-active__color);
+ background-color: var(--vp-pagination-minimal-paged--items-active__background-color);
+ border-radius: var(--vp-pagination-minimal-paged--items-active__border-radius);
+ }
+ }
+ }
+
+ // Paged for RTL.
+ @if variable-exists(rtl) and $rtl {
+ &[data-vp-pagination-type="paged"] {
+ .vp-pagination__item-next svg,
+ .vp-pagination__item-prev svg {
+ transform: scaleX(-1);
+ }
+ }
+ }
+}
diff --git a/templates/items-list/pagination/paged.php b/templates/items-list/pagination/paged.php
new file mode 100644
index 00000000..39da41b3
--- /dev/null
+++ b/templates/items-list/pagination/paged.php
@@ -0,0 +1,46 @@
+
+
+
diff --git a/templates/items-list/pagination/style-rtl.css b/templates/items-list/pagination/style-rtl.css
new file mode 100644
index 00000000..18e47a2b
--- /dev/null
+++ b/templates/items-list/pagination/style-rtl.css
@@ -0,0 +1 @@
+.vp-pagination__style-default{--vp-pagination-default--items__gap:10px;--vp-pagination-default--items__min-width:40px;--vp-pagination-default--items__padding-v:0.7em;--vp-pagination-default--items__padding-h:1.3em;--vp-pagination-default--items__font-size:0.9em;--vp-pagination-default--items__font-weight:600;--vp-pagination-default--items__line-height:1.4;--vp-pagination-default--items__text-decoration:none;--vp-pagination-default--items__text-transform:uppercase;--vp-pagination-default--items__letter-spacing:0.015em;--vp-pagination-default--items__color:var(--vp-color-gray);--vp-pagination-default--items__background-color:var(--vp-color-gray-lighten);--vp-pagination-default--items__border-radius:var(--vp-border-radius);--vp-pagination-default--items-hover__color:var(--vp-color-gray-darken);--vp-pagination-default--items-hover__background-color:var(--vp-color-gray-light);--vp-pagination-default--items-active__color:#fff;--vp-pagination-default--items-active__background-color:var(--vp-color-brand);--vp-pagination-default-transition-duration:var(--vp-interactive__transition-duration);--vp-pagination-default-transition-easing:var(--vp-interactive__transition-easing);display:flex;flex-wrap:wrap;gap:var(--vp-pagination-default--items__gap)}.vp-pagination__style-default .vp-pagination__item a{box-shadow:none;outline:none}.vp-portfolio__layout-elements-align-left .vp-pagination__style-default{justify-content:flex-start}.vp-portfolio__layout-elements-align-center .vp-pagination__style-default{justify-content:center}.vp-portfolio__layout-elements-align-right .vp-pagination__style-default{justify-content:flex-end}.vp-pagination__style-default .vp-pagination__item{flex:0 0 auto;max-width:100%;text-align:center}.vp-pagination__style-default .vp-pagination__item>*{background-color:var(--vp-pagination-default--items__background-color);border-radius:var(--vp-pagination-default--items__border-radius);color:var(--vp-pagination-default--items__color);display:block;font-size:var(--vp-pagination-default--items__font-size);font-weight:var(--vp-pagination-default--items__font-weight);letter-spacing:var(--vp-pagination-default--items__letter-spacing);line-height:var(--vp-pagination-default--items__line-height);min-width:var(--vp-pagination-default--items__min-width);padding:var(--vp-pagination-default--items__padding-v) var(--vp-pagination-default--items__padding-h);-webkit-text-decoration:var(--vp-pagination-default--items__text-decoration);text-decoration:var(--vp-pagination-default--items__text-decoration);text-transform:var(--vp-pagination-default--items__text-transform);transition:var(--vp-pagination-default-transition-duration) background-color var(--vp-pagination-default-transition-easing),var(--vp-pagination-default-transition-duration) color var(--vp-pagination-default-transition-easing)}.vp-pagination__style-default .vp-pagination__item>a:focus,.vp-pagination__style-default .vp-pagination__item>a:hover{background-color:var(--vp-pagination-default--items-hover__background-color);color:var(--vp-pagination-default--items-hover__color)}.vp-pagination__style-default .vp-pagination__item.vp-pagination__item-active{--vp-pagination-default--items__color:var(--vp-pagination-default--items-active__color);--vp-pagination-default--items__background-color:var(--vp-pagination-default--items-active__background-color);--vp-pagination-default--items-hover__color:var(--vp-pagination-default--items-active__color);--vp-pagination-default--items-hover__background-color:var(--vp-pagination-default--items-active__background-color)}.vp-pagination__style-default .vp-pagination__item.vp-pagination__item-active>*{cursor:default}.vp-pagination__style-default .vp-pagination__load-more>.vp-pagination__load-more-loading,.vp-pagination__style-default .vp-pagination__load-more>.vp-pagination__load-more-no-more,.vp-pagination__style-default.vp-pagination__no-more .vp-pagination__load-more>span,.vp-portfolio__loading .vp-pagination__style-default .vp-pagination__load-more>span,.vp-portfolio__loading .vp-pagination__style-default.vp-pagination__no-more .vp-pagination__load-more>.vp-pagination__load-more-no-more{display:none}.vp-pagination__style-default .vp-pagination__load-more>span,.vp-pagination__style-default.vp-pagination__no-more .vp-pagination__load-more>.vp-pagination__load-more-no-more,.vp-portfolio__loading .vp-pagination__style-default .vp-pagination__load-more>.vp-pagination__load-more-loading{display:block}.vp-pagination__style-default.vp-pagination__no-more .vp-pagination__load-more,.vp-portfolio__loading .vp-pagination__style-default .vp-pagination__load-more{background-color:transparent!important;border:none;cursor:default;outline:none!important;pointer-events:none;transition:none}.vp-pagination__style-default.vp-pagination__no-more .vp-pagination__load-more{opacity:.5}
diff --git a/templates/items-list/pagination/style.css b/templates/items-list/pagination/style.css
new file mode 100644
index 00000000..18e47a2b
--- /dev/null
+++ b/templates/items-list/pagination/style.css
@@ -0,0 +1 @@
+.vp-pagination__style-default{--vp-pagination-default--items__gap:10px;--vp-pagination-default--items__min-width:40px;--vp-pagination-default--items__padding-v:0.7em;--vp-pagination-default--items__padding-h:1.3em;--vp-pagination-default--items__font-size:0.9em;--vp-pagination-default--items__font-weight:600;--vp-pagination-default--items__line-height:1.4;--vp-pagination-default--items__text-decoration:none;--vp-pagination-default--items__text-transform:uppercase;--vp-pagination-default--items__letter-spacing:0.015em;--vp-pagination-default--items__color:var(--vp-color-gray);--vp-pagination-default--items__background-color:var(--vp-color-gray-lighten);--vp-pagination-default--items__border-radius:var(--vp-border-radius);--vp-pagination-default--items-hover__color:var(--vp-color-gray-darken);--vp-pagination-default--items-hover__background-color:var(--vp-color-gray-light);--vp-pagination-default--items-active__color:#fff;--vp-pagination-default--items-active__background-color:var(--vp-color-brand);--vp-pagination-default-transition-duration:var(--vp-interactive__transition-duration);--vp-pagination-default-transition-easing:var(--vp-interactive__transition-easing);display:flex;flex-wrap:wrap;gap:var(--vp-pagination-default--items__gap)}.vp-pagination__style-default .vp-pagination__item a{box-shadow:none;outline:none}.vp-portfolio__layout-elements-align-left .vp-pagination__style-default{justify-content:flex-start}.vp-portfolio__layout-elements-align-center .vp-pagination__style-default{justify-content:center}.vp-portfolio__layout-elements-align-right .vp-pagination__style-default{justify-content:flex-end}.vp-pagination__style-default .vp-pagination__item{flex:0 0 auto;max-width:100%;text-align:center}.vp-pagination__style-default .vp-pagination__item>*{background-color:var(--vp-pagination-default--items__background-color);border-radius:var(--vp-pagination-default--items__border-radius);color:var(--vp-pagination-default--items__color);display:block;font-size:var(--vp-pagination-default--items__font-size);font-weight:var(--vp-pagination-default--items__font-weight);letter-spacing:var(--vp-pagination-default--items__letter-spacing);line-height:var(--vp-pagination-default--items__line-height);min-width:var(--vp-pagination-default--items__min-width);padding:var(--vp-pagination-default--items__padding-v) var(--vp-pagination-default--items__padding-h);-webkit-text-decoration:var(--vp-pagination-default--items__text-decoration);text-decoration:var(--vp-pagination-default--items__text-decoration);text-transform:var(--vp-pagination-default--items__text-transform);transition:var(--vp-pagination-default-transition-duration) background-color var(--vp-pagination-default-transition-easing),var(--vp-pagination-default-transition-duration) color var(--vp-pagination-default-transition-easing)}.vp-pagination__style-default .vp-pagination__item>a:focus,.vp-pagination__style-default .vp-pagination__item>a:hover{background-color:var(--vp-pagination-default--items-hover__background-color);color:var(--vp-pagination-default--items-hover__color)}.vp-pagination__style-default .vp-pagination__item.vp-pagination__item-active{--vp-pagination-default--items__color:var(--vp-pagination-default--items-active__color);--vp-pagination-default--items__background-color:var(--vp-pagination-default--items-active__background-color);--vp-pagination-default--items-hover__color:var(--vp-pagination-default--items-active__color);--vp-pagination-default--items-hover__background-color:var(--vp-pagination-default--items-active__background-color)}.vp-pagination__style-default .vp-pagination__item.vp-pagination__item-active>*{cursor:default}.vp-pagination__style-default .vp-pagination__load-more>.vp-pagination__load-more-loading,.vp-pagination__style-default .vp-pagination__load-more>.vp-pagination__load-more-no-more,.vp-pagination__style-default.vp-pagination__no-more .vp-pagination__load-more>span,.vp-portfolio__loading .vp-pagination__style-default .vp-pagination__load-more>span,.vp-portfolio__loading .vp-pagination__style-default.vp-pagination__no-more .vp-pagination__load-more>.vp-pagination__load-more-no-more{display:none}.vp-pagination__style-default .vp-pagination__load-more>span,.vp-pagination__style-default.vp-pagination__no-more .vp-pagination__load-more>.vp-pagination__load-more-no-more,.vp-portfolio__loading .vp-pagination__style-default .vp-pagination__load-more>.vp-pagination__load-more-loading{display:block}.vp-pagination__style-default.vp-pagination__no-more .vp-pagination__load-more,.vp-portfolio__loading .vp-pagination__style-default .vp-pagination__load-more{background-color:transparent!important;border:none;cursor:default;outline:none!important;pointer-events:none;transition:none}.vp-pagination__style-default.vp-pagination__no-more .vp-pagination__load-more{opacity:.5}
diff --git a/templates/items-list/pagination/style.scss b/templates/items-list/pagination/style.scss
new file mode 100644
index 00000000..72c88c8d
--- /dev/null
+++ b/templates/items-list/pagination/style.scss
@@ -0,0 +1,108 @@
+@import "./variables";
+
+/**
+ * Default pagination style
+ */
+.vp-pagination__style-default {
+ display: flex;
+ flex-wrap: wrap;
+ gap: var(--vp-pagination-default--items__gap);
+
+ .vp-pagination__item a {
+ outline: none;
+ box-shadow: none;
+ }
+
+ // align
+ .vp-portfolio__layout-elements-align-left & {
+ justify-content: flex-start;
+ }
+
+ .vp-portfolio__layout-elements-align-center & {
+ justify-content: center;
+ }
+
+ .vp-portfolio__layout-elements-align-right & {
+ justify-content: flex-end;
+ }
+
+ .vp-pagination__item {
+ flex: 0 0 auto;
+ max-width: 100%;
+ text-align: center;
+
+ > * {
+ display: block;
+ min-width: var(--vp-pagination-default--items__min-width);
+ padding: var(--vp-pagination-default--items__padding-v) var(--vp-pagination-default--items__padding-h);
+ font-size: var(--vp-pagination-default--items__font-size);
+ font-weight: var(--vp-pagination-default--items__font-weight);
+ line-height: var(--vp-pagination-default--items__line-height);
+ color: var(--vp-pagination-default--items__color);
+ text-decoration: var(--vp-pagination-default--items__text-decoration);
+ text-transform: var(--vp-pagination-default--items__text-transform);
+ letter-spacing: var(--vp-pagination-default--items__letter-spacing);
+ background-color: var(--vp-pagination-default--items__background-color);
+ border-radius: var(--vp-pagination-default--items__border-radius);
+ transition: var(--vp-pagination-default-transition-duration) background-color var(--vp-pagination-default-transition-easing), var(--vp-pagination-default-transition-duration) color var(--vp-pagination-default-transition-easing);
+ }
+
+ > a:hover,
+ > a:focus {
+ color: var(--vp-pagination-default--items-hover__color);
+ background-color: var(--vp-pagination-default--items-hover__background-color);
+ }
+
+ &.vp-pagination__item-active {
+ --vp-pagination-default--items__color: var(--vp-pagination-default--items-active__color);
+ --vp-pagination-default--items__background-color: var(--vp-pagination-default--items-active__background-color);
+ --vp-pagination-default--items-hover__color: var(--vp-pagination-default--items-active__color);
+ --vp-pagination-default--items-hover__background-color: var(--vp-pagination-default--items-active__background-color);
+
+ > * {
+ cursor: default;
+ }
+ }
+ }
+
+ // show/hide labels
+ .vp-pagination__load-more > .vp-pagination__load-more-no-more,
+ .vp-pagination__load-more > .vp-pagination__load-more-loading,
+ .vp-portfolio__loading & .vp-pagination__load-more > span,
+ &.vp-pagination__no-more .vp-pagination__load-more > span,
+ .vp-portfolio__loading &.vp-pagination__no-more .vp-pagination__load-more > .vp-pagination__load-more-no-more {
+ display: none;
+ }
+
+ .vp-pagination__load-more > span,
+ .vp-portfolio__loading & .vp-pagination__load-more > .vp-pagination__load-more-loading,
+ &.vp-pagination__no-more .vp-pagination__load-more > .vp-pagination__load-more-no-more {
+ display: block;
+ }
+
+ // disable no more and loading buttons
+ &.vp-pagination__no-more .vp-pagination__load-more,
+ .vp-portfolio__loading & .vp-pagination__load-more {
+ pointer-events: none;
+ cursor: default;
+ // Important used to fix focused button background.
+ background-color: transparent !important;
+ border: none;
+ outline: none !important;
+ transition: none;
+ }
+
+ &.vp-pagination__no-more .vp-pagination__load-more {
+ opacity: 0.5;
+ }
+
+ // Paged for RTL.
+ @if variable-exists(rtl) and $rtl {
+ &[data-vp-pagination-type="paged"] {
+ .vp-pagination__item-next svg,
+ .vp-pagination__item-prev svg {
+ transform: scaleX(-1);
+ }
+ }
+ }
+}
diff --git a/templates/items-list/sort/_variables.scss b/templates/items-list/sort/_variables.scss
new file mode 100644
index 00000000..bfa30ea9
--- /dev/null
+++ b/templates/items-list/sort/_variables.scss
@@ -0,0 +1,31 @@
+/**
+ * Sort Default CSS Variables
+ */
+.vp-sort__style-default {
+ // Items.
+ --vp-sort-default--items__gap: 10px;
+ --vp-sort-default--items__min-width: 40px;
+ --vp-sort-default--items__padding-v: 0.7em;
+ --vp-sort-default--items__padding-h: 1.3em;
+ --vp-sort-default--items__font-size: 0.9em;
+ --vp-sort-default--items__font-weight: 600;
+ --vp-sort-default--items__line-height: 1.4;
+ --vp-sort-default--items__text-decoration: none;
+ --vp-sort-default--items__text-transform: uppercase;
+ --vp-sort-default--items__letter-spacing: 0.015em;
+ --vp-sort-default--items__color: var(--vp-color-gray);
+ --vp-sort-default--items__background-color: var(--vp-color-gray-lighten);
+ --vp-sort-default--items__border-radius: var(--vp-border-radius);
+ --vp-sort-default--items-hover__color: var(--vp-color-gray-darken);
+ --vp-sort-default--items-hover__background-color: var(--vp-color-gray-light);
+ --vp-sort-default--items-active__color: #fff;
+ --vp-sort-default--items-active__background-color: var(--vp-color-brand);
+
+ // Items Count.
+ --vp-sort-default--items-count__offset: 8px;
+ --vp-sort-default--items-count__font-size: 0.6em;
+
+ // Transitions.
+ --vp-sort-default-transition-duration: var(--vp-interactive__transition-duration);
+ --vp-sort-default-transition-easing: var(--vp-interactive__transition-easing);
+}
diff --git a/templates/items-list/sort/dropdown/_variables.scss b/templates/items-list/sort/dropdown/_variables.scss
new file mode 100644
index 00000000..4fac6a3e
--- /dev/null
+++ b/templates/items-list/sort/dropdown/_variables.scss
@@ -0,0 +1,30 @@
+/**
+ * Sort Dropdown CSS Variables
+ */
+.vp-sort__style-dropdown {
+ // Items.
+ --vp-sort-dropdown--items__gap: 6px;
+ --vp-sort-dropdown--items__min-width: 40px;
+ --vp-sort-dropdown--items__min-height: 2.7929em;
+ --vp-sort-dropdown--items__padding-v: 0.7em;
+ --vp-sort-dropdown--items__padding-h: 1.3em;
+ --vp-sort-dropdown--items__padding-right: 0.75em;
+ --vp-sort-dropdown--items__font-size: 0.9em;
+ --vp-sort-dropdown--items__font-weight: 600;
+ --vp-sort-dropdown--items__line-height: 1.4;
+ --vp-sort-dropdown--items__text-decoration: none;
+ --vp-sort-dropdown--items__text-transform: uppercase;
+ --vp-sort-dropdown--items__letter-spacing: 0.015em;
+ --vp-sort-dropdown--items__height: auto;
+ --vp-sort-dropdown--items__color: var(--vp-color-gray);
+ --vp-sort-dropdown--items__background-color: var(--vp-color-gray-lighten);
+ --vp-sort-dropdown--items__border-radius: var(--vp-border-radius);
+ --vp-sort-dropdown--items__arrow: url(data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e);
+ --vp-sort-dropdown--items__arrow-size: 0.6em;
+ --vp-sort-dropdown--items-hover__color: var(--vp-color-gray-darken);
+ --vp-sort-dropdown--items-hover__background-color: var(--vp-color-gray-light);
+
+ // Transitions.
+ --vp-sort-dropdown-transition-duration: var(--vp-interactive__transition-duration);
+ --vp-sort-dropdown-transition-easing: var(--vp-interactive__transition-easing);
+}
diff --git a/templates/items-list/sort/dropdown/sort.php b/templates/items-list/sort/dropdown/sort.php
new file mode 100644
index 00000000..ad137096
--- /dev/null
+++ b/templates/items-list/sort/dropdown/sort.php
@@ -0,0 +1,30 @@
+
+
+
diff --git a/templates/items-list/sort/dropdown/style-rtl.css b/templates/items-list/sort/dropdown/style-rtl.css
new file mode 100644
index 00000000..7c67b347
--- /dev/null
+++ b/templates/items-list/sort/dropdown/style-rtl.css
@@ -0,0 +1 @@
+.vp-sort__style-dropdown{--vp-sort-dropdown--items__gap:6px;--vp-sort-dropdown--items__min-width:40px;--vp-sort-dropdown--items__min-height:2.7929em;--vp-sort-dropdown--items__padding-v:0.7em;--vp-sort-dropdown--items__padding-h:1.3em;--vp-sort-dropdown--items__padding-right:0.75em;--vp-sort-dropdown--items__font-size:0.9em;--vp-sort-dropdown--items__font-weight:600;--vp-sort-dropdown--items__line-height:1.4;--vp-sort-dropdown--items__text-decoration:none;--vp-sort-dropdown--items__text-transform:uppercase;--vp-sort-dropdown--items__letter-spacing:0.015em;--vp-sort-dropdown--items__height:auto;--vp-sort-dropdown--items__color:var(--vp-color-gray);--vp-sort-dropdown--items__background-color:var(--vp-color-gray-lighten);--vp-sort-dropdown--items__border-radius:var(--vp-border-radius);--vp-sort-dropdown--items__arrow:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3E%3C/svg%3E");--vp-sort-dropdown--items__arrow-size:0.6em;--vp-sort-dropdown--items-hover__color:var(--vp-color-gray-darken);--vp-sort-dropdown--items-hover__background-color:var(--vp-color-gray-light);--vp-sort-dropdown-transition-duration:var(--vp-interactive__transition-duration);--vp-sort-dropdown-transition-easing:var(--vp-interactive__transition-easing);display:flex;flex-wrap:wrap;gap:var(--vp-sort-dropdown--items__gap)}.vp-sort__style-dropdown select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--vp-sort-dropdown--items__background-color);background-image:var(--vp-sort-dropdown--items__arrow);background-position:left var(--vp-sort-dropdown--items__padding-right) center;background-repeat:no-repeat;background-size:var(--vp-sort-dropdown--items__arrow-size);border:none;border-radius:var(--vp-sort-dropdown--items__border-radius);color:var(--vp-sort-dropdown--items__color);display:block;flex:0 0 auto;font-size:var(--vp-sort-dropdown--items__font-size);font-weight:var(--vp-sort-dropdown--items__font-weight);height:var(--vp-sort-dropdown--items__height);letter-spacing:var(--vp-sort-dropdown--items__letter-spacing);line-height:var(--vp-sort-dropdown--items__line-height);max-width:100%;min-height:var(--vp-sort-dropdown--items__min-height);min-width:var(--vp-sort-dropdown--items__min-width);padding:var(--vp-sort-dropdown--items__padding-v) var(--vp-sort-dropdown--items__padding-h);padding-left:calc(var(--vp-sort-dropdown--items__padding-right) + var(--vp-sort-dropdown--items__arrow-size));-webkit-text-decoration:var(--vp-sort-dropdown--items__text-decoration);text-decoration:var(--vp-sort-dropdown--items__text-decoration);text-transform:var(--vp-sort-dropdown--items__text-transform);transition:var(--vp-sort-dropdown-transition-duration) background-color var(--vp-sort-dropdown-transition-easing),var(--vp-sort-dropdown-transition-duration) color var(--vp-sort-dropdown-transition-easing)}.vp-sort__style-dropdown select:focus,.vp-sort__style-dropdown select:hover{background-color:var(--vp-sort-dropdown--items-hover__background-color);color:var(--vp-sort-dropdown--items-hover__color)}
diff --git a/templates/items-list/sort/dropdown/style.css b/templates/items-list/sort/dropdown/style.css
new file mode 100644
index 00000000..3a5d8ad8
--- /dev/null
+++ b/templates/items-list/sort/dropdown/style.css
@@ -0,0 +1 @@
+.vp-sort__style-dropdown{--vp-sort-dropdown--items__gap:6px;--vp-sort-dropdown--items__min-width:40px;--vp-sort-dropdown--items__min-height:2.7929em;--vp-sort-dropdown--items__padding-v:0.7em;--vp-sort-dropdown--items__padding-h:1.3em;--vp-sort-dropdown--items__padding-right:0.75em;--vp-sort-dropdown--items__font-size:0.9em;--vp-sort-dropdown--items__font-weight:600;--vp-sort-dropdown--items__line-height:1.4;--vp-sort-dropdown--items__text-decoration:none;--vp-sort-dropdown--items__text-transform:uppercase;--vp-sort-dropdown--items__letter-spacing:0.015em;--vp-sort-dropdown--items__height:auto;--vp-sort-dropdown--items__color:var(--vp-color-gray);--vp-sort-dropdown--items__background-color:var(--vp-color-gray-lighten);--vp-sort-dropdown--items__border-radius:var(--vp-border-radius);--vp-sort-dropdown--items__arrow:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3E%3C/svg%3E");--vp-sort-dropdown--items__arrow-size:0.6em;--vp-sort-dropdown--items-hover__color:var(--vp-color-gray-darken);--vp-sort-dropdown--items-hover__background-color:var(--vp-color-gray-light);--vp-sort-dropdown-transition-duration:var(--vp-interactive__transition-duration);--vp-sort-dropdown-transition-easing:var(--vp-interactive__transition-easing);display:flex;flex-wrap:wrap;gap:var(--vp-sort-dropdown--items__gap)}.vp-sort__style-dropdown select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--vp-sort-dropdown--items__background-color);background-image:var(--vp-sort-dropdown--items__arrow);background-position:right var(--vp-sort-dropdown--items__padding-right) center;background-repeat:no-repeat;background-size:var(--vp-sort-dropdown--items__arrow-size);border:none;border-radius:var(--vp-sort-dropdown--items__border-radius);color:var(--vp-sort-dropdown--items__color);display:block;flex:0 0 auto;font-size:var(--vp-sort-dropdown--items__font-size);font-weight:var(--vp-sort-dropdown--items__font-weight);height:var(--vp-sort-dropdown--items__height);letter-spacing:var(--vp-sort-dropdown--items__letter-spacing);line-height:var(--vp-sort-dropdown--items__line-height);max-width:100%;min-height:var(--vp-sort-dropdown--items__min-height);min-width:var(--vp-sort-dropdown--items__min-width);padding:var(--vp-sort-dropdown--items__padding-v) var(--vp-sort-dropdown--items__padding-h);padding-right:calc(var(--vp-sort-dropdown--items__padding-right) + var(--vp-sort-dropdown--items__arrow-size));-webkit-text-decoration:var(--vp-sort-dropdown--items__text-decoration);text-decoration:var(--vp-sort-dropdown--items__text-decoration);text-transform:var(--vp-sort-dropdown--items__text-transform);transition:var(--vp-sort-dropdown-transition-duration) background-color var(--vp-sort-dropdown-transition-easing),var(--vp-sort-dropdown-transition-duration) color var(--vp-sort-dropdown-transition-easing)}.vp-sort__style-dropdown select:focus,.vp-sort__style-dropdown select:hover{background-color:var(--vp-sort-dropdown--items-hover__background-color);color:var(--vp-sort-dropdown--items-hover__color)}
diff --git a/templates/items-list/sort/dropdown/style.scss b/templates/items-list/sort/dropdown/style.scss
new file mode 100644
index 00000000..7733a75b
--- /dev/null
+++ b/templates/items-list/sort/dropdown/style.scss
@@ -0,0 +1,43 @@
+@import "./variables";
+
+/**
+ * Dropdown sort style
+ */
+.vp-sort__style-dropdown {
+ display: flex;
+ flex-wrap: wrap;
+ gap: var(--vp-sort-dropdown--items__gap);
+
+ select {
+ display: block;
+ flex: 0 0 auto;
+ min-width: var(--vp-sort-dropdown--items__min-width);
+ max-width: 100%;
+ height: var(--vp-sort-dropdown--items__height);
+ min-height: var(--vp-sort-dropdown--items__min-height);
+ padding: var(--vp-sort-dropdown--items__padding-v) var(--vp-sort-dropdown--items__padding-h);
+ padding-right: calc(var(--vp-sort-dropdown--items__padding-right) + var(--vp-sort-dropdown--items__arrow-size));
+ font-size: var(--vp-sort-dropdown--items__font-size);
+ font-weight: var(--vp-sort-dropdown--items__font-weight);
+ line-height: var(--vp-sort-dropdown--items__line-height);
+ color: var(--vp-sort-dropdown--items__color);
+ text-decoration: var(--vp-sort-dropdown--items__text-decoration);
+ text-transform: var(--vp-sort-dropdown--items__text-transform);
+ letter-spacing: var(--vp-sort-dropdown--items__letter-spacing);
+ background-color: var(--vp-sort-dropdown--items__background-color);
+ background-image: var(--vp-sort-dropdown--items__arrow);
+ background-repeat: no-repeat;
+ background-position: right var(--vp-sort-dropdown--items__padding-right) center;
+ background-size: var(--vp-sort-dropdown--items__arrow-size);
+ border: none;
+ border-radius: var(--vp-sort-dropdown--items__border-radius);
+ transition: var(--vp-sort-dropdown-transition-duration) background-color var(--vp-sort-dropdown-transition-easing), var(--vp-sort-dropdown-transition-duration) color var(--vp-sort-dropdown-transition-easing);
+ appearance: none;
+
+ &:hover,
+ &:focus {
+ color: var(--vp-sort-dropdown--items-hover__color);
+ background-color: var(--vp-sort-dropdown--items-hover__background-color);
+ }
+ }
+}
diff --git a/templates/items-list/sort/minimal/_variables.scss b/templates/items-list/sort/minimal/_variables.scss
new file mode 100644
index 00000000..329bf1df
--- /dev/null
+++ b/templates/items-list/sort/minimal/_variables.scss
@@ -0,0 +1,25 @@
+/**
+ * Sort Minimal CSS Variables
+ */
+.vp-sort__style-minimal {
+ // Items.
+ --vp-sort-minimal--items__padding-v: 0.7em;
+ --vp-sort-minimal--items__padding-h: 1em;
+ --vp-sort-minimal--items__font-size: 0.9em;
+ --vp-sort-minimal--items__font-weight: 600;
+ --vp-sort-minimal--items__line-height: 1.4;
+ --vp-sort-minimal--items__text-decoration: none;
+ --vp-sort-minimal--items__text-transform: uppercase;
+ --vp-sort-minimal--items__letter-spacing: 0.015em;
+ --vp-sort-minimal--items__color: inherit;
+ --vp-sort-minimal--items-hover__color: var(--vp-color-brand);
+ --vp-sort-minimal--items-active__color: var(--vp-color-brand);
+
+ // Items Count.
+ --vp-sort-minimal--items-count__offset: 8px;
+ --vp-sort-minimal--items-count__font-size: 0.6em;
+
+ // Transitions.
+ --vp-sort-minimal-transition-duration: var(--vp-interactive__transition-duration);
+ --vp-sort-minimal-transition-easing: var(--vp-interactive__transition-easing);
+}
diff --git a/templates/items-list/sort/minimal/sort.php b/templates/items-list/sort/minimal/sort.php
new file mode 100644
index 00000000..67f0f3c2
--- /dev/null
+++ b/templates/items-list/sort/minimal/sort.php
@@ -0,0 +1,30 @@
+
+
+
diff --git a/templates/items-list/sort/minimal/style-rtl.css b/templates/items-list/sort/minimal/style-rtl.css
new file mode 100644
index 00000000..eeae90fe
--- /dev/null
+++ b/templates/items-list/sort/minimal/style-rtl.css
@@ -0,0 +1 @@
+.vp-sort__style-minimal{--vp-sort-minimal--items__padding-v:0.7em;--vp-sort-minimal--items__padding-h:1em;--vp-sort-minimal--items__font-size:0.9em;--vp-sort-minimal--items__font-weight:600;--vp-sort-minimal--items__line-height:1.4;--vp-sort-minimal--items__text-decoration:none;--vp-sort-minimal--items__text-transform:uppercase;--vp-sort-minimal--items__letter-spacing:0.015em;--vp-sort-minimal--items__color:inherit;--vp-sort-minimal--items-hover__color:var(--vp-color-brand);--vp-sort-minimal--items-active__color:var(--vp-color-brand);--vp-sort-minimal--items-count__offset:8px;--vp-sort-minimal--items-count__font-size:0.6em;--vp-sort-minimal-transition-duration:var(--vp-interactive__transition-duration);--vp-sort-minimal-transition-easing:var(--vp-interactive__transition-easing);display:flex;flex-wrap:wrap}.vp-sort__style-minimal .vp-sort__item a{box-shadow:none;outline:none}.vp-portfolio__layout-elements-align-left .vp-sort__style-minimal{justify-content:flex-start}.vp-portfolio__layout-elements-align-center .vp-sort__style-minimal{justify-content:center}.vp-portfolio__layout-elements-align-right .vp-sort__style-minimal{justify-content:flex-end}.vp-sort__style-minimal .vp-sort__item{flex:0 0 auto;max-width:100%;text-align:center}.vp-sort__style-minimal .vp-sort__item>*{color:var(--vp-sort-minimal--items__color);display:block;font-size:var(--vp-sort-minimal--items__font-size);font-weight:var(--vp-sort-minimal--items__font-weight);letter-spacing:var(--vp-sort-minimal--items__letter-spacing);line-height:var(--vp-sort-minimal--items__line-height);padding:var(--vp-sort-minimal--items__padding-v) var(--vp-sort-minimal--items__padding-h);-webkit-text-decoration:var(--vp-sort-minimal--items__text-decoration);text-decoration:var(--vp-sort-minimal--items__text-decoration);text-transform:var(--vp-sort-minimal--items__text-transform);transition:var(--vp-sort-minimal-transition-duration) color var(--vp-sort-minimal-transition-easing)}.vp-sort__style-minimal .vp-sort__item>a:focus,.vp-sort__style-minimal .vp-sort__item>a:hover{color:var(--vp-sort-minimal--items-hover__color)}.vp-sort__style-minimal .vp-sort__item.vp-sort__item-active{--vp-sort-minimal--items__color:var(--vp-sort-minimal--items-active__color);--vp-sort-minimal--items-hover__color:var(--vp-sort-minimal--items-active__color)}.vp-sort__style-minimal .vp-sort__item.vp-sort__item-active>*{cursor:default}.vp-sort__style-minimal .vp-sort__item .vp-sort__item-count{float:left;font-size:var(--vp-sort-minimal--items-count__font-size);margin-right:var(--vp-sort-minimal--items-count__offset)}
diff --git a/templates/items-list/sort/minimal/style.css b/templates/items-list/sort/minimal/style.css
new file mode 100644
index 00000000..0ffc9997
--- /dev/null
+++ b/templates/items-list/sort/minimal/style.css
@@ -0,0 +1 @@
+.vp-sort__style-minimal{--vp-sort-minimal--items__padding-v:0.7em;--vp-sort-minimal--items__padding-h:1em;--vp-sort-minimal--items__font-size:0.9em;--vp-sort-minimal--items__font-weight:600;--vp-sort-minimal--items__line-height:1.4;--vp-sort-minimal--items__text-decoration:none;--vp-sort-minimal--items__text-transform:uppercase;--vp-sort-minimal--items__letter-spacing:0.015em;--vp-sort-minimal--items__color:inherit;--vp-sort-minimal--items-hover__color:var(--vp-color-brand);--vp-sort-minimal--items-active__color:var(--vp-color-brand);--vp-sort-minimal--items-count__offset:8px;--vp-sort-minimal--items-count__font-size:0.6em;--vp-sort-minimal-transition-duration:var(--vp-interactive__transition-duration);--vp-sort-minimal-transition-easing:var(--vp-interactive__transition-easing);display:flex;flex-wrap:wrap}.vp-sort__style-minimal .vp-sort__item a{box-shadow:none;outline:none}.vp-portfolio__layout-elements-align-left .vp-sort__style-minimal{justify-content:flex-start}.vp-portfolio__layout-elements-align-center .vp-sort__style-minimal{justify-content:center}.vp-portfolio__layout-elements-align-right .vp-sort__style-minimal{justify-content:flex-end}.vp-sort__style-minimal .vp-sort__item{flex:0 0 auto;max-width:100%;text-align:center}.vp-sort__style-minimal .vp-sort__item>*{color:var(--vp-sort-minimal--items__color);display:block;font-size:var(--vp-sort-minimal--items__font-size);font-weight:var(--vp-sort-minimal--items__font-weight);letter-spacing:var(--vp-sort-minimal--items__letter-spacing);line-height:var(--vp-sort-minimal--items__line-height);padding:var(--vp-sort-minimal--items__padding-v) var(--vp-sort-minimal--items__padding-h);-webkit-text-decoration:var(--vp-sort-minimal--items__text-decoration);text-decoration:var(--vp-sort-minimal--items__text-decoration);text-transform:var(--vp-sort-minimal--items__text-transform);transition:var(--vp-sort-minimal-transition-duration) color var(--vp-sort-minimal-transition-easing)}.vp-sort__style-minimal .vp-sort__item>a:focus,.vp-sort__style-minimal .vp-sort__item>a:hover{color:var(--vp-sort-minimal--items-hover__color)}.vp-sort__style-minimal .vp-sort__item.vp-sort__item-active{--vp-sort-minimal--items__color:var(--vp-sort-minimal--items-active__color);--vp-sort-minimal--items-hover__color:var(--vp-sort-minimal--items-active__color)}.vp-sort__style-minimal .vp-sort__item.vp-sort__item-active>*{cursor:default}.vp-sort__style-minimal .vp-sort__item .vp-sort__item-count{float:right;font-size:var(--vp-sort-minimal--items-count__font-size);margin-left:var(--vp-sort-minimal--items-count__offset)}
diff --git a/templates/items-list/sort/minimal/style.scss b/templates/items-list/sort/minimal/style.scss
new file mode 100644
index 00000000..096a5329
--- /dev/null
+++ b/templates/items-list/sort/minimal/style.scss
@@ -0,0 +1,66 @@
+@import "./variables";
+
+/**
+ * Minimal sort style
+ */
+.vp-sort__style-minimal {
+ display: flex;
+ flex-wrap: wrap;
+
+ .vp-sort__item a {
+ outline: none;
+ box-shadow: none;
+ }
+
+ // align
+ .vp-portfolio__layout-elements-align-left & {
+ justify-content: flex-start;
+ }
+
+ .vp-portfolio__layout-elements-align-center & {
+ justify-content: center;
+ }
+
+ .vp-portfolio__layout-elements-align-right & {
+ justify-content: flex-end;
+ }
+
+ .vp-sort__item {
+ flex: 0 0 auto;
+ max-width: 100%;
+ text-align: center;
+
+ > * {
+ display: block;
+ padding: var(--vp-sort-minimal--items__padding-v) var(--vp-sort-minimal--items__padding-h);
+ font-size: var(--vp-sort-minimal--items__font-size);
+ font-weight: var(--vp-sort-minimal--items__font-weight);
+ line-height: var(--vp-sort-minimal--items__line-height);
+ color: var(--vp-sort-minimal--items__color);
+ text-decoration: var(--vp-sort-minimal--items__text-decoration);
+ text-transform: var(--vp-sort-minimal--items__text-transform);
+ letter-spacing: var(--vp-sort-minimal--items__letter-spacing);
+ transition: var(--vp-sort-minimal-transition-duration) color var(--vp-sort-minimal-transition-easing);
+ }
+
+ > a:hover,
+ > a:focus {
+ color: var(--vp-sort-minimal--items-hover__color);
+ }
+
+ &.vp-sort__item-active {
+ --vp-sort-minimal--items__color: var(--vp-sort-minimal--items-active__color);
+ --vp-sort-minimal--items-hover__color: var(--vp-sort-minimal--items-active__color);
+
+ > * {
+ cursor: default;
+ }
+ }
+
+ .vp-sort__item-count {
+ float: right;
+ margin-left: var(--vp-sort-minimal--items-count__offset);
+ font-size: var(--vp-sort-minimal--items-count__font-size);
+ }
+ }
+}
diff --git a/templates/items-list/sort/sort.php b/templates/items-list/sort/sort.php
new file mode 100644
index 00000000..0c724920
--- /dev/null
+++ b/templates/items-list/sort/sort.php
@@ -0,0 +1,30 @@
+
+
+
diff --git a/templates/items-list/sort/style-rtl.css b/templates/items-list/sort/style-rtl.css
new file mode 100644
index 00000000..43894da7
--- /dev/null
+++ b/templates/items-list/sort/style-rtl.css
@@ -0,0 +1 @@
+.vp-sort__style-default{--vp-sort-default--items__gap:10px;--vp-sort-default--items__min-width:40px;--vp-sort-default--items__padding-v:0.7em;--vp-sort-default--items__padding-h:1.3em;--vp-sort-default--items__font-size:0.9em;--vp-sort-default--items__font-weight:600;--vp-sort-default--items__line-height:1.4;--vp-sort-default--items__text-decoration:none;--vp-sort-default--items__text-transform:uppercase;--vp-sort-default--items__letter-spacing:0.015em;--vp-sort-default--items__color:var(--vp-color-gray);--vp-sort-default--items__background-color:var(--vp-color-gray-lighten);--vp-sort-default--items__border-radius:var(--vp-border-radius);--vp-sort-default--items-hover__color:var(--vp-color-gray-darken);--vp-sort-default--items-hover__background-color:var(--vp-color-gray-light);--vp-sort-default--items-active__color:#fff;--vp-sort-default--items-active__background-color:var(--vp-color-brand);--vp-sort-default--items-count__offset:8px;--vp-sort-default--items-count__font-size:0.6em;--vp-sort-default-transition-duration:var(--vp-interactive__transition-duration);--vp-sort-default-transition-easing:var(--vp-interactive__transition-easing);display:flex;flex-wrap:wrap;gap:var(--vp-sort-default--items__gap)}.vp-sort__style-default .vp-sort__item a{box-shadow:none;outline:none}.vp-portfolio__layout-elements-align-left .vp-sort__style-default{justify-content:flex-start}.vp-portfolio__layout-elements-align-center .vp-sort__style-default{justify-content:center}.vp-portfolio__layout-elements-align-right .vp-sort__style-default{justify-content:flex-end}.vp-sort__style-default .vp-sort__item{flex:0 0 auto;max-width:100%;text-align:center}.vp-sort__style-default .vp-sort__item>*{background-color:var(--vp-sort-default--items__background-color);border-radius:var(--vp-sort-default--items__border-radius);color:var(--vp-sort-default--items__color);display:block;font-size:var(--vp-sort-default--items__font-size);font-weight:var(--vp-sort-default--items__font-weight);letter-spacing:var(--vp-sort-default--items__letter-spacing);line-height:var(--vp-sort-default--items__line-height);min-width:var(--vp-sort-default--items__min-width);padding:var(--vp-sort-default--items__padding-v) var(--vp-sort-default--items__padding-h);-webkit-text-decoration:var(--vp-sort-default--items__text-decoration);text-decoration:var(--vp-sort-default--items__text-decoration);text-transform:var(--vp-sort-default--items__text-transform);transition:var(--vp-sort-default-transition-duration) background-color var(--vp-sort-default-transition-easing),var(--vp-sort-default-transition-duration) color var(--vp-sort-default-transition-easing)}.vp-sort__style-default .vp-sort__item>a:focus,.vp-sort__style-default .vp-sort__item>a:hover{background-color:var(--vp-sort-default--items-hover__background-color);color:var(--vp-sort-default--items-hover__color)}.vp-sort__style-default .vp-sort__item.vp-sort__item-active{--vp-sort-default--items__color:var(--vp-sort-default--items-active__color);--vp-sort-default--items__background-color:var(--vp-sort-default--items-active__background-color);--vp-sort-default--items-hover__color:var(--vp-sort-default--items-active__color);--vp-sort-default--items-hover__background-color:var(--vp-sort-default--items-active__background-color)}.vp-sort__style-default .vp-sort__item.vp-sort__item-active>*{cursor:default}.vp-sort__style-default .vp-sort__item .vp-sort__item-count{float:left;font-size:var(--vp-sort-default--items-count__font-size);margin-right:var(--vp-sort-default--items-count__offset)}
diff --git a/templates/items-list/sort/style.css b/templates/items-list/sort/style.css
new file mode 100644
index 00000000..4fc0f0d1
--- /dev/null
+++ b/templates/items-list/sort/style.css
@@ -0,0 +1 @@
+.vp-sort__style-default{--vp-sort-default--items__gap:10px;--vp-sort-default--items__min-width:40px;--vp-sort-default--items__padding-v:0.7em;--vp-sort-default--items__padding-h:1.3em;--vp-sort-default--items__font-size:0.9em;--vp-sort-default--items__font-weight:600;--vp-sort-default--items__line-height:1.4;--vp-sort-default--items__text-decoration:none;--vp-sort-default--items__text-transform:uppercase;--vp-sort-default--items__letter-spacing:0.015em;--vp-sort-default--items__color:var(--vp-color-gray);--vp-sort-default--items__background-color:var(--vp-color-gray-lighten);--vp-sort-default--items__border-radius:var(--vp-border-radius);--vp-sort-default--items-hover__color:var(--vp-color-gray-darken);--vp-sort-default--items-hover__background-color:var(--vp-color-gray-light);--vp-sort-default--items-active__color:#fff;--vp-sort-default--items-active__background-color:var(--vp-color-brand);--vp-sort-default--items-count__offset:8px;--vp-sort-default--items-count__font-size:0.6em;--vp-sort-default-transition-duration:var(--vp-interactive__transition-duration);--vp-sort-default-transition-easing:var(--vp-interactive__transition-easing);display:flex;flex-wrap:wrap;gap:var(--vp-sort-default--items__gap)}.vp-sort__style-default .vp-sort__item a{box-shadow:none;outline:none}.vp-portfolio__layout-elements-align-left .vp-sort__style-default{justify-content:flex-start}.vp-portfolio__layout-elements-align-center .vp-sort__style-default{justify-content:center}.vp-portfolio__layout-elements-align-right .vp-sort__style-default{justify-content:flex-end}.vp-sort__style-default .vp-sort__item{flex:0 0 auto;max-width:100%;text-align:center}.vp-sort__style-default .vp-sort__item>*{background-color:var(--vp-sort-default--items__background-color);border-radius:var(--vp-sort-default--items__border-radius);color:var(--vp-sort-default--items__color);display:block;font-size:var(--vp-sort-default--items__font-size);font-weight:var(--vp-sort-default--items__font-weight);letter-spacing:var(--vp-sort-default--items__letter-spacing);line-height:var(--vp-sort-default--items__line-height);min-width:var(--vp-sort-default--items__min-width);padding:var(--vp-sort-default--items__padding-v) var(--vp-sort-default--items__padding-h);-webkit-text-decoration:var(--vp-sort-default--items__text-decoration);text-decoration:var(--vp-sort-default--items__text-decoration);text-transform:var(--vp-sort-default--items__text-transform);transition:var(--vp-sort-default-transition-duration) background-color var(--vp-sort-default-transition-easing),var(--vp-sort-default-transition-duration) color var(--vp-sort-default-transition-easing)}.vp-sort__style-default .vp-sort__item>a:focus,.vp-sort__style-default .vp-sort__item>a:hover{background-color:var(--vp-sort-default--items-hover__background-color);color:var(--vp-sort-default--items-hover__color)}.vp-sort__style-default .vp-sort__item.vp-sort__item-active{--vp-sort-default--items__color:var(--vp-sort-default--items-active__color);--vp-sort-default--items__background-color:var(--vp-sort-default--items-active__background-color);--vp-sort-default--items-hover__color:var(--vp-sort-default--items-active__color);--vp-sort-default--items-hover__background-color:var(--vp-sort-default--items-active__background-color)}.vp-sort__style-default .vp-sort__item.vp-sort__item-active>*{cursor:default}.vp-sort__style-default .vp-sort__item .vp-sort__item-count{float:right;font-size:var(--vp-sort-default--items-count__font-size);margin-left:var(--vp-sort-default--items-count__offset)}
diff --git a/templates/items-list/sort/style.scss b/templates/items-list/sort/style.scss
new file mode 100644
index 00000000..53afb812
--- /dev/null
+++ b/templates/items-list/sort/style.scss
@@ -0,0 +1,73 @@
+@import "./variables";
+
+/**
+ * Default sort style
+ */
+.vp-sort__style-default {
+ display: flex;
+ flex-wrap: wrap;
+ gap: var(--vp-sort-default--items__gap);
+
+ .vp-sort__item a {
+ outline: none;
+ box-shadow: none;
+ }
+
+ // align
+ .vp-portfolio__layout-elements-align-left & {
+ justify-content: flex-start;
+ }
+
+ .vp-portfolio__layout-elements-align-center & {
+ justify-content: center;
+ }
+
+ .vp-portfolio__layout-elements-align-right & {
+ justify-content: flex-end;
+ }
+
+ .vp-sort__item {
+ flex: 0 0 auto;
+ max-width: 100%;
+ text-align: center;
+
+ > * {
+ display: block;
+ min-width: var(--vp-sort-default--items__min-width);
+ padding: var(--vp-sort-default--items__padding-v) var(--vp-sort-default--items__padding-h);
+ font-size: var(--vp-sort-default--items__font-size);
+ font-weight: var(--vp-sort-default--items__font-weight);
+ line-height: var(--vp-sort-default--items__line-height);
+ color: var(--vp-sort-default--items__color);
+ text-decoration: var(--vp-sort-default--items__text-decoration);
+ text-transform: var(--vp-sort-default--items__text-transform);
+ letter-spacing: var(--vp-sort-default--items__letter-spacing);
+ background-color: var(--vp-sort-default--items__background-color);
+ border-radius: var(--vp-sort-default--items__border-radius);
+ transition: var(--vp-sort-default-transition-duration) background-color var(--vp-sort-default-transition-easing), var(--vp-sort-default-transition-duration) color var(--vp-sort-default-transition-easing);
+ }
+
+ > a:hover,
+ > a:focus {
+ color: var(--vp-sort-default--items-hover__color);
+ background-color: var(--vp-sort-default--items-hover__background-color);
+ }
+
+ &.vp-sort__item-active {
+ --vp-sort-default--items__color: var(--vp-sort-default--items-active__color);
+ --vp-sort-default--items__background-color: var(--vp-sort-default--items-active__background-color);
+ --vp-sort-default--items-hover__color: var(--vp-sort-default--items-active__color);
+ --vp-sort-default--items-hover__background-color: var(--vp-sort-default--items-active__background-color);
+
+ > * {
+ cursor: default;
+ }
+ }
+
+ .vp-sort__item-count {
+ float: right;
+ margin-left: var(--vp-sort-default--items-count__offset);
+ font-size: var(--vp-sort-default--items-count__font-size);
+ }
+ }
+}
diff --git a/src/templates/items-list/wrapper-end.php b/templates/items-list/wrapper-end.php
similarity index 77%
rename from src/templates/items-list/wrapper-end.php
rename to templates/items-list/wrapper-end.php
index d326c2c1..16d6c9bf 100644
--- a/src/templates/items-list/wrapper-end.php
+++ b/templates/items-list/wrapper-end.php
@@ -5,11 +5,11 @@
* @var $options
* @var $style_options
*
- * @package @@plugin_name
+ * @package visual-portfolio
*/
if ( ! defined( 'ABSPATH' ) ) {
- exit;
+ exit;
}
?>
diff --git a/templates/items-list/wrapper-start.php b/templates/items-list/wrapper-start.php
new file mode 100644
index 00000000..18b8d522
--- /dev/null
+++ b/templates/items-list/wrapper-start.php
@@ -0,0 +1,36 @@
+
+
+
$data ) {
+ if ( 'data-vp-next-page-url' === $name ) {
+ echo esc_html( $name ) . '="' . esc_url( $data ) . '" ';
+ } else {
+ echo esc_html( $name ) . '="' . esc_attr( $data ) . '" ';
+ }
+ }
+ ?>
+>
+
+
+
+
+
diff --git a/templates/notices/_variables.scss b/templates/notices/_variables.scss
new file mode 100644
index 00000000..3f50432c
--- /dev/null
+++ b/templates/notices/_variables.scss
@@ -0,0 +1,13 @@
+/**
+ * Notices CSS Variables
+ */
+.vp-notice {
+ --vp-notice__padding-v: 1em;
+ --vp-notice__padding-h: 1.3em;
+ --vp-notice__color: var(--vp-color-brand);
+ --vp-notice__background-color: var(--vp-color-gray-lighten);
+ --vp-notice__border-width: 1px;
+ --vp-notice__border-left-width: 3px;
+ --vp-notice__border-color: var(--vp-color-brand);
+ --vp-notice__border-radius: var(--vp-border-radius);
+}
diff --git a/src/templates/notices/notices.php b/templates/notices/notices.php
similarity index 59%
rename from src/templates/notices/notices.php
rename to templates/notices/notices.php
index cb290550..f6e355bd 100644
--- a/src/templates/notices/notices.php
+++ b/templates/notices/notices.php
@@ -3,15 +3,15 @@
* Notices template.
*
* @var $args
- * @package @@plugin_name
+ * @package visual-portfolio
*/
if ( ! defined( 'ABSPATH' ) ) {
- exit;
+ exit;
}
?>
-
+
diff --git a/templates/notices/style-rtl.css b/templates/notices/style-rtl.css
new file mode 100644
index 00000000..38956c65
--- /dev/null
+++ b/templates/notices/style-rtl.css
@@ -0,0 +1 @@
+.vp-notice{--vp-notice__padding-v:1em;--vp-notice__padding-h:1.3em;--vp-notice__color:var(--vp-color-brand);--vp-notice__background-color:var(--vp-color-gray-lighten);--vp-notice__border-width:1px;--vp-notice__border-left-width:3px;--vp-notice__border-color:var(--vp-color-brand);--vp-notice__border-radius:var(--vp-border-radius);background-color:var(--vp-notice__background-color);border:var(--vp-notice__border-width) solid var(--vp-notice__border-color);border-right-width:var(--vp-notice__border-left-width);border-radius:var(--vp-notice__border-radius);color:var(--vp-notice__color);padding:var(--vp-notice__padding-v) var(--vp-notice__padding-h)}
diff --git a/templates/notices/style.css b/templates/notices/style.css
new file mode 100644
index 00000000..12710fff
--- /dev/null
+++ b/templates/notices/style.css
@@ -0,0 +1 @@
+.vp-notice{--vp-notice__padding-v:1em;--vp-notice__padding-h:1.3em;--vp-notice__color:var(--vp-color-brand);--vp-notice__background-color:var(--vp-color-gray-lighten);--vp-notice__border-width:1px;--vp-notice__border-left-width:3px;--vp-notice__border-color:var(--vp-color-brand);--vp-notice__border-radius:var(--vp-border-radius);background-color:var(--vp-notice__background-color);border:var(--vp-notice__border-width) solid var(--vp-notice__border-color);border-left-width:var(--vp-notice__border-left-width);border-radius:var(--vp-notice__border-radius);color:var(--vp-notice__color);padding:var(--vp-notice__padding-v) var(--vp-notice__padding-h)}
diff --git a/templates/notices/style.scss b/templates/notices/style.scss
new file mode 100644
index 00000000..a499727a
--- /dev/null
+++ b/templates/notices/style.scss
@@ -0,0 +1,13 @@
+@import "./variables";
+
+/**
+ * Notices style
+ */
+.vp-notice {
+ padding: var(--vp-notice__padding-v) var(--vp-notice__padding-h);
+ color: var(--vp-notice__color);
+ background-color: var(--vp-notice__background-color);
+ border: var(--vp-notice__border-width) solid var(--vp-notice__border-color);
+ border-left-width: var(--vp-notice__border-left-width);
+ border-radius: var(--vp-notice__border-radius);
+}
diff --git a/templates/popup/image-popup-data.php b/templates/popup/image-popup-data.php
new file mode 100644
index 00000000..5b209ef5
--- /dev/null
+++ b/templates/popup/image-popup-data.php
@@ -0,0 +1,49 @@
+
+
diff --git a/templates/popup/video-popup-data.php b/templates/popup/video-popup-data.php
new file mode 100644
index 00000000..da9d09b3
--- /dev/null
+++ b/templates/popup/video-popup-data.php
@@ -0,0 +1,45 @@
+
+
+
diff --git a/templates/preview/preview.php b/templates/preview/preview.php
new file mode 100644
index 00000000..e639f9ef
--- /dev/null
+++ b/templates/preview/preview.php
@@ -0,0 +1,37 @@
+
+ style="margin-top: 0 !important;">
+
+
+
+
+
+
+ >
+
+
+
+
+
+
+
+
+
diff --git a/templates/preview/style-rtl.css b/templates/preview/style-rtl.css
new file mode 100644
index 00000000..dd036d02
--- /dev/null
+++ b/templates/preview/style-rtl.css
@@ -0,0 +1 @@
+body,html{margin:0!important;padding:0!important}body:before{content:none!important}#wpadminbar{display:none}#vp_preview{margin:0;max-width:none;padding:0;position:relative;width:100%;z-index:99999}.entry-content{margin:0!important;padding:0!important}.vp-portfolio{margin-bottom:0;margin-top:0}#query-monitor-main{display:none!important}
diff --git a/templates/preview/style.css b/templates/preview/style.css
new file mode 100644
index 00000000..dd036d02
--- /dev/null
+++ b/templates/preview/style.css
@@ -0,0 +1 @@
+body,html{margin:0!important;padding:0!important}body:before{content:none!important}#wpadminbar{display:none}#vp_preview{margin:0;max-width:none;padding:0;position:relative;width:100%;z-index:99999}.entry-content{margin:0!important;padding:0!important}.vp-portfolio{margin-bottom:0;margin-top:0}#query-monitor-main{display:none!important}
diff --git a/templates/preview/style.scss b/templates/preview/style.scss
new file mode 100644
index 00000000..9fbab883
--- /dev/null
+++ b/templates/preview/style.scss
@@ -0,0 +1,43 @@
+/* stylelint-disable selector-id-pattern */
+/* stylelint-disable declaration-no-important */
+
+/**
+ * Preview style
+ */
+html,
+body {
+ padding: 0 !important;
+ margin: 0 !important;
+}
+
+body::before {
+ content: none !important;
+}
+
+#wpadminbar {
+ display: none;
+}
+
+#vp_preview {
+ position: relative;
+ z-index: 99999;
+ width: 100%;
+ max-width: none;
+ padding: 0;
+ margin: 0;
+}
+
+.entry-content {
+ padding: 0 !important;
+ margin: 0 !important;
+}
+
+.vp-portfolio {
+ margin-top: 0;
+ margin-bottom: 0;
+}
+
+// Hide Query Monitor.
+#query-monitor-main {
+ display: none !important;
+}
diff --git a/tests/e2e/config/flaky-tests-reporter.js b/tests/e2e/config/flaky-tests-reporter.js
index a2172146..0f3c2035 100644
--- a/tests/e2e/config/flaky-tests-reporter.js
+++ b/tests/e2e/config/flaky-tests-reporter.js
@@ -9,72 +9,72 @@
/**
* External dependencies
*/
-// eslint-disable-next-line import/no-import-module-exports
import fs from 'fs';
-
-// eslint-disable-next-line import/no-extraneous-dependencies, import/no-import-module-exports
+// eslint-disable-next-line import/no-extraneous-dependencies
import filenamify from 'filenamify';
// Remove "steps" to prevent stringify circular structure.
function formatTestResult(testResult) {
- const result = { ...testResult, steps: undefined };
- delete result.steps;
- return result;
+ const result = { ...testResult, steps: undefined };
+ delete result.steps;
+ return result;
}
class FlakyTestsReporter {
- failingTestCaseResults = new Map();
+ failingTestCaseResults = new Map();
- onBegin() {
- try {
- fs.mkdirSync('flaky-tests');
- } catch (err) {
- if (err instanceof Error && err.code === 'EEXIST') {
- // Ignore the error if the directory already exists.
- } else {
- throw err;
- }
- }
- }
+ onBegin() {
+ try {
+ fs.mkdirSync('flaky-tests');
+ } catch (err) {
+ if (err instanceof Error && err.code === 'EEXIST') {
+ // Ignore the error if the directory already exists.
+ } else {
+ throw err;
+ }
+ }
+ }
- onTestEnd(test, testCaseResult) {
- const testPath = test.location.file;
- const testTitle = test.title;
+ onTestEnd(test, testCaseResult) {
+ const testPath = test.location.file;
+ const testTitle = test.title;
- switch (test.outcome()) {
- case 'unexpected': {
- if (!this.failingTestCaseResults.has(testTitle)) {
- this.failingTestCaseResults.set(testTitle, []);
- }
- this.failingTestCaseResults.get(testTitle).push(formatTestResult(testCaseResult));
- break;
- }
- case 'flaky': {
- fs.writeFileSync(
- `flaky-tests/${filenamify(testTitle)}.json`,
- JSON.stringify({
- version: 1,
- runner: '@playwright/test',
- title: testTitle,
- path: testPath,
- results: this.failingTestCaseResults.get(testTitle),
- }),
- 'utf-8'
- );
- break;
- }
- default:
- break;
- }
- }
+ switch (test.outcome()) {
+ case 'unexpected': {
+ if (!this.failingTestCaseResults.has(testTitle)) {
+ this.failingTestCaseResults.set(testTitle, []);
+ }
+ this.failingTestCaseResults
+ .get(testTitle)
+ .push(formatTestResult(testCaseResult));
+ break;
+ }
+ case 'flaky': {
+ fs.writeFileSync(
+ `flaky-tests/${filenamify(testTitle)}.json`,
+ JSON.stringify({
+ version: 1,
+ runner: '@playwright/test',
+ title: testTitle,
+ path: testPath,
+ results: this.failingTestCaseResults.get(testTitle),
+ }),
+ 'utf-8'
+ );
+ break;
+ }
+ default:
+ break;
+ }
+ }
- onEnd() {
- this.failingTestCaseResults.clear();
- }
+ onEnd() {
+ this.failingTestCaseResults.clear();
+ }
- printsToStdio() {
- return false;
- }
+ printsToStdio() {
+ return false;
+ }
}
module.exports = FlakyTestsReporter;
diff --git a/tests/e2e/config/global-setup.js b/tests/e2e/config/global-setup.js
index fc82c093..6034d074 100644
--- a/tests/e2e/config/global-setup.js
+++ b/tests/e2e/config/global-setup.js
@@ -1,7 +1,7 @@
/**
* External dependencies
*/
-// eslint-disable-next-line import/no-extraneous-dependencies, import/order
+// eslint-disable-next-line import/no-extraneous-dependencies
import { request } from '@playwright/test';
/**
@@ -10,21 +10,35 @@ import { request } from '@playwright/test';
import { RequestUtils } from '@wordpress/e2e-test-utils-playwright';
async function globalSetup(config) {
- const { storageState, baseURL } = config.projects[0].use;
- const storageStatePath = typeof storageState === 'string' ? storageState : undefined;
+ const { storageState, baseURL } = config.projects[0].use;
+ const storageStatePath =
+ typeof storageState === 'string' ? storageState : undefined;
- const requestContext = await request.newContext({
- baseURL,
- });
+ const requestContext = await request.newContext({
+ baseURL,
+ });
- const requestUtils = new RequestUtils(requestContext, {
- storageStatePath,
- });
+ const requestUtils = new RequestUtils(requestContext, {
+ storageStatePath,
+ });
- // Authenticate and save the storageState to disk.
- await requestUtils.setupRest();
+ // Authenticate and save the storageState to disk.
+ await requestUtils.setupRest();
- await requestContext.dispose();
+ // Reset the test environment before running the tests.
+ await Promise.all([
+ requestUtils.activateTheme('empty-theme'),
+ // Disable this test plugin as it's conflicting with some of the tests.
+ // We already have reduced motion enabled and Playwright will wait for most of the animations anyway.
+ requestUtils.deactivatePlugin(
+ 'gutenberg-test-plugin-disables-the-css-animations'
+ ),
+ requestUtils.deleteAllPosts(),
+ requestUtils.deleteAllBlocks(),
+ requestUtils.resetPreferences(),
+ ]);
+
+ await requestContext.dispose();
}
export default globalSetup;
diff --git a/tests/e2e/playwright.config.js b/tests/e2e/playwright.config.js
index c5618455..47ee200c 100644
--- a/tests/e2e/playwright.config.js
+++ b/tests/e2e/playwright.config.js
@@ -9,75 +9,81 @@ import { fileURLToPath } from 'url';
import { defineConfig, devices } from '@playwright/test';
const STORAGE_STATE_PATH =
- process.env.STORAGE_STATE_PATH || path.join(process.cwd(), 'artifacts/storage-states/admin.json');
+ process.env.STORAGE_STATE_PATH ||
+ path.join(process.cwd(), 'artifacts/storage-states/admin.json');
const config = defineConfig({
- reporter: process.env.CI ? [['github'], ['./config/flaky-tests-reporter.js']] : 'list',
- forbidOnly: !!process.env.CI,
- workers: 1,
- retries: process.env.CI ? 2 : 0,
- timeout: parseInt(process.env.TIMEOUT || '', 10) || 100_000, // Defaults to 100 seconds.
- // Don't report slow test "files", as we will be running our tests in serial.
- reportSlowTests: null,
- testDir: fileURLToPath(new URL('./specs', `file:${__filename}`).href),
- outputDir: path.join(process.cwd(), 'artifacts/test-results'),
- snapshotPathTemplate: '{testDir}/{testFileDir}/__snapshots__/{arg}-{projectName}{ext}',
- globalSetup: fileURLToPath(new URL('./config/global-setup.js', `file:${__filename}`).href),
- use: {
- baseURL: process.env.WP_BASE_URL || 'http://localhost:8889',
- headless: true,
- viewport: {
- width: 960,
- height: 700,
- },
- ignoreHTTPSErrors: true,
- locale: 'en-US',
- contextOptions: {
- reducedMotion: 'reduce',
- strictSelectors: true,
- },
- storageState: STORAGE_STATE_PATH,
- actionTimeout: 10000, // 10 seconds.
- trace: 'retain-on-failure',
- screenshot: 'only-on-failure',
- video: 'on-first-retry',
- },
- webServer: {
- command: 'npm run env:start',
- port: 8889,
- timeout: 120000, // 120 seconds.
- reuseExistingServer: true,
- },
- projects: [
- {
- name: 'chromium',
- use: { ...devices['Desktop Chrome'] },
- grepInvert: /-chromium/,
- },
- {
- name: 'webkit',
- use: {
- ...devices['Desktop Safari'],
- /**
- * Headless webkit won't receive dataTransfer with custom types in the
- * drop event on Linux. The solution is to use `xvfb-run` to run the tests.
- * ```sh
- * xvfb-run npm run test:e2e:playwright
- * ```
- * See `.github/workflows/end2end-test-playwright.yml` for advanced usages.
- */
- headless: os.type() !== 'Linux',
- },
- grep: /@webkit/,
- grepInvert: /-webkit/,
- },
- {
- name: 'firefox',
- use: { ...devices['Desktop Firefox'] },
- grep: /@firefox/,
- grepInvert: /-firefox/,
- },
- ],
+ reporter: process.env.CI
+ ? [['github'], ['./config/flaky-tests-reporter.js']]
+ : 'list',
+ forbidOnly: !!process.env.CI,
+ workers: 1,
+ retries: process.env.CI ? 2 : 0,
+ timeout: parseInt(process.env.TIMEOUT || '', 10) || 100_000, // Defaults to 100 seconds.
+ // Don't report slow test "files", as we will be running our tests in serial.
+ reportSlowTests: null,
+ testDir: fileURLToPath(new URL('./specs', `file:${__filename}`).href),
+ outputDir: path.join(process.cwd(), 'artifacts/test-results'),
+ snapshotPathTemplate:
+ '{testDir}/{testFileDir}/__snapshots__/{arg}-{projectName}{ext}',
+ globalSetup: fileURLToPath(
+ new URL('./config/global-setup.js', `file:${__filename}`).href
+ ),
+ use: {
+ baseURL: process.env.WP_BASE_URL || 'http://localhost:8889',
+ headless: true,
+ viewport: {
+ width: 960,
+ height: 700,
+ },
+ ignoreHTTPSErrors: true,
+ locale: 'en-US',
+ contextOptions: {
+ reducedMotion: 'reduce',
+ strictSelectors: true,
+ },
+ storageState: STORAGE_STATE_PATH,
+ actionTimeout: 10000, // 10 seconds.
+ trace: 'retain-on-failure',
+ screenshot: 'only-on-failure',
+ video: 'on-first-retry',
+ },
+ webServer: {
+ command: 'npm run env:start',
+ port: 8889,
+ timeout: 120000, // 120 seconds.
+ reuseExistingServer: true,
+ },
+ projects: [
+ {
+ name: 'chromium',
+ use: { ...devices['Desktop Chrome'] },
+ grepInvert: /-chromium/,
+ },
+ {
+ name: 'webkit',
+ use: {
+ ...devices['Desktop Safari'],
+ /**
+ * Headless webkit won't receive dataTransfer with custom types in the
+ * drop event on Linux. The solution is to use `xvfb-run` to run the tests.
+ * ```sh
+ * xvfb-run npm run test:e2e:playwright
+ * ```
+ * See `.github/workflows/end2end-test-playwright.yml` for advanced usages.
+ */
+ headless: os.type() !== 'Linux',
+ },
+ grep: /@webkit/,
+ grepInvert: /-webkit/,
+ },
+ {
+ name: 'firefox',
+ use: { ...devices['Desktop Firefox'] },
+ grep: /@firefox/,
+ grepInvert: /-firefox/,
+ },
+ ],
});
export default config;
diff --git a/tests/e2e/specs/initial-loading.spec.js b/tests/e2e/specs/initial-loading.spec.js
index 76b1d9b1..5ced0e79 100644
--- a/tests/e2e/specs/initial-loading.spec.js
+++ b/tests/e2e/specs/initial-loading.spec.js
@@ -4,13 +4,18 @@
import { test, expect } from '@wordpress/e2e-test-utils-playwright';
test.describe('initial loading', () => {
- test.beforeAll(async ({ requestUtils }) => {
- await requestUtils.activatePlugin('visual-portfolio-posts-amp-image-gallery');
- });
+ test.beforeAll(async ({ requestUtils }) => {
+ await requestUtils.activatePlugin(
+ 'visual-portfolio-posts-amp-image-gallery'
+ );
+ });
- test('should have visual portfolio in admin menu', async ({ page, admin }) => {
- await admin.visitAdminPage('index.php');
+ test('should have visual portfolio in admin menu', async ({
+ page,
+ admin,
+ }) => {
+ await admin.visitAdminPage('index.php');
- await expect(page.locator('#menu-posts-portfolio')).toBeVisible();
- });
+ await expect(page.locator('#menu-posts-portfolio')).toBeVisible();
+ });
});
diff --git a/tests/phpunit/bootstrap.php b/tests/phpunit/bootstrap.php
index 5704aeb2..cbbd0165 100644
--- a/tests/phpunit/bootstrap.php
+++ b/tests/phpunit/bootstrap.php
@@ -49,7 +49,7 @@
* Manually load the plugin being tested.
*/
function _manually_load_plugin() {
- require dirname( dirname( dirname( __FILE__ ) ) ) . '/run-test.php';
+ require dirname( dirname( dirname( __FILE__ ) ) ) . '/class-visual-portfolio.php';
}
tests_add_filter( 'muplugins_loaded', '_manually_load_plugin' );
diff --git a/tests/themes/empty-theme-php/footer.php b/tests/themes/empty-theme-php/footer.php
new file mode 100644
index 00000000..99536881
--- /dev/null
+++ b/tests/themes/empty-theme-php/footer.php
@@ -0,0 +1,15 @@
+
+
+
+
diff --git a/tests/themes/empty-theme-php/functions.php b/tests/themes/empty-theme-php/functions.php
new file mode 100644
index 00000000..09edadc3
--- /dev/null
+++ b/tests/themes/empty-theme-php/functions.php
@@ -0,0 +1,41 @@
+ __( 'Primary Sidebar', 'theme_name' ),
+ 'id' => 'sidebar-1',
+ 'before_widget' => '
',
+ 'before_title' => '
',
+ ) );
+ }
+ add_action( 'after_setup_theme', 'empty_theme_php_support' );
+endif;
+
+/**
+ * Enqueue scripts and styles.
+ */
+function empty_theme_php_scripts() {
+ // Enqueue theme stylesheet.
+ wp_enqueue_style( 'empty-theme-php-style', get_template_directory_uri() . '/style.css', array(), wp_get_theme()->get( 'Version' ) );
+}
+
+add_action( 'wp_enqueue_scripts', 'empty_theme_php_scripts' );
diff --git a/tests/themes/empty-theme-php/header.php b/tests/themes/empty-theme-php/header.php
new file mode 100644
index 00000000..7067a26d
--- /dev/null
+++ b/tests/themes/empty-theme-php/header.php
@@ -0,0 +1,23 @@
+ section, opens the tag and adds the site's header.
+ */
+
+if ( ! defined( 'ABSPATH' ) ) {
+ exit; // Exit if accessed directly.
+}
+
+?>
+
+>
+
+
+
+
+
+
+>
+
+
diff --git a/tests/themes/empty-theme-php/index.php b/tests/themes/empty-theme-php/index.php
new file mode 100644
index 00000000..dd530cdb
--- /dev/null
+++ b/tests/themes/empty-theme-php/index.php
@@ -0,0 +1,39 @@
+
+
+
>
+
+
+
+
+
+ ' . esc_html__( 'Tagged ' ), null, '' ); ?>
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/themes/empty-theme-php/style.css b/tests/themes/empty-theme-php/style.css
new file mode 100644
index 00000000..0ffc48aa
--- /dev/null
+++ b/tests/themes/empty-theme-php/style.css
@@ -0,0 +1,13 @@
+/*
+Theme Name: Empty PHP theme for tests
+Theme URI: https://github.com/nk-crew/lazy-blocks
+Author: nk-o
+Description: Empty theme for tests.
+Requires at least: 6.0
+Tested up to: 6.3
+Requires PHP: 5.6
+Version: 1.0
+License: GNU General Public License v2 or later
+License URI: http://www.gnu.org/licenses/gpl-2.0.html
+Text Domain: empty-theme
+*/
diff --git a/tests/themes/empty-theme/functions.php b/tests/themes/empty-theme/functions.php
new file mode 100644
index 00000000..0fc15d49
--- /dev/null
+++ b/tests/themes/empty-theme/functions.php
@@ -0,0 +1,31 @@
+get( 'Version' ) );
+}
+
+add_action( 'wp_enqueue_scripts', 'empty_theme_scripts' );
diff --git a/tests/themes/empty-theme/index.php b/tests/themes/empty-theme/index.php
new file mode 100644
index 00000000..2b6276e2
--- /dev/null
+++ b/tests/themes/empty-theme/index.php
@@ -0,0 +1,9 @@
+
+
+
\ No newline at end of file
diff --git a/tests/themes/empty-theme/style.css b/tests/themes/empty-theme/style.css
new file mode 100644
index 00000000..e9516ede
--- /dev/null
+++ b/tests/themes/empty-theme/style.css
@@ -0,0 +1,13 @@
+/*
+Theme Name: Empty theme for tests
+Theme URI: https://github.com/nk-crew/lazy-blocks
+Author: nk-o
+Description: Empty theme for tests.
+Requires at least: 6.0
+Tested up to: 6.3
+Requires PHP: 5.6
+Version: 1.0
+License: GNU General Public License v2 or later
+License URI: http://www.gnu.org/licenses/gpl-2.0.html
+Text Domain: empty-theme
+*/
diff --git a/tests/themes/empty-theme/templates/category.html b/tests/themes/empty-theme/templates/category.html
new file mode 100644
index 00000000..8c389a21
--- /dev/null
+++ b/tests/themes/empty-theme/templates/category.html
@@ -0,0 +1 @@
+
diff --git a/tests/themes/empty-theme/templates/index.html b/tests/themes/empty-theme/templates/index.html
new file mode 100644
index 00000000..e3499f0f
--- /dev/null
+++ b/tests/themes/empty-theme/templates/index.html
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
diff --git a/tests/themes/empty-theme/templates/singular.html b/tests/themes/empty-theme/templates/singular.html
new file mode 100644
index 00000000..d66530c6
--- /dev/null
+++ b/tests/themes/empty-theme/templates/singular.html
@@ -0,0 +1,3 @@
+
+
+
diff --git a/tests/themes/empty-theme/templates/tag.html b/tests/themes/empty-theme/templates/tag.html
new file mode 100644
index 00000000..e69de29b
diff --git a/tests/themes/empty-theme/theme.json b/tests/themes/empty-theme/theme.json
new file mode 100644
index 00000000..536735a0
--- /dev/null
+++ b/tests/themes/empty-theme/theme.json
@@ -0,0 +1,11 @@
+{
+ "$schema": "https://schemas.wp.org/trunk/theme.json",
+ "version": 2,
+ "settings": {
+ "appearanceTools": true,
+ "layout": {
+ "contentSize": "840px",
+ "wideSize": "1100px"
+ }
+ }
+}
diff --git a/src/vendors/class-settings-api.php b/vendors/class-settings-api.php
similarity index 98%
rename from src/vendors/class-settings-api.php
rename to vendors/class-settings-api.php
index c410600d..a663fcc0 100644
--- a/src/vendors/class-settings-api.php
+++ b/vendors/class-settings-api.php
@@ -47,10 +47,10 @@ public function admin_enqueue_scripts() {
wp_enqueue_media();
wp_enqueue_script( 'wp-color-picker' );
wp_enqueue_script( 'jquery' );
- wp_enqueue_script( 'conditionize', visual_portfolio()->plugin_url . 'assets/vendor/conditionize/conditionize.min.js', array( 'jquery' ), '1.0.5' );
+ Visual_Portfolio_Assets::enqueue_script( 'conditionize', 'assets/vendor/conditionize/conditionize.min', array( 'jquery' ), '1.0.5' );
- wp_enqueue_style( 'select2', visual_portfolio()->plugin_url . 'assets/vendor/select2/select2.min.css', array(), '4.0.13' );
- wp_enqueue_script( 'select2', visual_portfolio()->plugin_url . 'assets/vendor/select2/select2.min.js', array( 'jquery' ), '4.0.13' );
+ Visual_Portfolio_Assets::enqueue_style( 'select2', 'assets/vendor/select2/select2.min', array(), '4.0.13' );
+ Visual_Portfolio_Assets::enqueue_script( 'select2', 'assets/vendor/select2/select2.min', array( 'jquery' ), '4.0.13' );
}
/**
@@ -147,7 +147,7 @@ public function admin_init() {
'utm_campaign' => esc_attr( $name ),
)
);
- $label .= '
?' . esc_html__( 'This feature is available in the Pro plugin only.', '@@text_domain' ) . '';
+ $label .= '
?' . esc_html__( 'This feature is available in the Pro plugin only.', 'visual-portfolio' ) . '';
}
$args = array(
diff --git a/src/vendors/slugify/Bridge/Laravel/SlugifyFacade.php b/vendors/slugify/Bridge/Laravel/SlugifyFacade.php
similarity index 100%
rename from src/vendors/slugify/Bridge/Laravel/SlugifyFacade.php
rename to vendors/slugify/Bridge/Laravel/SlugifyFacade.php
diff --git a/src/vendors/slugify/Bridge/Laravel/SlugifyServiceProvider.php b/vendors/slugify/Bridge/Laravel/SlugifyServiceProvider.php
similarity index 100%
rename from src/vendors/slugify/Bridge/Laravel/SlugifyServiceProvider.php
rename to vendors/slugify/Bridge/Laravel/SlugifyServiceProvider.php
diff --git a/src/vendors/slugify/Bridge/Latte/SlugifyHelper.php b/vendors/slugify/Bridge/Latte/SlugifyHelper.php
similarity index 100%
rename from src/vendors/slugify/Bridge/Latte/SlugifyHelper.php
rename to vendors/slugify/Bridge/Latte/SlugifyHelper.php
diff --git a/src/vendors/slugify/Bridge/League/SlugifyServiceProvider.php b/vendors/slugify/Bridge/League/SlugifyServiceProvider.php
similarity index 100%
rename from src/vendors/slugify/Bridge/League/SlugifyServiceProvider.php
rename to vendors/slugify/Bridge/League/SlugifyServiceProvider.php
diff --git a/src/vendors/slugify/Bridge/Nette/SlugifyExtension.php b/vendors/slugify/Bridge/Nette/SlugifyExtension.php
similarity index 100%
rename from src/vendors/slugify/Bridge/Nette/SlugifyExtension.php
rename to vendors/slugify/Bridge/Nette/SlugifyExtension.php
diff --git a/src/vendors/slugify/Bridge/Plum/SlugifyConverter.php b/vendors/slugify/Bridge/Plum/SlugifyConverter.php
similarity index 100%
rename from src/vendors/slugify/Bridge/Plum/SlugifyConverter.php
rename to vendors/slugify/Bridge/Plum/SlugifyConverter.php
diff --git a/src/vendors/slugify/Bridge/Symfony/CocurSlugifyBundle.php b/vendors/slugify/Bridge/Symfony/CocurSlugifyBundle.php
similarity index 100%
rename from src/vendors/slugify/Bridge/Symfony/CocurSlugifyBundle.php
rename to vendors/slugify/Bridge/Symfony/CocurSlugifyBundle.php
diff --git a/src/vendors/slugify/Bridge/Symfony/CocurSlugifyExtension.php b/vendors/slugify/Bridge/Symfony/CocurSlugifyExtension.php
similarity index 100%
rename from src/vendors/slugify/Bridge/Symfony/CocurSlugifyExtension.php
rename to vendors/slugify/Bridge/Symfony/CocurSlugifyExtension.php
diff --git a/src/vendors/slugify/Bridge/Symfony/Configuration.php b/vendors/slugify/Bridge/Symfony/Configuration.php
similarity index 100%
rename from src/vendors/slugify/Bridge/Symfony/Configuration.php
rename to vendors/slugify/Bridge/Symfony/Configuration.php
diff --git a/src/vendors/slugify/Bridge/Twig/SlugifyExtension.php b/vendors/slugify/Bridge/Twig/SlugifyExtension.php
similarity index 100%
rename from src/vendors/slugify/Bridge/Twig/SlugifyExtension.php
rename to vendors/slugify/Bridge/Twig/SlugifyExtension.php
diff --git a/src/vendors/slugify/Bridge/ZF2/Module.php b/vendors/slugify/Bridge/ZF2/Module.php
similarity index 100%
rename from src/vendors/slugify/Bridge/ZF2/Module.php
rename to vendors/slugify/Bridge/ZF2/Module.php
diff --git a/src/vendors/slugify/Bridge/ZF2/SlugifyService.php b/vendors/slugify/Bridge/ZF2/SlugifyService.php
similarity index 100%
rename from src/vendors/slugify/Bridge/ZF2/SlugifyService.php
rename to vendors/slugify/Bridge/ZF2/SlugifyService.php
diff --git a/src/vendors/slugify/Bridge/ZF2/SlugifyViewHelper.php b/vendors/slugify/Bridge/ZF2/SlugifyViewHelper.php
similarity index 100%
rename from src/vendors/slugify/Bridge/ZF2/SlugifyViewHelper.php
rename to vendors/slugify/Bridge/ZF2/SlugifyViewHelper.php
diff --git a/src/vendors/slugify/Bridge/ZF2/SlugifyViewHelperFactory.php b/vendors/slugify/Bridge/ZF2/SlugifyViewHelperFactory.php
similarity index 100%
rename from src/vendors/slugify/Bridge/ZF2/SlugifyViewHelperFactory.php
rename to vendors/slugify/Bridge/ZF2/SlugifyViewHelperFactory.php
diff --git a/src/vendors/slugify/RuleProvider/DefaultRuleProvider.php b/vendors/slugify/RuleProvider/DefaultRuleProvider.php
similarity index 100%
rename from src/vendors/slugify/RuleProvider/DefaultRuleProvider.php
rename to vendors/slugify/RuleProvider/DefaultRuleProvider.php
diff --git a/src/vendors/slugify/RuleProvider/FileRuleProvider.php b/vendors/slugify/RuleProvider/FileRuleProvider.php
similarity index 100%
rename from src/vendors/slugify/RuleProvider/FileRuleProvider.php
rename to vendors/slugify/RuleProvider/FileRuleProvider.php
diff --git a/src/vendors/slugify/RuleProvider/RuleProviderInterface.php b/vendors/slugify/RuleProvider/RuleProviderInterface.php
similarity index 100%
rename from src/vendors/slugify/RuleProvider/RuleProviderInterface.php
rename to vendors/slugify/RuleProvider/RuleProviderInterface.php
diff --git a/src/vendors/slugify/Slugify.php b/vendors/slugify/Slugify.php
similarity index 100%
rename from src/vendors/slugify/Slugify.php
rename to vendors/slugify/Slugify.php
diff --git a/src/vendors/slugify/SlugifyInterface.php b/vendors/slugify/SlugifyInterface.php
similarity index 100%
rename from src/vendors/slugify/SlugifyInterface.php
rename to vendors/slugify/SlugifyInterface.php
diff --git a/webpack.config.js b/webpack.config.js
index 7a3cd60b..204e7c17 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -1,80 +1,368 @@
-const md5 = require('md5');
-
-module.exports = function () {
- return {
- module: {
- rules: [
- {
- test: /(\.js)$/,
- loader: 'babel-loader',
- options: {
- cacheDirectory: true,
- cacheCompression: false,
- },
- },
- {
- test: /\.scss$/,
- use: [
- {
- loader: 'style-loader', // creates style nodes from JS strings
- },
- {
- loader: 'css-loader', // translates CSS into CommonJS
- options: {
- url: false,
- },
- },
- {
- loader: 'sass-loader', // compiles Sass to CSS
- },
- ],
- },
- {
- test: /\.css$/,
- use: [
- {
- loader: 'style-loader', // creates style nodes from JS strings
- },
- {
- loader: 'css-loader', // translates CSS into CommonJS
- options: {
- url: false,
- },
- },
- ],
- },
- {
- test: /\.svg$/,
- use: ({ resource }) => ({
- loader: '@svgr/webpack',
- options: {
- svgoConfig: {
- plugins: [
- {
- removeViewBox: false,
- },
- {
- cleanupIDs: {
- prefix: `visual-portfolio-${md5(resource)}-`,
- },
- },
- ],
- },
- },
- }),
- },
- {
- test: /\.(gif|png|jpe?g)$/i,
- loader: 'base64-inline-loader',
- },
- ],
- },
- resolve: {
- extensions: ['.js', '.json'],
- },
- externals: {
- react: 'React',
- 'react-dom': 'ReactDOM',
- },
- };
+/**
+ * External Dependencies
+ */
+const path = require('path');
+
+const glob = require('glob');
+const defaultConfig = require('@wordpress/scripts/config/webpack.config');
+const CopyWebpackPlugin = require('copy-webpack-plugin');
+const RemoveEmptyScriptsPlugin = require('webpack-remove-empty-scripts');
+const RtlCssPlugin = require('rtlcss-webpack-plugin');
+const isProduction = process.env.NODE_ENV === 'production';
+const FileManagerPlugin = require('filemanager-webpack-plugin');
+
+const { getWordPressSrcDirectory } = require('@wordpress/scripts/utils');
+
+const vendorFiles = [
+ {
+ source: 'node_modules/@fancyapps/fancybox/dist/jquery.fancybox.min.js',
+ destination: 'assets/vendor/fancybox/dist/jquery.fancybox.min.js',
+ },
+ {
+ source: 'node_modules/@fancyapps/fancybox/dist/jquery.fancybox.min.css',
+ destination: 'assets/vendor/fancybox/dist/jquery.fancybox.min.css',
+ },
+ {
+ source: 'node_modules/flickr-justified-gallery/dist/fjGallery.min.js',
+ destination:
+ 'assets/vendor/flickr-justified-gallery/dist/fjGallery.min.js',
+ },
+ {
+ source: 'node_modules/flickr-justified-gallery/dist/fjGallery.min.js.map',
+ destination:
+ 'assets/vendor/flickr-justified-gallery/dist/fjGallery.min.js.map',
+ },
+ {
+ source: 'node_modules/flickr-justified-gallery/dist/fjGallery.css',
+ destination:
+ 'assets/vendor/flickr-justified-gallery/dist/fjGallery.css',
+ },
+ {
+ source: 'node_modules/iframe-resizer/js/iframeResizer.contentWindow.min.js',
+ destination:
+ 'assets/vendor/iframe-resizer/js/iframeResizer.contentWindow.min.js',
+ },
+ {
+ source: 'node_modules/iframe-resizer/js/iframeResizer.contentWindow.map',
+ destination:
+ 'assets/vendor/iframe-resizer/js/iframeResizer.contentWindow.map',
+ },
+ {
+ source: 'node_modules/iframe-resizer/js/iframeResizer.min.js',
+ destination: 'assets/vendor/iframe-resizer/js/iframeResizer.min.js',
+ },
+ {
+ source: 'node_modules/iframe-resizer/js/iframeResizer.map',
+ destination: 'assets/vendor/iframe-resizer/js/iframeResizer.map',
+ },
+ {
+ source: 'node_modules/isotope-layout/dist/isotope.pkgd.min.js',
+ destination: 'assets/vendor/isotope-layout/dist/isotope.pkgd.min.js',
+ },
+ {
+ source: 'node_modules/lazysizes/lazysizes.min.js',
+ destination: 'assets/vendor/lazysizes/lazysizes.min.js',
+ },
+ {
+ source: 'node_modules/photoswipe/dist/photoswipe.min.js',
+ destination: 'assets/vendor/photoswipe/dist/photoswipe.min.js',
+ },
+ {
+ source: 'node_modules/photoswipe/dist/photoswipe-ui-default.min.js',
+ destination:
+ 'assets/vendor/photoswipe/dist/photoswipe-ui-default.min.js',
+ },
+ {
+ source: 'node_modules/photoswipe/dist/photoswipe.css',
+ destination: 'assets/vendor/photoswipe/dist/photoswipe.css',
+ },
+ {
+ source: 'node_modules/photoswipe/dist/default-skin/default-skin.css',
+ destination:
+ 'assets/vendor/photoswipe/dist/default-skin/default-skin.css',
+ },
+ {
+ source: 'node_modules/photoswipe/dist/default-skin/default-skin.png',
+ destination:
+ 'assets/vendor/photoswipe/dist/default-skin/default-skin.png',
+ },
+ {
+ source: 'node_modules/photoswipe/dist/default-skin/default-skin.svg',
+ destination:
+ 'assets/vendor/photoswipe/dist/default-skin/default-skin.svg',
+ },
+ {
+ source: 'node_modules/photoswipe/dist/default-skin/preloader.gif',
+ destination: 'assets/vendor/photoswipe/dist/default-skin/preloader.gif',
+ },
+ {
+ source: 'node_modules/simplebar/dist/simplebar.min.js',
+ destination: 'assets/vendor/simplebar/dist/simplebar.min.js',
+ },
+ {
+ source: 'node_modules/simplebar/dist/simplebar.min.css',
+ destination: 'assets/vendor/simplebar/dist/simplebar.min.css',
+ },
+ {
+ source: 'node_modules/swiper/swiper-bundle.min.js',
+ destination: 'assets/vendor/swiper/swiper-bundle.min.js',
+ },
+ {
+ source: 'node_modules/swiper/swiper-bundle.min.js.map',
+ destination: 'assets/vendor/swiper/swiper-bundle.min.js.map',
+ },
+ {
+ source: 'node_modules/swiper/swiper-bundle.min.css',
+ destination: 'assets/vendor/swiper/swiper-bundle.min.css',
+ },
+ {
+ source: 'assets/admin/images',
+ destination: 'build/assets/admin/images',
+ },
+ {
+ source: 'assets/images',
+ destination: 'build/assets/images',
+ },
+];
+
+defaultConfig.module.rules[2].use[1].options.url = false;
+
+// Prepare JS for assets.
+const entryAssetsJs = glob
+ .sync([
+ './assets/js/**.js',
+ './assets/admin/js/**.js',
+ './gutenberg/index.js',
+ './gutenberg/custom-post-meta.js',
+ './gutenberg/layouts-editor-script.js',
+ './assets/js/3rd/plugin-jetpack.js',
+ ])
+ .reduce(function (entries, entry) {
+ const name = entry.replace('.js', '');
+ entries[name] = path.resolve(process.cwd(), entry);
+ return entries;
+ }, {});
+
+// Prepare CSS for assets.
+const entryAssetsCss = glob
+ .sync([
+ './assets/css/**.scss',
+ './assets/admin/css/**.scss',
+ './templates/**/style.scss',
+ './templates/**/**/style.scss',
+ './templates/**/**/**/style.scss',
+ './gutenberg/style.scss',
+ './gutenberg/layouts-editor-style.scss',
+ ])
+ .filter((entry) => {
+ const filename = path.basename(entry);
+
+ // Exclude file names started with _
+ return !/^_/.test(filename);
+ })
+ .reduce(function (entries, entry) {
+ const name = entry.replace('.scss', '');
+
+ entries[name] = path.resolve(process.cwd(), entry);
+
+ return entries;
+ }, {});
+
+const newConfig = {
+ ...defaultConfig,
+ ...{
+ entry: {
+ // Assets JS.
+ ...entryAssetsJs,
+ // Assets CSS.
+ ...entryAssetsCss,
+ },
+
+ // Display minimum info in terminal.
+ stats: 'minimal',
+ },
+ module: {
+ ...defaultConfig.module,
+ rules: [...defaultConfig.module.rules],
+ },
+ plugins: [
+ ...defaultConfig.plugins,
+ new RtlCssPlugin({
+ filename: `[name]-rtl.css`,
+ }),
+ new CopyWebpackPlugin({
+ patterns: [
+ {
+ from: '**/block.json',
+ context: getWordPressSrcDirectory(),
+ noErrorOnMissing: true,
+ transform(content, absoluteFrom) {
+ const convertExtension = (p) => {
+ return p.replace(/\.(j|t)sx?$/, '.js');
+ };
+
+ if (path.basename(absoluteFrom) === 'block.json') {
+ const blockJson = JSON.parse(content.toString());
+ ['viewScript', 'script', 'editorScript'].forEach(
+ (key) => {
+ if (Array.isArray(blockJson[key])) {
+ blockJson[key] =
+ blockJson[key].map(
+ convertExtension
+ );
+ } else if (
+ typeof blockJson[key] === 'string'
+ ) {
+ blockJson[key] = convertExtension(
+ blockJson[key]
+ );
+ }
+ }
+ );
+
+ return JSON.stringify(blockJson, null, 2);
+ }
+
+ return content;
+ },
+ },
+ ],
+ }),
+ new FileManagerPlugin({
+ events: {
+ onEnd: {
+ copy: [
+ {
+ source: 'build/templates',
+ destination: 'templates',
+ options: {
+ flat: false,
+ preserveTimestamps: true,
+ overwrite: true,
+ force: true,
+ },
+ },
+ ...vendorFiles,
+ ],
+ delete: [
+ 'build/templates',
+ 'templates/**/*.css.map',
+ 'templates/**/*.js',
+ 'templates/**/*.js.map',
+ 'templates/**/*.asset.php',
+ ],
+ },
+ },
+ runOnceInWatchMode: false,
+ runTasksInSeries: true,
+ }),
+ ].filter(Boolean),
+ watchOptions: {
+ ignored: [
+ '**/templates/**/*.css',
+ '**/templates/**/*.css.map',
+ '**/templates/**/*.js',
+ '**/templates/**/*.js.map',
+ '**/templates/**/*.asset.php',
+ '**/vendor/**',
+ ],
+ },
+ optimization: {
+ ...defaultConfig.optimization,
+ splitChunks: {
+ cacheGroups: {
+ ...defaultConfig.optimization.splitChunks.cacheGroups,
+ style: {
+ type: 'css/mini-extract',
+ test: /[\\/]style(\.module)?\.(sc|sa|c)ss$/,
+ chunks: 'all',
+ enforce: true,
+ name(_, chunks, cacheGroupKey) {
+ const chunkName =
+ chunks[chunks.length > 1 ? 1 : 0].name;
+ let cssOutput = `${path.dirname(
+ chunkName
+ )}/${cacheGroupKey}-${path.basename(chunkName)}`;
+
+ if (
+ (chunkName.indexOf('templates/') > -1 ||
+ chunkName.indexOf('admin/css/') > -1 ||
+ chunkName.indexOf('gutenberg/') > -1) &&
+ cacheGroupKey === 'style'
+ ) {
+ cssOutput = `${path.dirname(
+ chunkName
+ )}/${path.basename(chunkName)}`;
+ }
+
+ if (
+ chunkName.indexOf('layouts-editor') > -1 &&
+ cacheGroupKey === 'style'
+ ) {
+ cssOutput = `${path.dirname(
+ chunkName
+ )}/${cacheGroupKey}-${path.basename(chunkName)}`;
+ }
+ return cssOutput;
+ },
+ },
+ },
+ },
+ },
};
+
+// Production only.
+if (isProduction) {
+ // Remove JS files created for styles
+ // to prevent enqueue it on production.
+ newConfig.plugins = [new RemoveEmptyScriptsPlugin(), ...newConfig.plugins];
+}
+
+// Development only.
+if (!isProduction) {
+ newConfig.devServer = {
+ ...newConfig.devServer,
+ // Support for dev server on all domains.
+ allowedHosts: 'all',
+ };
+
+ // Fix HMR is not working with multiple entries.
+ // @thanks https://github.com/webpack/webpack-dev-server/issues/2792#issuecomment-806983882
+ newConfig.optimization.runtimeChunk = 'single';
+}
+
+newConfig.module.rules = newConfig.module.rules.map((rule) => {
+ if (/svg/.test(rule.test)) {
+ return { ...rule, exclude: /\.svg$/i };
+ }
+
+ return rule;
+});
+
+newConfig.module.rules.push({
+ test: /\.svg$/,
+ use: [
+ {
+ loader: '@svgr/webpack',
+ options: {
+ svgoConfig: {
+ plugins: [
+ {
+ name: 'preset-default',
+ params: {
+ overrides: {
+ removeViewBox: false,
+ },
+ },
+ },
+ ],
+ },
+ },
+ },
+ {
+ loader: 'url-loader',
+ },
+ ],
+});
+
+module.exports = newConfig;
diff --git a/wpeg.config.js b/wpeg.config.js
deleted file mode 100644
index bb9f363f..00000000
--- a/wpeg.config.js
+++ /dev/null
@@ -1,125 +0,0 @@
-/* eslint-disable import/no-extraneous-dependencies */
-const path = require('path');
-
-const pkg = require('json-file').read('./package.json').data;
-
-const cfg = {};
-
-// Build Paths.
-cfg.name = 'visual-portfolio';
-cfg.src = './src';
-cfg.dist_root = './dist';
-cfg.dist = '{dist_root}/{name}';
-
-// Browser sync.
-cfg.browser_sync = {
- proxy: '{name}.local',
- host: '{name}.local',
- open: 'external',
- ghostMode: false,
-};
-
-// Template variables that will be automatically replaced.
-cfg.template_files_src = '{dist}/**/*.{md,php,js,css,pot,json}';
-cfg.template_files_variables = {
- text_domain: pkg.name,
- plugin_version: pkg.version,
- plugin_name: pkg.name,
- plugin_title: pkg.title,
- plugin_author: pkg.author,
-};
-
-// Copy files.
-cfg.copy_files_src = [
- '{src}/**/*',
- '!{src}/**/*.{js,jsx,scss}',
- '{src}/**/vendor/**/*.{js,jsx,scss}',
- './node_modules/@fancyapps/*fancybox/dist/jquery.fancybox.min.js',
- './node_modules/@fancyapps/*fancybox/dist/jquery.fancybox.min.css',
- './node_modules/*flickr-justified-gallery/dist/fjGallery.min.js',
- './node_modules/*flickr-justified-gallery/dist/fjGallery.min.js.map',
- './node_modules/*flickr-justified-gallery/dist/fjGallery.css',
- './node_modules/*iframe-resizer/js/iframeResizer.contentWindow.min.js',
- './node_modules/*iframe-resizer/js/iframeResizer.contentWindow.map',
- './node_modules/*iframe-resizer/js/iframeResizer.min.js',
- './node_modules/*iframe-resizer/js/iframeResizer.map',
- './node_modules/*isotope-layout/dist/isotope.pkgd.min.js',
- './node_modules/*lazysizes/lazysizes.min.js',
- './node_modules/*photoswipe/dist/photoswipe.min.js',
- './node_modules/*photoswipe/dist/photoswipe-ui-default.min.js',
- './node_modules/*photoswipe/dist/photoswipe.css',
- './node_modules/*photoswipe/dist/default-skin/default-skin.css',
- './node_modules/*photoswipe/dist/default-skin/default-skin.png',
- './node_modules/*photoswipe/dist/default-skin/default-skin.svg',
- './node_modules/*photoswipe/dist/default-skin/preloader.gif',
- './node_modules/*simplebar/dist/simplebar.min.js',
- './node_modules/*simplebar/dist/simplebar.min.css',
- './node_modules/*swiper/swiper-bundle.min.js',
- './node_modules/*swiper/swiper-bundle.min.js.map',
- './node_modules/*swiper/swiper-bundle.min.css',
-];
-
-cfg.copy_files_dist = (file) => {
- let destPath = `${cfg.dist_root}/${cfg.name}`;
- const filePath = path.relative(process.cwd(), file.path);
-
- if (filePath && /^node_modules/g.test(filePath)) {
- destPath += '/assets/vendor';
- }
-
- return destPath;
-};
-
-// Compile SCSS files.
-cfg.compile_scss_files_src = [
- '{src}/*assets/**/*.scss',
- '{src}/*gutenberg/*.scss',
- '{src}/*templates/**/*.scss',
- '!{src}/**/vendor/**/*',
-];
-cfg.compile_scss_files_rtl = true;
-
-// Compile JS files.
-cfg.compile_js_files_src = [
- '{src}/*assets/**/*.js',
- '{src}/*gutenberg/*.js',
- '!{src}/**/vendor/**/*',
-];
-
-// Correct line endings files.
-cfg.correct_line_endings_files_src = '{dist}/**/*.{js,css}';
-
-// Translate PHP files.
-cfg.translate_php_files_src = '{dist}/**/*.php';
-cfg.translate_php_files_dist = `{dist}/languages/${cfg.template_files_variables.plugin_name}.pot`;
-cfg.translate_php_options = {
- domain: cfg.template_files_variables.text_domain,
- package: cfg.template_files_variables.plugin_title,
- lastTranslator: cfg.template_files_variables.plugin_author,
- team: cfg.template_files_variables.plugin_author,
-};
-
-// ZIP files.
-cfg.zip_files = [
- {
- src: '{dist}/**/*',
- src_opts: {
- base: '{dist_root}',
- },
- dist: '{dist_root}/{name}.zip',
- },
-];
-
-// Watch files.
-cfg.watch_files = ['{src}/**/*', '!{src}/**/*.{jsx,js,scss}'];
-
-cfg.watch_js_files = [
- '{src}/**/*.js',
- '{src}/gutenberg/**/*',
- '!{src}/gutenberg/**/*.scss',
- '!{src}/*vendor/**/*',
-];
-
-cfg.watch_scss_files = '{src}/**/*.scss';
-
-module.exports = cfg;
diff --git a/src/wpml-config.xml b/wpml-config.xml
similarity index 100%
rename from src/wpml-config.xml
rename to wpml-config.xml