getgrav / grav-skeleton-twentyfifteen-site

TwentyFifteen Skeleton for Grav - Default 2015 Wordpress theme ported to Grav
https://getgrav.org
GNU General Public License v2.0
4 stars 3 forks source link

previous / next article div backrounds don't show on safari #4

Open benjaminfrombe opened 8 years ago

benjaminfrombe commented 8 years ago

When viewing an article, the background for the box with a link to the previous and next item is just grey, and not a background image in SAFARI. When I test this in Chrome it does show the background image. The wordpress version of twenty fifteen does not have this problem. Could this be fixed easily ? (This can easily be tested on the twenty fifteen grav skeleton demo page)

safari:

in_safari

chrome:

in_chrome

Thank you.

benjaminfrombe commented 8 years ago

found it !

there was a small error in the blog_item.html.twig codes for previous and next:

the ); came after the " and it should be before ...

so:

<div class="nav-previous" {% if page.prevSibling.media.images %}style="background-image: url({{ page.prevSibling.media.images|first.cropZoom(1038,437).url }}");{% endif %}>

should be

<div class="nav-previous" {% if page.prevSibling.media.images %}style="background-image: url({{ page.prevSibling.media.images|first.cropZoom(1038,437).url }});"{% endif %}>

and

<div class="nav-next" {% if page.nextSibling.media.images %}style="background-image: url({{ page.nextSibling.media.images|first.cropZoom(1038,437).url }}");{% endif %}>

should be

<div class="nav-next" {% if page.nextSibling.media.images %}style="background-image: url({{ page.nextSibling.media.images|first.cropZoom(1038,437).url }});"{% endif %}>

rhukster commented 8 years ago

Can you just edit the file on GitHub? It will let you create a PR with your fixes.