okkur / syna

Highly customizable open source theme for Hugo based static websites
https://syna.okkur.org/demo/
Apache License 2.0
251 stars 133 forks source link

feat: add parallax on hero #877

Open sergiopena opened 1 year ago

sergiopena commented 1 year ago

Add boolean to set the hero background image as fixed to create a parallax scroll effect.

What this PR does / why we need it: Adds a nice parallax effect to the Hero partial

Which issue this PR fixes partially fixes #814

Special notes for your reviewer: I started learning Hugo and this theme seven hours ago, so I literally don't know what I'm doing.

Just saw that it looked super easy to add a bool to fix the image in the background and get the effect 😇

It works on my computer ™️

Release note:

 parallax effect to hero partial
stp-ip commented 1 year ago

Thank you for the addition already. There are a few missing things. It isn't documented on the fragment page: https://github.com/okkur/syna/tree/master/exampleSite/content/fragments/hero Additionally with the default image it seems to not work well. Maybe a two part screenshot attached to the PR showcasing this effect makes this easier to grasp for anyone following up.