Move 'reply by email' button to the bottom of every post

This commit is contained in:
Caio Lente 2023-10-17 01:10:22 -03:00
parent cfb20f6851
commit 77893ccf46
No known key found for this signature in database
GPG Key ID: E66D381776EFC03A
6 changed files with 18 additions and 5 deletions

View File

@ -110,6 +110,9 @@ already implemented:
can be focused by people who need a keyboard to navigate the web (see [PR
#5](https://github.com/clente/hugo-bearcub/pull/5) by
[@2kool4idkwhat](https://github.com/2kool4idkwhat) for more information).
- Reply by email: if you supply an email address, the theme creates a "Reply to
this post by email" button at the end of every post (see Kev Quirk's [original
implementation](https://kevquirk.com/adding-the-post-title-to-my-reply-by-email-button)).
- Single-use CSS (EXPERIMENTAL): you can add some styles to a single page by
writing the CSS you need in `assets/{custom_css}.css` and then including
`style: "{custom_css}.css"` in the [front
@ -208,7 +211,7 @@ enableRobotsTXT = true
# Social media. Delete any item you aren't using to make sure it won't show up
# in your website's metadata.
[social]
email = "me@example.com" # Added to the navbar so readers can reply to posts
email = "me@example.com" # Added to the footer so readers can reply to posts
twitter = "example" # Twitter handle (without '@')
facebook_admin = "0000000000" # Facebook Page Admin ID
```

View File

@ -79,6 +79,6 @@ enableRobotsTXT = true
# Social media. Delete any item you aren't using to make sure it won't show up
# in your website's metadata.
[social]
email = "me@example.com" # Added to the navbar so readers can reply to posts
email = "me@example.com" # Added to the footer so readers can reply to posts
twitter = "example" # Twitter handle (without '@')
facebook_admin = "0000000000" # Facebook Page Admin ID

View File

@ -7,5 +7,8 @@
[email-subject]
other = "Reply to "
[email-reply]
other = "Reply to this post by email"
[skip-link]
other = "Skip to main content"

View File

@ -7,5 +7,8 @@
[email-subject]
other = "Resposta a "
[email-reply]
other = "Responda a este post por email"
[skip-link]
other = "Pular para conteúdo principal"

View File

@ -17,4 +17,11 @@
<a class="blog-tags" href="{{ .Permalink }}">#{{ .LinkTitle }}</a>&nbsp;&nbsp;
{{ end }}
</p>
{{ with .Site.Social.email }}
<p>
<a href='mailto:{{ . }}?subject={{ i18n "email-subject" }}"{{ default $.Site.Title $.Page.Title }}"'>
{{ i18n "email-reply" }} ↪
</a>
</p>
{{ end }}
{{ end }}

View File

@ -1,9 +1,6 @@
{{ range .Site.Menus.main.ByWeight }}
<a href="{{ .URL }}">{{ .Name }}</a>
{{ end }}
{{ with .Site.Social.email }}
<a href='mailto:{{ . }}?subject={{ i18n "email-subject" }}"{{ default $.Site.Title $.Page.Title }}"'>Email</a>
{{ end }}
<a href="{{ relLangURL .Site.Params.blogPath }}/index.xml">RSS</a>
<!-- Convert this page's translations into a dict -->