paulcollett / vue-masonry-css

Vue.js Masonry layout component powered by CSS, dependancy free
https://paulcollett.github.io/vue-masonry-css/demo/
MIT License
473 stars 42 forks source link

Just wanna say thanks! #30

Open davestewart opened 3 years ago

davestewart commented 3 years ago

I was using the Vue Isotope package and it wasn't playing well with SSR, then for some reason I found this and... boom; it just works.

I almost wasn't going to use grid packing, but now I'm going to stick with it.

Great job! And thank you.

dosstx commented 3 years ago

Can you share a code sample of how you have this set up for SSR? Thank you.

davestewart commented 3 years ago

Hey @dosstx - I don't think I did anything special, because it's CSS it doesn't reference window or such like.

This is it running in VuePress:

image

It's been a while since I looked at this, but I quickly scanned through the source I didn't see any client-only or such like.

Note that I am pre-rendering all pages.

dosstx commented 3 years ago

@davestewart Thanks! Doesn't pre-rendering basically build the pages before deployment? If so, that is different than SSR because with SSR the pages are dynamically rendered as the server requests them ("Server-Side Rendering/SSR"). Thus, I can see why the layout works fine for you. Vuepress is a static-site generator (non-SSR). In your case, that plugin should work as-is. Unless I am mistaken?

davestewart commented 3 years ago

Doesn't pre-rendering basically build the pages before deployment

Yup!

Vuepress is a static-site generator (non-SSR). In your case, that plugin should work as-is

It is. Sorry I can't help!