-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature/issue 605 draft issues (#610)
* move _redirects to public folder (netlify) * progressive loading articles page * add number of articles published to issue * remove date in Issue label, add name * add active/disabled class for Issue component * Update ArticlesFacets.js * Update translations.json * add "new" label * increase space see issue #605
- Loading branch information
1 parent
2b4f7f1
commit 6a15063
Showing
14 changed files
with
200 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,3 +9,4 @@ node_modules | |
.vscode/settings.json | ||
storybook-static | ||
# _redirects | ||
journal-of-digital-history.code-workspace |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
.Issue.disabled > div { | ||
display: none !important; | ||
} | ||
.Issue { | ||
border-top: 1px solid var(--gray-400); | ||
position: sticky; | ||
top: 99px; | ||
background: var(--gray-100); | ||
z-index: 1; | ||
} | ||
.Issue__numArticles b { | ||
border: 1px solid; | ||
padding: 0 6px 0 5px; | ||
border-radius: 5px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,26 @@ | ||
import React from 'react' | ||
import PropTypes from 'prop-types' | ||
import { useTranslation } from 'react-i18next' | ||
|
||
const IssueLabel = ({ pid, publication_date }) => { | ||
const IssueLabel = ({ pid = '', name = '' }) => { | ||
const { t } = useTranslation() | ||
const shortName = name.length > 16 ? name.slice(0, 16) + '...' : name | ||
return ( | ||
<React.Fragment> | ||
{pid.replace(/jdh0+(\d+)/, (m, n) => t('numbers.issue', { n }))} | ||
· | ||
{new Date(publication_date).getFullYear()} | ||
{name.length > 0 ? ( | ||
<> | ||
· | ||
{shortName} | ||
</> | ||
) : null} | ||
</React.Fragment> | ||
) | ||
} | ||
|
||
IssueLabel.propTypes = { | ||
pid: PropTypes.string, | ||
name: PropTypes.string, | ||
} | ||
|
||
export default IssueLabel |
Oops, something went wrong.