diff options
Diffstat (limited to '')
-rw-r--r-- | _layouts/default.html | 38 | ||||
-rw-r--r-- | _layouts/index.html | 10 | ||||
-rw-r--r-- | _layouts/post.html | 23 |
3 files changed, 52 insertions, 19 deletions
diff --git a/_layouts/default.html b/_layouts/default.html index 9fa116e..53b9830 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -1,23 +1,43 @@ <!DOCTYPE html> -<html lang="{{ page.lang | default: site.lang | default: "en" }}"> +<html lang="{{ page.lang | default: "en" }}"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="/styles.css"> - <link rel="alternate" type="application/atom+xml" href="/feed.xml" title="EuAndreh's Feed" /> + <link rel="alternate" type="application/atom+xml" href="{{ site.t.feed_url[page.lang] }}" title="{{ site.t.feed_title[page.lang] }}" /> {%- seo -%} </head> <body> <header> <nav> <div id="nav-left"> - <a href="/">EuAndreh's blog</a> + <a href="/">{{ site.t.home[page.lang] }}</a> </div> <div id="nav-right"> - <a href="/about.html">About</a> - <a href="/feed.xml"> - <img class="simple-icon" src="/images/atom.svg" alt="Blog feed" /> + <ul> + {% if page.ref != nil %} + {% assign lposts=site.posts | where:"ref", page.ref | sort: 'lang' %} + {% for lpost in lposts %} + <li> + <a href="{{ lpost.url }}" class="{{ lpost.lang }}">{{ lpost.lang }}</a> + </li> + {% endfor %} + {% endif %} + + {% if page.ref != nil %} + {% assign lpages=site.pages | where:"ref", page.ref | sort: 'lang' %} + {% for lpage in lpages %} + <li> + <a href="{{ lpage.url }}" class="{{ lpage.lang }}">{{ lpage.lang }}</a> + </li> + {% endfor %} + {% endif %} + </ul> + + <a href="/about.html">{{ site.t.about[page.lang] }}</a> + <a href="{{ site.t.feed_url[page.lang] }}"> + <img class="simple-icon" src="/images/atom.svg" alt="{{ site.t.alt.blog_feed[page.lang] }}" /> </a> </div> </nav> @@ -31,16 +51,16 @@ <footer> <ul> <li> - <img class="simple-icon" src="/images/envelope.svg" alt="Envelope icon" /> + <img class="simple-icon" src="/images/envelope.svg" alt="{{ site.t.alt.envelope_icon[page.lang] }}" /> <a href="mailto:eu@euandre.org">eu@euandre.org</a> </li> <li> - <img class="simple-icon" src="/images/lock.svg" alt="Lock icon" /> + <img class="simple-icon" src="/images/lock.svg" alt="{{ site.t.alt.lock_icon[page.lang] }}" /> <a href="/public-key.txt">81F90EC3CD356060</a> </li> </ul> <p> - The content for this site is licensed under <a rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/">CC-BY-SA</a>. The <a href="https://git.sr.ht/~euandreh/website">code</a> is <a href="https://git.sr.ht/~euandreh/website/tree/master/LICENSE">GPLv3 or later</a>. + {{ site.t.footer[page.lang] }} </p> </footer> </body> diff --git a/_layouts/index.html b/_layouts/index.html index 2c44ece..5b45898 100644 --- a/_layouts/index.html +++ b/_layouts/index.html @@ -1,11 +1,13 @@ --- layout: default --- -<h1>Recent posts</h1> +<h1>{{ site.t.recent_posts[page.lang] }}</h1> <ul> {%- for post in site.posts -%} - <li> - <a href="{{ post.url }}">{{ post.title | escape }}</a> - {{ post.date | date: "%b %-d, %Y" }} - </li> + {% if post.lang == page.lang %} + <li> + <a href="{{ post.url }}">{{ post.title | escape }}</a> - {{ post.date | date: "%b %-d, %Y" }} + </li> + {% endif %} {%- endfor -%} </ul> diff --git a/_layouts/post.html b/_layouts/post.html index bdaa3f8..b1b1412 100644 --- a/_layouts/post.html +++ b/_layouts/post.html @@ -3,17 +3,28 @@ layout: default --- <article> <section class="header"> - Posted on {{ page.date | date: "%b %-d, %Y" }} + {{ site.t.posted_on[page.lang] }} {{ page.date | date: site.t.date_format[page.lang] }} </section> <section> {{ content }} </section> <section> - <p>Have a comment on this post? Start a discussion - in my <a href="https://lists.sr.ht/~euandreh/public-inbox">public inbox</a> - by sending an email to <a href="mailto:~euandreh/public-inbox@lists.sr.ht?Subject=Re%3A%20{{ page.title | escape }}">~euandreh/public-inbox@lists.sr.ht</a> - [<a href="https://man.sr.ht/lists.sr.ht/etiquette.md">mailing list etiquette</a>], - or see <a href="https://lists.sr.ht/~euandreh/public-inbox?search={{ page.title | escape }}">existing discussions</a>. + <p> + {% if page.lang == 'en' %} + Have a comment on this post? Start a discussion in my + <a href="https://lists.sr.ht/~euandreh/public-inbox">public inbox</a> + by sending an email to + <a href="mailto:~euandreh/public-inbox@lists.sr.ht?Subject=Re%3A%20{{ page.title | escape }}">~euandreh/public-inbox@lists.sr.ht</a> + [<a href="https://man.sr.ht/lists.sr.ht/etiquette.md">mailing list etiquette</a>], + or see <a href="https://lists.sr.ht/~euandreh/public-inbox?search={{ page.title | escape }}">existing discussions</a>. + {% elsif page.lang == 'pt' %} + Tem um comentário sobre essa postagem? Comece uma discussão na minha + <a href="https://lists.sr.ht/~euandreh/public-inbox">caixa de entrada pública</a> + mandando um email para + <a href="mailto:~euandreh/public-inbox@lists.sr.ht?Subject=Re%3A%20{{ page.title | escape }}">~euandreh/public-inbox@lists.sr.ht</a> + [<a href="https://man.sr.ht/lists.sr.ht/etiquette.md">etiqueta da lista de email</a> (em inglês)], + ou procure por <a href="https://lists.sr.ht/~euandreh/public-inbox?search={{ page.title | escape }}">discussões existentes</a>. + {% endif %} </p> </section> </article> |