Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed public/assets/images/homepage/find.jpg
Binary file not shown.
Binary file removed public/assets/images/homepage/instant-speed.jpg
Binary file not shown.
Binary file removed public/assets/images/homepage/interactive-ast.jpg
Binary file not shown.
2 changes: 1 addition & 1 deletion resources/css/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
// to load the Bootswatch web fonts locally and avoid loading them from Google servers
// see https://github.com/thomaspark/bootswatch/issues/55#issuecomment-298093182

@import url('https://rsms.me/inter/inter.css');
// @import url('https://rsms.me/inter/inter.css');

html {
font-family: 'Inter', sans-serif;
Expand Down
5 changes: 0 additions & 5 deletions resources/views/_snippets/menu_items.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,6 @@ class="nav-link">Play with AST</a>
class="nav-link">Find rule</a>
</li>

<li class="nav-item">
<a href="{{ action(\App\Controller\Demo\CustomRuleController::class) }}"
class="nav-link">Custom Rule</a>
</li>

<li class="nav-item">
<a href="{{ action(\App\Controller\CodebaseRenovationController::class) }}"
class="nav-link">Codebase Renovation</a>
Expand Down
41 changes: 21 additions & 20 deletions resources/views/_snippets/styles.blade.php
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
<link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600&display=swap" rel="stylesheet">

{{-- live code highligh in demo --}}
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.28.0/codemirror.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.28.0/theme/solarized.min.css">
@isset ($codeMirror)
{{-- live code highligh in demo --}}
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.28.0/codemirror.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.28.0/theme/solarized.min.css">

{{-- code highligh posts --}}
{{-- pick from https://highlightjs.org/demo --}}
{{-- see ChatGPT https://chat.openai.com/share/af70716e-067c-481c-ad61-fc40de2f4dc3 --}}


<link rel="stylesheet" id="theme-link" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/base16/atlas.min.css">
{{--<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/base16/atelier-dune-light.min.css">--}}
<link rel="stylesheet" id="theme-link" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/base16/atlas.min.css">
@endisset

<style>
pre code.hljs {
Expand Down Expand Up @@ -64,19 +63,21 @@ function toggleTheme() {
window.onload = loadTheme;
</script>

<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/languages/bash.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/languages/php.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/languages/yaml.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/languages/diff.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/languages/json.min.js"></script>

<script>
document.addEventListener('DOMContentLoaded', (event) => {
document.querySelectorAll('pre code.language-bash, pre code.language-php, pre code.language-yaml, pre code.language-diff, pre code.language-json').forEach((element) => {
hljs.highlightElement(element);
@isset ($codeMirror)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@TomasVotruba this seems make detail rule doesn't have code highlight, see https://getrector.com/rule-detail/covers-annotation-with-value-to-attribute-rector

Screenshot 2025-04-29 at 08 28 50

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/languages/bash.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/languages/php.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/languages/yaml.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/languages/diff.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/languages/json.min.js"></script>

<script>
document.addEventListener('DOMContentLoaded', (event) => {
document.querySelectorAll('pre code.language-bash, pre code.language-php, pre code.language-yaml, pre code.language-diff, pre code.language-json').forEach((element) => {
hljs.highlightElement(element);
});
});
});
</script>
</script>
@endisset

@vite(['resources/css/app.scss', 'resources/js/app.js'])
95 changes: 0 additions & 95 deletions resources/views/homepage/interactive.blade.php

This file was deleted.

12 changes: 3 additions & 9 deletions routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,13 @@
use App\Controller\Blog\PostController;
use App\Controller\CodebaseRenovationController;
use App\Controller\ContactController;
use App\Controller\Demo\CustomRuleController;
use App\Controller\Demo\CustomRuleDetailController;
use App\Controller\Demo\DemoController;
use App\Controller\Demo\DemoDetailController;
use App\Controller\Demo\ProcessCustomRuleFormController;
use App\Controller\Demo\ProcessDemoFormController;
use App\Controller\DocumentationController;
use App\Controller\FindRuleController;
use App\Controller\HireTeamController;
use App\Controller\HomepageController;
use App\Controller\InteractiveController;
use App\Controller\RssController;
use App\Controller\RuleDetailController;
use App\Controller\Socials\PostThumbnailController;
Expand All @@ -43,7 +39,7 @@
Route::get('contact', ContactController::class);
Route::get('hire-team', HireTeamController::class);

Route::get('play-and-learn', InteractiveController::class);
Route::redirect('play-and-learn', 'ast');

Route::get('blog/{postSlug}', PostController::class);
Route::get('/thumbnail/{title}.png', PostThumbnailController::class)
Expand All @@ -63,10 +59,8 @@

Route::get('stats/find-rule', FindRuleStatsController::class);

Route::get('custom-rule/{uuid}', CustomRuleDetailController::class)
->whereUuid('uuid');
Route::get('custom-rule', CustomRuleController::class);
Route::post('process-custom-rule', ProcessCustomRuleFormController::class);
Route::redirect('custom-rule/{uuid}', 'demo');
Route::redirect('custom-rule', 'demo');

// demo
Route::get('demo/{uuid}', DemoDetailController::class)
Expand Down
1 change: 1 addition & 0 deletions src/Controller/Blog/PostController.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ public function __invoke(string $postSlug, PostRepository $postRepository): View

return \view('blog/post', [
'post' => $post,
'codeMirror' => true,
]);
}
}
1 change: 1 addition & 0 deletions src/Controller/CodebaseRenovationController.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public function __invoke(): View
return \view('homepage/codebase_renovation', [
'page_title' => 'Codebase Renovation',
'renovationItems' => $this->renovationItemRepository->fetchAll(),
'codeMirror' => true,
]);
}
}
20 changes: 0 additions & 20 deletions src/Controller/Demo/CustomRuleController.php

This file was deleted.

35 changes: 0 additions & 35 deletions src/Controller/Demo/CustomRuleDetailController.php

This file was deleted.

1 change: 1 addition & 0 deletions src/Controller/Demo/DemoController.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ public function __invoke(Request $request): View
return \view('demo/demo', [
'page_title' => 'Try Rector Online',
'rectorRun' => RectorRun::createEmpty(),
'codeMirror' => true,
]);
}
}
1 change: 1 addition & 0 deletions src/Controller/Demo/DemoDetailController.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public function __invoke(string $uuid): View|RedirectResponse
return \view('demo/demo', [
'page_title' => 'Try Rector Online',
'rectorRun' => $rectorRun,
'codeMirror' => true,
]);
}
}
39 changes: 0 additions & 39 deletions src/Controller/Demo/ProcessCustomRuleFormController.php

This file was deleted.

1 change: 1 addition & 0 deletions src/Controller/FindRuleController.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public function __invoke(): View
return \view('homepage/find_rule', [
'page_title' => 'Find the best Rule',
'ruleCount' => $this->rectorFinder->getRuleCount(),
'codeMirror' => true,
]);
}
}
18 changes: 0 additions & 18 deletions src/Controller/InteractiveController.php

This file was deleted.

Loading