diff --git a/.gitignore b/.gitignore index e02f53455..f77e3bf79 100644 --- a/.gitignore +++ b/.gitignore @@ -25,7 +25,8 @@ yarn-error.log /demo-runner -resources/json-database/* +/resources/json-database/* +!/resources/json-database/references.json /.env diff --git a/public/assets/images/faces/adam_gleiss.jpg b/public/assets/images/faces/adam_gleiss.jpg index 2bb1e3f09..8632ed22d 100644 Binary files a/public/assets/images/faces/adam_gleiss.jpg and b/public/assets/images/faces/adam_gleiss.jpg differ diff --git a/rector.php b/rector.php index 41c20f917..48f0e384c 100644 --- a/rector.php +++ b/rector.php @@ -9,7 +9,7 @@ return RectorConfig::configure() ->withPaths([__DIR__ . '/config', __DIR__ . '/src', __DIR__ . '/tests', __DIR__ . '/routes']) - ->withImportNames(removeUnusedImports: true) + ->withImportNames() ->withPreparedSets( deadCode: true, codeQuality: true, diff --git a/resources/css/app.scss b/resources/css/app.scss index a00f711d3..30a666a5b 100644 --- a/resources/css/app.scss +++ b/resources/css/app.scss @@ -363,7 +363,8 @@ h4 { h2 { text-align: center; - margin-bottom: 2.5em; + margin-top: .5em; + margin-bottom: 2em; font-weight: 500 !important; } } @@ -419,23 +420,14 @@ label.required:before { } #references { - .company-logo { - max-width: 10em; - margin-right: 0; - } - .company-quote { - font-size: 1.4em; + font-size: 1.3em; @media (max-width: 750px) { font-size: 1em; } } - .company-quote-card-body { - padding: 1.5em 1em 0 2em; - } - h3 { font-size: 1.8rem; margin-top: 0; diff --git a/resources/json-database/references.json b/resources/json-database/references.json new file mode 100644 index 000000000..8b708e92c --- /dev/null +++ b/resources/json-database/references.json @@ -0,0 +1,32 @@ +[ + { + "testimonial": "In my time as Head of software engineering at i6, I found in Rector the perfect core and enabling team to tackle technical debt, unblock critical upgrades and build strong foundations for leading aviation software project.", + "name": "Dom Graziano", + "position": "Head of Software Engineering at i6 Group", + "picture": "/assets/images/faces/dom_graziano.jpg" + }, + { + "testimonial": "I'm extremely pleased with the progress we are making.
It's really come a long way.", + "name": "William Adam Gleiss", + "position": "VP of Technology at aRes Travel", + "picture": "/assets/images/faces/adam_gleiss.jpg" + }, + { + "testimonial": "Tomas' deep expertise and tools-driven approach allowed us to modernize a significantly large legacy PHP codebase while teaching us best practices. Rector team worked around our schedule to ensure minimal disruption.

I highly recommend Rector team for legacy PHP code modernization!", + "name": "Eric Molitor", + "position": "CTO at Curve", + "picture": "/assets/images/faces/eric_molitor.jpg" + }, + { + "testimonial": "Thanks to Rector, we were able to quite simply refactor the core of our API, which saved a lot of work that our developers would otherwise have to do manually.", + "name": "Milan Mimra", + "position": "CTO at Spaceflow", + "picture": "/assets/images/faces/milan_mimra.jpg" + }, + { + "testimonial": "From upgrading our legacy project and improving team's productivity, to faster and easier code reviews, Rector is in the center of our PHP ecosystem.", + "name": "Nathan Page", + "position": "Technical Lead at EONX", + "picture": "/assets/images/faces/nathan_page.jpg" + } +] diff --git a/resources/views/hire_team/references.blade.php b/resources/views/hire_team/references.blade.php index 9d03acfcd..d7c553e3c 100644 --- a/resources/views/hire_team/references.blade.php +++ b/resources/views/hire_team/references.blade.php @@ -1,111 +1,135 @@ -

-
-
-
-
- Dom Graziano face -
+{{-- gpt ref https://grok.com/chat/082afba8-d9c2-42fc-ba27-58a26cb10469 --}} -
-

- "In my time as Head of software engineering at i6, I found in Rector the perfect core and enabling team to tackle technical debt, unblock critical upgrades and build strong foundations for leading aviation software project." -

-
- Dom Graziano, Head of Software Engineering at i6 Group -
-
-
-
+ -
-

- "From upgrading our legacy project and improving team's - productivity, to faster and easier code reviews, - Rector is in the center of our PHP ecosystem." -

-
- Nathan Page, Technical Lead at EONX -
-
+ + + +
+ + + diff --git a/resources/views/homepage/rule_detail.blade.php b/resources/views/homepage/rule_detail.blade.php index 07d01b021..183124713 100644 --- a/resources/views/homepage/rule_detail.blade.php +++ b/resources/views/homepage/rule_detail.blade.php @@ -22,8 +22,13 @@ @section('main')
- Back to rule search + @if (url()->previous() && str_contains(url()->previous(), 'find-rule')) + Back to rule search + @else + Find another rule + @endif
+
diff --git a/src/Controller/HomepageController.php b/src/Controller/HomepageController.php index 4ee885d26..ccaf08586 100644 --- a/src/Controller/HomepageController.php +++ b/src/Controller/HomepageController.php @@ -7,6 +7,8 @@ use App\Repository\PostRepository; use Illuminate\Contracts\View\View; use Illuminate\Routing\Controller; +use Nette\Utils\FileSystem; +use Nette\Utils\Json; final class HomepageController extends Controller { @@ -20,9 +22,22 @@ public function __invoke(): View return \view('homepage/homepage', [ 'page_title' => "We'll Speed Up Your Development Process by 300%", 'recentPosts' => $this->postRepository->fetchLast(5), + + 'references' => $this->loadReferences(), + // seo 'metaTitle' => 'Rector: Fast PHP Code Upgrades & Refactoring', 'metaDescription' => 'Automate PHP code upgrades and refactoring with Rector. Save time, reduce errors, and modernize your codebase instantly. Try it now!', ]); } + + /** + * @return array{string, mixed} + */ + private function loadReferences(): array + { + $referencesFileContents = FileSystem::read(__DIR__ . '/../../resources/json-database/references.json'); + + return Json::decode($referencesFileContents, forceArrays: true); + } } diff --git a/tests/SmokeTests/ControllerSmokeTest.php b/tests/SmokeTests/ControllerSmokeTest.php index ba6568406..915036d8b 100644 --- a/tests/SmokeTests/ControllerSmokeTest.php +++ b/tests/SmokeTests/ControllerSmokeTest.php @@ -17,7 +17,7 @@ public function test(string $url, int $expectedStatusCode): void { $testResponse = $this->get($url); - $testResponse->assertStatus($expectedStatusCode); + $this->assertSame($expectedStatusCode, $testResponse->getStatusCode(), (string) $testResponse->getContent()); } public static function provideData(): Iterator