Skip to content

Commit

Permalink
update the theme
Browse files Browse the repository at this point in the history
  • Loading branch information
overclokk committed Nov 25, 2023
1 parent fd4e54d commit 6969de8
Show file tree
Hide file tree
Showing 16 changed files with 1,700 additions and 1,649 deletions.
24 changes: 13 additions & 11 deletions assets/sass/theme.scss
Original file line number Diff line number Diff line change
@@ -1,22 +1,25 @@
$wp--preset--color--base: --wp--preset--color--base;
$wp--preset--color--light: --wp--preset--color--light;
$wp--preset--color--dark: --wp--preset--color--dark;
$wp--preset--color--body-bg: --wp--preset--color--body-bg;
$wp--preset--color--body-color: --wp--preset--color--body-color;
$wp--preset--color--heading-color: --wp--preset--color--heading-color;
$wp--preset--color--link-color: --wp--preset--color--link-color;
$wp--preset--color--base: --wp--preset--color--base;
$wp--preset--color--button-bg-hover: --wp--preset--color--button-bg-hover;
$wp--preset--color--button-text-hover: --wp--preset--color--button-text-hover;
$wp--preset--color--border-color: --wp--preset--color--border-color;
$wp--preset--color--base-dark: --wp--preset--color--base-dark;
$wp--preset--color--base-light: --wp--preset--color--base-light;
$wp--preset--color--base-complementary: --wp--preset--color--base-complementary;
$wp--preset--color--gray-100: --wp--preset--color--gray-100;
$wp--preset--color--gray-200: --wp--preset--color--gray-200;
$wp--preset--color--gray-300: --wp--preset--color--gray-300;
$wp--preset--color--gray-400: --wp--preset--color--gray-400;
$wp--preset--color--gray-500: --wp--preset--color--gray-500;
$wp--preset--color--gray-600: --wp--preset--color--gray-600;
$wp--preset--color--gray-700: --wp--preset--color--gray-700;
$wp--preset--color--gray-800: --wp--preset--color--gray-800;
$wp--preset--color--gray-900: --wp--preset--color--gray-900;
$wp--preset--color--body-color-100: --wp--preset--color--body-color-100;
$wp--preset--color--body-color-200: --wp--preset--color--body-color-200;
$wp--preset--color--body-color-300: --wp--preset--color--body-color-300;
$wp--preset--color--body-color-400: --wp--preset--color--body-color-400;
$wp--preset--color--body-color-500: --wp--preset--color--body-color-500;
$wp--preset--color--body-color-600: --wp--preset--color--body-color-600;
$wp--preset--color--body-color-700: --wp--preset--color--body-color-700;
$wp--preset--color--body-color-800: --wp--preset--color--body-color-800;
$wp--preset--color--body-color-900: --wp--preset--color--body-color-900;
$wp--preset--gradient--light-to-dark: --wp--preset--gradient--light-to-dark;
$wp--preset--gradient--base-to-white: --wp--preset--gradient--base-to-white;
$wp--preset--font-family--base: --wp--preset--font-family--base;
Expand Down Expand Up @@ -64,4 +67,3 @@ $wp--custom--form--border--color: --wp--custom--form--border--color;
$wp--custom--form--border--width: --wp--custom--form--border--width;
$wp--custom--form--input--color: --wp--custom--form--input--color;
$wp--custom--navbar--min--height: --wp--custom--navbar--min--height;
$wp--custom--query--post--title: --wp--custom--query--post--title;
75 changes: 43 additions & 32 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,19 @@
"codeception/module-filesystem": "^1.0",
"codeception/module-cli": "^1.0",
"codeception/util-universalframework": "^1.0",

"squizlabs/php_codesniffer": "*",
"phpcompatibility/php-compatibility": "*",
"dealerdirect/phpcodesniffer-composer-installer": "^0.7",
"phpstan/phpstan": "^0.12",
"szepeviktor/phpstan-wordpress": "^0.5",

"vimeo/psalm": "^4.8",
"phpbench/phpbench": "@dev",
"phpmetrics/phpmetrics": "^2.5",
"infection/infection": "^0.25",
"italystrap/debug": "^2.0",
"phpspec/prophecy-phpunit": "^1.1",
"italystrap/config": "^2.4",
"italystrap/theme-json-generator": "dev-master",
"italystrap/theme-json-generator": "dev-refactor",
"italystrap/html": "^1.2",
"infection/codeception-adapter": "^0.4.0"
},
Expand Down Expand Up @@ -70,53 +70,64 @@
},
"scripts": {
"cs": [
"vendor\\bin\\phpcbf -p --ignore=./tests/_support/* ./src/ ./tests/ && vendor\\bin\\phpcs -p --ignore=./tests/_support/* ./src/ ./tests/"
"@php ./vendor/bin/phpcs -p"
],
"analyze": [
"vendor\\bin\\phpstan analyze --level=max && vendor\\bin\\psalm"
"cs:fix": [
"@php ./vendor/bin/phpcbf -p"
],
"unit": [
"vendor\\bin\\codecept run unit && vendor\\bin\\infection --threads=4",
"@clean"
],
"unit:debug": [
"vendor\\bin\\codecept run unit --debug",
"@clean"
],
"wpunit": [
"vendor\\bin\\codecept run wpunit && vendor\\bin\\infection --threads=4",
"@clean"
"psalm": [
"@php ./vendor/bin/psalm --no-cache"
],
"wpunit:debug": [
"vendor\\bin\\codecept run wpunit --debug",
"@clean"
"unit": [
"@php ./vendor/bin/codecept run unit"
],
"functional": [
"vendor\\bin\\codecept run functional",
"@clean"
"integration": [
"@php ./vendor/bin/codecept run integration"
],
"functional:debug": [
"vendor\\bin\\codecept run functional --debug",
"@clean"
"infection": [
"echo \"Running Infection...\"",
"echo \"Also remember to escape suite correctly, example --skip=integration or --skip=wpunit\"",
"@php ./vendor/bin/infection --threads=max"
],
"bench": [
"vendor\\bin\\phpbench run --report=performance"
"@php ./vendor/bin/phpbench run tests/Benchmark --report=performance"
],
"metrics": [
"vendor\\bin\\phpmetrics --report-html='./tests/_output/report' ./src"
"@php ./vendor/bin/phpmetrics --report-html='./tests/_output/report' ./src"
],
"insights": [
"vendor\\bin\\phpinsights"
"@php ./vendor/bin/phpinsights"
],
"clean": [
"vendor\\bin\\codecept clean"
"@php ./vendor/bin/codecept clean"
],
"qa": [
"@cs",
"@psalm",
"@unit",
"@integration",
"@infection"
],
"json": [
"\\ItalyStrap\\ThemeJsonGenerator\\ComposerPlugin::run"
"rector": [
"@php ./vendor/bin/rector process --dry-run"
],
"rector:fix": [
"@php ./vendor/bin/rector process"
],
"theme/json": [
"@php ./vendor/bin/theme-json"
]
},
"support" : {
"issues": "https://github.com/ItalyStrap/experimental-theme/issues",
"source": "https://github.com/ItalyStrap/experimental-theme"
},
"config": {
"allow-plugins": {
"codeception/c3": true,
"infection/extension-installer": true,
"dealerdirect/phpcodesniffer-composer-installer": true,
"italystrap/theme-json-generator": true
}
}
}
1 change: 1 addition & 0 deletions config/assets/scripts.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

declare(strict_types=1);

namespace ItalyStrap\Ciao;
Expand Down
1 change: 1 addition & 0 deletions config/block_pattern/views/loop.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

declare(strict_types=1);

namespace ItalyStrap\Ciao;
Expand Down
3 changes: 2 additions & 1 deletion config/block_pattern/views/paragraph.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

declare(strict_types=1);

namespace ItalyStrap\Ciao;
Expand All @@ -9,5 +10,5 @@
$config = $this;
?>
<!-- wp:paragraph -->
<p><?php echo $config->get( 'content' ) ?></p>
<p><?php echo $config->get('content') ?></p>
<!-- /wp:paragraph -->
3 changes: 2 additions & 1 deletion functions/autoload.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

declare(strict_types=1);

namespace ItalyStrap\ExperimentalTheme;
namespace ItalyStrap\ExperimentalTheme;
45 changes: 13 additions & 32 deletions phpcs.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
<?xml version="1.0"?>
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="HTML-API" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/squizlabs/PHP_CodeSniffer/master/phpcs.xsd">

<description>A custom set of rules to check for a Module-sample repository</description>
<ruleset
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
name="HTML-API"
xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/squizlabs/PHP_CodeSniffer/master/phpcs.xsd"
>
<description>A custom set of rules to check for this project</description>
<arg name="colors"/>
<arg name="tab-width" value="4" />

Expand All @@ -12,36 +15,14 @@
<rule ref="PHPCompatibility"/>
<config name="testVersion" value="7.4-"/>

<!-- https://gist.github.com/gsherwood/9d22f634c57f990a7c64 -->
<!-- http://www.thisprogrammingthing.com/2015/creating-your-own-standard-in-phpcs/ -->
<!-- Use PSR2 as a base.-->
<rule ref="PSR2">

<exclude name="Squiz.Functions.FunctionDeclarationArgumentSpacing.SpacingAfterOpen" />
<exclude name="Squiz.Functions.FunctionDeclarationArgumentSpacing.SpacingBeforeClose" />

<exclude name="PSR2.ControlStructures.ControlStructureSpacing.SpacingAfterOpenBrace" />
<exclude name="PSR2.ControlStructures.ControlStructureSpacing.SpaceBeforeCloseBrace" />

<exclude name="PSR2.Methods.FunctionCallSignature.SpaceAfterOpenBracket" />
<exclude name="PSR2.Methods.FunctionCallSignature.SpaceBeforeCloseBracket" />
<file>./config/</file>
<file>./functions/</file>
<file>./src/</file>
<file>./tests/</file>


<!-- bracers -->
<exclude name="Squiz.Functions.MultiLineFunctionDeclaration.BraceOnSameLine" />
<exclude name="PSR2.Classes.ClassDeclaration.OpenBraceNewLine" />

<exclude name="Generic.WhiteSpace.DisallowTabIndent"/>
</rule>
<rule ref="Generic.WhiteSpace.DisallowSpaceIndent"/>
<rule ref="Generic.WhiteSpace.ScopeIndent">
<properties>
<property name="indent" value="4"/>
<property name="tabIndent" value="true"/>
</properties>
<rule ref="PSR12">
</rule>

<!-- bracers -->
<rule ref="Generic.Functions.OpeningFunctionBraceKernighanRitchie" />
<rule ref="Generic.Classes.OpeningBraceSameLine"/>
<exclude-pattern>*/vendor/*</exclude-pattern>
<exclude-pattern>*/tests/_support/*</exclude-pattern>
</ruleset>
33 changes: 18 additions & 15 deletions src/Helper.php
Original file line number Diff line number Diff line change
@@ -1,22 +1,25 @@
<?php

declare(strict_types=1);

namespace ItalyStrap\ExperimentalTheme;

final class Helper {

public static function templateParts( string $name, string $area ): array {
return [
'name' => $name,
'area' => $area,
];
}
final class Helper
{
public static function templateParts(string $name, string $area): array
{
return [
'name' => $name,
'area' => $area,
];
}

public static function customTemplates( string $name, string $title, array $post_types ): array {
return [
'name' => $name,
'area' => $title,
'postTypes' => $post_types,
];
}
public static function customTemplates(string $name, string $title, array $post_types): array
{
return [
'name' => $name,
'area' => $title,
'postTypes' => $post_types,
];
}
}
Loading

0 comments on commit 6969de8

Please sign in to comment.