new_site/_includes
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
..
cv format code with prettier.io (#2048) 2024-01-10 00:10:51 -05:00
repository format code with prettier.io (#2048) 2024-01-10 00:10:51 -05:00
resume Fix: date pill position on CV (#2455) 2024-05-31 13:27:10 -03:00
scripts Added support for a newsletter (#2517) 2024-06-19 14:49:19 -03:00
audio.liquid format code with prettier.io (#2048) 2024-01-10 00:10:51 -05:00
citation.liquid Added post citation (#2377) 2024-04-29 14:28:06 -03:00
disqus.liquid format code with prettier.io (#2048) 2024-01-10 00:10:51 -05:00
figure.liquid Changed lazy loading in figure.liquid 2024-02-14 12:58:28 -03:00
footer.liquid Added support for a newsletter (#2517) 2024-06-19 14:49:19 -03:00
giscus.liquid Added "follow system" option to theme toggle (#2261) 2024-03-13 22:42:46 -03:00
head.liquid Fix offline leaflet (#2420) 2024-05-15 17:56:00 -03:00
header.liquid fix: blog highlighted in nav for child pages (#2516) 2024-06-18 14:42:02 -03:00
latest_posts.liquid format code with prettier.io (#2048) 2024-01-10 00:10:51 -05:00
metadata.liquid Move libs versions to config (#2139) 2024-01-28 19:10:42 -03:00
news.liquid format code with prettier.io (#2048) 2024-01-10 00:10:51 -05:00
pagination.liquid fix: remove 'index.html' in pagination (#2509) 2024-06-15 16:31:40 -03:00
projects.liquid Feat reworked project layout (closing #2246) (#2357) 2024-04-22 21:39:22 -03:00
projects_horizontal.liquid Feat reworked project layout (closing #2246) (#2357) 2024-04-22 21:39:22 -03:00
related_posts.liquid Added support for a newsletter (#2517) 2024-06-19 14:49:19 -03:00
selected_papers.liquid format code with prettier.io (#2048) 2024-01-10 00:10:51 -05:00
social.liquid feat: added IEEE and ACM social (#2321) 2024-04-07 17:05:41 -03:00
video.liquid format code with prettier.io (#2048) 2024-01-10 00:10:51 -05:00