Skip to content

Commit

Permalink
chore: fix prettier liquid plugin to recognize html files
Browse files Browse the repository at this point in the history
  • Loading branch information
isabellabrookes committed Jul 8, 2024
1 parent 9d79558 commit 7a7d958
Show file tree
Hide file tree
Showing 15 changed files with 195 additions and 174 deletions.
11 changes: 10 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
{
"plugins": ["@shopify/prettier-plugin-liquid"],
"singleQuote": true
"singleQuote": true,
"overrides": [
{
"files": "*.html",
"options": {
"parser": "liquid-html",
"singleQuote": false
}
}
]
}
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# TWC The Netherlands

[![Netlify Status](https://api.netlify.com/api/v1/badges/05f9fda5-6fd8-418d-9cee-67882c0f5dba/deploy-status)](https://app.netlify.com/sites/twc-site-nl/deploys)
[![i18n-en](https://img.shields.io/badge/i18n-en-orange.svg)](./_i18n/en.yml)
[![i18n-nl](https://img.shields.io/badge/i18n-nl-orange.svg)](./_i18n/nl.yml)
[![website](https://img.shields.io/badge/website-url-blue.svg)](https://techwerkers.nl/)
[![production](https://img.shields.io/badge/production-url-blue.svg)](https://app.netlify.com/sites/twc-site-nl/deploys)
[![Twitter: nederlandtwc](https://img.shields.io/twitter/follow/nederlandtwc.svg?style=social)](https://twitter.com/nederlandtwc)

[![i18n-en](https://img.shields.io/badge/i18n-en-orange.svg)](./_i18n/en.yml)
[![i18n-nl](https://img.shields.io/badge/i18n-nl-orange.svg)](./_i18n/nl.yml)

> This repository is responsible for most content visible on the website [techwerkers.nl](https://techwerkers.nl). The site is made with a static site generator called [Jekyll](https://jekyllrb.com/) in a language called Ruby.
## Install
Expand Down
78 changes: 39 additions & 39 deletions _includes/blog.html
Original file line number Diff line number Diff line change
@@ -1,47 +1,47 @@
{% unless page.permalink == "/blog" %}
<a href="/blog">{% t home.blog.more %}</a>
{% unless page.permalink == '/blog' %}
<a href="/blog">{% t home.blog.more %}</a>
{% endunless %}
<ul
class="list -no-list-style l-stack -vertical"
style="--stack-spacing: 1.5rem"
>
{% assign limit = include.limit %} {% assign sorted_posts = site.blog |
filter_tags: include.tags | sort: 'date' | reverse %} {% for post in
sorted_posts limit: limit %} {% assign author = site.data.authors[post.author]
| default: site.data.authors['techworkersber'] %}
{% assign limit = include.limit %}
{% assign sorted_posts = site.blog | filter_tags: include.tags | sort: 'date' | reverse %}
{% for post in sorted_posts limit: limit %}
{% assign author = site.data.authors[post.author] | default: site.data.authors.techworkersber %}

<li>
<article
class="event-card__info-column l-stack -vertical"
style="--stack-spacing: 0.5rem"
aria-labelledby="news-{{ post.title | slugify }}"
>
<section class="l-stack -horizontal" style="--stack-spacing: 1rem">
<div class="l-stack -horizontal" style="--stack-spacing: 0.25rem">
{% if author.picture %}
<img
class="h-rounded"
style="--circle-size: 1.75rem"
src="{{author.picture}}"
alt="{{author.name}}"
/>
{% endif %}
<span>{{ author.name }}</span>
</div>
<time class="aside" datetime="{{ post.date | date: '%Y-%m-%d' }}"
>{{ post.date | localize: site.lang, '%-d %B %Y' }}</time
>
</section>
{% if limit %}
<h3 class="event-card__title" id="news-{{ post.title | slugify }}">
<a href="{{ post.url }}" class="event-card__link">{{ post.title }}</a>
</h3>
{% else %}
<h2 class="event-card__title" id="news-{{ post.title | slugify }}">
<a href="{{ post.url }}" class="event-card__link">{{ post.title }}</a>
</h2>
{% endif %}
</article>
</li>
<li>
<article
class="event-card__info-column l-stack -vertical"
style="--stack-spacing: 0.5rem"
aria-labelledby="news-{{ post.title | slugify }}"
>
<section class="l-stack -horizontal" style="--stack-spacing: 1rem">
<div class="l-stack -horizontal" style="--stack-spacing: 0.25rem">
{% if author.picture %}
<img
class="h-rounded"
style="--circle-size: 1.75rem"
src="{{author.picture}}"
alt="{{author.name}}"
>
{% endif %}
<span>{{ author.name }}</span>
</div>
<time class="aside" datetime="{{ post.date | date: '%Y-%m-%d' }}">
{{- post.date | localize: site.lang, '%-d %B %Y' -}}
</time>
</section>
{% if limit %}
<h3 class="event-card__title" id="news-{{ post.title | slugify }}">
<a href="{{ post.url }}" class="event-card__link">{{ post.title }}</a>
</h3>
{% else %}
<h2 class="event-card__title" id="news-{{ post.title | slugify }}">
<a href="{{ post.url }}" class="event-card__link">{{ post.title }}</a>
</h2>
{% endif %}
</article>
</li>
{% endfor %}
</ul>
16 changes: 7 additions & 9 deletions _includes/event-card.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,15 @@
class="event-card__info-column l-stack -vertical"
style="--stack-spacing: 0.25rem"
>
<time class="aside event-card__date" datetime="{{ event.date }}"
>{{ event.date | localize: site.lang }}</time
>
<time class="aside event-card__date" datetime="{{ event.date }}">{{ event.date | localize: site.lang }}</time>
{% if include.limit %}
<h3 class="event-card__title">
<a href="{{ event.url }}" class="event-card__link">{{ event.title }}</a>
</h3>
<h3 class="event-card__title">
<a href="{{ event.url }}" class="event-card__link">{{ event.title }}</a>
</h3>
{% else %}
<h2 class="event-card__title">
<a href="{{ event.url }}" class="event-card__link">{{ event.title }}</a>
</h2>
<h2 class="event-card__title">
<a href="{{ event.url }}" class="event-card__link">{{ event.title }}</a>
</h2>
{% endif %}
</div>
</article>
Expand Down
21 changes: 13 additions & 8 deletions _includes/events.html
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
{% unless page.permalink == "/events" %}
<a href="/events">{% t home.events.more %}</a>
{% unless page.permalink == '/events' %}
<a href="/events">{% t home.events.more %}</a>
{% endunless %}
<ul
class="list -no-list-style l-stack -vertical"
style="--stack-spacing: 1.5rem"
role="list"
>
{% assign events = site.events | filter_tags: include.tags | reverse %} {%
assign future_events = events | where_exp: "event", "event.date >= site.time"
%} {% if include.limit and future_events.size > 0 %} {% for event in
future_events reversed limit: include.limit %} {% include event-card.html %}
{% endfor %} {% else %} {% for event in events limit: include.limit %} {%
include event-card.html %} {% endfor %} {% endif %}
{% assign events = site.events | filter_tags: include.tags | reverse %}
{% assign future_events = events | where_exp: 'event', 'event.date >= site.time' %}
{% if include.limit and future_events.size > 0 %}
{% for event in future_events reversed limit: include.limit %}
{% include event-card.html %}
{% endfor %}
{% else %}
{% for event in events limit: include.limit %}
{% include event-card.html %}
{% endfor %}
{% endif %}
</ul>
21 changes: 12 additions & 9 deletions _includes/head.html
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>
{% if page.title %}{{ page.title | escape }}{% else %}{{ site.title | escape
}}{% endif %}
{% if page.title -%}
{{- page.title | escape -}}
{%- else -%}
{{- site.title | escape -}}
{%- endif %}
</title>
<meta
name="description"
content="{{ page.excerpt | default: site.description | strip_html | normalize_whitespace | truncate: 160 | escape }}"
/>
>
<style>
{% capture styles %}
{% include main.scss %}
Expand All @@ -22,8 +25,8 @@
type="application/rss+xml"
title="{{ site.title | escape }}"
href="{{ 'feed.xml' | relative_url }}"
/>
<link rel="shortcut icon" href="/assets/favicon.png" type="image/x-icon" />
<link rel="icon" href="/assets/favicon.png" type="image/x-icon" />
>
<link rel="shortcut icon" href="/assets/favicon.png" type="image/x-icon">
<link rel="icon" href="/assets/favicon.png" type="image/x-icon">
{% seo %}
</head>
12 changes: 6 additions & 6 deletions _includes/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ <h1 class="logo">{{ site.title }}</h1>
<div id="navBtn">menu</div>
<ul id="nav" class="dropdown__menu hide">
{% for link in site.header_themes %}
<li>
<a href="{{link.url}}"
>{{ site.translations[site.lang].pages[link.text] }}</a
>
</li>
<li>
<a href="{{link.url}}">{{ site.translations[site.lang].pages[link.text] }}</a>
</li>
{% endfor %}
</ul>
</li>
<li><a href="{% translate_link join %}">{% t connect.subscribe %}</a></li>
<li>
<a href="{% translate_link join %}">{% t connect.subscribe %}</a>
</li>
</ul>
</header>
130 changes: 65 additions & 65 deletions _includes/links.html
Original file line number Diff line number Diff line change
@@ -1,69 +1,69 @@
{% unless page.hide_form %}
<div class="social-links">
<form
name="subscribe"
class="join-form"
method="POST"
action="/welcome"
data-netlify="true"
>
<div class="control">
<label for="name">{% t connect.name %}</label>
<input class="input-text" id="name" type="text" required name="name" />
</div>
<div class="control">
<label for="email">{% t connect.email %}</label>
<input class="input-text" id="email" type="email" required name="email" />
</div>
<div class="control">
<label for="social1">{% t connect.public_link %} #1</label>
<input
class="input-text"
id="social1"
required
type="text"
name="social_media_1"
placeholder="{% t connect.public_link_placeholder %}"
/>
</div>
<div class="control">
<label for="social2">{% t connect.public_link %} #2</label>
<input
class="input-text"
id="social2"
required
type="text"
name="social_media_2"
placeholder="{% t connect.public_link_placeholder %}"
/>
</div>
<div class="control">
<label for="company">{% t connect.company %}</label>
<input
class="input-text"
required
id="company"
type="text"
name="company"
/>
</div>
<div class="social-links">
<form
name="subscribe"
class="join-form"
method="POST"
action="/welcome"
data-netlify="true"
>
<div class="control">
<label for="name">{% t connect.name %}</label>
<input class="input-text" id="name" type="text" required name="name">
</div>
<div class="control">
<label for="email">{% t connect.email %}</label>
<input class="input-text" id="email" type="email" required name="email">
</div>
<div class="control">
<label for="social1">{% t connect.public_link %} #1</label>
<input
class="input-text"
id="social1"
required
type="text"
name="social_media_1"
placeholder="{% t connect.public_link_placeholder %}"
>
</div>
<div class="control">
<label for="social2">{% t connect.public_link %} #2</label>
<input
class="input-text"
id="social2"
required
type="text"
name="social_media_2"
placeholder="{% t connect.public_link_placeholder %}"
>
</div>
<div class="control">
<label for="company">{% t connect.company %}</label>
<input
class="input-text"
required
id="company"
type="text"
name="company"
>
</div>

<div>
<input class="input-text" id="referrer" type="hidden" name="referrer" />
</div>
<div class="control">
<label for="how_did_hear">{% t connect.how_did_hear %}</label>
<input
class="input-text"
id="how_did_hear"
type="text"
name="how_did_hear"
/>
</div>
<div>
<input class="input-text" id="referrer" type="hidden" name="referrer">
</div>
<div class="control">
<label for="how_did_hear">{% t connect.how_did_hear %}</label>
<input
class="input-text"
id="how_did_hear"
type="text"
name="how_did_hear"
>
</div>

<button class="subscribe-button" type="submit">
{% t connect.subscribe %}
</button>
</form>
</div>
<button class="subscribe-button" type="submit">
{% t connect.subscribe %}
</button>
</form>
</div>
{% endunless %}
Loading

0 comments on commit 7a7d958

Please sign in to comment.