From fbc45d7ff0f9dbcce30f4f119faecfb810281003 Mon Sep 17 00:00:00 2001 From: Machiko Yasuda Date: Mon, 5 Aug 2024 20:42:50 +0000 Subject: [PATCH 1/4] fix(a11y): press, resources - make dateline tertiary, not secondary for a11y --- src/_includes/article.html | 36 +++++++++--------------------------- 1 file changed, 9 insertions(+), 27 deletions(-) diff --git a/src/_includes/article.html b/src/_includes/article.html index b3439204..a5b83d8d 100644 --- a/src/_includes/article.html +++ b/src/_includes/article.html @@ -1,30 +1,12 @@ -{% if item.category %} - {% if item.asset %} - {% assign url = item.asset %} - {% unless url contains "https://" %} - {% assign url = "/assets/" | append: url %} - {% endunless %} - {% else %} - {% assign url = item.url %} - {% endif %} -{% else %} - {% assign url = item.url %} - {% if item.external %} - {% assign url = item.external %} - {% endif %} -{% endif %} +{% if item.category %} {% if item.asset %} {% assign url = item.asset %} {% unless url contains "https://" %} {% assign url = +"/assets/" | append: url %} {% endunless %} {% else %} {% assign url = item.url %} {% endif %} {% else %} {% assign url = item.url +%} {% if item.external %} {% assign url = item.external %} {% endif %} {% endif %}
- {{ item.title }} -
- - {% if item.outlet %} - {{ item.outlet }} |{% endif %} - {% if item.tags.size > 0 %} - {{ item.tags | join: ", " }} |{% endif %} - {% include date.html date=item.date format = "%b %Y" %} + {{ item.title }} +
+ + {% if item.outlet %} {{ item.outlet }} |{% endif %} {% if item.tags.size > 0 %} {{ item.tags | join: ", " }} |{% endif %} {% + include date.html date=item.date format = "%b %Y" %}
From 7039de48b45d99b9d762bea6741c0850cf21f5c1 Mon Sep 17 00:00:00 2001 From: Machiko Yasuda Date: Mon, 5 Aug 2024 22:34:59 +0000 Subject: [PATCH 2/4] chore: formatting --- src/_includes/article.html | 34 ++++++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/src/_includes/article.html b/src/_includes/article.html index a5b83d8d..3199f8b1 100644 --- a/src/_includes/article.html +++ b/src/_includes/article.html @@ -1,12 +1,30 @@ -{% if item.category %} {% if item.asset %} {% assign url = item.asset %} {% unless url contains "https://" %} {% assign url = -"/assets/" | append: url %} {% endunless %} {% else %} {% assign url = item.url %} {% endif %} {% else %} {% assign url = item.url -%} {% if item.external %} {% assign url = item.external %} {% endif %} {% endif %} +{% if item.category %} + {% if item.asset %} + {% assign url = item.asset %} + {% unless url contains 'https://' %} + {% assign url = '/assets/' | append: url %} + {% endunless %} + {% else %} + {% assign url = item.url %} + {% endif %} +{% else %} + {% assign url = item.url %} + {% if item.external %} {% assign url = item.external %} {% endif %} +{% endif %}
- {{ item.title }} -
- - {% if item.outlet %} {{ item.outlet }} |{% endif %} {% if item.tags.size > 0 %} {{ item.tags | join: ", " }} |{% endif %} {% - include date.html date=item.date format = "%b %Y" %} + {{- item.title -}} + +
+ + {% if item.outlet %} {{ item.outlet }} |{% endif %} + {% if item.tags.size > 0 %} {{ item.tags | join: ', ' }} |{% endif %} + {% include date.html date=item.date format = "%b %Y" -%} +
From 498c16db9b4529dce4d3b31c1a082d54e0e2967c Mon Sep 17 00:00:00 2001 From: Machiko Yasuda Date: Mon, 5 Aug 2024 22:45:08 +0000 Subject: [PATCH 3/4] chore(liquid): specify shopify-liquid formatter and reformat --- .vscode/settings.json | 4 ++++ src/_includes/article.html | 23 ++++++++++++++--------- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 5fed93a2..19c8c361 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -9,5 +9,9 @@ "editor.tabSize": 2, "files.associations": { "*.html": "liquid" + }, + "[liquid]": { + "editor.defaultFormatter": "sissel.shopify-liquid", + "editor.formatOnSave": true } } diff --git a/src/_includes/article.html b/src/_includes/article.html index 3199f8b1..3bebe17d 100644 --- a/src/_includes/article.html +++ b/src/_includes/article.html @@ -8,23 +8,28 @@ {% assign url = item.url %} {% endif %} {% else %} - {% assign url = item.url %} - {% if item.external %} {% assign url = item.external %} {% endif %} + {% assign url = item.url + %} + {% if item.external %} + {% assign url = item.external %} + {% endif %} {% endif %}
+ target="_blank" + {% endif %}> {{- item.title -}} -
+
- {% if item.outlet %} {{ item.outlet }} |{% endif %} - {% if item.tags.size > 0 %} {{ item.tags | join: ', ' }} |{% endif %} - {% include date.html date=item.date format = "%b %Y" -%} + {% if item.outlet %} + {{ item.outlet }} |{% endif %} + {% if item.tags.size > 0 %} + {{ item.tags | join: ', ' }} |{% endif %} + {% + include date.html date=item.date format = "%b %Y" -%}
From 670479e62e03b29e5c8b331cae6ba047764811e6 Mon Sep 17 00:00:00 2001 From: Machiko Yasuda Date: Mon, 5 Aug 2024 22:52:17 +0000 Subject: [PATCH 4/4] chore: undo quote change --- src/_includes/article.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/_includes/article.html b/src/_includes/article.html index 3bebe17d..bcff5050 100644 --- a/src/_includes/article.html +++ b/src/_includes/article.html @@ -1,8 +1,8 @@ {% if item.category %} {% if item.asset %} {% assign url = item.asset %} - {% unless url contains 'https://' %} - {% assign url = '/assets/' | append: url %} + {% unless url contains "https://" %} + {% assign url = "/assets/" | append: url %} {% endunless %} {% else %} {% assign url = item.url %} @@ -28,7 +28,7 @@ {% if item.outlet %} {{ item.outlet }} |{% endif %} {% if item.tags.size > 0 %} - {{ item.tags | join: ', ' }} |{% endif %} + {{ item.tags | join: ", " }} |{% endif %} {% include date.html date=item.date format = "%b %Y" -%}