Skip to content
This repository has been archived by the owner on Nov 17, 2021. It is now read-only.

Commit

Permalink
feat(PLOS): Update theme with new semantic selectors
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-ketch committed Feb 18, 2020
1 parent d552f57 commit ca36008
Show file tree
Hide file tree
Showing 2 changed files with 153 additions and 206 deletions.
30 changes: 0 additions & 30 deletions src/themes/plos/index.ts
Original file line number Diff line number Diff line change
@@ -1,33 +1,3 @@
import { load } from '../../shared/js'

load()

/*
This is old code, currently commented out with the view to
consolidating in shared.
export const init = (): void => {
const referenceListItemSel = '[itemprop="references"] > li'
const datePublishedSel = '[itemprop="datePublished"]'
const publicationIssueTitleSel =
'[itemtype="https://schema.org/PublicationIssue"] [itemprop="title"]'
document.querySelectorAll(referenceListItemSel).forEach(node => {
// If PublicationIssue title node exists,
const publicationIssueTitle = node.querySelector(publicationIssueTitleSel)
// Move last datePublished after PublicationIssue title.
const datePublished = document.querySelectorAll(datePublishedSel)
const lastDatePublished = datePublished[datePublished.length - 1]
if (publicationIssueTitle && publicationIssueTitle.parentNode) {
publicationIssueTitle.parentNode.insertBefore(
lastDatePublished,
publicationIssueTitle.nextSibling
)
}
})
}
document.addEventListener('DOMContentLoaded', init)
*/
Loading

0 comments on commit ca36008

Please sign in to comment.