frjo / hugo-theme-zen

A fast and clean Hugo base theme with css-grid and Hugo pipes support.
https://zen-demo.xdeb.org/
GNU General Public License v2.0
264 stars 75 forks source link

Minor contact form issue #57

Closed georgew509 closed 2 years ago

georgew509 commented 2 years ago

I have been testing my Contact form to verify that it's working ok. I have noticed a minor issue in the message body. Roughly about every 69 characters, spaces between words are getting dropped. Here's one of my test messages:

"Ok, I saw something strange. It looked like there was spacing betweenwords after they wrapped around in the message box. This test messagestarted a 2nd line after "around" just before "in the". Let's see whathappened (after "Let's see")."

I thought that it may had been happening at the word wrap in the message box, but that wasn't the case. I was very careful to make sure there were spaces between each word.

I must confess that I have been experimenting with a couple of different themes, but I keep coming back to yours for the quality of the code and the contact form. I think that if I could learn how to add a "feature image," your theme would be my first choice. I'll keep researching and experimenting.

George

frjo commented 2 years ago

I can confirm this bug. Can you test adding an extra space before \n on line 83 in contact.php:

https://github.com/frjo/hugo-theme-zen/blob/2545daa221b3e4ae53ecd400f282061ea032ac17/php/contact.php.example#L82-L84

georgew509 commented 2 years ago

Looks good to me:

83c83 < $line = wordwrap($line, 72, " \n");

$line = wordwrap($line, 72, " \nā€);

I ran a couple of tests.

Thanks,

ā€” George @.*** https://altoplace.com

On May 2, 2022, at 11:53 AM, Fredrik Jonsson @.***> wrote:

I can confirm this bug. Can you test adding an extra space before \n on line 83 in contact.php:

https://github.com/frjo/hugo-theme-zen/blob/2545daa221b3e4ae53ecd400f282061ea032ac17/php/contact.php.example#L82-L84

ā€” Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.

frjo commented 2 years ago

Thanks, committed the fix now.

frjo commented 2 years ago

New release out now with the bug fix.

The contact form you can easily move to any theme you like. It just the php file, the shortcode and the js file. There are some optional css in the _zen.scss as well.

But glad you like the theme.

Regarding featured image, explain what you need in a post on https://discourse.gohugo.io/ and tag me.