Support

Home Forums Event Espresso Premium RE: EE4 Calendar thumbnail Posted: March 6, 2017

RE: EE4 Calendar thumbnail Posted: March 6, 2017

Posted: March 24, 2017 at 12:53 pm

Viewing 25 reply threads


Elizabeth

March 24, 2017 at 12:53 pm

I used this code:

/* Calendar thumbnail full height*/

@media
only screen and (max-width: 480px) {
#espresso_calendar .fc-event {
max-height: 5em !important;
}
}

Example: https://www.masterpiecemixerssnellville.com/

Go to very bottom right. Message in a Bottle

Rollover and look at bottom left…you will see like 2 small shells or pebbles. Now look at the calendar image. It still cuts off a part of the image. It happens on all images on desktop view. Phone view looks fine.


Josh

  • Support Staff

March 24, 2017 at 2:59 pm

Are you sure this is cut off?


Elizabeth

March 24, 2017 at 3:23 pm

Yep, she has tried it, I have tried it on several computers and browsers. I wish I can send you a screenshot.

Try here: March 17th (Cannot see the word “Day” on calendar image. Rollover the image and you see it on the popup image)

https://www.masterpiecemixerssuwanee.com/calendar/


Josh

  • Support Staff

March 24, 2017 at 3:31 pm

Hi Dorian,

Maybe it’d be better if you used the Grid template add-on to display events. The Calendar doesn’t have as much control over those images.


Elizabeth

March 25, 2017 at 9:00 am

https://www.dropbox.com/s/vwj2o935jh977oo/Screenshot%202017-03-25%2010.57.47.png?dl=0

https://www.dropbox.com/s/tzntv88skv669qn/Screenshot%202017-03-25%2010.57.58.png?dl=0

———-

/* Calendar thumbnail full height*/

@media
only screen and (max-width: 480px) {
#espresso_calendar .fc-event {
max-height: 5em !important;
}
}


Elizabeth

March 26, 2017 at 12:24 pm

Can you verify this code is correct? I cannot find it using firebug:


@media
only screen and (max-width: 480px) {
#espresso_calendar .fc-event {
max-height: 5em !important;
}
}

—-
https://www.masterpiecemixersgv.com/calendar/


Josh

  • Support Staff

March 27, 2017 at 4:21 pm

Hi Dorian,

The code in question will only affect views where it’s a small screen (where the max-width of the screen is 480px or less).

Part of the problems you’re having with these images is they’re all of your event titles come out to different heights. Like how the St. Patrick’s day event fills 5 lines. One way to work around that is set a limit with some CSS. Here’s one example:

.fc-event-title {
max-height: 38px;
overflow: hidden;
}

The above should probably be put into a media query so it only affects larger sized screens (not mobile).


mm_georgia_1

March 27, 2017 at 9:03 pm

I tried this and did not work. March 24th only has 1 line of text and image still cutting off.


@media
only screen and (min-width: 1024px) {
.fc-event-title {
max-height: 38px;
overflow: hidden;
}
}


Elizabeth

March 27, 2017 at 9:14 pm

I tried this and did not work. March 24th only has 1 line of text and image still cutting off.

@media
only screen and (min-width: 1024px) {
.fc-event-title {
max-height: 38px;
overflow: hidden;
}
}


Josh

  • Support Staff

April 7, 2017 at 2:39 pm

Hi Dorian,

There’s more than one issue that’s happening with the way your site has its featured images/thumbnails set up and the solution is going to involve more than adding some CSS. First, if you take a look at your competitor’s site, you’ll notice that they use two basic image sizes for their calendar thumbnails. There’s one basic size for portrait images and one for landscape images. Now compare one week on the masterpiecemixersgv.com site where each thumbnail has a wide variety of dimensions:
https://www.evernote.com/l/AARvtreZcTFGHb6G4igQQ-YfslC2_h3jets

So one thing that will help make your calendar’s thumbnails look nicer is you can set the WordPress Media settings to crop the images at a specific size, then you use the Regenerate thumbnails plugin to resize them.

You can adjust the numbers to your taste, but a general rule of thumb is you set your image dimension settings to match the taller images. It looks like the tallest image on your current calendar by way of aspect ratio is the Pelican Sunset, so you could start with its ratio as starting point. Its dimensions are 150*206.

You go to WP > Settings > Media, make a note of the settings there in case you want to change them back later, then set the 150 W and 206 H dimensions there and check the box next to “Crop thumbnail to exact dimensions (normally thumbnails are proportional)”. Then you save the changes

Then you install the Regenerate Thumbnails plugin, then go to WP > Tools > Regen Thumbnails and click the button there. You’ll note that if you make another change to the Media settings thumbnail dimensions, you’ll need to regenerate again.

You may need to make a few tweaks to the above, and may also need to make a few tweaks to some of the thumbnail images you’re using, so if you can clone a site to a dev server and test there first that will be the best way forward so you can experiment there.

You also may want to use some CSS to add more padding between the events that occur in the same day, which is also something that your competitor is doing with their calendar.


Elizabeth

April 16, 2017 at 10:03 am

Thanks for your reply:

I’ve tried various padding but cannot find the correct one.

What is the best padding to do? Which class or ID


Josh

  • Support Staff

April 17, 2017 at 6:08 pm

The best padding will depend on the sizes of images you’re using. Have you narrowed down the different images to two main sizes? If so, may I ask what are the two main image sizes?


Elizabeth

April 21, 2017 at 11:15 am

I have them using 400×300 for horizontal and 400×600 vertical. So they are proportional.

Do you have a better recommendation for the horizontal and vertical sizes?


Josh

  • Support Staff

April 21, 2017 at 11:26 am

Do you see how the Pelican Sunset featured image is longer than its neighbors?

https://www.evernote.com/l/AATSPWKzAsROo4KPgaAMXNNtjdIJ_8piDns


Elizabeth

April 21, 2017 at 11:32 am

I just checked and the pelican and the one to the left of it are both 300 px tall.


Josh

  • Support Staff

April 21, 2017 at 12:00 pm

They’re both 300px tall, but they have different widths, which affects the aspect ratio which also affects the way they’re cropped. So in the example of the screenshot, here’s the 3 images with their sizes:

Pop Art Paris: 237px x 300px
Fall Flower Bike (Les Fleurs): 237px x 300px
Pelican Sunset: 219px x 300px

So what will happen is the calendar will resize the images so each day is the same width. Since Pelican Sunset is 18px narrower in width what ends up happening is the image stretched width-wise more than the other two images, then you see the hard crop of the bottom on the initial view.


Elizabeth

April 21, 2017 at 12:11 pm

Gotcha. I will instruct them on cropping them they resize and see if that helps.

Thanks


Elizabeth

May 4, 2017 at 10:49 am

We noticed in Firefox the get cut off still but in Chrome they show fine. Any thoughts?


Elizabeth

May 4, 2017 at 10:51 am

Also, they have some photos that have to be very tall beyond the standard size. But they need them to show full height.

Is there a way to have a special css just for certain height photos for the calendar?


Josh

  • Support Staff

May 4, 2017 at 12:10 pm

No because the heights of the table cells are calculated with JavaScript. If you need a variety of image heights a better solution may to use the Event Grid add-on.


Elizabeth

May 4, 2017 at 12:13 pm

Do you have any good examples of someone using grid view? And can you only enable it on mobile?


Josh

  • Support Staff

May 4, 2017 at 2:13 pm

Here’s the example from our demo site:

http://demoee.org/use-cases/events-grid-template/

and a real world use example:

https://is.gd/i2BRR7

The Grid template add-on works much like the calendar add-on where you add a shortcode to a WordPress post or page, and the shortcode gets parsed to display a grid of events. You use the WP Mobile Detect plugin to set specific content to only show on mobile:

https://wordpress.org/plugins/wp-mobile-detect/


Elizabeth

May 4, 2017 at 2:17 pm

I notice in the real world example all of the photos are the same size.

Will it adjust for various image heights?

Can you have them in rows vs columns?

Can you have them begin with the most current date so its not showing previous events.


Josh

  • Support Staff

May 4, 2017 at 2:27 pm

Will it adjust for various image heights?

The grid will by default scale the images to fit.

Can you have them in rows vs columns?

They are actually displaying the events in rows.

Can you have them begin with the most current date so its not showing previous events.

That’s exactly what the two demos have. There are no previous events showing on those demos.


Elizabeth

May 4, 2017 at 2:50 pm

I meant like on a phone, 1 per row


Josh

  • Support Staff

May 4, 2017 at 3:06 pm

Yes when you view those pages on a phone you’ll see the events are displayed one per row.

Viewing 25 reply threads

The support post ‘RE: EE4 Calendar thumbnail Posted: March 6, 2017’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso