rich-iannone / quarto-email

MIT License
4 stars 0 forks source link

present latest/this version URLs as separate paragraphs #7

Closed aronatkins closed 1 year ago

aronatkins commented 1 year ago

The current presentation of latest/this version

https://github.com/rich-iannone/quarto-email/blob/61443d78e378716819ef8ffc382d798e036c9b48/_extensions/quarto-email/quarto-email.lua#L217-L218

export RSC_REPORT_RENDERING_URL="[[==RSC_REPORT_RENDERING_URL==]]"
export RSC_REPORT_SUBSCRIPTION_URL="[[==RSC_REPORT_SUBSCRIPTION_URL==]]"
export RSC_REPORT_URL="[[==RSC_REPORT_URL==]]"
quarto render

The resulting HTML looks like:

<p>This message was generated on 2023-09-11 10:12:10.</p>

<p>This Version: <a href="[[==RSC_REPORT_RENDERING_URL==]]">[[==RSC_REPORT_RENDERING_URL==]]</a>

Latest Version: <a href="[[==RSC_REPORT_URL==]]">[[==RSC_REPORT_URL==]]</a></p>

<p>If you wish to stop receiving emails for this document, you may <a href="[[==RSC_REPORT_SUBSCRIPTION_URL==]]">unsubscribe here</a>.</p><br/><p>If HTML documents are attached, they may not render correctly when viewed in some email clients. For a better experience, download HTML documents to disk before opening in a web browser.</p>

Rendered:

image

The latest and this version URLs should be presented on separate lines, maybe through separate paragraphs or with a <br> tag.

image

Note: These examples are using placeholder values rather than real URLs.

aronatkins commented 1 year ago

Here is a layout that used <br> rather than <p>. Not clear which we should use, here.

image
rich-iannone commented 1 year ago

I opted to go with a "</p>\n\n" in the Lua code in https://github.com/rich-iannone/quarto-email/commit/25680b452583c58e31ba4c23430ed24016c356ef. It's now cleaned up so each piece of information is on its own line. Here's a partial screenshot from an email sent to myself after the change:

connect_email_footer

We can always tweak this later if this still looks off.