Sign in or register
You'll be able to write comments and posts, like content, and much more
Search
Dark theme
— English / Español / Deutsch / Русский

Selfish tourists hog loungers with towels and don’t use them

I'm staying with my family at a five-star all-inclusive in Belek - not a cheap place. Around 8 or 9 in the morning we head straight to the sea for a swim, skipping the pool. By that time, the poolside loungers already look like this:
Show full...
+4
17

The foreman at the dock from The Naked Gun made it into the third film (actor Joe Grifasi)

Remember that memorable interrogation scene on Pier 32 from The Naked Gun?
The actor who played the sleazy dock foreman is named Joe Grifasi.
Show full...
+4
13

Quentin Tarantino and his foot fetish: a complete list of all his films featuring scenes with feet and legs - photos and videos

Fans of Quentin Tarantino know that he has a foot fetish. For those unfamiliar with the term: it's when a man has a particular fascination with women's legs, and even more so with their feet. It's safe to say that Quentin Tarantino is the most famous foot fetishist in the world.

Let's start with Quentin Tarantino's first real film - Reservoir Dogs (1992). I'm skipping "My Best Friend's Birthday", as it was never officially released.
There's nothing related to foot fetishism in Reservoir Dogs: the film features only tough men. Women appear only briefly in a few background scenes. I found just one scene where a woman is shown in the foreground - the carjacking moment.
Show full...
+3
16

How to use Quill Editor with Nuxt 3 and SSR (Vue)

If you try to use Quill Editor with Nuxt 3 when rendering a page in SSR you will get this error:
500 document is not defined.
That means NodeJS doesn't have the global variable 'document'. Because SSR rendering is executed in
a NodeJS environment, not a browser.

The sad fact: <client-only> won't help with this problem. The problem with quill's code is that during import, it assumes it's being executed in the browser. I hope you remember that the code imported from the module is not just imported, but executed, i.e. the authors of Quill wrote it so that the 'document' object is immediately accessed there. Very bad.

One solution is to disable SSR, but its an awful solution. But the second solution is to use dynamic JS imports.

My <script lang="ts" setup> in QuillEditor.vue in Nuxt 3 project:
import 'quill/dist/quill.core.css';
import 'quill/dist/quill.snow.css';
// import Quill from 'quill'; // SSR problem with 'document', need to use dynamic import
import type Quill from 'quill';

const elemForQuillEditor = ref<HTMLDivElement|null>(null);

let editor: null|Quill = null; // Do not store in ref() - it causes bugs!

// ...

async function createQuillAndSetListeners() {
  const Quill = (await import('quill')).default; // This is most important thing - usage of JS dynamic import

  if (!elemForQuillEditor.value) return;
  editor = new Quill(elemForQuillEditor.value, {
    theme: 'snow',
    modules: {
      history: {
        delay: 2000,
        maxStack: 500,
        userOnly: true,
      },
      toolbar: {
        container: [
          ['bold', 'italic', 'underline', 'strike'],
          ['link'],
          [{ list: 'ordered' }, { list: 'bullet' }],
          [{ script: 'sub' }, { script: 'super' }],
          [{ header: [1, 2, 3, 4, 5, 6, false] }],
          [{ color: [] }, { background: [] }],
          ['clean'],
          ['undo', 'redo'],
        ],
        handlers: {
          undo() {
            editor?.history.undo();
          },
          redo() {
            editor?.history.redo();
          },
        },
      },
    },
    placeholder: props.placeholder,
  });
  
  editor.on('text-change', () => {
    if (!editor) return;
    // ... my other code
  });
}

// ...

onMounted(createQuillAndSetListeners);

Now your Quill editor will work in Nuxt 3 even during SSR!
+2
90

Vue.js popularity in 2024

Let's try to measure the popularity of Vue.JS. I really like this framework and I am a supporter of its popularization.

First, let's look at the download statistics on NPM.
Now vs year ago:
vue - 4,868,119 - 3,746,361
@angular/core - 3,416,382 - 3,015,855
react - 23,763,131 - 20,548,838

As you can see, React is in the first place in absolute values. And VueJS is only in second place.

And now let's look at the percentage growth relative to last year's values.
vue +29,9%
angular +13,3%
react +15,6%
Hurray! Vue's popularity is growing faster than any of the three!
And now let's go through the sites from the top of Google and see what JS frameworks are used there.

For example, let's take the search query "rent car".
To understand which libraries each site uses, I used Wappalyzer browser extension.
Websites from search results; NF means "there is no framework from the big three".
rentalcars.com - NF
enterprise.com - NF
kayak.com - React
avis.com - NF (old AngularJS)
localrent.com - Vue
hertz.com - NF (old BackboneJS)
sixt.com - React
budget.com - NF (old AngularJS)
zipcar.com - NF
turo.com - React
autoeurope.eu - NF
alamo.com - React
rent.toyota.co.jp - NF
booking.com - React
costcotravel.com - React
borent.nl - NF
europcar.com - Vue
turo.com - React
vipcars.com - NF
skyscanner.net - React
tripadvisor.com - NF
timescar-rental.com - NF
klook.com - Vue
wiberrentacar.com - Vue
uber.com - NF
dollar.com - React
edreams.com - Vue
nationalcar.com - NF
thrifty.com - NF

As you can see, Vue is actively moving forward!
Show full...
+2
38

Perfect Homemade Chicken Broth

For years, I avoided clear broths. Childhood memories told me they were bland and only meant for sick days. Then I tried this recipe — and everything changed.
It’s crystal clear, gently aromatic, and full of flavor.
Ingredients

1 chicken breast, skin on

2 liters (about 8 cups) water

3 allspice berries

3 whole black peppercorns

2 sprigs fresh parsley

½ tablespoon salt, level
Show full...
+5
23

The Same Typeface in Woody Allen's Films

In his films, Woody Allen consistently uses the same typeface in the opening and closing credits. Midnight in Paris (2011):
Show full...
+2
10