Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redesign #27

Closed
wants to merge 67 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
1f19400
Update dependencies & purge views
sebastiandedeyne Jul 8, 2024
876f81d
Further view cleanup
sebastiandedeyne Jul 9, 2024
5400456
Fix Tailwind config
sebastiandedeyne Jul 10, 2024
1cf3e48
Fix Tailwind config
sebastiandedeyne Jul 10, 2024
f414140
Add styling for updated homepage
jimirobaer Jul 11, 2024
489b4ec
Add styling for download popup (WIP)
jimirobaer Jul 11, 2024
ab2ac0b
Add mobile styling for header
jimirobaer Jul 12, 2024
8e28849
Add styling for Blog
jimirobaer Jul 12, 2024
7ffe79e
Fix rendering problems.
timvandijck Jul 23, 2024
1ef1f47
Add styling for Docs, refactor custom CSS
jimirobaer Jul 22, 2024
d20bffe
Merge branch 'redesign' of github.com:spatie/myray.app into redesign
jimirobaer Jul 23, 2024
97aecb7
Tweaks to styling + icons
jimirobaer Jul 23, 2024
8c321f0
Toggle testimonials
jimirobaer Jul 23, 2024
73810de
Add testimonials from HomeController
jimirobaer Jul 23, 2024
c27e04c
Styling for legal pages
jimirobaer Jul 23, 2024
6a2f28d
Tweaks to styles & templates
jimirobaer Jul 23, 2024
006c0b6
Simple styling for 404
jimirobaer Jul 23, 2024
0468226
Add links to integrations on home
jimirobaer Jul 23, 2024
df1be1f
Tweaks to header, templates
jimirobaer Jul 23, 2024
ce4e0df
Tweak markup styling
jimirobaer Jul 23, 2024
2e009b9
Tweak testimonials
jimirobaer Jul 24, 2024
3277c83
Styling for Ray app window
jimirobaer Jul 24, 2024
21bfb72
Add tooltips to window
jimirobaer Jul 24, 2024
dfd6589
Tweak table styling for mobile viewports
jimirobaer Jul 24, 2024
5b175ea
Tweak code block styling
jimirobaer Jul 25, 2024
b1cd78a
Tweak docs sidebar link styling
jimirobaer Jul 25, 2024
35f6404
Minor content tweaks
sebastiandedeyne Jul 25, 2024
85bdf3d
Add animation to home hero
jimirobaer Jul 26, 2024
f4856ba
Merge branch 'redesign' of github.com:spatie/myray.app into redesign
jimirobaer Jul 26, 2024
025e7d3
Tweak date style on blog article
jimirobaer Jul 26, 2024
5d35760
Tweak timings of typewriter
jimirobaer Jul 26, 2024
bc89539
Remove FA icons
jimirobaer Jul 26, 2024
ca21167
Add theme-color to pages
jimirobaer Jul 26, 2024
61af025
Tweak hover styling for logos
jimirobaer Jul 26, 2024
6e8cf8a
Tweak markup typography
jimirobaer Jul 26, 2024
15c9000
Process feedback
jimirobaer Jul 26, 2024
0b2c6a0
Tweak code editor animation
jimirobaer Jul 29, 2024
4083808
Tweak nav active state
jimirobaer Jul 29, 2024
38ecabb
Tweak docs
jimirobaer Jul 29, 2024
983812b
Add markup for docs nav
jimirobaer Jul 29, 2024
0fd04b3
Add changelog
jimirobaer Jul 29, 2024
ece9260
Add teaser page
jimirobaer Jul 30, 2024
e642f3b
Tweak styles
jimirobaer Jul 30, 2024
ccadd26
Add text to changelog pge
jimirobaer Jul 30, 2024
1d3ca50
Tweaks to teaser
jimirobaer Jul 30, 2024
0957ee4
Add newsletter form to blog post
jimirobaer Jul 31, 2024
df91cd5
Tweak teaser intro animation
jimirobaer Jul 31, 2024
48962e0
Make docs sidebar sticky + cleanup
jimirobaer Jul 31, 2024
aa214d4
Fix teaser
jimirobaer Aug 1, 2024
d9c1751
Tweak docs sidebar size
jimirobaer Aug 1, 2024
cfbbeeb
Tweak screenshot
jimirobaer Aug 7, 2024
f95ac9a
Add confetti
jimirobaer Aug 7, 2024
2be1999
Tweak confetti
jimirobaer Aug 7, 2024
de6ec99
Feedback
jimirobaer Aug 7, 2024
fddfe77
Tweak hero baseline
jimirobaer Aug 7, 2024
0525aca
Subscription form
sebastiandedeyne Aug 8, 2024
c101b81
Cleanup alpine
timvandijck Aug 20, 2024
c081730
Add wire:navigate
timvandijck Aug 20, 2024
807c6dc
Tweak Changelog template
jimirobaer Aug 21, 2024
76d6a7f
Wire prev and next pages in the docs
timvandijck Aug 21, 2024
92343bb
Update deploy script
timvandijck Aug 22, 2024
3fcea3d
Update deploy script
timvandijck Aug 22, 2024
e464ad8
Update deploy script
timvandijck Aug 22, 2024
b83d454
Remove wire:navigate from search
timvandijck Aug 22, 2024
df64846
Teaser form
sebastiandedeyne Aug 26, 2024
3a5d3f1
Remove unused view
sebastiandedeyne Aug 26, 2024
2ef5d95
Remove old view registration
sebastiandedeyne Aug 26, 2024
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
26 changes: 20 additions & 6 deletions Envoy.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,23 @@
require __DIR__.'/vendor/autoload.php';
\Dotenv\Dotenv::create(\Illuminate\Support\Env::getRepository(), __DIR__)->load();

$server = "myray.app";
$environment ??= 'staging';
$branch ??= 'main';

$server = match($environment) {
'next' => 'next.myray.app',
'production' => 'myray.app',
default => 'next.myray.app',
};

$branch = match($environment) {
'next' => 'redesign',
'production' => 'main',
default => 'redesign',
};

$userAndServer = 'forge@'. $server;
$repository = "spatie/{$server}";
$repository = "spatie/myray.app";
$baseDir = "/home/forge/{$server}";
$releasesDir = "{$baseDir}/releases";
$persistentDir = "{$baseDir}/persistent";
Expand Down Expand Up @@ -41,8 +55,8 @@ function logMessage($message) {

@task('startDeployment', ['on' => 'local'])
{{ logMessage("🏃 Starting deployment...") }}
git checkout main
git pull origin main
git checkout {{ $branch }}
git pull origin {{ $branch }}
@endtask

@task('cloneRepository', ['on' => 'remote'])
Expand All @@ -56,7 +70,7 @@ function logMessage($message) {
mkdir {{ $newReleaseDir }};

# Clone the repo
git clone --depth 1 [email protected]:{{ $repository }} {{ $newReleaseName }}
git clone --depth 1 [email protected]:{{ $repository }} --branch {{ $branch }} {{ $newReleaseName }}

# Configure sparse checkout
cd {{ $newReleaseDir }}
Expand Down Expand Up @@ -152,7 +166,7 @@ function logMessage($message) {
@task('deployOnlyCode',['on' => 'remote'])
{{ logMessage("💻 Deploying code changes...") }}
cd {{ $currentDir }}
git pull origin main
git pull origin {{ $branch }}
php artisan config:clear
php artisan cache:clear
php artisan config:cache
Expand Down
45 changes: 16 additions & 29 deletions app/Domain/Docs/BladeParsingExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,86 +12,73 @@
use League\CommonMark\Extension\CommonMark\Node\Inline\Code;
use League\CommonMark\Extension\ExtensionInterface;
use \League\CommonMark\Environment\EnvironmentBuilderInterface;
use League\CommonMark\Node\Inline\Text;
use League\CommonMark\Output\RenderedContent;
use League\CommonMark\Renderer\HtmlRenderer;

class BladeParsingExtension implements ExtensionInterface
{
private EnvironmentBuilderInterface $environment;

protected array $rendered = [];

protected array $components = [
'<x-docs.integrations-overview />',
];

public function register(EnvironmentBuilderInterface $environment): void
{
$this->environment = $environment;

$environment->addEventListener(
DocumentParsedEvent::class, [$this, 'onDocumentParsed'], -10
);

$environment->addEventListener(
DocumentRenderedEvent::class, [$this, 'onDocumentRendered'], 10
DocumentRenderedEvent::class, [$this, 'onDocumentRendered'], 10000
);
}

public function onDocumentParsed(DocumentParsedEvent $event)
public function onDocumentParsed(DocumentParsedEvent $event): void
{
// Walk through every node in the document
foreach ($event->getDocument()->iterator() as $node) {
// We're only looking for code nodes.
if (!$this->isCodeNode($node)) {
if (!$this->isKnownComponent($node)) {
continue;
}

// Create a unique, random ID
$id = Str::uuid()->toString();

// Create a new HTML block that just has our placeholder
$replacement = new HtmlBlock(HtmlBlock::TYPE_6_BLOCK_ELEMENT);

$replacement->setLiteral("[[replace:$id]]");

// Replace the code node with our placeholder
$node->replaceWith($replacement);

// Create an identical renderer to the main one
$renderer = new HtmlRenderer($this->environment);

// Render the code node and stash it away.
$this->rendered[$id] = $renderer->renderNodes([$node]);
$this->rendered[$id] = Blade::render($node->getLiteral());
}
}

public function onDocumentRendered(DocumentRenderedEvent $event)
public function onDocumentRendered(DocumentRenderedEvent $event): void
{
$search = [];

$replace = [];

// Gather up all the placeholders and their real content
foreach ($this->rendered as $id => $content) {
$search[] = "[[replace:$id]]";
$replace[] = $content;
}

// The HTML that Commonmark generated
$content = $event->getOutput()->getContent();

// First render the output without code blocks.
$content = Blade::render($content);

// Then add the code blocks back in.
$content = Str::replace($search, $replace, $content);

// And replace the entire response with our new, Blade-processed output.
$event->replaceOutput(
new RenderedContent($event->getOutput()->getDocument(), $content)
);
}

protected function isCodeNode($node)
protected function isKnownComponent($node): bool
{
return $node instanceof FencedCode
|| $node instanceof IndentedCode;
if (!$node instanceof Text) {
return false;
}

return in_array($node->getLiteral(), $this->components);
}
}
8 changes: 7 additions & 1 deletion app/Http/Front/Controllers/DocsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ class DocsController
{
private DocTree $docTree;


public function __construct()
{
$this->docTree = DocTree::build();
Expand Down Expand Up @@ -42,13 +43,18 @@ public function show(string $slug)

$category = $this->docTree->findCategory($page->category);

$index = $category->pages->search(fn ($p) => $p->slug === $page->slug);

$prev = $category->pages->get($index - 1);
$next = $category->pages->get($index + 1);

$categories = [];
while($category !== null) {
$categories[] = $category;
$category = $category->parent ?? null;
}
$categories = array_reverse($categories);

return view('front.docs.index', compact('page', 'slug', 'categories'));
return view('docs.show', compact('page', 'slug', 'categories', 'prev', 'next'));
}
}
18 changes: 9 additions & 9 deletions app/Http/Front/Controllers/HomeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public function __invoke(Request $request)

$prices = SpatiePriceApi::getPriceForPurchasable($purchasableId);

return view('front.home.index', [
return view('home.index', [
'downloadLinkMacIntel' => spatieUrl('https://spatie.be/products/ray/download/macosIntel/latest'),
'downloadLinkMacAppleSilicon' => spatieUrl('https://spatie.be/products/ray/download/macosAppleSilicon/latest'),
'downloadLinkWindows' => spatieUrl('https://spatie.be/products/ray/download/windows/latest'),
Expand All @@ -33,14 +33,14 @@ protected function getTestimonials(): Collection
return collect([
new Testimonial(
name: 'Taylor Otwell',
text: 'Ray is <strong class=" font-black text-2xl block">Life</strong>',
text: '<span class="text-2xl">Ray is life</span>',
image: 'taylor',
url: 'https://twitter.com/taylorotwell',
title: 'Laravel Founder & Creator',
),
new Testimonial(
name: 'Michael Dyrynda',
text: 'As an amateur developer that swears by <code>dd()</code>, I was thrilled to hear about Ray. Now
text: 'As an amateur developer that swears by dd(), I was thrilled to hear about Ray. Now
I can <strong class="font-semibold">feel like a real developer</strong>, even without using \'real\'
debugging tools!',
image: 'michael',
Expand All @@ -56,8 +56,8 @@ protected function getTestimonials(): Collection
),
new Testimonial(
name: 'Nuno Maduro',
text: 'Ray is a part of my <strong class="font-semibold">Essentials</strong> toolbox. It has the
snapiness of a real debugger, but the simplicity of <code>dd()</code>',
text: 'Ray is a part of my <strong class="font-bold">Essentials</strong> toolbox. It has the
snapiness of a real debugger, but the simplicity of dd()',
image: 'nuno',
url: 'https://twitter.com/enunomaduro',
title: 'Software engineer at Laravel',
Expand Down Expand Up @@ -127,7 +127,7 @@ protected function getTestimonials(): Collection
),
new Testimonial(
name: 'Caneco',
text: 'dd() is for now, ray() is forever… or at least until you clear your log screen.',
text: 'dd() is for now, Ray() is forever… or at least until you clear your log screen.',
image: 'caneco',
url: 'https://twitter.com/caneco',
title: 'Full Stack Developer at Mediacare',
Expand All @@ -148,7 +148,7 @@ protected function getTestimonials(): Collection
),
new Testimonial(
name: 'Daniel Koop',
text: 'I have just started using ray and I just love the simplicity of the tool. It is a neat way for debugging without a configuration hassle and I love the pause feature rather than running sleep.',
text: 'I have just started using Ray and I just love the simplicity of the tool. It is a neat way for debugging without a configuration hassle and I love the pause feature rather than running sleep.',
image: 'mrkoopie',
url: 'https://twitter.com/mrkoopie',
title: 'WordPress and Laravel developer',
Expand Down Expand Up @@ -204,7 +204,7 @@ protected function getTestimonials(): Collection
),
new Testimonial(
name: 'Andre Biel',
text: 'Despite being awesome in so many different ways, ray is the missing dd() for pure API applications.',
text: 'Despite being awesome in so many different ways, Ray is the missing dd() for pure API applications.',
image: 'andre',
url: 'https://twitter.com/the_real_biel',
title: 'Co-founder Nice Outside',
Expand All @@ -225,7 +225,7 @@ protected function getTestimonials(): Collection
),
new Testimonial(
name: 'JL',
text: "Ray is a 'ray' of sunshine that saves me time digging into log files or the response tab in chrome. Wordpress, Laravel, Yii: I've used ray everywhere and it's done nothing but make me more productive.",
text: "Ray is a 'ray' of sunshine that saves me time digging into log files or the response tab in Chrome. Wordpress, Laravel, Yii: I've used Ray everywhere and it's done nothing but make me more productive.",
image: 'jl',
url: 'https://twitter.com/JLadHDeveloper',
title: 'Full Stack Wildcard Developer',
Expand Down
4 changes: 2 additions & 2 deletions app/Http/Front/Controllers/PostsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public function index()
{
$posts = ContentApi::getPosts('ray', request('page', 1), theme: 'nord');

return view('front.blog.index', [
return view('blog.index', [
'posts' => $posts,
]);
}
Expand All @@ -31,7 +31,7 @@ public function detail(string $slug)

abort_if(is_null($post), 404);

return view('front.blog.show', [
return view('blog.show', [
'post' => $post,
]);
}
Expand Down
30 changes: 0 additions & 30 deletions app/Http/Front/Controllers/SubscribeController.php

This file was deleted.

1 change: 0 additions & 1 deletion app/Livewire/DocSearch.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace App\Livewire;

use Illuminate\Support\Collection;
use Livewire\Component;
use Spatie\SiteSearch\Search;
use Spatie\SiteSearch\SearchResults\SearchResults;
Expand Down
2 changes: 0 additions & 2 deletions app/Providers/AppServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ public function boot(): void
'error' => 'alert-error',
]);

Blade::component('app.components.buyButton', 'buy-button');

Blade::directive('markdown', function () {
return "<?php echo (new \League\CommonMark\CommonMarkConverter())->convertToHtml(<<<HEREDOC";
});
Expand Down
2 changes: 1 addition & 1 deletion app/View/Components/DocsNavigation.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ public function render(): View|Closure|string

$slug = request()->route()->parameter('slug');

return view('components.docs-navigation', compact('navigation', 'slug'));
return view('components.docs.navigation.index', compact('navigation', 'slug'));
}
}
2 changes: 1 addition & 1 deletion app/View/Components/Download.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class Download extends Component
{
public function render(): View|Closure|string
{
return view('components.download', [
return view('components.download.template', [
'downloadLinkMacIntel' => spatieUrl('https://spatie.be/products/ray/download/macosIntel/latest'),
'downloadLinkMacAppleSilicon' => spatieUrl('https://spatie.be/products/ray/download/macosAppleSilicon/latest'),
'downloadLinkWindows' => spatieUrl('https://spatie.be/products/ray/download/windows/latest'),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace App\View\Components;
namespace App\View\Components\docs;

use Closure;
use Illuminate\Contracts\View\View;
Expand All @@ -24,6 +24,6 @@ public function render(): View|Closure|string
$doc->parts[count($doc->parts) -1] === '_index.md';
});

return view('components.integrations-overview', compact('docs'));
return view('components.docs.integrations-overview', compact('docs'));
}
}
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"aws/aws-sdk-php": "^3.211",
"blade-ui-kit/blade-ui-kit": "^0.4",
"fakerphp/faker": "^1.9.1",
"gehrisandro/tailwind-merge-laravel": "^1.2",
"guzzlehttp/guzzle": "^7.2",
"laravel/framework": "^10.8",
"laravel/socialite": "^5.6",
Expand Down
Loading