Skip to content

Commit

Permalink
Merge pull request #61 from tinykite/add-missing-press-links
Browse files Browse the repository at this point in the history
feat: Add missing press links for about page
  • Loading branch information
tinykite authored Feb 12, 2024
2 parents 3f6d2f9 + d65c155 commit aea0869
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/components/cap-media-list.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { LitElement, html, css } from "../lib/lit.js";
import { baseStyles } from "../lib/wc-base.js";
import { pressLinks } from "../data/pressLinks.js";
import clsx from "../lib/clsx.js";

export class CapMediaList extends LitElement {
static properties = {
decoration: { type: String | undefined },
theme: { type: String | undefined },
data: { type: Array },
};

static styles = [
Expand Down Expand Up @@ -89,11 +89,12 @@ export class CapMediaList extends LitElement {
super();
this.theme = "light";
this.decoration = "bulleted";
this.data = [];
}
render() {
return html`
<ul class=${clsx("mediaList", `mediaList--${this.theme}`)}>
${pressLinks.map((link) => {
${this.data.map((link) => {
return html`
<li
class=${clsx("mediaList__item", {
Expand Down
2 changes: 1 addition & 1 deletion src/components/cap-section-highlight.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export class CapSectionHighlight extends LitElement {
<cap-media-list
theme="dark"
decoration="none"
.data=${pressLinks}
.data=${pressLinks.slice(0, 5)}
></cap-media-list>
</div>
Expand Down
19 changes: 19 additions & 0 deletions src/data/pressLinks.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,23 @@ export const pressLinks = [
date: "October 31, 2018",
url: "https://www.techdirt.com/2018/10/31/harvard-opens-up-massive-caselaw-access-project/",
},
{
title: "Caselaw Access Project launches API and bulk data service",
publisher: "Harvard Law Today",
date: "October 31, 2018",
url: "https://today.law.harvard.edu/caselaw-access-project-launches-api-and-bulk-data-service/",
},
{
title:
"Caselaw Access Project gives free access to 360 years of American court cases",
publisher: "ABA Journal",
date: "October 30, 2018",
url: "http://www.abajournal.com/news/article/caselaw_access_project_gives_free_access_to_360_years_of_american_court_cas",
},
{
title: "Harvard Law Library Readies Trove of Decisions for Digital Age",
publisher: "The New York Times",
date: "October 28, 2015",
url: "http://www.nytimes.com/2015/10/29/us/harvard-law-library-sacrifices-a-trove-for-the-sake-of-a-free-database.html",
},
];
3 changes: 2 additions & 1 deletion src/templates/cap-about-page.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import "../components/cap-page-header.js";
import "../components/cap-footer.js";
import "../components/cap-anchor-list.js";
import "../components/cap-media-list.js";
import { pressLinks } from "../data/pressLinks.js";
import "../components/cap-contributor-list.js";
import { anchorLinks } from "../data/aboutSidebarLinks.js";

Expand Down Expand Up @@ -189,7 +190,7 @@ export class CapAboutPage extends LitElement {
</strong>
</p>
<h2 class="c-decoratedHeader" id="press">Press</h2>
<cap-media-list></cap-media-list>
<cap-media-list .data=${pressLinks}></cap-media-list>
<h2 class="c-decoratedHeader" id="friends-and-partners">
Friends and Partners
Expand Down

0 comments on commit aea0869

Please sign in to comment.