Jump to content

Gradient picker module


verdeandrea
 Share

Recommended Posts

Hello everybody!

I am working on a project that should allow the user to generate a gradient from the admin panel. Something similar to the Photoshop gradient panel, or to this https://www.colorzilla.com/gradient-editor/

Is anyone aware of an existing module that is already doing that? The alternative is that I try to write my first (!) module!
Do you have any advice or suggestion on how I should approach this?

Thanks

 

  • Like 1
Link to comment
Share on other sites

@verdeandrea Sounds like a cool project! If I had to do this, I guess I would go a similar route like @wbmnfktr suggests.

However, gradient generators are a lot more work than just (single) color-pickers. I'm not sure it's worth re-creating all that stuff just so your authors can finally insert some CSS for a given section.

I would perhaps rather use a markup inputfield*, and just open a gradient generator in a (pw-) modal, and instruct the editors to copy and paste the generated CSS into a regular textarea. Would certainly not look as polished and streamlined as a native PW inputfield, but it would get the job done way faster.

https://modules.processwire.com/modules/fieldtype-runtime-markup/ or https://processwire.com/talk/topic/21982-rockmarkup2-inputfield-to-easily-include-any-phphtmljscss-in-the-pw-admin/

 

  • Like 3
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...