682 search results

32 lines | templates/cart/cart.html.twig
// ... lines 1 - 10
<aside class="col-12 col-md-4 order-2 order-md-1">
<turbo-frame id="cart-sidebar" src="{{ path('_app_cart_product_featured') }}" target="_top">
Loading...
</turbo-frame>
</aside>
// ... lines 16 - 32
See Code Block in Script
32 lines | templates/cart/cart.html.twig
// ... lines 1 - 10
<aside class="col-12 col-md-4 order-2 order-md-1">
<turbo-frame id="cart-sidebar" src="{{ fragment_uri(controller('App\\Controller\\CartController::_cartFeaturedProduct')) }}" target="_top">
Loading...
</turbo-frame>
</aside>
// ... lines 17 - 32
See Code Block in Script
32 lines | templates/cart/cart.html.twig
// ... lines 1 - 10
<aside class="col-12 col-md-4 order-2 order-md-1">
<turbo-frame id="cart-sidebar" src="{{ fragment_uri(controller('App\\Controller\\CartController::_cartFeaturedProduct')) }}">
Loading...
</turbo-frame>
</aside>
// ... lines 16 - 32
See Code Block in Script
34 lines | package.json
// ... line 1
"devDependencies": {
"@babel/preset-react": "^7.0.0",
"@fortawesome/fontawesome-free": "^5.15.3",
"@hotwired/turbo": "^7.0.0-beta.5",
"@popperjs/core": "^2.9.1",
"@symfony/stimulus-bridge": "^2.0.0",
// ... lines 8 - 34
See Code Block in Script
32 lines | templates/cart/cart.html.twig
// ... lines 1 - 10
<aside class="col-12 col-md-4 order-2 order-md-1">
<turbo-frame id="cart-sidebar" src="{{ path('_app_cart_product_featured') }}">
Loading...
</turbo-frame>
</aside>
// ... lines 16 - 32
See Code Block in Script
105 lines | templates/base.html.twig
// ... lines 1 - 96
<script>
document.getElementById('logo-img').addEventListener('click', (event) => {
event.preventDefault();
Turbo.visit('/cart');
})
</script>
// ... lines 103 - 105
See Code Block in Script
173 lines | assets/styles/app.css
// ... lines 1 - 4
body {
font-family: 'Montserrat', sans-serif;
transition: opacity 1000ms;
}
body.turbo-loading, body.turbo-loaded {
opacity: .2;
}
// ... lines 12 - 173
See Code Block in Script
…it - they're kind of fun, and fit right into the Turbo & Stimulus world (one is built on top of Stimulus): https://github.com/symfony/ux-twig-component and https://github.com/symfony/ux-live-component Anyways, we should be right back on our normal…
weaverryan
weaverryan
Read Full Comment
31 lines | assets/app.js
// ... lines 1 - 13
import { Modal } from 'bootstrap';
import Swal from 'sweetalert2';
document.addEventListener('turbo:before-cache', () => {
if (document.body.classList.contains('modal-open')) {
const modalEl = document.querySelector('.modal');
const modal = Modal.getInstance(modalEl);
modalEl.classList.remove('fade');
modal._backdrop._config.isAnimated = false;
modal.hide();
modal.dispose();
}
if (Swal.isVisible()) {
Swal.close();
}
});
See Code Block in Script
32 lines | assets/app.js
// ... lines 1 - 13
import { Modal } from 'bootstrap';
import Swal from 'sweetalert2';
document.addEventListener('turbo:before-cache', () => {
if (document.body.classList.contains('modal-open')) {
const modalEl = document.querySelector('.modal');
const modal = Modal.getInstance(modalEl);
modalEl.classList.remove('fade');
modal._backdrop._config.isAnimated = false;
modal.hide();
modal.dispose();
}
if (Swal.isVisible()) {
Swal.getPopup().style.animationDuration = '0ms'
Swal.close();
}
});
See Code Block in Script
Hey Michael B.! Ah!!! This is awesome - and I'm so honored. Alpine is a very powerful system - so I'm even happier that you like Stimulus (I also much prefer its approach). And Turbo is... starting today! Cheers!
weaverryan
weaverryan
Read Full Comment
… Yea, sorry about the big delay - we've been busy with a bunch of frontend stuff (Stimulus, Turbo), which I know a lot of people LOVE... but also a lot of people want this stuff too :). > Authentication and generating fixtures with relationships are things…
weaverryan
weaverryan
Read Full Comment
…That being said, the community is huge, the projects using Stimulus & Turbo are huge - so we'll find a path forward. The technology is just too good not to :). Edit: For others reading this, the loss of the 2 maintainers was not for any reasons…
weaverryan
weaverryan
Read Full Comment
My mind is now fully blown by how easy and intuitive stimulus makes doing front-end javascript dev without abandoning Twig. Thanks and I can't wait for the Turbo course!
Hey Axel! We'll cover that :). Well, specifically Turbo and Mercure - there is absolutely a built-in feature for having a section of your site subscribe for updates and have them added automatically. It's pretty sweet. Cheers!
weaverryan
weaverryan
Read Full Comment
…that you can move between previously visited pages using browser navigation without downloading them again from the server, but how to prevent this after logging out (for pages that should not be available to non-logged in users)? Does Trubo provide any mechanisms for this?
Nataniel-Z
Nataniel-Z
Read Full Comment
…up stimulus controllers and other assets? I'm pretty sure some bundles I've used have twig controllers and themes, but I'm not sure about assets. I'm just starting out with Symfony, but the few projects I have all use turbo and stimulus.
JeffJones
JeffJones
Read Full Comment
Hey |mention:91995| I just answered your other message, but I just realized that you're using Webpack Encore, not AssetMapper, right? In general, you need to install the package `turbo-view-transitions` and rebuild your assets Cheers!
MolloKhan
MolloKhan
Read Full Comment
…includes doing work here! Fortunately Kevin is now "spun up" & I'm also recording, so we're hoping to accelerate. Not sure about PWAs this year, I'm also interested in https://turbo.hotwired.dev/handbook/native but haven't played with it yet Cheers!
weaverryan
weaverryan
Read Full Comment
…done this way. Depending on exact situation there can be found different ways, for example maybe some turbo frame with menu to display what you need. And if you want do it inside the twig, you can get current route name from request, and compare…