WPCN wrote a comment+100 XP
2mos ago
Excellent lesson, great illustration of the difference between Vibe Coding and Developer-Driven AI. Also nice illustration of cool things you can do with a Telegram bot :-)
WPCN wrote a comment+100 XP
2mos ago
Before I saw this video I was sceptic about the benefits of talking to your computer, but you show how easy and fast it is. So now I’m looking at various apps that offer that (I checked Wispr Flow, but don’t want yet another subscription), here are some I found:
https://www.onresonant.com https://embertype.com https://sotto.to https://superwhisper.com
Anyone else using a dictating app which you could recommend?
WPCN wrote a comment+100 XP
3mos ago
Thanks Jeffrey, that was fun!
WPCN liked a comment+100 XP
3mos ago
An easy way to add focus trap to the modal is to add this first party focus trap plugin: https://alpinejs.dev/plugins/focus
bootstrap.js
import axios from 'axios';
import Alpine from 'alpinejs'
import focus from '@alpinejs/focus'
window.axios = axios;
window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
window.Alpine = Alpine;
Alpine.plugin(focus);
Alpine.start();
modal.blade.php
@props(['name', 'title'])
<div
x-data="{ show: false, name: @js($name) }"
x-show="show"
x-trap="show"
@open-modal.window="show = ($event.detail === name)"
@keydown.escape.window="show = false"
x-transition:enter="ease-out duration-250"
x-transition:enter-start="opacity-0 -translate-y-4"
x-transition:enter-end="opacity-100"
x-transition:leave="ease-in duration-250"
x-transition:leave-start="opacity-100"
x-transition:leave-end="opacity-0 -translate-y-4"
class="fixed inset-0 z-50 flex items-center justify-center bg-black/50 backdrop-blur-xs"
style="display:none;"
role="dialog"
aria-modal="true"
aria-labelledby="modal-{{ $name }}-title"
:aria-hidden="!show"
tabindex="-1"
id="modal-{{ $name }}"
>
<x-card is="div" @click.away="show = false">
<div>
<h2 id="modal-{{ $name }}-title" class="text-2xl font-bold">{{ $title }}</h2>
</div>
<div>
{{ $slot }}
</div>
</x-card>
</div>
And you can add some extra spice by disabling scrolling when a modal is open:
body:not(:has([role='dialog'][aria-hidden])) {
overflow: hidden;
}
WPCN wrote a comment+100 XP
3mos ago
These videos go way too fast to code along. From now on I’ll just watch them instead of coding together with you.
WPCN wrote a comment+100 XP
3mos ago
WPCN liked a comment+100 XP
4mos ago
Color theme for those looking to copy:
--color-background: oklch(0.12 0 0);
--color-foreground: oklch(0.95 0 0);
--color-card: oklch(0.16 0 0);
--color-primary: oklch(0.65 0.15 160);
--color-primary-foreground: oklch(0.12 0 0);
--color-border: oklch(0.24 0 0);
--color-input: oklch(0.24 0 0);
--color-muted-foreground: oklch(0.6 0 0);
WPCN liked a comment+100 XP
4mos ago
Here are the full CSS component files for those looking to copy:
resources/css/components/btn.css
button {
cursor: pointer;
}
.btn {
background: var(--color-primary);
border-radius: var(--radius-xl);
color: var(--color-primary-foreground);
padding-inline: calc(var(--spacing) * 3);
font-size: var(--text-sm);
font-weight: var(--font-weight-medium);
cursor: pointer;
height: calc(var(--spacing) * 8);
line-height: calc(var(--spacing) * 8);
display: inline-block;
}
.btn.btn-outlined {
background: transparent;
border: 1px solid var(--color-border);
border-color: var(--color-border);
color: var(--color-foreground);
}
.btn.btn-outlined:hover {
background: color-mix(in srgb, black 25%, var(--color-input));
}
.btn.btn-ghost {
background: transparent;
}
.btn:has(> svg) {
display: flex;
align-items: center;
column-gap: calc(var(--spacing) * 2);
}
.btn:hover {
background: color-mix(in srgb, black 10%, var(--color-primary));
text-decoration: none;
}
resources/css/components/form.css
label {
color: var(--color-foreground);
}
.input {
border-radius: var(--radius-md);
height: calc(var(--spacing) * 10);
width: 100%;
border-width: 1px;
border-color: var(--color-border);
padding: calc(var(--spacing) * 2) calc(var(--spacing) * 3);
background-color: var(--color-card);
color: var(--color-foreground);
outline: 2px solid transparent;
outline-offset: 2px;
}
.input::placeholder {
color: var(--color-muted-foreground);
}
.input:focus-visible {
outline: 0;
box-shadow:
0 0 0 calc(var(--spacing) * .5) var(--color-background)
0 0 0 calc(var(--spacing) * 1) var(--color-primary);
}
@media (min-width: var(--breakpoint-md)) {
.input {
font-size: var(--text-sm);
}
}
.textarea {
border-radius: var(--radius-md);
height: calc(var(--spacing) * 40);
width: 100%;
border-width: 1px;
border-color: var(--color-border);
padding: calc(var(--spacing) * 2) calc(var(--spacing) * 3);
background-color: var(--color-card);
color: var(--color-foreground);
outline: 2px solid transparent;
outline-offset: 2px;
}
.textarea::placeholder {
color: var(--color-muted-foreground);
}
.textarea:focus-visible {
outline: 0;
box-shadow:
0 0 0 calc(var(--spacing) * .5) var(--color-background)
0 0 0 calc(var(--spacing) * 1) var(--color-primary);
}
.label {
display: block;
font-size: var(--text-sm);
}
input[type=file] {
display: block;
width: 100%;
font-size: 0.875rem;
line-height: 1.25rem;
color: var(--color-foreground);
}
input[type=file]::file-selector-button {
margin-right: calc(var(--spacing) * 4);
padding: calc(var(--spacing) * 2) calc(var(--spacing) * 4);
border-radius: calc(var(--spacing) * 2);
border-width: 0;
font-size: 0.875rem;
line-height: 1.25rem;
font-weight: 500;
background-color: var(--color-primary);
color: rgb(var(--color-background));
}
input[type=file]::file-selector-button:hover {
opacity: 0.9;
}
.error {
font-size: var(--text-sm);
color: var(--color-red-600);
}
.form-muted-icon {
color: var(--color-muted-foreground);
}
.form-muted-icon:hover {
color: var(--color-foreground);
}
WPCN liked a comment+100 XP
4mos ago
CodeRabbit is a paid service, and deserves every penny. But for a more laravel-native and free alternative, I'd recommend laravel-simplifier. php-simplifier's laravel-first version, kinda.
I commit and before pushing, I call Claude to scan with laravel-simplifier. Almost 99% accurate and most times I accept without touching anything. Then I push.
https://laravel-news.com/laravel-gets-a-claude-code-simplifier-plugin
WPCN wrote a comment+100 XP
4mos ago
Hi @jeffry ! With every lesson I get it more why you are so excited about Laravel, it’s pretty awesome what’s all in the box. Love your teaching style, it’s all super interesting and fun to watch as well. Thanks for creating this course, really enjoying it!