Skip to content

Commit

Permalink
Lint.
Browse files Browse the repository at this point in the history
  • Loading branch information
rebeccacremona committed Mar 6, 2024
1 parent 79716b8 commit 931d92c
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 11 deletions.
15 changes: 10 additions & 5 deletions src/components/cap-case.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export default class CapCase extends LitElement {
.pdf-link {
font-family: var(--font-sans-text);
text-align: center;
margin: var(--spacing-50) auto -1em;;
margin: var(--spacing-50) auto -1em;
}
/**/
Expand Down Expand Up @@ -452,15 +452,20 @@ export default class CapCase extends LitElement {
}
}

getPDFLink(){
if (this.caseMetadata.provenance.source === "Harvard"){
getPDFLink() {
if (this.caseMetadata.provenance.source === "Harvard") {
return html`
<div class="pdf-link">
<a href="${window.BUCKET_ROOT}/${this.reporter}/${this.volume}.pdf#page=${this.caseMetadata.first_page_order}"> View scanned PDF</a>
<a
href="${window.BUCKET_ROOT}/${this.reporter}/${this
.volume}.pdf#page=${this.caseMetadata.first_page_order}"
>
View scanned PDF</a
>
</div>
`;
}
return nothing
return nothing;
}

removeLink = (a) => {
Expand Down
15 changes: 9 additions & 6 deletions src/components/cap-volume.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,15 @@ export default class CapVolume extends LitElement {
);
}

getPDFLink(){
if (this.casesData[0].provenance.source === "Harvard"){
return html`<a href="${window.BUCKET_ROOT}/${this.reporter}/${this.volume}.pdf"> View scanned PDF.</a>`;
getPDFLink() {
if (this.casesData[0].provenance.source === "Harvard") {
return html`<a
href="${window.BUCKET_ROOT}/${this.reporter}/${this.volume}.pdf"
>
View scanned PDF.</a
>`;
}
return nothing
return nothing;
}

render() {
Expand All @@ -137,8 +141,7 @@ export default class CapVolume extends LitElement {
<p class="volume__subHeading">
${this.reporterData.full_name}
(${this.reporterData.start_year}-${this.reporterData.end_year})
volume ${this.volume}.
${this.getPDFLink()}
volume ${this.volume}. ${this.getPDFLink()}
</p>
</hgroup>
<ul class="volume__caseList">
Expand Down

0 comments on commit 931d92c

Please sign in to comment.