~mrls/www

32d8bed14e24b73d49cc9c683592dc7fc705ec71 — Mauro Morales 2 months ago ba1335f
Add functionality

- Display links to comment via lists
- Display post's place of writing
M _config.yml => _config.yml +15 -0
@@ 28,10 28,25 @@ permalink: none
root:
  en: /
  es: /inicio.html
ml:
  es:
    url: https://lists.sr.ht/~mrls/ecdp
    email: ~mrls/ecdp@lists.sr.ht
  en:
    url: https://lists.sr.ht/~mrls/www
    email: ~mrls/www@lists.sr.ht

collections:
  guias:
    output: true

plugins:
  - jekyll-feed

feed:
  collections:
    - guias

# theme
theme: minima
show_excerpts: true

M _data/i18n.yml => _data/i18n.yml +13 -0
@@ 11,3 11,16 @@ the_source_code:
the_sites_content:
  en: the site's content
  es: el contenido del sitio
comments:
  en: The comments are accesible in the
  es: Los comentarios están disponibles en el
public_inbox:
  en: public inbox
  es: correo público
send_email:
  en: You can send yours to 
  es: Puedes enviar el tuyo a
subscribe_rss:
  en: Get updates via
  es: Recive actualizaciones por medio de


M _includes/header.html => _includes/header.html +1 -1
@@ 19,7 19,7 @@
      <div class="trigger">
        {%- for menu in site.data.menus[lang] -%}
          {%- assign my_page = site.pages | where: "path", menu.path | first -%}
          <a class="page-link" href="{{ my_page.url | relative_url }}">{{ my_page.title | default: menu.title | escape }}</a>
          <a class="page-link" href="{{ my_page.url | relative_url }}">{{ menu.title | default: my_page.title | escape }}</a>
        {%- endfor -%}
      </div>
    </nav>

A _layouts/post.html => _layouts/post.html +34 -0
@@ 0,0 1,34 @@
---
layout: default
---
<article class="post h-entry" itemscope itemtype="http://schema.org/BlogPosting">

  <header class="post-header">
    <h1 class="post-title p-name" itemprop="name headline">{{ page.title | escape }}</h1>
    <p class="post-meta">
      <time class="dt-published" datetime="{{ page.date | date_to_xmlschema }}" itemprop="datePublished">
        {%- assign date_format = site.minima.date_format | default: "%b %-d, %Y" -%}
        {{ page.date | date: date_format }}
      </time>
      {%- if page.place -%}
        • <span itemprop="place" itemscope itemtype="http://schema.org/Place"><span class="p-author h-card" itemprop="name">{{ page.place }}</span></span>&nbsp;
      {%- endif -%}
      {%- if page.category -%}
        • <span class="p-author h-card">{{ page.category | replace: "-", " " | capitalize }}</span>
      {%- endif -%}</p>
  </header>

  <div class="post-content e-content" itemprop="articleBody">
    {{ content }}
  </div>

  <div class="comments">
    {%- assign lang = page.lang | default: 'en' -%}
    {%- if site.ml[lang] -%}
      {{ site.data.i18n.comments[lang] }}&nbsp;<a href="{{- site.ml[lang].url }}">{{ site.data.i18n.public_inbox[lang] }}</a>&nbsp;
      {{ site.data.i18n.send_email[lang] }}&nbsp;<a href="mailto:{{- site.ml[lang].email }}?Subject={{- page.title | prepend: "Re: " | my_url_encode -}}">{{- site.ml[lang].email }}</a>.
    {%- endif -%}
  </div>

  <a class="u-url" href="{{ page.url | relative_url }}" hidden></a>
</article>

A _plugins/my_url_encode.rb => _plugins/my_url_encode.rb +15 -0
@@ 0,0 1,15 @@
# frozen_string_literal: true

# _plugins/url_encode.rb
require 'liquid'
require 'erb'

# Percent encoding for URI conforming to RFC 3986.
# Ref: http://tools.ietf.org/html/rfc3986#page-12
module URLEncode
  def my_url_encode(url)
    ERB::Util.url_encode(url)
  end
end

Liquid::Template.register_filter(URLEncode)

M _posts/2019-12-28-december-2019.md => _posts/2019-12-28-december-2019.md +1 -0
@@ 2,6 2,7 @@
layout: post
title: December 2019
date: 2019-12-28 10:33 +0100
place: Ghent
category: status-updates
---


M assets/main.scss => assets/main.scss +27 -1
@@ 4,18 4,44 @@

@import "minima";


.license {
  font-size: 0.9em;
}

.warning {
.info {
  background-color: lightyellow;
  padding: 10px;
  font-style: italic;
}

.warning {
  background-color: lightcoral;
  padding: 10px;
  font-style: italic;
}

.page-content {
  font-size: 1.2em;
}

.page-content p {
  text-align: justify;
  text-justify: inter-word;
}

.page-content h2 {
  @media screen and (min-width: 800px) {
    font-size: 38px;
  }
}

.comments {
  color: gray;
}

.post-title {
  @media screen and (min-width: 800px) {
    font-size: 4em;
  }
}

M notes/index.html => notes/index.html +1 -1
@@ 3,7 3,7 @@ layout: page
title: Notes
---

<p class="warning">
<p class="info">
This is a list of my personal notes. Expect lots of changes including URLs.
</p>