Skip to content

Commit

Permalink
Add events
Browse files Browse the repository at this point in the history
  • Loading branch information
shushugah committed Mar 17, 2024
1 parent 702340d commit b3ffe9f
Show file tree
Hide file tree
Showing 12 changed files with 179 additions and 31 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Open a browser to localhost:8080

## DecapCMS

In addition to GitHub, you can update the website via [DecapCMS](https://decapcms.org/) for example adding new blog posts by going to [/admin](https://techworkerscoalition.org/admin) interface.
In addition to GitHub, you can update the website via [DecapCMS](https://decapcms.org/) for example adding new blog posts and events by going to [/admin](https://techworkerscoalition.org/admin) interface. For local development, visit this [tutorial](https://decapcms.org/docs/working-with-a-local-git-repository/) (run `npx decap-server` from a different shell)

## Add your city

Expand Down
14 changes: 13 additions & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ description: A coalition of tech industry workers, labor organizers, community o
url: "https://techworkerscoalition.org" # the subpath of your site, e.g. /blog
baseurl: "" # the base hostname & protocol for your site, e.g. http://example.com
twitter_username: techworkersco
timezone: "Europe/Berlin"

# Build settings
plugins:
Expand All @@ -41,18 +42,27 @@ exclude:
- .jekyll-cache/
# also update index.md
languages: ["en", "es", "fr", "it", "pt", "ru"]

defaults:
- scope:
path: ""
values:
# unless languages: ["bl" "ah"] is included, english is only/default frontmatter language
languages: ["en"]
languages: ["en"]
- scope:
type: "events"
values:
layout: "event"

permalink: pretty
future: true
collections:
blog:
output: true
permalink: blog/:title
events:
output: true
permalink: events/:title

exclude_from_localizations: ["assets", "admin"]
header_links:
Expand All @@ -66,6 +76,8 @@ header_links:
links:
- url: /subscribe
text: Join
- url: /events
text: Event
- url: /blog
text: Blog
- url: /chapters
Expand Down
12 changes: 12 additions & 0 deletions _events/online-book-review-tech-workers-guide-to-unions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
title: "Online book review: Tech Worker's Guide to Unions "
date: 2024-03-26T18:00:00.000Z
timezone:
- Europe/Berlin
hide_form: false
---
In this 90 minute online-call, you will learn more about "[The Tech Worker's Guide to Unions](https://www.amazon.de/Tech-Workers-Guide-Unions/dp/9083386945)" book by Janneke Parrish, about their experiences organizing [\#AppleTogether](https://appletogether.org/) and supporting other tech companies in workplace organizing.

In 2021, Apple fired Janneke for their work #AppleToo, a movement that brought the discrimination, harassment, and retaliation that many Apple workers were experiencing to light. Since then, they've continued to found the solidarity union #AppleTogether which connects Apple organizing initiatives around the world together.

Whether you're newly interested in unionizing, or a veteran organizer, this online call is for you! This talk will be streamed and recorded. Detailed to be announced! [Mandatory registration over Zoom](https://us02web.zoom.us/meeting/register/tZcpd--sqzkqHtUUvK-u-vexE6hsAby7T1rs)
3 changes: 3 additions & 0 deletions _i18n/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ home:
description: |
<p>We’re also happy to chat, answer any questions you might have, or hear about any social justice efforts in which you need a partner. <a href="mailto:[email protected]">Send us an email.</a></p>
<p>If you’re a member of the press, please get in touch with us through <a href="mailto:[email protected]">[email protected].</a></p>
events:
title: Recent events
more: Find more events

job_board:
title: "Job Board 🌹"
Expand Down
7 changes: 7 additions & 0 deletions _includes/date_format.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{% assign date = include.date %}
{% assign local_hours = date | date: '%HH' | times: 60%}
{% assign offset = date | date: '%z' | slice: 2 | times: 60 %}
{% assign hours = local_hours | minus: offset | divided_by: 60 %}
<a target="_blank" href="https://www.timeanddate.com/worldclock/converter.html?iso={{date |
date: '%Y%m%d'}}T{{hours}}{{date | date: ':%M'}}00&p1=179&p2=224&p3=37">{{ date | date: '%R %Z'}}<a/>
{{ date | date: '%A, %d %B %Y ' }}
37 changes: 37 additions & 0 deletions _includes/event-card.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@

<article class="event-card marg-b-4 flex items-center">
<div class="bg-black circ lh-1">
<svg
focusable="false"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
x="0px"
y="0px"
viewBox="0 0 24 24"
class="event-card__icon card-icon"
style="enable-background:new 0 0 24 24;"
xml:space="preserve"
>
<path d="M20,3h-1V1h-2v2H7V1H5v2H4C2.9,3,2,3.9,2,5v16c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V5C22,3.9,21.1,3,20,3z M20,21H4V8h16V21z"/>
<text transform="matrix(1 0 0 1 5.3281 19.1641)" class="st0 st1">{{ event.date | date: "%d" }}</text>
</svg>
</div>
<div
class="event-card__info-column l-stack -vertical"
style="--stack-spacing: 0.25rem"
>
<time
class="aside event-card__date"
datetime="{{ event.date }}"
>{{ event.date | date: "%A, %d %b %Y %R %Z" }}</time>
{% if include.limit %}
<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>
{% endif %}
</div>
</article>
15 changes: 15 additions & 0 deletions _includes/events.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{% unless page.permalink == "/events" %}
<a href="/events">{% t home.events.more %}</a>
{% endunless %}
{% 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 %}
32 changes: 29 additions & 3 deletions _includes/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -525,14 +525,14 @@ hr {
padding: 0.75rem;
}

.press-icon {
.card-icon {
height: 40px;
min-width: 40px;
width: 40px;
}

@media (prefers-color-scheme: light) {
.press-icon {
.card-icon {
fill: $black;
}

Expand Down Expand Up @@ -599,7 +599,7 @@ hr {
h2 a:link {
color: $white;
}
.press-icon {
.card-icon {
fill: $red;
}
.border {
Expand Down Expand Up @@ -671,3 +671,29 @@ hr {
width: 100%;
height: auto; // use this to display responsive image
}

.event-card {
@supports (display: grid) {
align-items: center;
display: grid;
grid-template-columns: 2rem 1fr;
grid-gap: 0.5rem;
}

& > div {
padding: 1rem 3.5rem 1rem 1rem;
}
}

.event-card__info-column {
grid-column: 2;
margin-left: 2rem;
}

.event-card__icon {
fill: $grey;
font-size: 0.55em;
font-weight: bold;
grid-column: 1;
width: 2rem;
}
46 changes: 23 additions & 23 deletions _includes/press.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,29 @@
{% assign posts = site.data.press | concat: berlin_press | sort: 'date' | reverse %}
{% for post in posts limit: limit %}
<article class="marg-b-4 flex items-center">
<div class="bg-black circ p-3 marg-r-3 lh-1">
<svg
focusable="false"
class="press-icon"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
x="0px"
y="0px"
viewBox="0 0 512 512"
xml:space="preserve"><g><path d="m464.867 64.266h-81.4v-49.266c0-8.284-6.716-15-15-15h-353.467c-8.284 0-15 6.716-15 15v417.733c0 43.708 35.559 79.267 79.267 79.267 0 0 249.182.001 353.467.001 43.777-.001 79.266-35.49 79.266-79.268v-321.334c0-25.989-21.144-47.133-47.133-47.133zm-43.936 30c-2.1 5.388-3.197 11.176-3.197 17.134v49.267h-34.267v-66.4h37.464zm-341.664 387.733c-27.166 0-49.267-22.1-49.267-49.266v-402.733h323.467v402.733c0 18.625 6.44 35.737 17.193 49.266zm402.733-49.266c0 27.21-22.057 49.267-49.267 49.267-21.978 0-40.588-14.394-46.934-34.267h46.934c8.284 0 15-6.716 15-15s-6.716-15-15-15h-49.267v-34.267h49.267c8.284 0 15-6.716 15-15s-6.716-15-15-15h-49.267v-34.267h49.267c8.284 0 15-6.716 15-15s-6.716-15-15-15h-49.267v-34.267h49.267c8.284 0 15-6.716 15-15s-6.716-15-15-15h-49.267v-34.267h49.267c8.284 0 15-6.716 15-15v-64.265c0-9.359 7.567-17.134 17.133-17.134 9.447 0 17.133 7.687 17.133 17.134v321.333z"/><path d="m304.2 64.266h-224.933c-8.284 0-15 6.716-15 15s6.716 15 15 15h224.933c8.284 0 15-6.716 15-15s-6.716-15-15-15z"/><path d="m304.2 289.199h-80.333c-8.284 0-15 6.716-15 15s6.716 15 15 15h80.333c8.284 0 15-6.716 15-15s-6.716-15-15-15z"/><path d="m159.6 289.199h-80.333c-8.284 0-15 6.716-15 15s6.716 15 15 15h80.333c8.284 0 15-6.716 15-15s-6.716-15-15-15z"/><path d="m304.2 417.733h-80.333c-8.284 0-15 6.716-15 15s6.716 15 15 15h80.333c8.284 0 15-6.716 15-15s-6.716-15-15-15z"/><path d="m159.6 417.733h-80.333c-8.284 0-15 6.716-15 15s6.716 15 15 15h80.333c8.284 0 15-6.716 15-15s-6.716-15-15-15z"/><path d="m304.2 353.466h-80.333c-8.284 0-15 6.716-15 15s6.716 15 15 15h80.333c8.284 0 15-6.716 15-15s-6.716-15-15-15z"/><path d="m159.6 353.466h-80.333c-8.284 0-15 6.716-15 15s6.716 15 15 15h80.333c8.284 0 15-6.716 15-15s-6.716-15-15-15z"/><path d="m304.2 128.532h-224.933c-8.284 0-15 6.716-15 15v96.4c0 8.284 6.716 15 15 15h224.933c8.284 0 15-6.716 15-15v-96.4c0-8.284-6.716-15-15-15zm-15 96.401h-194.933v-66.4h194.933z"/></g></svg>
</div>
<div class="bg-black circ p-3 marg-r-3 lh-1">
<svg
focusable="false"
class="card-icon"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
x="0px"
y="0px"
viewBox="0 0 512 512"
xml:space="preserve"><g><path d="m464.867 64.266h-81.4v-49.266c0-8.284-6.716-15-15-15h-353.467c-8.284 0-15 6.716-15 15v417.733c0 43.708 35.559 79.267 79.267 79.267 0 0 249.182.001 353.467.001 43.777-.001 79.266-35.49 79.266-79.268v-321.334c0-25.989-21.144-47.133-47.133-47.133zm-43.936 30c-2.1 5.388-3.197 11.176-3.197 17.134v49.267h-34.267v-66.4h37.464zm-341.664 387.733c-27.166 0-49.267-22.1-49.267-49.266v-402.733h323.467v402.733c0 18.625 6.44 35.737 17.193 49.266zm402.733-49.266c0 27.21-22.057 49.267-49.267 49.267-21.978 0-40.588-14.394-46.934-34.267h46.934c8.284 0 15-6.716 15-15s-6.716-15-15-15h-49.267v-34.267h49.267c8.284 0 15-6.716 15-15s-6.716-15-15-15h-49.267v-34.267h49.267c8.284 0 15-6.716 15-15s-6.716-15-15-15h-49.267v-34.267h49.267c8.284 0 15-6.716 15-15s-6.716-15-15-15h-49.267v-34.267h49.267c8.284 0 15-6.716 15-15v-64.265c0-9.359 7.567-17.134 17.133-17.134 9.447 0 17.133 7.687 17.133 17.134v321.333z"/><path d="m304.2 64.266h-224.933c-8.284 0-15 6.716-15 15s6.716 15 15 15h224.933c8.284 0 15-6.716 15-15s-6.716-15-15-15z"/><path d="m304.2 289.199h-80.333c-8.284 0-15 6.716-15 15s6.716 15 15 15h80.333c8.284 0 15-6.716 15-15s-6.716-15-15-15z"/><path d="m159.6 289.199h-80.333c-8.284 0-15 6.716-15 15s6.716 15 15 15h80.333c8.284 0 15-6.716 15-15s-6.716-15-15-15z"/><path d="m304.2 417.733h-80.333c-8.284 0-15 6.716-15 15s6.716 15 15 15h80.333c8.284 0 15-6.716 15-15s-6.716-15-15-15z"/><path d="m159.6 417.733h-80.333c-8.284 0-15 6.716-15 15s6.716 15 15 15h80.333c8.284 0 15-6.716 15-15s-6.716-15-15-15z"/><path d="m304.2 353.466h-80.333c-8.284 0-15 6.716-15 15s6.716 15 15 15h80.333c8.284 0 15-6.716 15-15s-6.716-15-15-15z"/><path d="m159.6 353.466h-80.333c-8.284 0-15 6.716-15 15s6.716 15 15 15h80.333c8.284 0 15-6.716 15-15s-6.716-15-15-15z"/><path d="m304.2 128.532h-224.933c-8.284 0-15 6.716-15 15v96.4c0 8.284 6.716 15 15 15h224.933c8.284 0 15-6.716 15-15v-96.4c0-8.284-6.716-15-15-15zm-15 96.401h-194.933v-66.4h194.933z"/></g></svg>
</div>
<div>
<div>
<div>
{{post.media}} —
<time datetime="{{ post.date | date: '%Y-%m-%d' }}">
{{ post.date | date: '%-d %B %Y' }}
</time>
</div>
{% if limit %}<h2>{% else %}<h3>{% endif %}
<a href="{{ post.url }}">
{{ post.title }}
</a>
{% if limit %}</h2>{% else %}</h3>{% endif %}
{{post.media}} —
<time datetime="{{ post.date | date: '%Y-%m-%d' }}">
{{ post.date | date: '%-d %B %Y' }}
</time>
</div>
</article>
{% if limit %}<h2>{% else %}<h3>{% endif %}
<a href="{{ post.url }}">
{{ post.title }}
</a>
{% if limit %}</h2>{% else %}</h3>{% endif %}
</div>
</article>
{% endfor %}
15 changes: 15 additions & 0 deletions _layouts/event.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
layout: default
---
<style>h1, .main-wrapper h2, h3 {text-align: left; font-weight: bold;}</style>
<article class="post">
<a href="/events">{%t home.events.more %}</a>
<h1 class="post-title">{{ page.title | escape }}</h1>
<div class="post-content">
<h3>
📆 {% include date_format.html date=page.date %}
</h3>

{{ content }}
</div>
</article>
19 changes: 16 additions & 3 deletions admin/config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
local_backend:
url: http://127.0.0.1:8090
local_backend: true

backend:
name: git-gateway
Expand All @@ -23,4 +22,18 @@ collections:
fields: # The fields for each document, usually in front matter
- {label: "Title", name: "title", widget: "string"}
- {label: "Date", name: "date", widget: "datetime", picker_utc: true }
- {label: "Body", name: "body", widget: "markdown"}
- {label: "Body", name: "body", widget: "markdown"}

- name: "event" # Used in routes, e.g., /admin/collections/blog
label: "Event" # Used in the UI
folder: "_events" # The path to the folder where the documents are stored
create: true # Allow users to create new documents in this collection
fields: # The fields for each document, usually in front matter
- {label: "Title", name: "title", widget: "string"}
- {label: "Date", name: "date", widget: "datetime"}
- {label: "Timezone", name: "timezone", widget: "select", multiple: true, default: ["US/Eastern"], min: 1, options: ["US/Eastern", "US/Pacific", "US/Central", "US/Mountain", "Europe/Berlin", "Europe/London"]}
- {label: "hide signup form", name: "hide_form", widget: "boolean", default: false}
- {label: "Canonical url", name: "canonical_url", widget: "string", required: false}
- {label: "Tags", name: "tags", widget: "list"}
- {label: "Body", name: "body", widget: "markdown"}
- {label: "Optional image for SEO", name: "image", widget: "image", required: false}
8 changes: 8 additions & 0 deletions events.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
layout: page
permalink: /events
languages: ["en"]
---
<h1>Tech Worker Events</h1>
Explore all <b>{{site.events.size}}</b> public events we organized
{% include events.html %}

0 comments on commit b3ffe9f

Please sign in to comment.