new_site/_layouts
Andrew Boyer 0ac9e447ca
Added support for a newsletter (#2517)
In reference to idea:
https://github.com/alshedivat/al-folio/discussions/2097
In reference to request:
https://github.com/alshedivat/al-folio/issues/923#issuecomment-2171924663

Added support to integrate a [loops.so](https://loops.so/) mailing list
into the site.

To use, you need to enable `newsletter` in `_config.yml`. You also must
specify a loops endpoint (although I think any mailing list endpoint can
work), which you can get when you set up a mailing list on loops. More
documentation on loops: [here](https://loops.so/docs/forms/custom-form).

Once that is enabled, the behavior is different depending on how you
specified your footer to behave in `_config.yml`. If `footer_fixed:
true`, then the sign up will appear at the bottom of the about page, as
well as at the bottom of blog posts, if you enable `related_posts`.

If `footer_fixed: false`, then the newsletter signup will be in the
footer (on every page), like it is in on [my
website](https://asboyer.com).

I'm not attached to the placement of the signup, and you can choose to
include it wherever you want with `{% include scripts/newsletter.liquid
%}`. Also if you include positional variables into that, you can choose
how you center the signup. So `{% include scripts/newsletter.liquid
left=true %}` positions the signup bar to the left.

Here are some screenshots below:
## Dark version

![image](https://github.com/alshedivat/al-folio/assets/52665298/af7fdb81-6e5f-47a9-958b-4cb93bba9e8f)

## Light version

![image](https://github.com/alshedivat/al-folio/assets/52665298/927f8bc5-b481-448b-ae5e-6f5b1c613243)
I think the input field color should probably change to maybe be light
for both themes? What do you think? I think the dark background looks
cool, but I don't usually see that done like that on other sites.

## Footer fixed

![image](https://github.com/alshedivat/al-folio/assets/52665298/c52f3dc1-0e45-400e-8b71-eeb00d00cb01)


![image](https://github.com/alshedivat/al-folio/assets/52665298/678a2d45-88ab-4d9a-b8cc-9fc6db26d744)

## Footer not fixed

![image](https://github.com/alshedivat/al-folio/assets/52665298/fd2c0228-2bce-4335-ac3c-5cb20a3307e2)


![image](https://github.com/alshedivat/al-folio/assets/52665298/f594b4f2-67e0-4f2b-a3e8-febd579aaf19)
To clarify, if footer isn't fixed, the email signup will appear on every
page.

---------

Co-authored-by: George <31376482+george-gca@users.noreply.github.com>
2024-06-19 14:49:19 -03:00
..
about.liquid Added support for a newsletter (#2517) 2024-06-19 14:49:19 -03:00
archive-category.liquid Remove bootstrap-table from archive tables (#2306) 2024-04-03 15:35:18 -03:00
archive-tag.liquid Remove bootstrap-table from archive tables (#2306) 2024-04-03 15:35:18 -03:00
archive-year.liquid Remove bootstrap-table from archive tables (#2306) 2024-04-03 15:35:18 -03:00
bib.liquid Support superscripts in bibtex author names (#2512) 2024-06-19 14:34:54 -03:00
cv.liquid Fix broken links (#2077) 2024-01-15 11:09:45 -03:00
default.liquid Feature: Dynamically sets the search shortcut key based on the user's platform (#2461) 2024-05-31 18:23:46 -03:00
distill.liquid Add back-to-top to distill layout (#2451) 2024-05-27 12:53:53 -04:00
none.liquid format code with prettier.io (#2048) 2024-01-10 00:10:51 -05:00
page.liquid Fix broken links (#2077) 2024-01-15 11:09:45 -03:00
post.liquid Delete extra space ; Update post.liquid (#2452) 2024-05-27 21:07:39 -03:00
profiles.liquid Lighthouse fixes (#2199) 2024-02-14 14:37:32 -03:00