Skip to content

Commit 82bf214

Browse files
authored
v3.1.0
v3.1.0
2 parents ffcac73 + 874ffd0 commit 82bf214

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+934
-1575
lines changed

.env

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,6 @@ REACT_APP_TAG_EDITORIAL=editorial
77
REACT_APP_ENABLE_AUTH_0=false
88
REACT_APP_GITHUB_RELEASES_API_ENDPOINT=https://api.github.com/repos/c2dh/journal-of-digital-history/releases
99
REACT_APP_GITHUB_WIKI_FAQ=https://raw.githubusercontent.com/wiki/c2dh/journal-of-digital-history/FAQ.md
10+
REACT_APP_NOTEBOOK_GUIDELINES_URL=https://journalofdigitalhistory.org/proxy-githubusercontent/C2DH/jdh-notebook/master/examples/Author_Guideline/AuthorGuideline.ipynb
11+
REACT_APP_NOTEBOOK_CFP_BASE_URL=https://journalofdigitalhistory.org/proxy-githubusercontent/C2DH/jdh-notebook/master/cfp
12+
REACT_APP_GITHUB_WIKI_NEWS=https://raw.githubusercontent.com/wiki/c2dh/journal-of-digital-history/News.md

package-lock.json

Lines changed: 34 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "jdh",
3-
"version": "3.0.0",
3+
"version": "3.1.0",
44
"private": true,
55
"dependencies": {
66
"@auth0/auth0-react": "^1.1.0",
@@ -56,6 +56,7 @@
5656
"react-router-dom": "^5.2.0",
5757
"react-scripts": "4.0.3",
5858
"react-scrollama": "^2.2.15",
59+
"react-slick": "^0.28.1",
5960
"react-spring": "^9.1.2",
6061
"react-use-gesture": "^9.1.3",
6162
"react-window": "^1.8.5",

public/index.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@
3737
<meta name="twitter:title" content="Journal of Digital History" data-react-helmet="true"/>
3838
<meta name="twitter:description" content="The Journal of Digital History (JDH) is an international, academic, peer-reviewed and open-access journal. JDH will set new standards in history publishing based on the principle of multi-layered articles." data-react-helmet="true"/>
3939
<meta name="twitter:image" content="https://journalofdigitalhistory.org/img/issues/social-media/jdh001.png" data-react-helmet="true"/>
40+
<link rel="stylesheet" type="text/css" charset="UTF-8" href="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.6.0/slick.min.css" />
41+
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.6.0/slick-theme.min.css" />
4042
</head>
4143
<body>
4244
<noscript>You need to enable JavaScript to run this app.</noscript>

src/App.js

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ const Home = lazy(() => import('./pages/Home'))
5353
const About = lazy(() => import('./pages/About'))
5454
const AbstractSubmission = lazy(() => import('./pages/AbstractSubmission'))
5555
const AbstractSubmitted = lazy(() => import('./pages/AbstractSubmitted'))
56+
const ArticlesPage = lazy(() => import('./pages/Articles'))
57+
const CallForPapers = lazy(() => import('./pages/CallForPapers'))
5658
const Issue = lazy(() => import('./pages/Issue'))
5759
const Issues = lazy(() => import('./pages/Issues'))
5860
const Abstract = lazy(() => import('./pages/Abstract'))
@@ -114,9 +116,11 @@ function LangRoutes() {
114116
<Route path={`${path}/abstract/:id`}>
115117
<Abstract />
116118
</Route>
119+
117120
<Route path={`${path}/issues`} component={Issues} />
118121
<Route path={`${path}/issue/:id`} component={Issue} />
119122
<Route path={`${path}/article/:pid`} component={ArticleViewer} />
123+
<Route exact path={`${path}/articles`} component={ArticlesPage} />
120124
<Route path={`${path}/abstract-submitted`} component={AbstractSubmitted} />
121125
<Route exact path={`${path}/terms`} component={TermsOfUse}/>
122126
<Route exact path={`${path}/submit`}>
@@ -141,6 +145,7 @@ function LangRoutes() {
141145
<Route exact path={`${path}/playground`} component={Playground}/>
142146
<Route exact path={`${path}/fingerprint`} component={Fingerprint} />
143147
<Route exact path={`${path}/guidelines`} component={Guidelines} />
148+
<Route exact path={`${path}/cfp/:permalink`} component={CallForPapers} />
144149
<Route path={`${path}*`}>
145150
<NotFound path={path}/>
146151
</Route>
@@ -156,20 +161,21 @@ function usePageViews() {
156161
() => {
157162
const url = [pathname, search].join('')
158163
console.info('pageview', url)
159-
// based on the pathname, change the background
160-
if (pathname.indexOf('/notebook') !== -1 || pathname.indexOf('/article') !== -1) {
161-
changeBackgroundColor('#F4F1F8')
162-
} else if (pathname.indexOf('/issue') !== -1) {
163-
changeBackgroundColor('#F4F1F8')
164-
} else if (pathname.indexOf('/submit') !== -1) {
165-
changeBackgroundColor('var(--gray-100)')
166-
} else if (pathname.indexOf('/about') !== -1) {
167-
changeBackgroundColor('var(--linen)')
168-
} else if (pathname.indexOf('/terms') !== -1) {
169-
changeBackgroundColor('var(--peachpuff)')
170-
} else {
171-
changeBackgroundColor('var(--gray-100)')
172-
}
164+
changeBackgroundColor('var(--gray-100)')
165+
// // based on the pathname, change the background
166+
// if (pathname.indexOf('/notebook') !== -1 || pathname.indexOf('/article') !== -1) {
167+
// changeBackgroundColor('#F4F1F8')
168+
// } else if (pathname.indexOf('/issue') !== -1) {
169+
// changeBackgroundColor('#F4F1F8')
170+
// } else if (pathname.indexOf('/submit') !== -1) {
171+
// changeBackgroundColor('var(--gray-100)')
172+
// } else if (pathname.indexOf('/about') !== -1) {
173+
// changeBackgroundColor('var(--linen)')
174+
// } else if (pathname.indexOf('/terms') !== -1) {
175+
// changeBackgroundColor('var(--peachpuff)')
176+
// } else {
177+
// changeBackgroundColor('var(--gray-100)')
178+
// }
173179
ReactGA.pageview(url)
174180
},
175181
[pathname, search, changeBackgroundColor]
@@ -215,7 +221,7 @@ export default function App() {
215221
<AppRoutes />
216222
</Suspense>
217223
</main>
218-
<Footer hideOnRoutes={['/article/', '/notebook-viewer/']}/>
224+
<Footer hideOnRoutes={['/article/', '/notebook-viewer/', '/cfp/', '/guidelines/']}/>
219225
<ScrollToTop />
220226
</Auth0ProviderWithHistory>
221227
</QueryParamProvider>

src/components/AbstractSubmissionPreview.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,23 +33,23 @@ const AbstractSubmissionPreview = ({
3333
].join('-')
3434

3535
return (
36-
<div className="p-3 shadow-sm rounded" style={{
36+
<div className="p-3 shadow-sm rounded small" style={{
3737
border: '1px solid var(--gray-300)'
3838
}}>
3939
<h3>{t('pages.abstractSubmission.preview')}</h3>
4040
<p>{isEmpty && (<>
41-
<Badge bg="info" pill>{t('badge.warning')}</Badge>&nbsp;
41+
<Badge bg="secondary" pill>{t('badge.warning')}</Badge>&nbsp;
4242
{t('labels.formSubmissionIncomplete')}
4343
</>)}
4444
{!isEmpty && !validatorResult.valid && (<>
45-
<Badge bg="warning" pill>{t('badge.danger')}</Badge>&nbsp;
45+
<Badge bg="secondary" pill>{t('badge.danger')}</Badge>&nbsp;
4646
<span dangerouslySetInnerHTML={{
4747
__html: t('missingStepsWithCount', { count: validatorResult.errors.length})
4848
}} />
4949
</>)}
5050
{validatorResult.valid && (
5151
<>
52-
<Badge bg="success" pill>{t('badge.success')}</Badge>&nbsp;
52+
<Badge bg="primary" pill>{t('badge.success')}</Badge>&nbsp;
5353
<span dangerouslySetInnerHTML={{
5454
__html: t('labels.formSubmissionReady')
5555
}} />
@@ -75,7 +75,7 @@ const AbstractSubmissionPreview = ({
7575
<span> ({t('dates.fromNow', {date: temporaryAbstractSubmission.getDateLastModified()})})</span>
7676
<br/>
7777
<div className="my-3 d-grid gap-2">
78-
<Button variant="outline-danger"
78+
<Button variant="outline-dark"
7979
size="sm"
8080
onClick={onReset}
8181
>

src/components/Article/ArticleBibliography.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ const ArticleBilbiography = ({
1010
className='mt-5'
1111
}) => {
1212
const { t } = useTranslation()
13-
13+
console.debug('[ArticleBilbiography] articleTree', articleTree, articleTree.bibliography)
14+
if (!articleTree.bibliography) {
15+
return null
16+
}
1417
return (
1518
<Container className={`ArticleBilbiography ${className}`}>
1619
<Row>

src/components/Article/ArticleHeader.js

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ const ArticleHeader = ({
2222
url,
2323
bibjson,
2424
children,
25-
isPreview=true
25+
isPreview=true,
26+
ignorePublicationStatus=false
2627
}) => {
2728
const { t } = useTranslation()
2829
const keywordsCleaned = keywords.reduce((acc, d) => {
@@ -35,15 +36,17 @@ const ArticleHeader = ({
3536
<Container className={`ArticleHeader ${className}`}>
3637
<Row>
3738
<Col {...BootstrapColumLayout}>
38-
<div className="mb-3">
39-
{t(`pages.article.status.${publicationStatus}`)}
40-
{publicationStatus === ArticleStatusPublished
41-
? <span> &mdash; <LangLink to={`issue/${issue.pid}`}>{issue?.name}</LangLink></span>
42-
: null}
43-
<br/>
44-
<b>{publicationDate.getFullYear()}</b>
45-
</div>
46-
<div className={`ArticleHeader_title my-3 ${variant}`}>
39+
{!ignorePublicationStatus &&
40+
<div className="mb-3">
41+
{t(`pages.article.status.${publicationStatus}`)}
42+
{publicationStatus === ArticleStatusPublished
43+
? <span> &mdash; <LangLink to={`issue/${issue.pid}`}>{issue?.name}</LangLink></span>
44+
: null}
45+
<br/>
46+
<b>{publicationDate.getFullYear()}</b>
47+
</div>
48+
}
49+
<div className={`ArticleHeader_title ${ignorePublicationStatus ? 'mb-3': 'my-3'} ${variant}`}>
4750
{title.map((paragraph, i) => (
4851
<ArticleCellContent key={i} {...paragraph} hideIdx hideNum/>
4952
))}
@@ -64,13 +67,13 @@ const ArticleHeader = ({
6467
</Col>
6568
))}
6669
</Row>
67-
{abstract.length
70+
{abstract.length > 0 && !ignorePublicationStatus
6871
? (
6972
<Row className="mt-5">
7073
<Col {...BootstrapColumLayout}>
7174
<h3>{t('pages.article.abstract')}</h3>
7275
<ArticleKeywords keywords={keywordsCleaned}/>
73-
<ArticleCitation disabled={isPreview} bibjson={bibjson} className="my-4 w-100"/>
76+
<ArticleCitation disabled={isPreview } bibjson={bibjson} className="my-4 w-100"/>
7477
<div className="ArticleHeader_abstract">
7578
{abstract.map((paragraph, i) => (
7679
<ArticleCellContent key={i} {...paragraph} hideIdx hideNum/>
@@ -80,6 +83,17 @@ const ArticleHeader = ({
8083
</Row>
8184
):null
8285
}
86+
{abstract.length > 0 && ignorePublicationStatus && (
87+
<Row className="mt-5">
88+
<Col {...BootstrapColumLayout}>
89+
<div className="ArticleHeader_abstract">
90+
{abstract.map((paragraph, i) => (
91+
<ArticleCellContent key={i} {...paragraph} hideIdx hideNum/>
92+
))}
93+
</div>
94+
</Col>
95+
</Row>
96+
)}
8397
{!!url && (
8498
<Row>
8599
<Col {...BootstrapColumLayout}>

0 commit comments

Comments
 (0)