diff --git a/.ddev/.env.web b/.ddev/.env.web new file mode 100644 index 0000000..d68df0b --- /dev/null +++ b/.ddev/.env.web @@ -0,0 +1,10 @@ +CRAFT_DB_DATABASE="db" +CRAFT_DB_PASSWORD="db" +CRAFT_DB_DRIVER="mysql" +CRAFT_DB_PORT="3306" +CRAFT_WEB_ROOT="/var/www/html/web" +PRIMARY_SITE_URL="https://viget-craft-starter.ddev.site" +CRAFT_DB_SERVER="db" +CRAFT_DB_USER="db" +MAILPIT_SMTP_HOSTNAME="127.0.0.1" +MAILPIT_SMTP_PORT="1025" diff --git a/.ddev/config.yaml b/.ddev/config.yaml index 2f8acb6..0ae2704 100644 --- a/.ddev/config.yaml +++ b/.ddev/config.yaml @@ -1,7 +1,7 @@ name: viget-craft-starter type: craftcms docroot: web -php_version: '8.2' +php_version: '8.4' webserver_type: nginx-fpm xdebug_enabled: false additional_hostnames: [] diff --git a/.ddev/php/php-local.ini b/.ddev/php/php-local.ini new file mode 100755 index 0000000..c75eb32 --- /dev/null +++ b/.ddev/php/php-local.ini @@ -0,0 +1,3 @@ +[PHP] +display_errors = On +error_reporting = ~E_ALL & ~E_DEPRECATED & ~E_USER_DEPRECATED; diff --git a/composer.json b/composer.json index c187fb7..28833ed 100644 --- a/composer.json +++ b/composer.json @@ -18,7 +18,7 @@ "verbb/expanded-singles": "3.0.3", "verbb/navigation": "3.0.15", "viget/craft-classnames": "3.0.0", - "viget/craft-parts-kit": "dev-main", + "viget/craft-parts-kit": "^1.0", "vlucas/phpdotenv": "^5.4.0" }, "require-dev": { @@ -41,7 +41,7 @@ "sort-packages": true, "optimize-autoloader": true, "platform": { - "php": "8.2" + "php": "8.4" } }, "scripts": { @@ -69,10 +69,6 @@ "type": "composer", "url": "https://composer.craftcms.com", "canonical": false - }, - { - "type": "github", - "url": "https://github.com/vigetlabs/craft-parts-kit.git" } ] -} \ No newline at end of file +} diff --git a/composer.lock b/composer.lock index 7ee7c54..e5a0980 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "840c570c460e963f1ad5c1ad635e1e30", + "content-hash": "1e58e9f0114c71068954e2490923727b", "packages": [ { "name": "aws/aws-crt-php", @@ -48,16 +48,16 @@ }, { "name": "aws/aws-sdk-php", - "version": "3.363.0", + "version": "3.364.0", "source": { "type": "git", "url": "https://github.com/aws/aws-sdk-php.git", - "reference": "b2f78a0787a73801957eb329048d52b4181e9660" + "reference": "768e0055da7e9e505aae8a87454d310a7c321ac1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/b2f78a0787a73801957eb329048d52b4181e9660", - "reference": "b2f78a0787a73801957eb329048d52b4181e9660", + "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/768e0055da7e9e505aae8a87454d310a7c321ac1", + "reference": "768e0055da7e9e505aae8a87454d310a7c321ac1", "shasum": "" }, "require": { @@ -139,9 +139,9 @@ "support": { "forum": "https://github.com/aws/aws-sdk-php/discussions", "issues": "https://github.com/aws/aws-sdk-php/issues", - "source": "https://github.com/aws/aws-sdk-php/tree/3.363.0" + "source": "https://github.com/aws/aws-sdk-php/tree/3.364.0" }, - "time": "2025-11-21T19:41:10+00:00" + "time": "2025-12-01T01:08:11+00:00" }, { "name": "bacon/bacon-qr-code", @@ -4466,16 +4466,16 @@ }, { "name": "phpdocumentor/reflection-docblock", - "version": "5.6.4", + "version": "5.6.5", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "90a04bcbf03784066f16038e87e23a0a83cee3c2" + "reference": "90614c73d3800e187615e2dd236ad0e2a01bf761" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/90a04bcbf03784066f16038e87e23a0a83cee3c2", - "reference": "90a04bcbf03784066f16038e87e23a0a83cee3c2", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/90614c73d3800e187615e2dd236ad0e2a01bf761", + "reference": "90614c73d3800e187615e2dd236ad0e2a01bf761", "shasum": "" }, "require": { @@ -4524,22 +4524,22 @@ "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", "support": { "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", - "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.6.4" + "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.6.5" }, - "time": "2025-11-17T21:13:10+00:00" + "time": "2025-11-27T19:50:05+00:00" }, { "name": "phpdocumentor/type-resolver", - "version": "1.11.1", + "version": "1.12.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "f626740b38009078de0dc8b2b9dc4e7f749c6eba" + "reference": "92a98ada2b93d9b201a613cb5a33584dde25f195" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/f626740b38009078de0dc8b2b9dc4e7f749c6eba", - "reference": "f626740b38009078de0dc8b2b9dc4e7f749c6eba", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/92a98ada2b93d9b201a613cb5a33584dde25f195", + "reference": "92a98ada2b93d9b201a613cb5a33584dde25f195", "shasum": "" }, "require": { @@ -4582,9 +4582,9 @@ "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", "support": { "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.11.1" + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.12.0" }, - "time": "2025-11-21T11:31:57+00:00" + "time": "2025-11-21T15:09:14+00:00" }, { "name": "phpoption/phpoption", @@ -6037,16 +6037,16 @@ }, { "name": "symfony/css-selector", - "version": "v7.3.6", + "version": "v7.4.0", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", - "reference": "84321188c4754e64273b46b406081ad9b18e8614" + "reference": "ab862f478513e7ca2fe9ec117a6f01a8da6e1135" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/css-selector/zipball/84321188c4754e64273b46b406081ad9b18e8614", - "reference": "84321188c4754e64273b46b406081ad9b18e8614", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/ab862f478513e7ca2fe9ec117a6f01a8da6e1135", + "reference": "ab862f478513e7ca2fe9ec117a6f01a8da6e1135", "shasum": "" }, "require": { @@ -6082,7 +6082,7 @@ "description": "Converts CSS selectors to XPath expressions", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/css-selector/tree/v7.3.6" + "source": "https://github.com/symfony/css-selector/tree/v7.4.0" }, "funding": [ { @@ -6102,7 +6102,7 @@ "type": "tidelift" } ], - "time": "2025-10-29T17:24:25+00:00" + "time": "2025-10-30T13:39:42+00:00" }, { "name": "symfony/deprecation-contracts", @@ -6173,26 +6173,27 @@ }, { "name": "symfony/dom-crawler", - "version": "v7.3.3", + "version": "v7.4.0", "source": { "type": "git", "url": "https://github.com/symfony/dom-crawler.git", - "reference": "efa076ea0eeff504383ff0dcf827ea5ce15690ba" + "reference": "8f3e7464fe7e77294686e935956a6a8ccf7442c4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/efa076ea0eeff504383ff0dcf827ea5ce15690ba", - "reference": "efa076ea0eeff504383ff0dcf827ea5ce15690ba", + "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/8f3e7464fe7e77294686e935956a6a8ccf7442c4", + "reference": "8f3e7464fe7e77294686e935956a6a8ccf7442c4", "shasum": "" }, "require": { "masterminds/html5": "^2.6", "php": ">=8.2", + "symfony/deprecation-contracts": "^2.5|^3", "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-mbstring": "~1.0" }, "require-dev": { - "symfony/css-selector": "^6.4|^7.0" + "symfony/css-selector": "^6.4|^7.0|^8.0" }, "type": "library", "autoload": { @@ -6220,7 +6221,7 @@ "description": "Eases DOM navigation for HTML and XML documents", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/dom-crawler/tree/v7.3.3" + "source": "https://github.com/symfony/dom-crawler/tree/v7.4.0" }, "funding": [ { @@ -6240,20 +6241,20 @@ "type": "tidelift" } ], - "time": "2025-08-06T20:13:54+00:00" + "time": "2025-10-31T09:30:03+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v7.3.3", + "version": "v7.4.0", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "b7dc69e71de420ac04bc9ab830cf3ffebba48191" + "reference": "9dddcddff1ef974ad87b3708e4b442dc38b2261d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/b7dc69e71de420ac04bc9ab830cf3ffebba48191", - "reference": "b7dc69e71de420ac04bc9ab830cf3ffebba48191", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/9dddcddff1ef974ad87b3708e4b442dc38b2261d", + "reference": "9dddcddff1ef974ad87b3708e4b442dc38b2261d", "shasum": "" }, "require": { @@ -6270,13 +6271,14 @@ }, "require-dev": { "psr/log": "^1|^2|^3", - "symfony/config": "^6.4|^7.0", - "symfony/dependency-injection": "^6.4|^7.0", - "symfony/error-handler": "^6.4|^7.0", - "symfony/expression-language": "^6.4|^7.0", - "symfony/http-foundation": "^6.4|^7.0", + "symfony/config": "^6.4|^7.0|^8.0", + "symfony/dependency-injection": "^6.4|^7.0|^8.0", + "symfony/error-handler": "^6.4|^7.0|^8.0", + "symfony/expression-language": "^6.4|^7.0|^8.0", + "symfony/framework-bundle": "^6.4|^7.0|^8.0", + "symfony/http-foundation": "^6.4|^7.0|^8.0", "symfony/service-contracts": "^2.5|^3", - "symfony/stopwatch": "^6.4|^7.0" + "symfony/stopwatch": "^6.4|^7.0|^8.0" }, "type": "library", "autoload": { @@ -6304,7 +6306,7 @@ "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v7.3.3" + "source": "https://github.com/symfony/event-dispatcher/tree/v7.4.0" }, "funding": [ { @@ -6324,7 +6326,7 @@ "type": "tidelift" } ], - "time": "2025-08-13T11:49:31+00:00" + "time": "2025-10-28T09:38:46+00:00" }, { "name": "symfony/event-dispatcher-contracts", @@ -6474,16 +6476,16 @@ }, { "name": "symfony/http-client", - "version": "v7.3.6", + "version": "v7.4.0", "source": { "type": "git", "url": "https://github.com/symfony/http-client.git", - "reference": "3c0a55a2c8e21e30a37022801c11c7ab5a6cb2de" + "reference": "ee5e0e0139ab506f6063a230e631bed677c650a4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-client/zipball/3c0a55a2c8e21e30a37022801c11c7ab5a6cb2de", - "reference": "3c0a55a2c8e21e30a37022801c11c7ab5a6cb2de", + "url": "https://api.github.com/repos/symfony/http-client/zipball/ee5e0e0139ab506f6063a230e631bed677c650a4", + "reference": "ee5e0e0139ab506f6063a230e631bed677c650a4", "shasum": "" }, "require": { @@ -6514,12 +6516,13 @@ "php-http/httplug": "^1.0|^2.0", "psr/http-client": "^1.0", "symfony/amphp-http-client-meta": "^1.0|^2.0", - "symfony/dependency-injection": "^6.4|^7.0", - "symfony/http-kernel": "^6.4|^7.0", - "symfony/messenger": "^6.4|^7.0", - "symfony/process": "^6.4|^7.0", - "symfony/rate-limiter": "^6.4|^7.0", - "symfony/stopwatch": "^6.4|^7.0" + "symfony/cache": "^6.4|^7.0|^8.0", + "symfony/dependency-injection": "^6.4|^7.0|^8.0", + "symfony/http-kernel": "^6.4|^7.0|^8.0", + "symfony/messenger": "^6.4|^7.0|^8.0", + "symfony/process": "^6.4|^7.0|^8.0", + "symfony/rate-limiter": "^6.4|^7.0|^8.0", + "symfony/stopwatch": "^6.4|^7.0|^8.0" }, "type": "library", "autoload": { @@ -6550,7 +6553,7 @@ "http" ], "support": { - "source": "https://github.com/symfony/http-client/tree/v7.3.6" + "source": "https://github.com/symfony/http-client/tree/v7.4.0" }, "funding": [ { @@ -6570,7 +6573,7 @@ "type": "tidelift" } ], - "time": "2025-11-05T17:41:46+00:00" + "time": "2025-11-20T12:32:50+00:00" }, { "name": "symfony/http-client-contracts", @@ -6652,16 +6655,16 @@ }, { "name": "symfony/mailer", - "version": "v7.3.5", + "version": "v7.4.0", "source": { "type": "git", "url": "https://github.com/symfony/mailer.git", - "reference": "fd497c45ba9c10c37864e19466b090dcb60a50ba" + "reference": "a3d9eea8cfa467ece41f0f54ba28185d74bd53fd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mailer/zipball/fd497c45ba9c10c37864e19466b090dcb60a50ba", - "reference": "fd497c45ba9c10c37864e19466b090dcb60a50ba", + "url": "https://api.github.com/repos/symfony/mailer/zipball/a3d9eea8cfa467ece41f0f54ba28185d74bd53fd", + "reference": "a3d9eea8cfa467ece41f0f54ba28185d74bd53fd", "shasum": "" }, "require": { @@ -6669,8 +6672,8 @@ "php": ">=8.2", "psr/event-dispatcher": "^1", "psr/log": "^1|^2|^3", - "symfony/event-dispatcher": "^6.4|^7.0", - "symfony/mime": "^7.2", + "symfony/event-dispatcher": "^6.4|^7.0|^8.0", + "symfony/mime": "^7.2|^8.0", "symfony/service-contracts": "^2.5|^3" }, "conflict": { @@ -6681,10 +6684,10 @@ "symfony/twig-bridge": "<6.4" }, "require-dev": { - "symfony/console": "^6.4|^7.0", - "symfony/http-client": "^6.4|^7.0", - "symfony/messenger": "^6.4|^7.0", - "symfony/twig-bridge": "^6.4|^7.0" + "symfony/console": "^6.4|^7.0|^8.0", + "symfony/http-client": "^6.4|^7.0|^8.0", + "symfony/messenger": "^6.4|^7.0|^8.0", + "symfony/twig-bridge": "^6.4|^7.0|^8.0" }, "type": "library", "autoload": { @@ -6712,7 +6715,7 @@ "description": "Helps sending emails", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/mailer/tree/v7.3.5" + "source": "https://github.com/symfony/mailer/tree/v7.4.0" }, "funding": [ { @@ -6732,24 +6735,25 @@ "type": "tidelift" } ], - "time": "2025-10-24T14:27:20+00:00" + "time": "2025-11-21T15:26:00+00:00" }, { "name": "symfony/mime", - "version": "v7.3.4", + "version": "v7.4.0", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", - "reference": "b1b828f69cbaf887fa835a091869e55df91d0e35" + "reference": "bdb02729471be5d047a3ac4a69068748f1a6be7a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/b1b828f69cbaf887fa835a091869e55df91d0e35", - "reference": "b1b828f69cbaf887fa835a091869e55df91d0e35", + "url": "https://api.github.com/repos/symfony/mime/zipball/bdb02729471be5d047a3ac4a69068748f1a6be7a", + "reference": "bdb02729471be5d047a3ac4a69068748f1a6be7a", "shasum": "" }, "require": { "php": ">=8.2", + "symfony/deprecation-contracts": "^2.5|^3", "symfony/polyfill-intl-idn": "^1.10", "symfony/polyfill-mbstring": "^1.0" }, @@ -6764,11 +6768,11 @@ "egulias/email-validator": "^2.1.10|^3.1|^4", "league/html-to-markdown": "^5.0", "phpdocumentor/reflection-docblock": "^3.0|^4.0|^5.0", - "symfony/dependency-injection": "^6.4|^7.0", - "symfony/process": "^6.4|^7.0", - "symfony/property-access": "^6.4|^7.0", - "symfony/property-info": "^6.4|^7.0", - "symfony/serializer": "^6.4.3|^7.0.3" + "symfony/dependency-injection": "^6.4|^7.0|^8.0", + "symfony/process": "^6.4|^7.0|^8.0", + "symfony/property-access": "^6.4|^7.0|^8.0", + "symfony/property-info": "^6.4|^7.0|^8.0", + "symfony/serializer": "^6.4.3|^7.0.3|^8.0" }, "type": "library", "autoload": { @@ -6800,7 +6804,7 @@ "mime-type" ], "support": { - "source": "https://github.com/symfony/mime/tree/v7.3.4" + "source": "https://github.com/symfony/mime/tree/v7.4.0" }, "funding": [ { @@ -6820,7 +6824,7 @@ "type": "tidelift" } ], - "time": "2025-09-16T08:38:17+00:00" + "time": "2025-11-16T10:14:42+00:00" }, { "name": "symfony/polyfill-ctype", @@ -7779,16 +7783,16 @@ }, { "name": "symfony/process", - "version": "v7.3.4", + "version": "v7.4.0", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "f24f8f316367b30810810d4eb30c543d7003ff3b" + "reference": "7ca8dc2d0dcf4882658313aba8be5d9fd01026c8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/f24f8f316367b30810810d4eb30c543d7003ff3b", - "reference": "f24f8f316367b30810810d4eb30c543d7003ff3b", + "url": "https://api.github.com/repos/symfony/process/zipball/7ca8dc2d0dcf4882658313aba8be5d9fd01026c8", + "reference": "7ca8dc2d0dcf4882658313aba8be5d9fd01026c8", "shasum": "" }, "require": { @@ -7820,7 +7824,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v7.3.4" + "source": "https://github.com/symfony/process/tree/v7.4.0" }, "funding": [ { @@ -7840,28 +7844,29 @@ "type": "tidelift" } ], - "time": "2025-09-11T10:12:26+00:00" + "time": "2025-10-16T11:21:06+00:00" }, { "name": "symfony/property-access", - "version": "v7.3.3", + "version": "v7.4.0", "source": { "type": "git", "url": "https://github.com/symfony/property-access.git", - "reference": "4a4389e5c8bd1d0320d80a23caa6a1ac71cb81a7" + "reference": "537626149d2910ca43eb9ce465654366bf4442f4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/property-access/zipball/4a4389e5c8bd1d0320d80a23caa6a1ac71cb81a7", - "reference": "4a4389e5c8bd1d0320d80a23caa6a1ac71cb81a7", + "url": "https://api.github.com/repos/symfony/property-access/zipball/537626149d2910ca43eb9ce465654366bf4442f4", + "reference": "537626149d2910ca43eb9ce465654366bf4442f4", "shasum": "" }, "require": { "php": ">=8.2", - "symfony/property-info": "^6.4|^7.0" + "symfony/property-info": "^6.4|^7.0|^8.0" }, "require-dev": { - "symfony/cache": "^6.4|^7.0" + "symfony/cache": "^6.4|^7.0|^8.0", + "symfony/var-exporter": "^6.4.1|^7.0.1|^8.0" }, "type": "library", "autoload": { @@ -7900,7 +7905,7 @@ "reflection" ], "support": { - "source": "https://github.com/symfony/property-access/tree/v7.3.3" + "source": "https://github.com/symfony/property-access/tree/v7.4.0" }, "funding": [ { @@ -7920,27 +7925,27 @@ "type": "tidelift" } ], - "time": "2025-08-04T15:15:28+00:00" + "time": "2025-09-08T21:14:32+00:00" }, { "name": "symfony/property-info", - "version": "v7.3.5", + "version": "v7.4.0", "source": { "type": "git", "url": "https://github.com/symfony/property-info.git", - "reference": "0b346ed259dc5da43535caf243005fe7d4b0f051" + "reference": "c3c686e3d3a33a99f6967e69d6d5832acb7c25a1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/property-info/zipball/0b346ed259dc5da43535caf243005fe7d4b0f051", - "reference": "0b346ed259dc5da43535caf243005fe7d4b0f051", + "url": "https://api.github.com/repos/symfony/property-info/zipball/c3c686e3d3a33a99f6967e69d6d5832acb7c25a1", + "reference": "c3c686e3d3a33a99f6967e69d6d5832acb7c25a1", "shasum": "" }, "require": { "php": ">=8.2", "symfony/deprecation-contracts": "^2.5|^3", - "symfony/string": "^6.4|^7.0", - "symfony/type-info": "^7.3.5" + "symfony/string": "^6.4|^7.0|^8.0", + "symfony/type-info": "^7.3.5|^8.0" }, "conflict": { "phpdocumentor/reflection-docblock": "<5.2", @@ -7952,9 +7957,9 @@ "require-dev": { "phpdocumentor/reflection-docblock": "^5.2", "phpstan/phpdoc-parser": "^1.0|^2.0", - "symfony/cache": "^6.4|^7.0", - "symfony/dependency-injection": "^6.4|^7.0", - "symfony/serializer": "^6.4|^7.0" + "symfony/cache": "^6.4|^7.0|^8.0", + "symfony/dependency-injection": "^6.4|^7.0|^8.0", + "symfony/serializer": "^6.4|^7.0|^8.0" }, "type": "library", "autoload": { @@ -7990,7 +7995,7 @@ "validator" ], "support": { - "source": "https://github.com/symfony/property-info/tree/v7.3.5" + "source": "https://github.com/symfony/property-info/tree/v7.4.0" }, "funding": [ { @@ -8010,7 +8015,7 @@ "type": "tidelift" } ], - "time": "2025-10-05T22:12:41+00:00" + "time": "2025-11-13T08:38:49+00:00" }, { "name": "symfony/serializer", @@ -8203,22 +8208,23 @@ }, { "name": "symfony/string", - "version": "v7.3.4", + "version": "v7.4.0", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "f96476035142921000338bad71e5247fbc138872" + "reference": "d50e862cb0a0e0886f73ca1f31b865efbb795003" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/f96476035142921000338bad71e5247fbc138872", - "reference": "f96476035142921000338bad71e5247fbc138872", + "url": "https://api.github.com/repos/symfony/string/zipball/d50e862cb0a0e0886f73ca1f31b865efbb795003", + "reference": "d50e862cb0a0e0886f73ca1f31b865efbb795003", "shasum": "" }, "require": { "php": ">=8.2", + "symfony/deprecation-contracts": "^2.5|^3.0", "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-intl-grapheme": "~1.0", + "symfony/polyfill-intl-grapheme": "~1.33", "symfony/polyfill-intl-normalizer": "~1.0", "symfony/polyfill-mbstring": "~1.0" }, @@ -8226,11 +8232,11 @@ "symfony/translation-contracts": "<2.5" }, "require-dev": { - "symfony/emoji": "^7.1", - "symfony/http-client": "^6.4|^7.0", - "symfony/intl": "^6.4|^7.0", + "symfony/emoji": "^7.1|^8.0", + "symfony/http-client": "^6.4|^7.0|^8.0", + "symfony/intl": "^6.4|^7.0|^8.0", "symfony/translation-contracts": "^2.5|^3.0", - "symfony/var-exporter": "^6.4|^7.0" + "symfony/var-exporter": "^6.4|^7.0|^8.0" }, "type": "library", "autoload": { @@ -8269,7 +8275,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v7.3.4" + "source": "https://github.com/symfony/string/tree/v7.4.0" }, "funding": [ { @@ -8289,20 +8295,20 @@ "type": "tidelift" } ], - "time": "2025-09-11T14:36:48+00:00" + "time": "2025-11-27T13:27:24+00:00" }, { "name": "symfony/type-info", - "version": "v7.3.5", + "version": "v7.4.0", "source": { "type": "git", "url": "https://github.com/symfony/type-info.git", - "reference": "8b36f41421160db56914f897b57eaa6a830758b3" + "reference": "7f9743e921abcce92a03fc693530209c59e73076" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/type-info/zipball/8b36f41421160db56914f897b57eaa6a830758b3", - "reference": "8b36f41421160db56914f897b57eaa6a830758b3", + "url": "https://api.github.com/repos/symfony/type-info/zipball/7f9743e921abcce92a03fc693530209c59e73076", + "reference": "7f9743e921abcce92a03fc693530209c59e73076", "shasum": "" }, "require": { @@ -8352,7 +8358,7 @@ "type" ], "support": { - "source": "https://github.com/symfony/type-info/tree/v7.3.5" + "source": "https://github.com/symfony/type-info/tree/v7.4.0" }, "funding": [ { @@ -8372,20 +8378,20 @@ "type": "tidelift" } ], - "time": "2025-10-16T12:30:12+00:00" + "time": "2025-11-07T09:36:46+00:00" }, { "name": "symfony/uid", - "version": "v7.3.1", + "version": "v7.4.0", "source": { "type": "git", "url": "https://github.com/symfony/uid.git", - "reference": "a69f69f3159b852651a6bf45a9fdd149520525bb" + "reference": "2498e9f81b7baa206f44de583f2f48350b90142c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/uid/zipball/a69f69f3159b852651a6bf45a9fdd149520525bb", - "reference": "a69f69f3159b852651a6bf45a9fdd149520525bb", + "url": "https://api.github.com/repos/symfony/uid/zipball/2498e9f81b7baa206f44de583f2f48350b90142c", + "reference": "2498e9f81b7baa206f44de583f2f48350b90142c", "shasum": "" }, "require": { @@ -8393,7 +8399,7 @@ "symfony/polyfill-uuid": "^1.15" }, "require-dev": { - "symfony/console": "^6.4|^7.0" + "symfony/console": "^6.4|^7.0|^8.0" }, "type": "library", "autoload": { @@ -8430,7 +8436,7 @@ "uuid" ], "support": { - "source": "https://github.com/symfony/uid/tree/v7.3.1" + "source": "https://github.com/symfony/uid/tree/v7.4.0" }, "funding": [ { @@ -8441,12 +8447,16 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2025-06-27T19:55:54+00:00" + "time": "2025-09-25T11:02:55+00:00" }, { "name": "symfony/var-dumper", @@ -8508,28 +8518,28 @@ }, { "name": "symfony/yaml", - "version": "v7.3.5", + "version": "v7.4.0", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "90208e2fc6f68f613eae7ca25a2458a931b1bacc" + "reference": "6c84a4b55aee4cd02034d1c528e83f69ddf63810" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/90208e2fc6f68f613eae7ca25a2458a931b1bacc", - "reference": "90208e2fc6f68f613eae7ca25a2458a931b1bacc", + "url": "https://api.github.com/repos/symfony/yaml/zipball/6c84a4b55aee4cd02034d1c528e83f69ddf63810", + "reference": "6c84a4b55aee4cd02034d1c528e83f69ddf63810", "shasum": "" }, "require": { "php": ">=8.2", - "symfony/deprecation-contracts": "^2.5|^3.0", + "symfony/deprecation-contracts": "^2.5|^3", "symfony/polyfill-ctype": "^1.8" }, "conflict": { "symfony/console": "<6.4" }, "require-dev": { - "symfony/console": "^6.4|^7.0" + "symfony/console": "^6.4|^7.0|^8.0" }, "bin": [ "Resources/bin/yaml-lint" @@ -8560,7 +8570,7 @@ "description": "Loads and dumps YAML files", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/yaml/tree/v7.3.5" + "source": "https://github.com/symfony/yaml/tree/v7.4.0" }, "funding": [ { @@ -8580,7 +8590,7 @@ "type": "tidelift" } ], - "time": "2025-09-27T09:00:46+00:00" + "time": "2025-11-16T10:14:42+00:00" }, { "name": "theiconic/name-parser", @@ -8943,16 +8953,16 @@ }, { "name": "viget/craft-parts-kit", - "version": "dev-main", + "version": "1.0.0", "source": { "type": "git", "url": "https://github.com/vigetlabs/craft-parts-kit.git", - "reference": "2853630a177adf0fd4645102ed22dc72f00ecb0a" + "reference": "18378ce1a31d7f2db00cb27846ce0e1ada83a247" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vigetlabs/craft-parts-kit/zipball/2853630a177adf0fd4645102ed22dc72f00ecb0a", - "reference": "2853630a177adf0fd4645102ed22dc72f00ecb0a", + "url": "https://api.github.com/repos/vigetlabs/craft-parts-kit/zipball/18378ce1a31d7f2db00cb27846ce0e1ada83a247", + "reference": "18378ce1a31d7f2db00cb27846ce0e1ada83a247", "shasum": "" }, "require": { @@ -8963,11 +8973,10 @@ "craftcms/ecs": "dev-main", "craftcms/phpstan": "dev-main" }, - "default-branch": true, "type": "craft-plugin", "extra": { - "handle": "parts-kit", "name": "Parts Kit", + "handle": "parts-kit", "developer": "Viget", "documentationUrl": "https://github.com/vigetlabs/craft-parts-kit" }, @@ -8976,26 +8985,16 @@ "viget\\partskit\\": "src/" } }, - "scripts": { - "check-cs": [ - "ecs check --ansi" - ], - "fix-cs": [ - "ecs check --ansi --fix" - ], - "phpstan": [ - "phpstan --memory-limit=1G" - ] - }, + "notification-url": "https://packagist.org/downloads/", "license": [ "mit" ], "support": { "email": "craft@viget.com", - "source": "https://github.com/vigetlabs/craft-parts-kit/tree/main", - "issues": "https://github.com/vigetlabs/craft-parts-kit/issues" + "issues": "https://github.com/vigetlabs/craft-parts-kit/issues", + "source": "https://github.com/vigetlabs/craft-parts-kit/tree/1.0.0" }, - "time": "2025-11-05T23:17:44+00:00" + "time": "2025-11-05T22:56:29+00:00" }, { "name": "vlucas/phpdotenv", @@ -10320,16 +10319,16 @@ }, { "name": "nette/utils", - "version": "v4.0.8", + "version": "v4.0.9", "source": { "type": "git", "url": "https://github.com/nette/utils.git", - "reference": "c930ca4e3cf4f17dcfb03037703679d2396d2ede" + "reference": "505a30ad386daa5211f08a318e47015b501cad30" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nette/utils/zipball/c930ca4e3cf4f17dcfb03037703679d2396d2ede", - "reference": "c930ca4e3cf4f17dcfb03037703679d2396d2ede", + "url": "https://api.github.com/repos/nette/utils/zipball/505a30ad386daa5211f08a318e47015b501cad30", + "reference": "505a30ad386daa5211f08a318e47015b501cad30", "shasum": "" }, "require": { @@ -10403,9 +10402,9 @@ ], "support": { "issues": "https://github.com/nette/utils/issues", - "source": "https://github.com/nette/utils/tree/v4.0.8" + "source": "https://github.com/nette/utils/tree/v4.0.9" }, - "time": "2025-08-06T21:43:34+00:00" + "time": "2025-10-31T00:45:47+00:00" }, { "name": "nikic/php-parser", @@ -10589,16 +10588,16 @@ }, { "name": "psy/psysh", - "version": "v0.12.14", + "version": "v0.12.15", "source": { "type": "git", "url": "https://github.com/bobthecow/psysh.git", - "reference": "95c29b3756a23855a30566b745d218bee690bef2" + "reference": "38953bc71491c838fcb6ebcbdc41ab7483cd549c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/bobthecow/psysh/zipball/95c29b3756a23855a30566b745d218bee690bef2", - "reference": "95c29b3756a23855a30566b745d218bee690bef2", + "url": "https://api.github.com/repos/bobthecow/psysh/zipball/38953bc71491c838fcb6ebcbdc41ab7483cd549c", + "reference": "38953bc71491c838fcb6ebcbdc41ab7483cd549c", "shasum": "" }, "require": { @@ -10662,22 +10661,22 @@ ], "support": { "issues": "https://github.com/bobthecow/psysh/issues", - "source": "https://github.com/bobthecow/psysh/tree/v0.12.14" + "source": "https://github.com/bobthecow/psysh/tree/v0.12.15" }, - "time": "2025-10-27T17:15:31+00:00" + "time": "2025-11-28T00:00:14+00:00" }, { "name": "symfony/console", - "version": "v7.3.6", + "version": "v7.4.0", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "c28ad91448f86c5f6d9d2c70f0cf68bf135f252a" + "reference": "0bc0f45254b99c58d45a8fbf9fb955d46cbd1bb8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/c28ad91448f86c5f6d9d2c70f0cf68bf135f252a", - "reference": "c28ad91448f86c5f6d9d2c70f0cf68bf135f252a", + "url": "https://api.github.com/repos/symfony/console/zipball/0bc0f45254b99c58d45a8fbf9fb955d46cbd1bb8", + "reference": "0bc0f45254b99c58d45a8fbf9fb955d46cbd1bb8", "shasum": "" }, "require": { @@ -10685,7 +10684,7 @@ "symfony/deprecation-contracts": "^2.5|^3", "symfony/polyfill-mbstring": "~1.0", "symfony/service-contracts": "^2.5|^3", - "symfony/string": "^7.2" + "symfony/string": "^7.2|^8.0" }, "conflict": { "symfony/dependency-injection": "<6.4", @@ -10699,16 +10698,16 @@ }, "require-dev": { "psr/log": "^1|^2|^3", - "symfony/config": "^6.4|^7.0", - "symfony/dependency-injection": "^6.4|^7.0", - "symfony/event-dispatcher": "^6.4|^7.0", - "symfony/http-foundation": "^6.4|^7.0", - "symfony/http-kernel": "^6.4|^7.0", - "symfony/lock": "^6.4|^7.0", - "symfony/messenger": "^6.4|^7.0", - "symfony/process": "^6.4|^7.0", - "symfony/stopwatch": "^6.4|^7.0", - "symfony/var-dumper": "^6.4|^7.0" + "symfony/config": "^6.4|^7.0|^8.0", + "symfony/dependency-injection": "^6.4|^7.0|^8.0", + "symfony/event-dispatcher": "^6.4|^7.0|^8.0", + "symfony/http-foundation": "^6.4|^7.0|^8.0", + "symfony/http-kernel": "^6.4|^7.0|^8.0", + "symfony/lock": "^6.4|^7.0|^8.0", + "symfony/messenger": "^6.4|^7.0|^8.0", + "symfony/process": "^6.4|^7.0|^8.0", + "symfony/stopwatch": "^6.4|^7.0|^8.0", + "symfony/var-dumper": "^6.4|^7.0|^8.0" }, "type": "library", "autoload": { @@ -10742,7 +10741,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v7.3.6" + "source": "https://github.com/symfony/console/tree/v7.4.0" }, "funding": [ { @@ -10762,7 +10761,7 @@ "type": "tidelift" } ], - "time": "2025-11-04T01:21:42+00:00" + "time": "2025-11-27T13:27:24+00:00" }, { "name": "symplify/easy-coding-standard", @@ -10889,15 +10888,14 @@ "minimum-stability": "dev", "stability-flags": { "craftcms/ecs": 20, - "craftcms/phpstan": 20, - "viget/craft-parts-kit": 20 + "craftcms/phpstan": 20 }, "prefer-stable": true, "prefer-lowest": false, "platform": {}, "platform-dev": {}, "platform-overrides": { - "php": "8.2" + "php": "8.4" }, - "plugin-api-version": "2.6.0" + "plugin-api-version": "2.9.0" } diff --git a/config/embeddedassets.php b/config/embeddedassets.php new file mode 100644 index 0000000..b34f1f3 --- /dev/null +++ b/config/embeddedassets.php @@ -0,0 +1,10 @@ + true, + 'cacheDuration' => '21600', // 6 hours +]; diff --git a/config/general.php b/config/general.php index bca2155..a76d9e1 100644 --- a/config/general.php +++ b/config/general.php @@ -10,18 +10,31 @@ use craft\config\GeneralConfig; use craft\helpers\App; +use craft\helpers\StringHelper; + +$environment = App::env("CRAFT_ENVIRONMENT"); +$isDev = $environment === "dev"; +$isProduction = $environment === "production"; return GeneralConfig::create() - // Set the default week start day for date pickers (0 = Sunday, 1 = Monday, etc.) - ->defaultWeekStartDay(1) - // Prevent generated URLs from including "index.php" + ->allowAdminChanges($isDev) + ->allowUpdates($isDev) + ->backupOnUpdate(false) + ->convertFilenamesToAscii(true) + ->defaultWeekStartDay(1) // Monday + ->devMode($isDev) + ->disallowRobots(!$isProduction) + ->enableGql(false) + ->enableTemplateCaching(!$isDev) + ->limitAutoSlugsToAscii(true) ->omitScriptNameInUrls() - // Preload Single entries as Twig variables ->preloadSingles() - // Prevent user enumeration attacks ->preventUserEnumeration() - // Set the @webroot alias so the clear-caches command knows where to find CP resources + ->timezone('America/New_York') + ->useEmailAsUsername() + ->verificationCodeDuration("P1W") ->aliases([ '@webroot' => dirname(__DIR__) . '/web', - ]) -; + '@web' => App::env('PRIMARY_SITE_URL'), + '@primarySiteUrl' => StringHelper::removeRight(App::env('PRIMARY_SITE_URL'), '/'), + ]); diff --git a/config/parts-kit.php b/config/parts-kit.php new file mode 100644 index 0000000..8c82466 --- /dev/null +++ b/config/parts-kit.php @@ -0,0 +1,5 @@ + '_partials/head.twig', +]; diff --git a/config/project/project.yaml b/config/project/project.yaml index 980b045..9bb8bf3 100644 --- a/config/project/project.yaml +++ b/config/project/project.yaml @@ -1,4 +1,4 @@ -dateModified: 1758315776 +dateModified: 1764867081 elementSources: craft\elements\Entry: - @@ -149,6 +149,10 @@ plugins: enabled: true licenseKey: REPLACE schemaVersion: 2.1.1 + parts-kit: + edition: standard + enabled: true + schemaVersion: 1.0.0 retour: edition: standard enabled: true @@ -159,10 +163,6 @@ plugins: enabled: true licenseKey: REPLACE schemaVersion: 3.0.13 - viget-parts-kit: - edition: standard - enabled: true - schemaVersion: 1.0.0 vite: edition: standard enabled: true diff --git a/config/project/sites/default--35b563a0-4662-40b9-b885-a8450a2868d9.yaml b/config/project/sites/default--35b563a0-4662-40b9-b885-a8450a2868d9.yaml index 2e2368d..a9f358b 100644 --- a/config/project/sites/default--35b563a0-4662-40b9-b885-a8450a2868d9.yaml +++ b/config/project/sites/default--35b563a0-4662-40b9-b885-a8450a2868d9.yaml @@ -1,4 +1,4 @@ -baseUrl: $PRIMARY_SITE_URL +baseUrl: '@primarySiteUrl' enabled: true handle: default hasUrls: true diff --git a/templates/_layouts/base.twig b/templates/_layouts/base.twig index 0ba48e7..a832773 100644 --- a/templates/_layouts/base.twig +++ b/templates/_layouts/base.twig @@ -16,21 +16,7 @@ {{ siteName }} {%- endif %} - {# Preload Webfonts #} - - - - - - {# Load our main CSS file to avoid FOUC in dev mode #} - {% if craft.vite.devServerRunning() %} - - {% endif %} - - {{ craft.vite.script('src/js/app.js', false) }} - - {# Hide elements if we're in the parts-kit #} - {% set isPartsKitUrl = craft.app.request.segments | first == 'parts-kit' %} + {{ include('_partials/head.twig') }} {# -- Dangerously added raw HTML -- #} {{ include(codeBlocksTemplate, { @@ -45,17 +31,13 @@ codePosition: 'bodyTop' }, with_context = false) }} - {% if not isPartsKitUrl %} - {{ include('_partials/header.twig') }} - {% endif %} + {{ include('_partials/header.twig') }}
{% block content %}{% endblock %}
- {% if not isPartsKitUrl %} - {{ include('_partials/footer.twig') }} - {% endif %} + {{ include('_partials/footer.twig') }} {# -- Dangerously added raw HTML -- #} {{ include(codeBlocksTemplate, { diff --git a/templates/_partials/head.twig b/templates/_partials/head.twig new file mode 100644 index 0000000..9412de5 --- /dev/null +++ b/templates/_partials/head.twig @@ -0,0 +1,12 @@ + {# Preload Webfonts #} + + + + + + {# Load our main CSS file to avoid FOUC in dev mode #} + {% if craft.vite.devServerRunning() %} + + {% endif %} + + {{ craft.vite.script('src/js/app.js', false) }} diff --git a/templates/parts-kit/accordion/default.twig b/templates/parts-kit/accordion/default.twig index 962a052..bd50519 100644 --- a/templates/parts-kit/accordion/default.twig +++ b/templates/parts-kit/accordion/default.twig @@ -1,26 +1,22 @@ -{% extends "viget-parts-kit/layout.twig" %} {% from '_components/accordion' import Accordion %} -{% block main %} +
+ {% for i in 1..3 %} + {{ Accordion({ + title: 'Accordion Item ' ~ i, + content: 'This is the content for accordion item ' ~ i ~ '.', + }) }} + {% endfor %} +
-
- {% for i in 1..3 %} - {{ Accordion({ - title: 'Accordion Item ' ~ i, - content: 'This is the content for accordion item ' ~ i ~ '.', - }) }} - {% endfor %} -
+

Grouped Accordions

-

Grouped Accordions

- -
- {% for i in 1..3 %} - {{ Accordion({ - title: 'Accordion Item ' ~ i, - content: 'This is the content for accordion item ' ~ i ~ '.', - name: 'accordion-group', - }) }} - {% endfor %} -
-{% endblock %} +
+ {% for i in 1..3 %} + {{ Accordion({ + title: 'Accordion Item ' ~ i, + content: 'This is the content for accordion item ' ~ i ~ '.', + name: 'accordion-group', + }) }} + {% endfor %} +
diff --git a/templates/parts-kit/alert-banner/default.twig b/templates/parts-kit/alert-banner/default.twig index 2fd31f2..4c446ae 100644 --- a/templates/parts-kit/alert-banner/default.twig +++ b/templates/parts-kit/alert-banner/default.twig @@ -1,19 +1,15 @@ -{% extends 'viget-parts-kit/layout.twig' %} - {% from '_components/alert-banner' import AlertBanner %} -{% block main %} - {{ AlertBanner({ - title: 'Dismissible Alert Banner', - description: 'Cillum dolor nisi et sunt in in et ullamco eiusmod duis aute et fugiat excepteur. Sit irure consectetur anim do aliqua excepteur amet nulla magna enim proident incididunt ipsum.', - dismissible: true, - }) }} +{{ AlertBanner({ + title: 'Dismissible Alert Banner', + description: 'Cillum dolor nisi et sunt in in et ullamco eiusmod duis aute et fugiat excepteur. Sit irure consectetur anim do aliqua excepteur amet nulla magna enim proident incididunt ipsum.', + dismissible: true, +}) }} -
+
- {{ AlertBanner({ - title: 'Non-Dismissible Alert Banner', - description: 'Cillum dolor nisi et sunt in in et ullamco eiusmod duis aute et fugiat excepteur. Sit irure consectetur anim do aliqua excepteur amet nulla magna enim proident incididunt ipsum.', - dismissible: false, - }) }} -{% endblock %} +{{ AlertBanner({ + title: 'Non-Dismissible Alert Banner', + description: 'Cillum dolor nisi et sunt in in et ullamco eiusmod duis aute et fugiat excepteur. Sit irure consectetur anim do aliqua excepteur amet nulla magna enim proident incididunt ipsum.', + dismissible: false, +}) }} diff --git a/templates/parts-kit/button/default.twig b/templates/parts-kit/button/default.twig index 40baa65..c6fda1a 100644 --- a/templates/parts-kit/button/default.twig +++ b/templates/parts-kit/button/default.twig @@ -1,117 +1,114 @@ -{% extends 'viget-parts-kit/layout.twig' %} - {% from '_components/button' import Button %} {% set sizes = ['sm', 'md', 'lg'] %} -{% block main %} -
- {% for size in sizes %} -
-

{{ size }}

- - {{ Button({ - variant: 'contained', - text: 'Button', - size, - }) }} - - {{ Button({ - variant: 'outlined', - text: 'Button', - size, - }) }} - - {{ Button({ - variant: 'subtle', - text: 'Button', - size, - }) }} - - {{ Button({ - variant: 'text', - text: 'Button', - size, - }) }} -
- {% endfor %} -
- -
- -
-

With Icon

- {% for size in sizes %} -
-

{{ size }}

- {{ Button({ - variant: 'contained', - text: 'Button', - size, - icon: 'arrow-right', - }) }} - - {{ Button({ - variant: 'contained', - text: 'Button', - size, - icon: 'arrow-right', - iconLast: true, - }) }} - - {{ Button({ - variant: 'contained', - text: 'Button', - size, - icon: 'arrow-right', - iconOnly: true, - }) }} - - {{ Button({ - variant: 'outlined', - text: 'Button', - size, - icon: 'arrow-right', - }) }} - - {{ Button({ - variant: 'outlined', - text: 'Button', - size, - icon: 'arrow-right', - iconOnly: true, - }) }} - - {{ Button({ - variant: 'subtle', - text: 'Button', - size, - icon: 'arrow-right', - }) }} - - {{ Button({ - variant: 'subtle', - iconOnly: true, - text: 'Button', - size, - icon: 'arrow-right', - }) }} - - {{ Button({ - variant: 'text', - text: 'Button', - size, - icon: 'arrow-right', - }) }} - - {{ Button({ - variant: 'text', - text: 'Button', - size, - icon: 'arrow-right', - iconOnly: true, - }) }} -
- {% endfor %} -
-{% endblock %} +
+ {% for size in sizes %} +
+

{{ size }}

+ + {{ Button({ + variant: 'contained', + text: 'Button', + size, + }) }} + + {{ Button({ + variant: 'outlined', + text: 'Button', + size, + }) }} + + {{ Button({ + variant: 'subtle', + text: 'Button', + size, + }) }} + + {{ Button({ + variant: 'text', + text: 'Button', + size, + }) }} +
+ {% endfor %} +
+ +
+ +
+

With Icon

+ + {% for size in sizes %} +
+

{{ size }}

+ {{ Button({ + variant: 'contained', + text: 'Button', + size, + icon: 'arrow-right', + }) }} + + {{ Button({ + variant: 'contained', + text: 'Button', + size, + icon: 'arrow-right', + iconLast: true, + }) }} + + {{ Button({ + variant: 'contained', + text: 'Button', + size, + icon: 'arrow-right', + iconOnly: true, + }) }} + + {{ Button({ + variant: 'outlined', + text: 'Button', + size, + icon: 'arrow-right', + }) }} + + {{ Button({ + variant: 'outlined', + text: 'Button', + size, + icon: 'arrow-right', + iconOnly: true, + }) }} + + {{ Button({ + variant: 'subtle', + text: 'Button', + size, + icon: 'arrow-right', + }) }} + + {{ Button({ + variant: 'subtle', + iconOnly: true, + text: 'Button', + size, + icon: 'arrow-right', + }) }} + + {{ Button({ + variant: 'text', + text: 'Button', + size, + icon: 'arrow-right', + }) }} + + {{ Button({ + variant: 'text', + text: 'Button', + size, + icon: 'arrow-right', + iconOnly: true, + }) }} +
+ {% endfor %} +
diff --git a/templates/parts-kit/call-to-action/default.twig b/templates/parts-kit/call-to-action/default.twig index ea692e1..0ef3cca 100644 --- a/templates/parts-kit/call-to-action/default.twig +++ b/templates/parts-kit/call-to-action/default.twig @@ -1,13 +1,9 @@ -{% extends 'viget-parts-kit/layout.twig' %} - {% from '_components/call-to-action' import CallToAction %} -{% block main %} - {{ CallToAction({ - title: 'Lorem ipsum dolor sit amet', - text: 'Lorem ipsum dolor sit amet, consectetur adipiscing e lit. Nulla facilisi. Nulla facilisi. Nulla facilisi.', - href: '#TEST', - buttonText: 'Button', - newTab: true, - }) }} -{% endblock %} +{{ CallToAction({ + title: 'Lorem ipsum dolor sit amet', + text: 'Lorem ipsum dolor sit amet, consectetur adipiscing e lit. Nulla facilisi. Nulla facilisi. Nulla facilisi.', + href: '#TEST', + buttonText: 'Button', + newTab: true, +}) }} diff --git a/templates/parts-kit/card/card-with-icon.twig b/templates/parts-kit/card/card-with-icon.twig index e2b21c5..9078bb5 100644 --- a/templates/parts-kit/card/card-with-icon.twig +++ b/templates/parts-kit/card/card-with-icon.twig @@ -1,30 +1,26 @@ -{% extends 'viget-parts-kit/layout.twig' %} - {% from '_components/card-icon' import CardIcon %} -{% block main %} -
- {% for i in 1..3 %} - {{ CardIcon({ - href: i == 2 ? '#TEST' : null, - newTab: i == 2, - icon: 'clock', - title: 'Lorem ipsum dolor sit amet', - description: 'Cillum dolor nisi et sunt in in et ullamco eiusmod duis aute et fugiat excepteur. Sit irure consectetur anim do aliqua excepteur amet nulla magna enim proident incididunt ipsum.', - }) }} - {% endfor %} -
+
+ {% for i in 1..3 %} + {{ CardIcon({ + href: i == 2 ? '#TEST' : null, + newTab: i == 2, + icon: 'clock', + title: 'Lorem ipsum dolor sit amet', + description: 'Cillum dolor nisi et sunt in in et ullamco eiusmod duis aute et fugiat excepteur. Sit irure consectetur anim do aliqua excepteur amet nulla magna enim proident incididunt ipsum.', + }) }} + {% endfor %} +
-
- {% for i in 1..3 %} - {{ CardIcon({ - href: i == 2 ? '#TEST' : null, - newTab: i == 2, - align: 'center', - icon: 'clock', - title: 'Lorem ipsum dolor sit amet', - description: 'Cillum dolor nisi et sunt in in et ullamco eiusmod duis aute et fugiat excepteur. Sit irure consectetur anim do aliqua excepteur amet nulla magna enim proident incididunt ipsum.', - }) }} - {% endfor %} -
-{% endblock %} +
+ {% for i in 1..3 %} + {{ CardIcon({ + href: i == 2 ? '#TEST' : null, + newTab: i == 2, + align: 'center', + icon: 'clock', + title: 'Lorem ipsum dolor sit amet', + description: 'Cillum dolor nisi et sunt in in et ullamco eiusmod duis aute et fugiat excepteur. Sit irure consectetur anim do aliqua excepteur amet nulla magna enim proident incididunt ipsum.', + }) }} + {% endfor %} +
diff --git a/templates/parts-kit/card/card-with-image.twig b/templates/parts-kit/card/card-with-image.twig index 919cf1c..e277d6d 100644 --- a/templates/parts-kit/card/card-with-image.twig +++ b/templates/parts-kit/card/card-with-image.twig @@ -1,37 +1,33 @@ -{% extends 'viget-parts-kit/layout.twig' %} - {% from '_components/card-image' import CardImage %} -{% block main %} -
- {% for i in 1..3 %} - {{ CardImage({ - image: craft.assets.one(), - href: i == 2 ? '#TEST' : null, - newTab: i == 2, - sizes: { - default: '33vw', - }, - title: 'Lorem ipsum dolor sit amet', - description: 'Cillum dolor nisi et sunt in in et ullamco eiusmod duis aute et fugiat excepteur. Sit irure consectetur anim do aliqua excepteur amet nulla magna enim proident incididunt ipsum.', - }) }} - {% endfor %} -
+
+ {% for i in 1..3 %} + {{ CardImage({ + image: craft.assets.one(), + href: i == 2 ? '#TEST' : null, + newTab: i == 2, + sizes: { + default: '33vw', + }, + title: 'Lorem ipsum dolor sit amet', + description: 'Cillum dolor nisi et sunt in in et ullamco eiusmod duis aute et fugiat excepteur. Sit irure consectetur anim do aliqua excepteur amet nulla magna enim proident incididunt ipsum.', + }) }} + {% endfor %} +
-
- {% for i in 1..3 %} - {{ CardImage({ - align: 'center', - image: craft.assets.one(), - href: i == 2 ? '#TEST' : null, - newTab: i == 2, - ratio: 1/1, - sizes: { - default: '33vw', - }, - title: 'Lorem ipsum dolor sit amet', - description: 'Cillum dolor nisi et sunt in in et ullamco eiusmod duis aute et fugiat excepteur. Sit irure consectetur anim do aliqua excepteur amet nulla magna enim proident incididunt ipsum.', - }) }} - {% endfor %} -
-{% endblock %} +
+ {% for i in 1..3 %} + {{ CardImage({ + align: 'center', + image: craft.assets.one(), + href: i == 2 ? '#TEST' : null, + newTab: i == 2, + ratio: 1/1, + sizes: { + default: '33vw', + }, + title: 'Lorem ipsum dolor sit amet', + description: 'Cillum dolor nisi et sunt in in et ullamco eiusmod duis aute et fugiat excepteur. Sit irure consectetur anim do aliqua excepteur amet nulla magna enim proident incididunt ipsum.', + }) }} + {% endfor %} +
diff --git a/templates/parts-kit/dialog/default.twig b/templates/parts-kit/dialog/default.twig index 6ec0cb2..f17cd3a 100644 --- a/templates/parts-kit/dialog/default.twig +++ b/templates/parts-kit/dialog/default.twig @@ -1,17 +1,13 @@ -{% extends "viget-parts-kit/layout.twig" %} - {% from '_components/button' import Button %} {% from '_components/dialog' import Dialog %} -{% block main %} - - {% set content %} -

Hello World

-

Lorem ipsum dolor sit amet consectetur adipisicing elit. Quisquam, quos.

- {% endset %} +{% set content %} +

Hello World

+

Lorem ipsum dolor sit amet consectetur adipisicing elit. Quisquam, quos.

+{% endset %} - {# Dialogs are triggered by dispatching a custom event dialog:open with an id that matches the dialog's id #} - {{ Button({ +{# Dialogs are triggered by dispatching a custom event dialog:open with an id that matches the dialog's id #} +{{ Button({ text: 'Open Dialog', attrs: { 'x-data': '', @@ -19,9 +15,8 @@ }, }) }} - {{ Dialog({ - content, - id: 'my-dialog', - hideClose: true, - }) }} -{% endblock %} +{{ Dialog({ + content, + id: 'my-dialog', + hideClose: true, +}) }} diff --git a/templates/parts-kit/dialog/digalog-triggers-dialog.twig b/templates/parts-kit/dialog/digalog-triggers-dialog.twig index 9127ce1..7cd751e 100644 --- a/templates/parts-kit/dialog/digalog-triggers-dialog.twig +++ b/templates/parts-kit/dialog/digalog-triggers-dialog.twig @@ -1,48 +1,39 @@ -{% extends "viget-parts-kit/layout.twig" %} - {% from '_components/button' import Button %} {% from '_components/dialog' import Dialog %} -{% block main %} - {% set dialog1Content %} -

Dialog 1

-

Lorem ipsum dolor sit amet consectetur adipisicing elit. Quisquam, quos.

- - {{ Button({ - text: 'Open Dialog 2', - attrs: { - 'x-data': '', - '@click': "$dispatch('dialog:open', { id: 'my-dialog-2' })" - }, - }) }} - {% endset %} - - {% set dialog2Content %} -

Dialog 2

-

Lorem ipsum dolor sit amet consectetur adipisicing elit. Quisquam, quos.

- +

Dialog 1

+

Lorem ipsum dolor sit amet consectetur adipisicing elit. Quisquam, quos.

- {% endset %} - - {# Dialogs are triggered by dispatching a custom event dialog:open with an id that matches the dialog's id #} {{ Button({ - text: 'Open Dialog 1', + text: 'Open Dialog 2', attrs: { 'x-data': '', - '@click': "$dispatch('dialog:open', { id: 'my-dialog' })" + '@click': "$dispatch('dialog:open', { id: 'my-dialog-2' })" }, }) }} - - {{ Dialog({ - content: dialog1Content, - id: 'my-dialog', - }) }} - - {{ Dialog({ - content: dialog2Content, - id: 'my-dialog-2', - }) }} - - -{% endblock %} +{% endset %} + +{% set dialog2Content %} +

Dialog 2

+

Lorem ipsum dolor sit amet consectetur adipisicing elit. Quisquam, quos.

+{% endset %} + +{# Dialogs are triggered by dispatching a custom event dialog:open with an id that matches the dialog's id #} +{{ Button({ + text: 'Open Dialog 1', + attrs: { + 'x-data': '', + '@click': "$dispatch('dialog:open', { id: 'my-dialog' })" + }, +}) }} + +{{ Dialog({ + content: dialog1Content, + id: 'my-dialog', +}) }} + +{{ Dialog({ + content: dialog2Content, + id: 'my-dialog-2', +}) }} diff --git a/templates/parts-kit/forms/select.twig b/templates/parts-kit/forms/select.twig index 29b6e67..06e58cc 100644 --- a/templates/parts-kit/forms/select.twig +++ b/templates/parts-kit/forms/select.twig @@ -1,85 +1,79 @@ -{% extends 'viget-parts-kit/layout.twig' %} - {% from '_components/field-select' import FieldSelect %} -{% block main %} - - {% set options = [ - { label: 'Option 1', value: 'option-1' }, - { label: 'Option 2', value: 'option-2' }, - { label: 'Option 3', value: 'option-3' }, - ] %} - - {% set fields %} -
- {{ FieldSelect({ - id: 'custom-id', - label: 'Select', - subLabel: 'This is a sublabel', - instructions: 'This is an instruction', - options, - name: 'select', - }) }} - - {{ FieldSelect({ - label: 'Selected options', - options: [ - { label: 'Option 1', value: 'option-1' }, - { label: 'Option 2 (selected)', value: 'option-2', selected: true }, - { label: 'Option 3', value: 'option-3' }, - ], - name: 'select-selected', - }) }} - -
- {{ FieldSelect({ - class: 'w-full', - label: 'Select (required)', - required: true, - instructions: 'This is an instruction', - useEmptyOption: true, - placeholder: 'Choose an option', - options, - name: 'select-required', - }) }} +{% set options = [ + { label: 'Option 1', value: 'option-1' }, + { label: 'Option 2', value: 'option-2' }, + { label: 'Option 3', value: 'option-3' }, +] %} - -
+{% set fields %} +
+ {{ FieldSelect({ + id: 'custom-id', + label: 'Select', + subLabel: 'This is a sublabel', + instructions: 'This is an instruction', + options, + name: 'select', + }) }} - {{ FieldSelect({ - label: 'Select (required long)', - required: 'long', - instructions: 'This is an instruction', - options, - name: 'select-required-long', - }) }} + {{ FieldSelect({ + label: 'Selected options', + options: [ + { label: 'Option 1', value: 'option-1' }, + { label: 'Option 2 (selected)', value: 'option-2', selected: true }, + { label: 'Option 3', value: 'option-3' }, + ], + name: 'select-selected', + }) }} +
{{ FieldSelect({ - label: 'Select (required with error)', + class: 'w-full', + label: 'Select (required)', required: true, instructions: 'This is an instruction', - errorMessages: ['This is an error message', 'This is another error message'], + useEmptyOption: true, + placeholder: 'Choose an option', options, - name: 'select-required-with-error', + name: 'select-required', }) }} - {{ FieldSelect({ - label: 'Select (disabled)', - disabled: true, - options, - name: 'select-disabled', - }) }} -
- {% endset %} + + - {# default colors #} - {{ fields }} + {{ FieldSelect({ + label: 'Select (required long)', + required: 'long', + instructions: 'This is an instruction', + options, + name: 'select-required-long', + }) }} - {# dark background #} -
- {% namespace 'dark' %} - {{ fields }} - {% endnamespace %} + {{ FieldSelect({ + label: 'Select (required with error)', + required: true, + instructions: 'This is an instruction', + errorMessages: ['This is an error message', 'This is another error message'], + options, + name: 'select-required-with-error', + }) }} + + {{ FieldSelect({ + label: 'Select (disabled)', + disabled: true, + options, + name: 'select-disabled', + }) }}
+{% endset %} + +{# default colors #} +{{ fields }} -{% endblock %} +{# dark background #} +
+ {% namespace 'dark' %} + {{ fields }} + {% endnamespace %} +
diff --git a/templates/parts-kit/forms/text-input.twig b/templates/parts-kit/forms/text-input.twig index fa19fa3..6568896 100644 --- a/templates/parts-kit/forms/text-input.twig +++ b/templates/parts-kit/forms/text-input.twig @@ -1,79 +1,73 @@ -{% extends 'viget-parts-kit/layout.twig' %} - {% from '_components/field-text-input' import FieldTextInput %} -{% block main %} +{% set fields %} +
+ {{ FieldTextInput({ + id: 'custom-id', + label: 'Text Input', + subLabel: 'This is a sublabel', + instructions: 'This is an instruction', + name: 'text-input', + }) }} + + {{ FieldTextInput({ + label: 'Text Input', + placeholder: 'Placeholder (label hidden)', + labelHidden: true, + required: 'long', + name: 'text-input-placeholder', + }) }} - {% set fields %} -
+
{{ FieldTextInput({ - id: 'custom-id', - label: 'Text Input', - subLabel: 'This is a sublabel', + class: 'w-full', + label: 'Text Input (required)', + required: true, instructions: 'This is an instruction', - name: 'text-input', + name: 'text-input-required', }) }} - {{ FieldTextInput({ - label: 'Text Input', - placeholder: 'Placeholder (label hidden)', - labelHidden: true, - required: 'long', - name: 'text-input-placeholder', - }) }} + +
-
- {{ FieldTextInput({ - class: 'w-full', - label: 'Text Input (required)', - required: true, - instructions: 'This is an instruction', - name: 'text-input-required', - }) }} + {{ FieldTextInput({ + label: 'Text Input (required long)', + required: 'long', + instructions: 'This is an instruction', + name: 'text-input-required-long', + }) }} - -
+ {{ FieldTextInput({ + label: 'Text Input (required with error)', + required: true, + instructions: 'This is an instruction', + errorMessages: ['This is an error message', 'This is another error message'], + name: 'text-input-required-with-error', + }) }} - {{ FieldTextInput({ - label: 'Text Input (required long)', - required: 'long', - instructions: 'This is an instruction', - name: 'text-input-required-long', - }) }} + {{ FieldTextInput({ + label: 'Text Input (disabled)', + disabled: true, + name: 'text-input-disabled', + }) }} + {% set inputTypes = ['text', 'password', 'email', 'number', 'tel', 'url'] %} + {% for type in inputTypes %} {{ FieldTextInput({ - label: 'Text Input (required with error)', - required: true, - instructions: 'This is an instruction', - errorMessages: ['This is an error message', 'This is another error message'], - name: 'text-input-required-with-error', - }) }} - - {{ FieldTextInput({ - label: 'Text Input (disabled)', - disabled: true, - name: 'text-input-disabled', + label: 'Text Input (' ~ type ~ ')', + type, + name: 'text-input-' ~ type, }) }} - - {% set inputTypes = ['text', 'password', 'email', 'number', 'tel', 'url'] %} - {% for type in inputTypes %} - {{ FieldTextInput({ - label: 'Text Input (' ~ type ~ ')', - type, - name: 'text-input-' ~ type, - }) }} - {% endfor %} -
- {% endset %} - - {# default colors #} - {{ fields }} - - {# dark background #} -
- {% namespace 'dark' %} - {{ fields }} - {% endnamespace %} + {% endfor %}
+{% endset %} + +{# default colors #} +{{ fields }} -{% endblock %} +{# dark background #} +
+ {% namespace 'dark' %} + {{ fields }} + {% endnamespace %} +
diff --git a/templates/parts-kit/forms/textarea.twig b/templates/parts-kit/forms/textarea.twig index e06e58a..68ce880 100644 --- a/templates/parts-kit/forms/textarea.twig +++ b/templates/parts-kit/forms/textarea.twig @@ -1,82 +1,76 @@ -{% extends 'viget-parts-kit/layout.twig' %} - {% from '_components/field-textarea' import FieldTextarea %} -{% block main %} +{% set fields %} +
+ {{ FieldTextarea({ + id: 'custom-id', + label: 'Text Area', + subLabel: 'This is a sublabel', + instructions: 'This is an instruction', + name: 'textarea', + }) }} - {% set fields %} -
- {{ FieldTextarea({ - id: 'custom-id', - label: 'Text Area', - subLabel: 'This is a sublabel', - instructions: 'This is an instruction', - name: 'textarea', - }) }} + {{ FieldTextarea({ + label: 'Text Area', + placeholder: 'Placeholder (label hidden)', + labelHidden: true, + required: 'long', + name: 'textarea-placeholder', + }) }} +
{{ FieldTextarea({ - label: 'Text Area', - placeholder: 'Placeholder (label hidden)', - labelHidden: true, - required: 'long', - name: 'textarea-placeholder', - }) }} - - - {{ FieldTextarea({ - class: 'w-full', - label: 'Text Area (required)', - required: true, - instructions: 'This is an instruction', - name: 'textarea-required', - }) }} - - -
- - {{ FieldTextarea({ - label: 'Text Area (required long)', - required: 'long', - instructions: 'This is an instruction', - name: 'textarea-required-long', - }) }} - - {{ FieldTextarea({ - label: 'Text Area (required with error)', + class: 'w-full', + label: 'Text Area (required)', required: true, instructions: 'This is an instruction', - errorMessages: ['This is an error message', 'This is another error message'], - name: 'textarea-required-with-error', + name: 'textarea-required', }) }} - {{ FieldTextarea({ - label: 'Text Area (disabled)', - disabled: true, - name: 'textarea-disabled', - }) }} + + - {{ FieldTextarea({ - label: 'Text Area (custom rows)', - rows: 10, - name: 'textarea-custom-rows', - }) }} + {{ FieldTextarea({ + label: 'Text Area (required long)', + required: 'long', + instructions: 'This is an instruction', + name: 'textarea-required-long', + }) }} - {{ FieldTextarea({ - label: 'Text Area (resize)', - resize: true, - name: 'textarea-resize', - }) }} -
- {% endset %} + {{ FieldTextarea({ + label: 'Text Area (required with error)', + required: true, + instructions: 'This is an instruction', + errorMessages: ['This is an error message', 'This is another error message'], + name: 'textarea-required-with-error', + }) }} - {# default colors #} - {{ fields }} + {{ FieldTextarea({ + label: 'Text Area (disabled)', + disabled: true, + name: 'textarea-disabled', + }) }} - {# dark background #} -
- {% namespace 'dark' %} - {{ fields }} - {% endnamespace %} + {{ FieldTextarea({ + label: 'Text Area (custom rows)', + rows: 10, + name: 'textarea-custom-rows', + }) }} + + {{ FieldTextarea({ + label: 'Text Area (resize)', + resize: true, + name: 'textarea-resize', + }) }}
+{% endset %} + +{# default colors #} +{{ fields }} -{% endblock %} +{# dark background #} +
+ {% namespace 'dark' %} + {{ fields }} + {% endnamespace %} +
diff --git a/templates/parts-kit/icons/default.twig b/templates/parts-kit/icons/default.twig index 27e6065..0646e1b 100644 --- a/templates/parts-kit/icons/default.twig +++ b/templates/parts-kit/icons/default.twig @@ -1,42 +1,37 @@ -{% extends 'viget-parts-kit/layout.twig' %} - {% from '_components/icon.twig' import Icon %} {% set sizes = ['sm', 'md', 'lg', 'none'] %} {% set icons = ['arrow-left', 'arrow-right', 'clock', 'close'] %} -{% block main %} - - {% for size in sizes %} -
-

- {{ size }} - {% if size == 'none' %} - Custom size class - {% endif %} -

-
- {% for icon in icons %} -
- {{ Icon({ - name: icon, - size: size, - class: size == 'none' ? 'size-64' : null, - }) }} - {{ icon }} -
- {% endfor %} -
-

Accessibility

-

- Icons are hidden from screen readers by default. Use ariaHidden: false to show the icon to screen readers. -

- - {{ Icon({ - name: 'arrow-right', - ariaHidden: false, - }) }} +{% for size in sizes %} +
+

+ {{ size }} + {% if size == 'none' %} + Custom size class + {% endif %} +

+
+ {% for icon in icons %} +
+ {{ Icon({ + name: icon, + size: size, + class: size == 'none' ? 'size-64' : null, + }) }} + {{ icon }} +
+ {% endfor %}
- {% endfor %} -{% endblock %} +

Accessibility

+

+ Icons are hidden from screen readers by default. Use ariaHidden: false to show the icon to screen readers. +

+ + {{ Icon({ + name: 'arrow-right', + ariaHidden: false, + }) }} +
+{% endfor %} diff --git a/templates/parts-kit/image-caption/default.twig b/templates/parts-kit/image-caption/default.twig index 505a612..198d42c 100644 --- a/templates/parts-kit/image-caption/default.twig +++ b/templates/parts-kit/image-caption/default.twig @@ -1,5 +1,3 @@ -{% extends 'viget-parts-kit/layout.twig' %} - {% from '_components/image-caption' import ImageCaption %} {# @@ -11,16 +9,14 @@ Use the same props that are defined in the image component. #} -{% block main %} -
-

Image Caption

+
+

Image Caption

- {{ ImageCaption({ - imageProps: { - image: craft.assets().one(), - ratio: 16/9, - }, - caption: 'Image caption', - }) }} -
-{% endblock %} + {{ ImageCaption({ + imageProps: { + image: craft.assets().one(), + ratio: 16/9, + }, + caption: 'Image caption', + }) }} +
diff --git a/templates/parts-kit/image/default.twig b/templates/parts-kit/image/default.twig index 66081e3..a82405a 100644 --- a/templates/parts-kit/image/default.twig +++ b/templates/parts-kit/image/default.twig @@ -1,5 +1,3 @@ -{% extends 'viget-parts-kit/layout.twig' %} - {% from '_components/image' import Image %} {# @@ -50,83 +48,80 @@ > #} -{% block main %} - -
- - {# - Basic Example: - Transforms and sizes are configured to work well with the .container class. - #} -

Basic Example

- {{ Image({ - image: craft.assets.one(), - ratio: 16/9, - }) }} +
+ {# + Basic Example: + Transforms and sizes are configured to work well with the .container class. + #} +

Basic Example

+ {{ Image({ + image: craft.assets.one(), + ratio: 16/9, + }) }} - {# - Custom Sizes: - The keys of the sizes attribute correspond to the breakpoints in your Tailwind config. - It uses a mobile first approach, default is the size used without a breakpoint. - #} -
-
-

Custom Sizes

- {{ Image({ - image: craft.assets.one(), - sizes: { - default: '50vw', - sm: '25vw', - md: '33vw', - }, - }) }} -
-
-

Custom Sizes and Aspect Ratio

- {{ Image({ - image: craft.assets.one(), - sizes: { - default: '50vw', - sm: '25vw', - md: '33vw', - }, - ratio: 3/4, - }) }} -
-
- {# - Named Transform: - If you need to use a named transform, you can pass a string into the `transform` prop. - #} -

Named Transform

- {{ Image({ - image: craft.assets.one(), - transform: 'exampleNamedTransform', - sizes: { - default: '50vw', - sm: '25vw', - md: '33vw', - }, - }) }} -
-
- {# - Scalar Sizes - This component supports custom transforms and scalar values for the sizes prop. - #} -

Scalar Sizes & Custom Transform

- {{ Image({ - image: craft.assets.one(), - class: 'size-40', - transformMinWidth: 40, - transformMaxWidth: 80, - transformAutofillCount: 0, - ratio: 1/1, - sizes: '40px', - }) }} -
+ {# + Custom Sizes: + The keys of the sizes attribute correspond to the breakpoints in your Tailwind config. + It uses a mobile first approach, default is the size used without a breakpoint. + #} +
+
+

Custom Sizes

+ {{ Image({ + image: craft.assets.one(), + sizes: { + default: '50vw', + sm: '25vw', + md: '33vw', + }, + }) }} +
+
+

Custom Sizes and Aspect Ratio

+ {{ Image({ + image: craft.assets.one(), + sizes: { + default: '50vw', + sm: '25vw', + md: '33vw', + }, + ratio: 3/4, + }) }} +
+
+ {# + Named Transform: + If you need to use a named transform, you can pass a string into the `transform` prop. + #} +

Named Transform

+ {{ Image({ + image: craft.assets.one(), + transform: 'exampleNamedTransform', + sizes: { + default: '50vw', + sm: '25vw', + md: '33vw', + }, + }) }} +
+
+ {# + Scalar Sizes + This component supports custom transforms and scalar values for the sizes prop. + #} +

Scalar Sizes & Custom Transform

+ {{ Image({ + image: craft.assets.one(), + class: 'size-40', + transformMinWidth: 40, + transformMaxWidth: 80, + transformAutofillCount: 0, + ratio: 1/1, + sizes: '40px', + }) }}
+
{# Full Bleed Image @@ -162,4 +157,3 @@ transformAutofillCount: 1, }) }}
-{% endblock %} diff --git a/templates/parts-kit/page-hero/default.twig b/templates/parts-kit/page-hero/default.twig index a2eee54..d882ba2 100644 --- a/templates/parts-kit/page-hero/default.twig +++ b/templates/parts-kit/page-hero/default.twig @@ -1,11 +1,7 @@ -{% extends 'viget-parts-kit/layout.twig' %} - {% from '_components/page-hero' import PageHero %} -{% block main %} - {{ PageHero({ - image: craft.assets.one(), - title: 'Lorem ipsum dolor sit amet', - description: 'Cillum dolor nisi et sunt in in et ullamco eiusmod duis aute et fugiat excepteur. Sit irure consectetur anim do aliqua excepteur amet nulla magna enim proident incididunt ipsum.', - }) }} -{% endblock %} +{{ PageHero({ + image: craft.assets.one(), + title: 'Lorem ipsum dolor sit amet', + description: 'Cillum dolor nisi et sunt in in et ullamco eiusmod duis aute et fugiat excepteur. Sit irure consectetur anim do aliqua excepteur amet nulla magna enim proident incididunt ipsum.', +}) }} diff --git a/templates/parts-kit/paginaton/default.twig b/templates/parts-kit/paginaton/default.twig index b6d6d12..138fd32 100644 --- a/templates/parts-kit/paginaton/default.twig +++ b/templates/parts-kit/paginaton/default.twig @@ -1,5 +1,3 @@ -{% extends 'viget-parts-kit/layout.twig' %} - {% from '_components/pagination' import Pagination %} {# @@ -64,12 +62,10 @@ Example Usage: }) }} {% endset %} -{% block main %} -
- {{ examples }} -
+
+ {{ examples }} +
-
- {{ examples }} -
-{% endblock %} +
+ {{ examples }} +
diff --git a/templates/parts-kit/tabs/default.twig b/templates/parts-kit/tabs/default.twig index e35ac66..4544720 100644 --- a/templates/parts-kit/tabs/default.twig +++ b/templates/parts-kit/tabs/default.twig @@ -1,23 +1,19 @@ -{% extends "viget-parts-kit/layout.twig" %} - {% from '_components/tabs' import Tabs %} -{% block main %} -
- {{ Tabs({ - tabs: [ - { title: 'Tab 1', content: 'Content for Tab 1' }, - { title: 'Tab 2', content: 'Content for Tab 2' }, - ], - }) }} -
+
+ {{ Tabs({ + tabs: [ + { title: 'Tab 1', content: 'Content for Tab 1' }, + { title: 'Tab 2', content: 'Content for Tab 2' }, + ], + }) }} +
-
- {{ Tabs({ - tabs: [ - { title: 'Tab 1', content: 'Content for Tab 1' }, - { title: 'Tab 2', content: 'Content for Tab 2' }, - ], - }) }} -
-{% endblock %} +
+ {{ Tabs({ + tabs: [ + { title: 'Tab 1', content: 'Content for Tab 1' }, + { title: 'Tab 2', content: 'Content for Tab 2' }, + ], + }) }} +
diff --git a/templates/parts-kit/tag/default.twig b/templates/parts-kit/tag/default.twig index a18da95..d017f82 100644 --- a/templates/parts-kit/tag/default.twig +++ b/templates/parts-kit/tag/default.twig @@ -1,35 +1,31 @@ -{% extends "viget-parts-kit/layout.twig" %} - {% from '_components/tag' import Tag %} {% set variants = ['contained', 'outlined'] %} {% set sizes = ['sm', 'md', 'lg'] %} -{% block main %} - {% for variant in variants %} -
- {% for size in sizes %} - {{ Tag({ - text: 'Tag ' ~ size ~ ' ' ~ variant, - size: size, - variant: variant, - }) }} +{% for variant in variants %} +
+ {% for size in sizes %} + {{ Tag({ + text: 'Tag ' ~ size ~ ' ' ~ variant, + size: size, + variant: variant, + }) }} - {{ Tag({ - text: 'Tag ' ~ size ~ ' link', - size: size, - variant: variant, - href: '#TEST', - }) }} + {{ Tag({ + text: 'Tag ' ~ size ~ ' link', + size: size, + variant: variant, + href: '#TEST', + }) }} - {{ Tag({ - text: 'Tag ' ~ size ~ ' ' ~ variant, - size: size, - variant: variant, - icon: 'clock', - }) }} - {% endfor %} -
- {% endfor %} -{% endblock %} + {{ Tag({ + text: 'Tag ' ~ size ~ ' ' ~ variant, + size: size, + variant: variant, + icon: 'clock', + }) }} + {% endfor %} +
+{% endfor %} diff --git a/templates/parts-kit/video/default.twig b/templates/parts-kit/video/default.twig index 4dd1d9d..6948cda 100644 --- a/templates/parts-kit/video/default.twig +++ b/templates/parts-kit/video/default.twig @@ -1,17 +1,13 @@ -{% extends 'viget-parts-kit/layout.twig' %} - {% from '_components/video' import Video %} -{% block main %} -
+
- {{ Video({ - source: 'https://www.youtube.com/embed/lJIrF4YjHfQ', - class: 'mb-24', - }) }} + {{ Video({ + source: 'https://www.youtube.com/embed/lJIrF4YjHfQ', + class: 'mb-24', + }) }} -

- Lorem ipsum dolor sit amet consectetur adipisicing elit. Quisquam, quos. Focusable Content After Video -

-
-{% endblock %} +

+ Lorem ipsum dolor sit amet consectetur adipisicing elit. Quisquam, quos. Focusable Content After Video +

+