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

Weekly Reports List Updates #404

Merged
merged 2 commits into from May 11, 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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 6 additions & 4 deletions content/weekly-reports/_index.md
Expand Up @@ -8,6 +8,12 @@ cascade:
fbImage: /images/og/eviction-lab-about-us-fb.jpg
twImage: /images/og/eviction-lab-about-us-tw.jpg
socialDescription: We’ve built the first nationwide database of evictions.
fundedby:
heading: The Eviction Tracking System is funded by
links:
- url: https://c3dti.ai/
logo: /uploads/c3-logo.svg
alt: C3.ai Digital Transformation Institute
---

The Eviction Tracking System (ETS) is a platform for monitoring and providing weekly updates on the number of eviction cases being filed in a set of cities across the United States. We built this system during the current pandemic out of concern that a growing number of families may face the threat of eviction. The ETS provides a data infrastructure for tracking eviction trends that previously did not exist. Scroll down to see the cities in which we are operating and learn more about the project.
Expand All @@ -33,7 +39,3 @@ We welcome feedback, as well as partnerships with states and localities who wish
- To receive updates, add your email below.
- For media inquiries, email [press@evictionlab.org](mailto:press@evictionlab.org)
- To provide tips and feedback on the ETS, email [info@evictionlab.org](mailto:info@evictionlab.org).

### The Eviction Tracking System is funded by

<a href="https://c3dti.ai/" target="_blank">![C3.ai Digital Transformation Institute](/uploads/c3-logo.svg)</a>
30 changes: 29 additions & 1 deletion static/admin/config.yml
Expand Up @@ -2,6 +2,16 @@ backend:
name: github
repo: EvictionLab/eviction-lab-website
branch: cms-dev

# FOR LOCAL DEVELOPMENT:
# ---
# - uncomment the backend below
# - run `npx netlify-cms-proxy-server` to serve content

# backend:
# name: git-gateway
# local_backend: true

media_folder: "static/uploads" # Folder where user uploaded files should go
publish_mode: editorial_workflow
public_folder: "/uploads" # The src attribute for uploaded media will begin with /images/uploads
Expand All @@ -26,6 +36,7 @@ collections:
- label: "Meta"
name: "cascade"
widget: "object"
collapsed: true
fields:
- {
label: "Browser Window Title",
Expand Down Expand Up @@ -57,10 +68,27 @@ collections:
widget: "image",
hint: "Image used when page is shared on Twitter",
}

- { label: Heading, name: h1, widget: string }
- { label: "Updated Date", name: "date", widget: "date" }
- { label: "Body", name: "body", widget: "markdown" }
- label: "Funded By"
name: "fundedby"
widget: "object"
fields:
- { label: Heading, name: heading, widget: string, default: "" }
- label: "Links"
name: "links"
widget: "list"
summary: '{{fields.alt}}'
fields:
- {
label: "URL",
name: "url",
widget: "string",
hint: "e.g. https://website.com/",
}
- { label: "Logo", name: "logo", widget: "image" }
- { label: "Alternate Text", name: "alt", widget: "string" }

- name: "weekly-reports"
identifier_field: "h1"
Expand Down
40 changes: 36 additions & 4 deletions themes/evictionlab/assets/weekly-reports/app.css
Expand Up @@ -96,9 +96,35 @@ body {
padding: 4px 8px;
}

.column--content > img,
.column--content > p img {
max-width: 140px;
.links.links--images {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}

.links.links--images a {
margin: 16px;
}

.links.links--images img {
max-width: 160px;
width: 100%;
}

@media(min-width: 768px) {
.links.links--images {
flex-direction: row;
flex-wrap: wrap;
align-items: center;
justify-content: flex-start;
margin: 0 -16px;
}
.links.links--images a {
margin: 0;
padding: 16px;
}

}

.breadcrumbs a {
Expand Down Expand Up @@ -143,7 +169,7 @@ body {
justify-content: center;
max-width: 1200px;
margin: auto;
padding: 24px;
padding: 16px;
}

.layout > .column--content {
Expand All @@ -152,6 +178,12 @@ body {
margin-bottom: 64px;
}

@media(min-width: 768px) {
.layout {
padding: 24px;
}
}

/** end page layout */

/** table base */
Expand Down
13 changes: 13 additions & 0 deletions themes/evictionlab/layouts/weekly-reports/list.html
Expand Up @@ -10,7 +10,20 @@ <h1 class="graphic-page-header">{{ .Params.h1 }}</h1>
<div class="layout layout--full">
<div class="column column--content">
<p class="date">Last Updated: {{ .Date.Format "January 2, 2006" }}</p>

{{ .Content }}

{{ with .Params.fundedby }}
<h3>{{ .heading }}</h3>
<div class="links links--images">
{{ range .links }}
{{ $url := (index . "url") }}
<a href="{{ .url }}" target="_blank">
<img src="{{ .logo }}" alt="{{ .alt }}" />
</a>
{{ end }}
</div>
{{ end }}
</div>
</div>

Expand Down