Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Media location #23

Merged
merged 12 commits into from
May 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ end_date: 2020-04-20 14:00:00 -0500
event_platform:
- zoom
featured_images:
- img_url: https://brooklynrail-web.imgix.net/article_image/image/24689/whitney-stanley-2-finalweb.jpg?w=440&q=80&fit=max
- media: 2020-05-stanley-whitney
---

## The New Social Environment
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ date: 2020-04-21 13:00:00 -0500
end_date: 2020-04-21 14:00:00 -0500
event_platform:
- zoom
featured_images:
- img_url: https://img.evbuc.com/https%3A%2F%2Fcdn.evbuc.com%2Fimages%2F98460586%2F250527606728%2F1%2Foriginal.20200410-204950?h=2000&w=720&auto=format%2Ccompress&q=75&sharp=10&s=8649b025d9637aa49fc1c6759d7c09ee
---
## The New Social Environment

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ date: 2020-04-22 13:00:00 -0500
end_date: 2020-04-22 14:00:00 -0500
event_platform:
- zoom
featured_images:
- img_url: https://venice.brooklynrail.org/assets/media/rail-venice-courtyard.png
---
## The New Social Environment

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ end_date: 2020-04-27 14:00:00 -0500
event_platform:
- zoom
- youtube
featured_images:
- img_url: https://brooklynrail-web.imgix.net/article_image/image/23068/Bui-Harris-1.jpg?w=600&q=80&fit=max
---


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ end_date: 2020-04-28 14:00:00 -0500
event_platform:
- zoom
- youtube
featured_images:
- img_url: https://img.evbuc.com/https%3A%2F%2Fcdn.evbuc.com%2Fimages%2F99205246%2F250527606728%2F1%2Foriginal.20200421-204356?h=2000&w=720&auto=format%2Ccompress&q=75&sharp=10&s=41ed5b545656746c0654796ed2e73e9f
---
**Dorothea Rockburne** is an artist, born in Montréal, who lives and works in New York. Most recently, she had a solo show installed for long-term view at Dia:Beacon in 2018.

Expand Down
6 changes: 0 additions & 6 deletions content/media/2020-05-rail-zoom.md

This file was deleted.

7 changes: 0 additions & 7 deletions content/media/_index.md

This file was deleted.

5 changes: 5 additions & 0 deletions data/media/2020-05-stanley-whitney.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
media: /media/stanley-whitney.jpeg
title: Stanley Whitney
alt: A drawing of artist Stanley Whitney by Phong Bui.
credit: Phong Bui
date: 2020-05-05 22:46:00 -0500
3 changes: 0 additions & 3 deletions static/media/ocean.jpg

This file was deleted.

3 changes: 0 additions & 3 deletions static/media/rail-button.png

This file was deleted.

3 changes: 0 additions & 3 deletions static/media/rail-zoom-1.png

This file was deleted.

3 changes: 3 additions & 0 deletions static/media/stanley-whitney.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 10 additions & 5 deletions themes/brooklynrail/layouts/events-beta/card-event-past.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,17 @@ <h2 class="p-name hover">
</header>

{{/* Featured Image */}}
{{- $featured_images := .Params.featured_images -}}
<div class="card_cover">
{{- range $index, $featured_image := first 1 $featured_images -}}
<div class="card_cover_img">
<img src="{{- $featured_image.img_url -}}" alt="{{- .Title -}}">
</div>
{{- $featured_images := .Params.featured_images -}}
{{- if $featured_images -}}
{{- range $media := first 1 $featured_images -}}
<div class="card_cover_img">
{{- if $media -}}
{{- $thisimg := index $.Site.Data.media ($media.media | lower) -}}
<img src="{{- $thisimg.media -}}" alt="">
{{- end -}}
</div>
{{- end -}}
{{- end -}}
</div>
</a>
Expand Down
32 changes: 19 additions & 13 deletions themes/brooklynrail/static/workflow/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ logo_url: https://brooklynrail.org/images/dist/brooklynrail-logo-red.png

# Backend and connections
backend:
name: github
name: git-gateway
repo: brooklynrail/brooklynrail-platform
site_domain: brooklynrail.netlify.com
base_url: https://api.netlify.com
Expand Down Expand Up @@ -159,13 +159,22 @@ collections:
default: ["zoom"]
required: false


- label: "Featured Images"
name: "featured_images"
widget: "list"
hint: "Upload images through the OLD RAIL admin"
required: false
fields:
- { label: "Image URL", name: "img_url", widget: "string" }
- label: "Media"
name: "media"
widget: "relation"
collection: "media"
searchFields: ["media", "title"]
valueField: "{{slug}}"
required: false
displayFields: ["media"]


- label: "Event Copy"
name: "body"
Expand Down Expand Up @@ -261,11 +270,13 @@ collections:
label: "Media" # Used in the UI
label_singular: "Media"
description: "TKTK"
folder: "content/media" # path to the folder where files are stored
path: "{{year}}/{{month}}/{{slug}}"
folder: "data/media/" # path to the folder where files are stored
# path: "{{year}}/{{month}}"
extension: "yml"
create: true # Allow users to create new documents in this collection
identifier_field: name # sets the field that is used to create the slug
slug: "{{slug}}"
identifier_field: title # sets the field that is used to create the slug
slug: "{{year}}-{{month}}-{{slug}}"
summary: "{{title}} ({{year}}-{{month}})"

fields: # The fields for each document, usually in frontmatter
- label: "Media"
Expand All @@ -276,14 +287,9 @@ collections:
media_library:
config:
multiple: true
fields:
- label: "Names"
name: "names"
widget: "string"
hint: "TKTK"

- label: "Name"
name: "name"
- label: "Image title"
name: "title"
widget: "string"
hint: "TKTK"

Expand Down