diff --git a/README.md b/README.md index 18c7c77..693bd61 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,27 @@ -# clarity -Clarity is a refreshed version of the clean theme that prioritises accessibility +# Clarity + +A more modern theme for Janeway with a switchable colour palette system and accessibility improvements over the Clean theme. + +## Installation + +Clone or copy this theme into `src/themes/`, restart the server, then select **Clarity** under General Settings. + +## Repository Support + +Clarity includes repository (preprint) front-end templates. To enable them, add a local copy of the `REPOSITORY_THEMES` setting to your `settings.py` that includes `clarity`: + +```python +REPOSITORY_THEMES = [ + "OLH", + "material", + "clarity", +] +``` + +## Colour Palettes + +Clarity ships with five palettes: `evergreen`, `ocean`, `cardinal` and `midnight` (dark mode). To switch, edit the `@import` line near the top of `clarity.css`: + +```css +@import url('/static/clarity/css/evergreen.css'); +``` diff --git a/__init__.py b/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/assets/css/cardinal.css b/assets/css/cardinal.css new file mode 100644 index 0000000..b132ab7 --- /dev/null +++ b/assets/css/cardinal.css @@ -0,0 +1,98 @@ +:root { + /* Brand & Theme Colors */ + --brand-primary: #9b2c2c; + --brand-secondary: #c05555; + --text-link-alt: #7c2d2d; + --focus-shadow: #5a1515; + --color-success: #5cb85c; + /* Highlight color (shared across themes) */ + --highlight-color: #FFEB3B; + + /* Text Colors */ + /* Must pass WCAG color contrast at --recede-opacity */ + --text-primary: #212529; + --text-muted: #747474; + --text-on-dark: white; + --text-link: var(--body-text); + --text-black: #000; + --text-white: #fff; + --text-header: var(--text-black); + --body-text: #525252; + --nav-text: #636363; + --nav-text-active: var(--brand-primary); + --recede-opacity: 70%; + + /* Link Decoration */ + --link-decoration: underline; + --link-decoration-hover: underline; + --nav-link-decoration: none; + --nav-link-decoration-hover: underline; + --dropdown-item-decoration: none; + --dropdown-item-decoration-hover: underline; + --link-hover-color: var(--brand-primary); + --link-transition: color 0.2s ease; + + /* Background Colors */ + --bg-body: #fff; + --bg-content: white; + --bg-footer: #FCFCFC; + --bg-card-alt: #f8f9fa; + --bg-blockquote: #F0F0F0; + --bg-overlay: rgba(55, 55, 55, 0.8); + + /* UI State Colors */ + --color-success: green; + --color-danger: darkred; + + /* Border Colors */ + --border-light: #e5e5e5; + --border-medium: #6c757d; + --border-gray-200: rgb(229, 231, 235); + + /* Header & Navigation */ + --header-bg: var(--brand-primary); + --bg-nav: #fefeff; + + /* Button Colors */ + --btn-primary-bg: var(--brand-primary); + --btn-primary-border: var(--brand-primary); + --btn-primary-text: white; + --btn-outline-secondary: #6c757d; + + /* Focus & Accessibility */ + --focus-outline: #F9F9F9; + --focus-ring-size: 4px; + + /* Typography */ + --main-font: Geist, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; + + /* Spacing */ + --spacing-xs: 4px; + --spacing-sm: 8px; + --spacing-md: 15px; + --spacing-lg: 20px; + --spacing-xl: 30px; + + /* Sizes */ + --border-radius: 3px; + --border-radius-lg: 2rem; + --header-height: 120px; + --footer-height: 70px; + --card-image-height: 250px; + --carousel-min-height: 500px; + --icon-size: 16px; + + /* Transitions */ + --transition-standard: all 1s ease; + + /* Pagination Colors - Light Mode */ + --pagination-color: var(--body-text); + --pagination-bg: var(--bg-content); + --pagination-border: var(--border-light); + --pagination-hover-color: var(--brand-primary); + --pagination-hover-bg: var(--bg-card-alt); + --pagination-active-color: var(--btn-primary-text); + --pagination-active-bg: var(--btn-primary-bg); + --pagination-active-border: var(--btn-primary-border); + --pagination-disabled-color: var(--text-muted); +} \ No newline at end of file diff --git a/assets/css/clarity.css b/assets/css/clarity.css new file mode 100644 index 0000000..431e02c --- /dev/null +++ b/assets/css/clarity.css @@ -0,0 +1,1419 @@ +@import url('https://fonts.googleapis.com/css2?family=Geist:wght@100..900&display=swap'); + +/* Palette Selection - Use only one palette */ +@import url('/static/clarity/css/evergreen.css'); +/* @import url('/static/clarity/css/evergreen.css'); */ +/* @import url('/static/clean/css/ocean.css'); */ +/* @import url('/static/clean/css/cardinal.css'); */ + +/* ======================================================================== + Base Styles + ======================================================================== */ +html, +body { + height: 100%; +} + +body { + background-color: var(--bg-body); + font-family: var(--main-font); + font-weight: 400; + color: var(--body-text); + display: flex; + flex-direction: column; +} + +a { + overflow-wrap: break-word; + text-decoration: var(--link-decoration); + transition: var(--link-transition); +} + +a:hover, +a:focus { + text-decoration: var(--link-decoration-hover); + color: var(--link-hover-color); +} + +/* ======================================================================== + Typography + ======================================================================== */ +h1, h2, h3, h4, h5, h6 { + font-family: var(--main-font); + color: var(--text-header); +} + +h1 { font-size: 2rem; } +h2 { font-size: 1.5rem; } +h3 { font-size: 1.25rem; } +h4 { font-size: 1.125rem; } +h5 { font-size: 1rem; } +h6 { font-size: 0.875rem; } + +.editor-name { + font-size: 1.25rem; +} + +.byline { + font-size: 1rem; + font-family: var(--main-font); + margin-bottom: 0.5rem; + font-weight: 400; + line-height: 1.2; +} + +.text-muted { + color: var(--text-muted) !important; +} + +/* ======================================================================== + Layout Components + ======================================================================== */ +main.container { + padding-left: 0; + padding-right: 0; +} + +.site-header .container, +.navbar .container { + padding-inline: 0; +} + +.site-header { + background-color: var(--header-bg); + line-height: 1; + border-bottom: 1px solid var(--border-light); + padding: var(--spacing-md); + color: var(--text-on-dark); +} + +main { + margin-top: var(--spacing-lg); + padding-left: var(--spacing-lg); + padding-right: var(--spacing-lg); +} + +main a { + color: var(--text-link); +} + +#footer { + margin-top: auto; +} + +/* ======================================================================== + Navigation + ======================================================================== */ +.navbar { + padding: 0; + border-bottom: 1px solid var(--border-gray-200); +} + +.navbar-custom .navbar-nav .nav-link, +.navbar-custom .nav-link.dropdown-toggle, +.navbar-dark.navbar-custom .navbar-nav .nav-link, +.navbar-dark.navbar-custom .nav-link.dropdown-toggle { + color: var(--nav-text); + text-decoration: var(--nav-link-decoration); +} + +.navbar-custom .navbar-nav .nav-link:hover, +.navbar-custom .navbar-nav .nav-link:focus, +.navbar-custom .nav-link.dropdown-toggle:hover, +.navbar-custom .nav-link.dropdown-toggle:focus, +.navbar-dark.navbar-custom .navbar-nav .nav-link:hover, +.navbar-dark.navbar-custom .navbar-nav .nav-link:focus, +.navbar-dark.navbar-custom .nav-link.dropdown-toggle:hover, +.navbar-dark.navbar-custom .nav-link.dropdown-toggle:focus { + text-decoration: var(--nav-link-decoration-hover); + color: var(--nav-text-active); +} + +.navbar-custom .nav-item.active .nav-link, +.navbar-custom .nav-item:hover .nav-link, +.navbar-custom .nav-item:focus-visible .nav-link, +.navbar-dark.navbar-custom .nav-item.active .nav-link, +.navbar-dark.navbar-custom .nav-item:hover .nav-link, +.navbar-dark.navbar-custom .nav-item:focus-visible .nav-link { + color: var(--nav-text-active); +} + +.dropdown-toggle::after { + display: inline-block; + margin-left: .255em; + vertical-align: .255em; + content: ""; + border: none; + width: 0.4em; + height: 0.4em; + border-right: 2px solid currentColor; + border-bottom: 2px solid currentColor; + transform: rotate(45deg); + margin-top: -0.1em; +} + +/* Dropdown menu container */ +.dropdown-menu { + padding: var(--focus-ring-size); + background-color: var(--bg-content); + border: 1px solid var(--border-light); +} + +/* Dropdown item styles - standardized with nav-link behavior */ +.dropdown-item { + color: var(--nav-text); + text-decoration: var(--dropdown-item-decoration); + transition: var(--link-transition); +} + +.dropdown-item:hover, +.dropdown-item:focus { + color: var(--nav-text-active); + text-decoration: var(--dropdown-item-decoration-hover); + background-color: var(--bg-card-alt); +} + +.dropdown-divider { + border-top-color: var(--border-light); +} + +/* ======================================================================== + Cards + ======================================================================== */ +.card { + margin-bottom: var(--spacing-md) !important; + display: flex; + flex-direction: column; + box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1); + border-radius: 8px; + border: 1px solid rgba(0, 0, 0, 0.06); + transition: box-shadow 0.3s ease; + background-color: var(--bg-content); +} + +.card:hover { + box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15); +} + +.card-link { + text-decoration: none; +} + +.card-link:hover { + text-decoration: var(--link-decoration-hover); +} + +.card img { + max-height: var(--card-image-height); + object-fit: cover; +} + +.card-img-top { + height: 200px; + object-fit: cover; + width: 100%; +} + +.card-body { + flex-grow: 1; + display: flex; + flex-direction: column; + justify-content: space-between; +} + +.card-footer { + background: none; +} + +.card.no-image { + min-height: 200px; + background-color: var(--bg-card-alt); +} + +.card.no-image .card-img-overlay { + position: relative; + background-color: var(--bg-card-alt); + padding: 1.25rem; +} + +.card.no-image .card-img-overlay.white-text { + color: var(--text-primary); +} + +.card.no-image .card-img-overlay.white-text a { + color: var(--text-link); +} + +.card.no-image .card-img-overlay.white-text a:hover, +.card.no-image .card-img-overlay.white-text a:focus { + color: var(--brand-primary); +} + +.card-block { + padding: var(--spacing-lg); +} + +.card-title { + font-size: 1.5rem; +} + +.full-width-card { + min-width: 100%; +} + +/* ======================================================================== + Buttons + ======================================================================== */ +.btn-primary, +.btn-primary:active, +.btn-primary:visited { + background-color: var(--btn-primary-bg); + border-color: var(--btn-primary-border); + color: var(--btn-primary-text); +} + +.btn-primary:hover, +.btn-primary:focus { + color: var(--btn-primary-text); + background-color: var(--btn-primary-bg); + border-color: var(--btn-primary-border); +} + +.btn-background, +.btn-background:active, +.btn-background:visited { + background-color: inherit; + color: inherit; + border: 1px solid var(--brand-primary); + padding: 0 10px; + min-width: 7rem; + min-height: 2rem; + white-space: nowrap; + vertical-align: middle; + line-height: 1; +} + +.btn-background:not(:first-child) { + margin-left: 0.5rem; +} + +.btn-background:hover { + color: var(--text-on-dark); + background-color: var(--brand-primary); + border-color: var(--brand-primary); + transition: var(--transition-standard); +} + +a.btn { + text-decoration: none; +} + +.dropdown-button { + background: inherit; + font-family: inherit; + font-weight: inherit; + border: 0; +} + +.background-button { + border: 0; + background: transparent; +} + +.alert .close { + color: var(--color-danger); + opacity: var(--recede-opacity); +} + +.btn-outline-secondary { + color: var(--btn-outline-secondary); + border-color: var(--btn-outline-secondary); + background-color: transparent; +} + +.btn-outline-secondary:hover, +.btn-outline-secondary:focus { + color: var(--brand-primary); + background-color: transparent; + border-color: var(--brand-primary); +} + +.btn-outline-secondary:focus { + box-shadow: 0 0 0 var(--focus-ring-size) rgba(167, 172, 177, 0.25); +} + +/* ======================================================================== + Carousel + ======================================================================== */ +.carousel { + height: var(--carousel-min-height); + box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1); + border-radius: 8px; + overflow: hidden; + margin-bottom: 2rem; +} + +.carousel-inner { + height: 100%; + border-radius: 8px; +} + +.carousel-item { + height: 100%; +} + +.carousel-min { + min-width: 100%; + height: var(--carousel-min-height); +} + +.carousel-min img { + width: 100%; + height: 100%; + object-fit: cover; +} + +.carousel-caption { + left: 0; + right: 0; + bottom: 0; + background: linear-gradient(transparent, rgba(0, 0, 0, var(--recede-opacity)) 20%); + padding: 2rem; + text-align: center; +} + +.carousel-caption a, +.carousel-caption h2 a { + color: var(--text-on-dark); +} + +.carousel-caption h3 a { + color: var(--text-on-dark); + font-size: 1.5rem; + font-weight: 500; +} + +.carousel-caption p { + color: var(--text-on-dark); + margin-bottom: 1rem; +} + +.carousel-control-next, +.carousel-control-prev { + top: 40px; + opacity: var(--recede-opacity); +} + +#carousel-buttons { + margin-left: 100px; + position: absolute; + top: 5px; + right: 5px; +} + +/* ======================================================================== + Article Styles + ======================================================================== */ +.article-title { + font-size: 1.25rem; + margin-bottom: 0.25rem; + font-weight: 500; + line-height: 1.3; + color: var(--text-header); +} + +.article-thumbnail { + object-fit: cover; +} + +.article-img { + filter: brightness(50%); +} + +.article-menu h2 { + font-size: 1.5rem; +} + +.article-authors { + color: var(--text-muted); + margin-bottom: 0.5rem; + font-weight: 400; +} + +.article-meta { + display: flex; + flex-wrap: wrap; + gap: 1rem; + color: var(--text-muted); + margin-top: 0.5rem; +} + +.meta-item { + display: inline-flex; + align-items: center; + gap: 0.25rem; +} + +.article-item { + padding: 1.25rem 0; + border-bottom: 1px solid var(--border-light); +} + +.article-item:last-child { + border-bottom: none; + padding-bottom: 0; +} + +.article-link { + color: inherit; +} + +.article-link:hover .article-title { + color: var(--link-hover-color); + transition: var(--link-transition); +} + +.article-table { + display: block; + overflow-x: scroll; + width: 100%; + margin-bottom: 1rem; + color: var(--text-primary); +} + +.article-table th, +.article-table td { + padding: 0.75rem; + vertical-align: top; + border-top: 1px solid var(--border-medium); +} + +.article-table thead th { + vertical-align: bottom; + border-bottom: 2px solid var(--border-medium); +} + +.article-table tbody + tbody { + border-top: 2px solid var(--border-medium); +} + +.article-table-sm th, +.article-table-sm td { + padding: 0.3rem; +} + +#main_article { + margin-top: var(--spacing-xl); +} + +#main_article img { + max-width: 100%; +} + +#article blockquote { + background: var(--bg-blockquote); + border-left: 10px solid var(--brand-primary); + margin: 1.5em 10px; + padding: 0.5em 10px; +} + +#article iframe { + max-width: 100%; + height: auto; + aspect-ratio: 16/9; + margin: 1rem 0; +} + +#reflist ul { + padding-left: 0; +} + +#reflist li { + word-wrap: break-word; + list-style-type: none; + padding-bottom: var(--spacing-sm); +} + +#reading-options{ + display: flex; + gap: 1rem; + margin: 0; + padding: 9px; + justify-content: flex-end; + min-height: fit-content; + box-sizing: border-box; + position: sticky; + top: 0; + z-index: 1000; + width: fit-content; + margin-left: auto; + background-color: var(--bg-body); +} + +.btn-opt { + border: 1px solid #1C304A; + background: #f1f1f1; +} + +.dyslexia-friendly { + font-family: Verdana !important; + color: #4c4c4c; + background-color: #F5F5DC; +} + +.dyslexia-friendly em, +.dyslexia-friendly i { + background-color: #FAFAC8; + font-style: normal; +} + +.dyslexia-friendly a { + font-family: inherit; + color: inherit; + text-decoration: underline; +} + +/* ======================================================================== + Thumbnail Styles + ======================================================================== */ +.thumbnail-container { + position: relative; + width: 80px; + height: 80px; + flex-shrink: 0; +} + +.article-thumbnail { + width: 100%; + height: 100%; + border-radius: 8px; + object-fit: cover; + display: block; +} + +.article-thumbnail[src*="journal_cover_download"], +.article-thumbnail[src*="article.png"] { + object-fit: contain; +} + +.thumbnail-fallback { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + border-radius: 8px; + background-color: var(--brand-primary); + color: white; + display: none; + align-items: center; + justify-content: center; + font-weight: 600; + font-size: 1.2rem; + text-transform: uppercase; +} + +.thumbnail-container.fallback-active .article-thumbnail { + display: none !important; +} + +.thumbnail-container.fallback-active .thumbnail-fallback { + display: flex !important; +} + +/* ======================================================================== + Journal Styles + ======================================================================== */ +.journal-name { + font-size: 2.5rem; + margin-bottom: 0.5rem; + font-weight: 500; + line-height: 1.2; +} + +.journal-card-title { + margin-bottom: 0; + font-size: 13px; +} + +.journal-div { + padding-bottom: var(--spacing-md); +} + +.journal-button-block { + margin-top: var(--spacing-xs); + margin-bottom: var(--spacing-xs); +} + +/* ======================================================================== + Issue & Content Sections + ======================================================================== */ +.homepage-element-wrapper:not(:first-child) { + margin-block: 2rem; +} + +.issue-section { + background: var(--bg-content); + border-radius: 8px; + box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1); + border: 1px solid rgba(0, 0, 0, 0.06); + margin-bottom: 2rem; + padding: 2rem; +} + +.section-title { + margin-bottom: 1.5rem; + padding-bottom: 0.5rem; + border-bottom: 2px solid var(--border-light); + color: var(--text-header); + font-weight: 600; +} + +.additional-issues { + margin-top: 1rem; + padding-top: 1rem; + border-top: 1px solid var(--border-light); +} + +.also-part-of { + font-weight: 400; + font-size: 0.9rem; + margin-bottom: 0.25rem; + color: var(--text-muted); +} + +.additional-issue-link { + display: block; + margin-bottom: 0.25rem; + font-size: 0.9rem; + color: var(--text-muted); +} + +.search-results .article-item, +section[aria-label*="Results"] .article-item { + background: var(--bg-content); + border-radius: 8px; + box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1); + border: 1px solid rgba(0, 0, 0, 0.06); + padding: 2rem; + margin-bottom: 1.5rem; +} + +.sticky-top { + max-height: 100vh; + overflow-y: auto; +} + +/* ======================================================================== + Footer + ======================================================================== */ +.site-footer { + padding: 2.5rem var(--spacing-md); + color: var(--text-muted); + text-align: center; + background-color: var(--bg-footer); + border-top: 0.05rem solid var(--border-light); +} + +.site-footer a { + color: var(--text-link-alt); +} + +.site-footer p:last-child { + margin-bottom: 0; +} + +footer svg, +footer img, +footer .img-fluid{ + max-height: var(--footer-height); + max-width: 100%; +} + +header svg { + max-height: var(--header-height); + max-width: 100%; +} + +/* ======================================================================== + Form Elements + ======================================================================== */ +.homepage-element-search-bar input[type="text"] { + font-size: 1.5rem; +} + +.homepage-element-search-bar .input-group-text { + font-size: 1.5rem; +} + +.input-group .form-control, +.input-group .custom-select, +.input-group .input-group-text { + margin: 0 !important; + border-radius: 0; +} + +.input-group > .custom-select:last-child { + border-top-right-radius: .25rem; + border-bottom-right-radius: .25rem; +} + +.input-group-prepend > .input-group-text { + border-top-left-radius: .25rem; + border-bottom-left-radius: .25rem; +} + +.input-group { + align-items: stretch; +} + +.input-group .custom-select, +.input-group .input-group-text { + height: 2.5rem; + display: flex; + align-items: center; +} + +.input-group{ + display: flex; + flex-wrap: nowrap; +} + +.input-group > input { + flex: 1; + min-width: 0; +} + +.input-group > input.group-append{ + flex-shrink: 0; + align-items: center; + display: flex; +} + +.input-group .btn { + margin: 0; + height: 100%; + border-radius: 0 .25rem .25rem 0; +} + +.badge-secondary { + background-color: var(--brand-secondary); + color: #fff; +} + +input + .btn-background { + height: 2.4375rem; +} + +span + .btn-background { + height: auto; + min-height: 1.8rem; +} + +/* ======================================================================== + Utility Classes + ======================================================================== */ +.white-text { + color: var(--text-on-dark); +} + +.white-text a { + color: var(--text-on-dark); +} + +.white-text a:hover, +.white-text a:focus { + color: var(--text-on-dark); +} + +.header-image { + max-height: var(--header-height); +} + +.draw-attention { + background-color: var(--highlight-color); + transition: background-color 2s ease-out; +} + +.sticky-toc { + position: sticky; + max-height: 100vh; + overflow-y: auto; + top: 60px; + z-index: 999; +} + +.table-caption { + margin-bottom: var(--spacing-sm); +} + +.math-formulae { + overflow-x: auto; + padding-bottom: 1rem; +} + +/* ======================================================================== + Icons + ======================================================================== */ +.fa-check { + color: var(--color-success); +} + +.fa-times { + color: var(--color-danger); +} + +.orcid-img { + height: var(--icon-size); + width: var(--icon-size); + display: inline-block; +} + +.icon-recede{ + opacity: var(--recede-opacity); +} + +.superscript-icon { + vertical-align: super; + font-size: 0.7em !important; +} + +.pad-icon { + padding-left: 0.4rem; + padding-right: 0.4rem; +} + + +/* ======================================================================== + Lists + ======================================================================== */ +.no-bullet-list { + list-style-type: none; + padding-left: 0; + margin-left: 0; +} + +.keywords-list { + list-style: none; + padding-left: 0; + margin: 0; + white-space: normal; + margin-bottom: 1rem; +} + +.keywords-list li { + display: inline-block; +} + +.back-links-list { + list-style: none; + padding-left: 0.2rem; + margin: 0; + display: inline; + white-space: normal; +} + +.back-links-list li { + margin: 0; + padding-left: 0.1rem; + display: inline; + white-space: normal; +} + +.back-links-list li:not(:last-child)::after { + content: " "; +} + +.section-link { + white-space: nowrap; +} + +.section-link:not(:first-of-type) { + margin-left: 0.5rem; +} + +/* ======================================================================== + Grid Utilities + ======================================================================== */ +.row-eq-height { + display: flex; +} + +.row-smaller-gutters { + margin-left: -9px; + margin-right: -9px; +} + +.row-smaller-gutters > div[class^="col"] { + padding-left: 9px; + padding-right: 9px; +} + +/* ======================================================================== + Pagination + ======================================================================== */ +.site-pagination { + margin-bottom: 4rem; +} + +.site-pagination > .btn { + border-radius: var(--border-radius-lg); +} + +.pagination { + display: flex; + padding-left: 0; + list-style: none; + gap: 4px; +} + +.page-item { + margin: 0; +} + +.page-link { + position: relative; + display: block; + padding: 0.5rem 0.75rem; + color: var(--pagination-color); + background-color: var(--pagination-bg); + border: 1px solid var(--pagination-border); + border-radius: var(--border-radius); + transition: var(--link-transition); + cursor: pointer; + text-decoration: none; +} + +.page-link:hover, +.page-link:focus { + color: var(--pagination-hover-color); + background-color: var(--pagination-hover-bg); + border-color: var(--border-medium); +} + +.page-link:focus { + z-index: 2; + outline: 2px solid var(--focus-outline); + outline-offset: 2px; +} + +.page-item.active .page-link { + color: var(--pagination-active-color); + background-color: var(--pagination-active-bg); + border-color: var(--pagination-active-border); + font-weight: 600; +} + +.page-item.active .page-link:hover { + background-color: var(--pagination-active-bg); + border-color: var(--pagination-active-border); +} + +.page-link[disabled], +.page-link:disabled { + color: var(--pagination-disabled-color); + pointer-events: none; + background-color: transparent; + border-color: var(--pagination-border); + cursor: not-allowed; + opacity: 0.6; +} + +/* ======================================================================== + Contact + ======================================================================== */ +.contact h3 { + font-size: 1.6rem; +} + +.contact h4 { + font-size: 1.3rem; +} + +/* ======================================================================== + Table Footnotes + ======================================================================== */ +.table-foot .table-footnotes li.fn { + list-style-type: none; +} + +/* ======================================================================== + Modal + ======================================================================== */ +.modal-sticky-close { + position: sticky; + top: 0.2rem; + right: 0.2rem; + z-index: 1050; + float: right; + margin-bottom: 0.2rem; + min-width: 24px; + min-height: 24px; +} + +/* ======================================================================== + Accessibility & Skip Navigation + ======================================================================== */ +.skip-container { + text-align: left; +} + +.skip-container a { + position: absolute; + left: -10000px; + width: 1px; + height: 1px; + overflow: hidden; + color: var(--text-link); +} + +.skip-container a:focus, +.skip-container a:active { + position: static; + left: 0; + width: auto; + height: auto; + overflow: visible; +} + +/* Focus Management */ +button, input, select, textarea, [tabindex]:not([tabindex="-1"]), +.dropdown-menu, .dropdown-item, .nav-link, .nav-link a, .btn { + margin: var(--focus-ring-size); +} + +p a, span a, li a { + margin: calc(-1 * var(--focus-ring-size)); + padding: var(--focus-ring-size); + box-sizing: border-box; +} + +.dropdown-menu a, +.dropdown-menu button, +.dropdown-menu .dropdown-item { + margin: 0; +} + +.article-block a, +.site-header a, +.site-footer a, +.article-item a, +.carousel-caption a, +p a, +li a { + display: inline-block; +} + +.dropdown-item:focus { + white-space: nowrap; +} + +.dropdown-menu { + padding: var(--focus-ring-size); +} + +.form-check:has(input:focus-visible), +.form-check:has(select:focus-visible), +.form-check:has(textarea:focus-visible) { + outline: 2px var(--focus-outline) solid; + outline-offset: 0; + box-shadow: 0 0 0 var(--focus-ring-size) var(--focus-shadow); + display: block; + white-space: normal; +} + +.form-check input:focus-visible { + outline: none; + box-shadow: none; +} + +/* Universal Focus Styles - Only show on keyboard navigation */ +*:focus-visible { + outline: 2px var(--focus-outline) solid; + outline-offset: 0; + box-shadow: 0 0 0 var(--focus-ring-size) var(--focus-shadow); +} + +a:focus-visible { + outline: 2px var(--focus-outline) solid; + outline-offset: 0; + box-shadow: 0 0 0 var(--focus-ring-size) var(--focus-shadow); + display: inline-block; + white-space: normal; +} + +main a:focus-visible, +.site-footer a:focus-visible, +#lightbox a:focus-visible, +.navbar-custom .nav-link:focus-visible, +.navbar-custom .navbar-brand:focus-visible, +.navbar-dark.navbar-custom .nav-link:focus-visible, +.btn:focus-visible, +.btn-primary:focus-visible, +.btn-secondary:focus-visible, +.btn-success:focus-visible, +.btn-danger:focus-visible, +.btn-warning:focus-visible, +.btn-info:focus-visible, +.btn-light:focus-visible, +.btn-dark:focus-visible, +.site-pagination > .btn:focus-visible, +.pagination button:focus-visible, +input[type="text"]:focus-visible, +input[type="email"]:focus-visible, +input[type="password"]:focus-visible, +input[type="search"]:focus-visible, +input[type="number"]:focus-visible, +input[type="date"]:focus-visible, +input[type="datetime-local"]:focus-visible, +input[type="file"]:focus-visible, +input[type="submit"]:focus-visible, +.form-control.is-valid:focus-visible, +.form-control.is-invalid:focus-visible, +textarea.tinymce:focus-visible, +.custom-select:focus-visible, +.modal-sticky-close:focus-visible { + outline: 2px var(--focus-outline) solid; + outline-offset: 0; + box-shadow: 0 0 0 var(--focus-ring-size) var(--focus-shadow); +} + +.carousel-control-next:focus-visible, +.carousel-control-prev:focus-visible{ + outline: 2px var(--focus-outline) solid; + outline-offset: 0; + box-shadow: 0 0 0 var(--focus-ring-size) var(--focus-shadow); + opacity: 1; +} + +/* ======================================================================== + Media Queries + ======================================================================== */ +@media screen and (max-width: 990px) { + .article-title { + font-size: 1.1em !important; + } +} + +@media screen and (max-width: 764px) { + .article-title { + font-size: 0.9em !important; + } + + p { + font-size: 0.7em !important; + margin-bottom: var(--spacing-sm); + } + + .card-img-overlay { + padding: 10px; + } + + .card img { + min-height: 220px; + object-fit: cover; + } + + .journal-name { + font-size: 1.4rem; + } +} + +@media (min-width: 768px) { + .row { + display: flex; + flex-direction: row; + } + .journal-container { + order: 1; + } + .col-lg-4.col-md-2 { + order: 2; + } +} + +/* ======================================================================== + Issue Cards - Horizontal Layout + ======================================================================== */ +.issues-grid { + display: grid; + grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); + gap: 1.5rem; + margin-top: 2rem; + margin-bottom: 2rem; +} + +.issue-card { + background: var(--bg-content); + border-radius: 8px; + box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1); + border: 1px solid rgba(0, 0, 0, 0.06); + overflow: hidden; + transition: box-shadow 0.3s ease; +} + +.issue-card:hover { + box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15); +} + +.issue-card-inner { + display: flex; + height: 195px; +} + +.issue-content { + width: 60%; + padding: 1.5rem; + display: flex; + flex-direction: column; + justify-content: space-between; +} + +.issue-title { + font-size: 1.1rem; + font-weight: 600; + color: var(--text-header); + margin-bottom: 0.5rem; + line-height: 1.3; +} + +.issue-date { + color: var(--text-muted); + font-size: 0.9rem; + margin-bottom: 0.25rem; +} + +.issue-count { + color: var(--text-muted); + font-size: 0.9rem; + margin-bottom: 1rem; +} + +.no-issues { + grid-column: 1 / -1; +} + +/* Responsive adjustments */ +@media (max-width: 768px) { + .issues-grid { + grid-template-columns: 1fr; + gap: 1rem; + } + + .issue-card-inner { + height: 200px; + } + + .issue-content { + padding: 1rem; + } + + .issue-title { + font-size: 1rem; + } +} + +/* ======================================================================== + Repository + ======================================================================== */ +.repo-hero { + background-color: var(--header-bg); + color: var(--text-on-dark); + text-align: center; + padding: 3.5rem 1.5rem; + margin-bottom: 2rem; + border-radius: 8px; +} + +.repo-hero h1 { + color: var(--text-on-dark); + font-size: 2.5rem; + margin-bottom: 0.75rem; +} + +.repo-hero .lead { + color: var(--text-on-dark); + opacity: 0.85; + max-width: 640px; + margin: 0 auto; +} + +.repo-hero-image .card-img-overlay { + justify-content: center; + text-align: center; +} + +.preprint-card-grid { + display: grid; + grid-template-columns: 1fr; + gap: 1rem; + margin-bottom: 1.5rem; +} + +@media (min-width: 576px) { + .preprint-card-grid { grid-template-columns: repeat(2, 1fr); } +} + +@media (min-width: 992px) { + .preprint-card-grid { grid-template-columns: repeat(3, 1fr); } +} + +/* ======================================================================== + Article Sidebar Lists + ======================================================================== */ +.article-menu ul { + padding-left: 20px; +} + +.article-menu ul li { + position: relative; +} + +.article-menu ul li a { + color: var(--text-link); +} + +.article-menu ul li a:hover { + color: var(--brand-primary); +} + +/* ======================================================================== + Article Tables + ======================================================================== */ +#main_article table { + width: 100%; + margin-bottom: 1rem; + background-color: transparent; + border-collapse: collapse; +} + +#main_article table th, +#main_article table td { + padding: 0.75rem; + vertical-align: top; + border-top: 1px solid var(--border-light); +} + +#main_article table thead th { + vertical-align: bottom; + border-bottom: 2px solid var(--border-medium); + background-color: var(--bg-card-alt); + font-weight: bold; + color: var(--text-header); +} + +#main_article table tbody tr:hover { + background-color: rgba(0, 0, 0, 0.02); +} + +#main_article table tbody + tbody { + border-top: 2px solid var(--border-medium); +} + +/* Responsive table wrapper */ +#main_article .table-responsive { + display: block; + width: 100%; + overflow-x: auto; + -webkit-overflow-scrolling: touch; +} diff --git a/assets/css/evergreen.css b/assets/css/evergreen.css new file mode 100644 index 0000000..a12a25c --- /dev/null +++ b/assets/css/evergreen.css @@ -0,0 +1,98 @@ +:root { + /* Brand & Theme Colors */ + --brand-primary: #047a59; + --brand-secondary: #4F637D; + --text-link-alt: #00688B; + --focus-shadow: #193146; + --color-success: #5cb85c; + /* Highlight color (shared across themes) */ + --highlight-color: #FFEB3B; + + /* Text Colors */ + /* Must pass WCAG color contrast at --recede-opacity */ + --text-primary: #212529; + --text-muted: #747474; + --text-on-dark: white; + --text-link: var(--body-text); + --text-black: #000; + --text-white: #fff; + --text-header: var(--text-black); + --body-text: #525252; + --nav-text: #636363; + --nav-text-active: var(--brand-primary); + --recede-opacity: 70%; + + /* Link Decoration */ + --link-decoration: underline; + --link-decoration-hover: underline; + --nav-link-decoration: none; + --nav-link-decoration-hover: underline; + --dropdown-item-decoration: none; + --dropdown-item-decoration-hover: underline; + --link-hover-color: var(--brand-primary); + --link-transition: color 0.2s ease; + + /* Background Colors */ + --bg-body: #fff; + --bg-content: white; + --bg-footer: #FCFCFC; + --bg-card-alt: #f8f9fa; + --bg-blockquote: #F0F0F0; + --bg-overlay: rgba(55, 55, 55, 0.8); + + /* UI State Colors */ + --color-success: green; + --color-danger: darkred; + + /* Border Colors */ + --border-light: #e5e5e5; + --border-medium: #6c757d; + --border-gray-200: rgb(229, 231, 235); + + /* Header & Navigation */ + --header-bg: var(--brand-primary); + --bg-nav: #fefeff; + + /* Button Colors */ + --btn-primary-bg: var(--brand-primary); + --btn-primary-border: var(--brand-primary); + --btn-primary-text: white; + --btn-outline-secondary: #6c757d; + + /* Focus & Accessibility */ + --focus-outline: #F9F9F9; + --focus-ring-size: 4px; + + /* Typography */ + --main-font: Geist, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; + + /* Spacing */ + --spacing-xs: 4px; + --spacing-sm: 8px; + --spacing-md: 15px; + --spacing-lg: 20px; + --spacing-xl: 30px; + + /* Sizes */ + --border-radius: 3px; + --border-radius-lg: 2rem; + --header-height: 120px; + --footer-height: 70px; + --card-image-height: 250px; + --carousel-min-height: 500px; + --icon-size: 16px; + + /* Transitions */ + --transition-standard: all 1s ease; + + /* Pagination Colors - Light Mode */ + --pagination-color: var(--body-text); + --pagination-bg: var(--bg-content); + --pagination-border: var(--border-light); + --pagination-hover-color: var(--brand-primary); + --pagination-hover-bg: var(--bg-card-alt); + --pagination-active-color: var(--btn-primary-text); + --pagination-active-bg: var(--btn-primary-bg); + --pagination-active-border: var(--btn-primary-border); + --pagination-disabled-color: var(--text-muted); +} \ No newline at end of file diff --git a/assets/css/midnight.css b/assets/css/midnight.css new file mode 100644 index 0000000..4ad24d9 --- /dev/null +++ b/assets/css/midnight.css @@ -0,0 +1,95 @@ +:root { + /* Brand & Theme Colors */ + --brand-primary: #0a0f1a; + --brand-secondary: #7eb3ff; + --color-success: #5cb85c; + --text-link-alt: #6ba3ff; + --focus-shadow: #2563a8; + --highlight-color: #ffd93d; + + /* Text Colors */ + --text-primary: #e4e6eb; + --text-muted: #b0b3b8; + --text-on-dark: white; + --text-link: #9bb1d4; + --text-black: #e4e6eb; + --text-white: #0a0f1a; + --text-header: #ffffff; + --body-text: #e4e6eb; + --nav-text: #b0b3b8; + --nav-text-active: #4d9fff; + --recede-opacity: 70%; + + /* Link Decoration */ + --link-decoration: underline; + --link-decoration-hover: underline; + --nav-link-decoration: none; + --nav-link-decoration-hover: underline; + --link-hover-color: #4d9fff; + --link-transition: color 0.2s ease; + --dropdown-item-decoration: none; + --dropdown-item-decoration-hover: underline; + + /* Background Colors */ + --bg-body: #0a0f1a; + --bg-content: #151b2b; + --bg-footer: #0d1219; + --bg-card-alt: #1a2235; + --bg-blockquote: #1a2235; + --bg-overlay: rgba(10, 15, 26, 0.9); + + /* UI State Colors */ + --color-danger: #ff6b6b; + + /* Border Colors */ + --border-light: #2d3748; + --border-medium: #4a5568; + --border-gray-200: #2d3748; + + /* Header & Navigation */ + --header-bg: #0a0f1a; + --bg-nav: #0d1219; + + /* Button Colors */ + --btn-primary-bg: #4d9fff; + --btn-primary-border: #4d9fff; + --btn-primary-text: #0a0f1a; + --btn-outline-secondary: #a7acb1; + + /* Focus & Accessibility */ + --focus-outline: #4d9fff; + --focus-ring-size: 4px; + + /* Typography */ + --main-font: Geist, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; + + /* Spacing */ + --spacing-xs: 4px; + --spacing-sm: 8px; + --spacing-md: 15px; + --spacing-lg: 20px; + --spacing-xl: 30px; + + /* Sizes */ + --border-radius: 3px; + --border-radius-lg: 2rem; + --header-height: 120px; + --footer-height: 70px; + --card-image-height: 250px; + --carousel-min-height: 500px; + --icon-size: 16px; + + /* Transitions */ + --transition-standard: all 1s ease; + + /* Pagination Colors - Dark Mode */ + --pagination-color: #a7acb1; + --pagination-bg: transparent; + --pagination-border: var(--border-light); + --pagination-hover-color: var(--text-on-dark); + --pagination-hover-bg: var(--bg-card-alt); + --pagination-active-color: var(--btn-primary-text); + --pagination-active-bg: var(--btn-primary-bg); + --pagination-active-border: var(--btn-primary-border); + --pagination-disabled-color: var(--text-muted); +} diff --git a/assets/css/ocean.css b/assets/css/ocean.css new file mode 100644 index 0000000..27ec913 --- /dev/null +++ b/assets/css/ocean.css @@ -0,0 +1,98 @@ +:root { + /* Brand & Theme Colors */ + --brand-primary: #1e3a5f; + --brand-secondary: #5a7a9e; + --text-link-alt: #2563a8; + --focus-shadow: #2a4a6e; + --color-success: #5cb85c; + /* Highlight color (shared across themes) */ + --highlight-color: #FFEB3B; + + /* Text Colors */ + /* Must pass WCAG color contrast at --recede-opacity */ + --text-primary: #212529; + --text-muted: #747474; + --text-on-dark: white; + --text-link: var(--body-text); + --text-black: #000; + --text-white: #fff; + --text-header: var(--text-black); + --body-text: #525252; + --nav-text: #636363; + --nav-text-active: var(--brand-primary); + --recede-opacity: 70%; + + /* Link Decoration */ + --link-decoration: underline; + --link-decoration-hover: underline; + --nav-link-decoration: none; + --nav-link-decoration-hover: underline; + --dropdown-item-decoration: none; + --dropdown-item-decoration-hover: underline; + --link-hover-color: var(--brand-primary); + --link-transition: color 0.2s ease; + + /* Background Colors */ + --bg-body: #fff; + --bg-content: white; + --bg-footer: #FCFCFC; + --bg-card-alt: #f8f9fa; + --bg-blockquote: #F0F0F0; + --bg-overlay: rgba(55, 55, 55, 0.8); + + /* UI State Colors */ + --color-success: green; + --color-danger: darkred; + + /* Border Colors */ + --border-light: #e5e5e5; + --border-medium: #6c757d; + --border-gray-200: rgb(229, 231, 235); + + /* Header & Navigation */ + --header-bg: var(--brand-primary); + --bg-nav: #fefeff; + + /* Button Colors */ + --btn-primary-bg: var(--brand-primary); + --btn-primary-border: var(--brand-primary); + --btn-primary-text: white; + --btn-outline-secondary: #6c757d; + + /* Focus & Accessibility */ + --focus-outline: #F9F9F9; + --focus-ring-size: 4px; + + /* Typography */ + --main-font: Geist, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; + + /* Spacing */ + --spacing-xs: 4px; + --spacing-sm: 8px; + --spacing-md: 15px; + --spacing-lg: 20px; + --spacing-xl: 30px; + + /* Sizes */ + --border-radius: 3px; + --border-radius-lg: 2rem; + --header-height: 120px; + --footer-height: 70px; + --card-image-height: 250px; + --carousel-min-height: 500px; + --icon-size: 16px; + + /* Transitions */ + --transition-standard: all 1s ease; + + /* Pagination Colors - Light Mode */ + --pagination-color: var(--body-text); + --pagination-bg: var(--bg-content); + --pagination-border: var(--border-light); + --pagination-hover-color: var(--brand-primary); + --pagination-hover-bg: var(--bg-card-alt); + --pagination-active-color: var(--btn-primary-text); + --pagination-active-bg: var(--btn-primary-bg); + --pagination-active-border: var(--btn-primary-border); + --pagination-disabled-color: var(--text-muted); +} \ No newline at end of file diff --git a/assets/js/tooltip-init.js b/assets/js/tooltip-init.js new file mode 100644 index 0000000..7ad10a0 --- /dev/null +++ b/assets/js/tooltip-init.js @@ -0,0 +1,6 @@ +// tooltip-init.js + +// Initialise Bootstrap tooltips, enabling HTML content support +$(document).ready(function () { + $('[data-toggle="tooltip"]').tooltip(); +}); diff --git a/build_assets.py b/build_assets.py new file mode 100644 index 0000000..a62ae7b --- /dev/null +++ b/build_assets.py @@ -0,0 +1,76 @@ +import os +import shutil + +from django.conf import settings + +from journal import models as journal_models + + +def copy_file(source, destination): + """ + :param source: The source of the folder for copying + :param destination: The destination folder for the file + :return: + """ + destination_folder = os.path.join(settings.BASE_DIR, os.path.dirname(destination)) + os.makedirs(destination_folder, exist_ok=True) + + shutil.copy( + os.path.join(settings.BASE_DIR, source), + os.path.join(settings.BASE_DIR, destination), + ) + + +def create_paths(): + base_path = os.path.join(settings.BASE_DIR, "static", "clarity") + folders = ["css", "js"] + + for folder in folders: + os.makedirs(os.path.join(base_path, folder), exist_ok=True) + + +def process_journals(): + journals = journal_models.Journal.objects.all() + + for journal in journals: + for file in journal.scss_files: + if file.endswith("clean_override.css"): + print(f"Copying clean override file for {journal.name}") + + override_css_file = os.path.join( + settings.BASE_DIR, + "static", + "clarity", + "css", + f"journal{journal.id}_override.css", + ) + + copy_file(file, override_css_file) + + +def copy_theme_files(): + """Copy theme CSS and JS files to static directory.""" + theme_files = [ + ("css", "clarity.css"), + ("css", "evergreen.css"), + ("css", "ocean.css"), + ("css", "cardinal.css"), + ("css", "midnight.css"), + ("js", "tooltip-init.js"), + ] + + for file_type, filename in theme_files: + source = os.path.join("themes", "clarity", "assets", file_type, filename) + destination = os.path.join("static", "clarity", file_type, filename) + copy_file(source, destination) + + +def build(): + print("Creating folders") + create_paths() + + print("Copying theme files") + copy_theme_files() + + print("Processing journal overrides") + process_journals() diff --git a/imgs/journal_of_flatcaps.png b/imgs/journal_of_flatcaps.png new file mode 100644 index 0000000..1d66784 Binary files /dev/null and b/imgs/journal_of_flatcaps.png differ diff --git a/templates/403.html b/templates/403.html new file mode 100644 index 0000000..cd26099 --- /dev/null +++ b/templates/403.html @@ -0,0 +1,24 @@ +{% extends "core/base.html" %} + +{% block css %} +{% endblock %} + +{% block body %} +
+
+
+ {% if request.META.maintenance_mode %} +

{% trans 'Maintenance Mode' %}

+

{{ request.META.maintenance_mode.value|safe }}

+ {% else %} +

{% trans 'Permission Denied' %}

+ {% if exception %} +

{{ exception }}

+ {% else %} +

{% trans 'You do not have permission to view this page' %}.

+ {% endif %} + {% endif %} +
+
+
+{% endblock body %} \ No newline at end of file diff --git a/templates/404.html b/templates/404.html new file mode 100644 index 0000000..6709058 --- /dev/null +++ b/templates/404.html @@ -0,0 +1,17 @@ +{% extends "core/base.html" %} + +{% block page_title %}Page Not Found{% endblock %} + +{% block css %} +{% endblock %} + +{% block body %} +
+
+
+

{% trans "Page Not Found" %}

+

{% trans "Sorry, the page you were looking for was not found." %}

+
+
+
+{% endblock body %} \ No newline at end of file diff --git a/templates/500.html b/templates/500.html new file mode 100644 index 0000000..f727cbc --- /dev/null +++ b/templates/500.html @@ -0,0 +1,42 @@ +{% load static %} +{% load i18n %} +{% load hooks %} + +{% get_current_language as current_language %} + + + + + + {% trans 'Server Error' %} + + + + + + + +
+
+
+
+

{% trans 'Server Error' %}

+

{% trans 'A server error has occurred.' %}

+
+
+ +
+
+ + + + + diff --git a/templates/cms/page.html b/templates/cms/page.html new file mode 100644 index 0000000..3254de5 --- /dev/null +++ b/templates/cms/page.html @@ -0,0 +1,36 @@ +{% extends "core/base.html" %} +{% load static %} + +{% block title %}{{ page.display_name }}{% endblock title %} + +{% block page_title %}{{ page.display_name }}{% endblock %} + +{% block body %} +
+
+
+

{{ page.display_name }}

+ +
{{ page.content|safe }}
+
+ {% if page.display_toc %} +
+
+
+
+
+

{% trans "Table of Contents" %}

+
    +
    +
    +
    +
    +
    + {% endif %} +
    +
    +{% endblock body %} + +{% block js %} + +{% endblock %} diff --git a/templates/core/accounts/public_profile.html b/templates/core/accounts/public_profile.html new file mode 100644 index 0000000..a4fc7f3 --- /dev/null +++ b/templates/core/accounts/public_profile.html @@ -0,0 +1,40 @@ +{% extends "core/base.html" %} +{% load static %} + +{% block title %}{{ user.full_name }} {% trans 'Profile' %}{% endblock %} + +{% block body %} +
    +
    +
    + {% include "common/elements/profile_image.html" with classes="thumbnail img-fluid editorial-image" user=user %} +
    +

    {{ user.full_name }}

    +

    {% trans 'Roles' %}:
    +

      + {% for role in roles %} +
    • {{ role.role.name }}
    • + {% endfor %} +
    +

    + {% include "common/elements/profile_affiliations.html" %} +
    +
    + {% if user.biography %} +

    {% trans "Biography" %}

    + + {{ user.biography|safe }} +

    + {% endif %} + {% if user.published_articles %} +

    {% trans "Publications" %}

    + + {% for article in user.published_articles %} + {% include "elements/article_listing.html" with article=article level="shallow" %} + + {% endfor %} + {% endif %} +
    +
    +
    +{% endblock %} diff --git a/templates/core/base.html b/templates/core/base.html new file mode 100644 index 0000000..4042791 --- /dev/null +++ b/templates/core/base.html @@ -0,0 +1,104 @@ +{% load static %} +{% load i18n hooks press_url %} +{% get_current_language as current_language %} + + + + + + + {% if request.journal %} + {% endif %} + {% block title %}{% if request.journal %}{{ request.journal.name }}{% else %}{{ request.press.name }} + {% endif %}{% endblock title %} + {% block head %}{% endblock head %} + + + {% if not request.journal or journal_settings.general.feeds %} + + + {% endif %} + {% include "common/elements/favicons.html" %} + + + + + + {% block css %}{% endblock %} + {% hook 'base_head_css' %} + + +{% include "common/elements/skip_to_main_content.html" %} + + +{% if request.journal %} + {% include "core/nav.html" %} +{% elif request.repository %} + {% include "repository/nav.html" %} +{% elif request.press %} + {% include "press/nav.html" %} +{% endif %} +
    + {% for message in messages %} +
    + + {{ message|linebreaksbr }} +
    + {% endfor %} + {% block body %}{% endblock body %} +
    + +{% include "common/elements/analytics.html" %} + + + +{% block js %}{% endblock %} + + diff --git a/templates/core/footer.html b/templates/core/footer.html new file mode 100644 index 0000000..8e8ab8c --- /dev/null +++ b/templates/core/footer.html @@ -0,0 +1,19 @@ +{% load svg from press_url %} +{% load svg_or_image from press_url %} +{% load i18n %} +
    +
    + {% if request.journal.press_image_override %} + {% svg_or_image request.journal.press_image_override "img-fluid" %} + {% else %} + {% svg request.press_cover %} + {% endif %} +
    +
    + {% if request.journal %} + {% include "elements/journal_footer.html" %} + {% else %} + {% include "elements/press_footer.html" %} + {% endif %} +
    +
    diff --git a/templates/core/homepage_elements/search_bar.html b/templates/core/homepage_elements/search_bar.html new file mode 100644 index 0000000..00d611c --- /dev/null +++ b/templates/core/homepage_elements/search_bar.html @@ -0,0 +1,39 @@ +{% load i18n %} + +
    + +
    diff --git a/templates/core/nav.html b/templates/core/nav.html new file mode 100644 index 0000000..a6abd73 --- /dev/null +++ b/templates/core/nav.html @@ -0,0 +1,137 @@ +{% load static %} +{% load svg from press_url %} +{% load roles %} +{% load i18n %} +{% load hooks %} +{% load next_url %} + + diff --git a/templates/core/news/index.html b/templates/core/news/index.html new file mode 100644 index 0000000..d069d36 --- /dev/null +++ b/templates/core/news/index.html @@ -0,0 +1,92 @@ +{% extends "core/base.html" %} +{% load truncate %} +{% load dates %} +{% load pages %} + +{% block title %}{{ journal_settings.news.news_title }}{% endblock title %} + +{% block body %} +
    +
    +

    {{ journal_settings.news.news_title }}

    + {% if tag %}

    Filtering tag: {{ tag }}

    {% endif %} +
    + {% for item in news_items %} +
    +
    +
    +

    + {{ item.title|safe }} +

    + + + {{ item.body|truncatewords_html:50|safe }} + +
    + +
    +
    + {% empty %} +
    +

    + {% trans "This journal currently has no " %} {{ journal_settings.news.news_title }} {% trans "items to display." %} +

    +
    + {% endfor %} +
    +
    +
    + +
    +
    +{% endblock body %} diff --git a/templates/core/news/item.html b/templates/core/news/item.html new file mode 100644 index 0000000..d3d149c --- /dev/null +++ b/templates/core/news/item.html @@ -0,0 +1,48 @@ +{% extends "core/base.html" %} +{% load truncate %} +{% load dates %} + +{% block title %}{{ news_item.title }}{% endblock title %} + +{% block head %} +{% include "elements/social_meta.html" %} +{% endblock head %} + +{% block body %} +
    +
    +
    +
    +

    {{ news_item.title|safe }}

    +

    + {{ news_item.byline }} on {{ news_item.posted|date_human }} +

    + {{ news_item.body|safe }} + + {% if news_item.tags.all %} +

    + {% trans 'Tags ' %} + +

    + + {% endif %} +
    + +
    +
    +
    +{% endblock body %} diff --git a/templates/elements/article_listing.html b/templates/elements/article_listing.html new file mode 100644 index 0000000..2415e7f --- /dev/null +++ b/templates/elements/article_listing.html @@ -0,0 +1,97 @@ +{% load i18n %} +{% load static %} +{% load dates %} +{% load alt_text %} + +
    +
    + {% if not journal_settings.article.disable_article_thumbnails %} +
    +
    + {% if article.thumbnail_image_file %} + {% get_alt_text obj=article.thumbnail_image_file default=article.title|striptags|escape %} + {% elif request.journal.thumbnail_image %} + {{ request.journal }} thumbnail icon + {% else %} + {{ article.title|striptags|escape }} + {% endif %} +
    + {{ request.journal.code|upper }} +
    +
    +
    + {% endif %} +
    + {% if article.is_remote %} + + {% if level == "deep" %} +

    {{ article.title|safe }} {% include "elements/icons/link_external.html" %}

    + {% elif level == "shallow" %} +

    {{ article.title|safe }} {% include "elements/icons/link_external.html" %}

    + {% else %} +

    {{ article.title|safe }} {% include "elements/icons/link_external.html" %}

    + {% endif %} +
    + {% else %} + + {% if level == "deep" %} +

    {{ article.title|safe }}

    + {% elif level == "shallow" %} +

    {{ article.title|safe }}

    + {% else %} +

    {{ article.title|safe }}

    + {% endif %} +
    + {% endif %} + + + + + + {% if article.issues.count > 1 %} +
    +

    {% trans 'Also a part of:'%}

    + {% for other in article.issues.all %} + {% if other != article.issue %} + + + {{other.issue_type.pretty_name}}: {{ other.display_title }} + + {% endif %} + {% endfor %} +
    + {% endif %} +
    +
    +
    \ No newline at end of file diff --git a/templates/elements/journal/article_list_filters.html b/templates/elements/journal/article_list_filters.html new file mode 100644 index 0000000..82ecd96 --- /dev/null +++ b/templates/elements/journal/article_list_filters.html @@ -0,0 +1,17 @@ +{% load classname %} +{% load bootstrap4 %} + +{% if facet_form.fields %} +
    +
    +
    +

    {% trans 'Filter' %}

    +
    + {% bootstrap_form facet_form %} + + +
    +
    +
    +
    +{% endif %} diff --git a/templates/elements/journal/authors_block.html b/templates/elements/journal/authors_block.html new file mode 100644 index 0000000..fc182e9 --- /dev/null +++ b/templates/elements/journal/authors_block.html @@ -0,0 +1,5 @@ + diff --git a/templates/elements/journal/citation_modals.html b/templates/elements/journal/citation_modals.html new file mode 100644 index 0000000..5f60889 --- /dev/null +++ b/templates/elements/journal/citation_modals.html @@ -0,0 +1,88 @@ + + + + + diff --git a/templates/elements/journal/editorial_social_content.html b/templates/elements/journal/editorial_social_content.html new file mode 100644 index 0000000..00ca70d --- /dev/null +++ b/templates/elements/journal/editorial_social_content.html @@ -0,0 +1,53 @@ +{% if user.website or user.twitter or user.facebook or user.github or user.linkedin %} +

    + {% if user.website %} + + + {% trans 'Website' %} + {% include "elements/icons/link_external.html" %} + + {% endif %} + + {% if user.twitter %} + + + {% trans 'Twitter' %} + {% include "elements/icons/link_external.html" %} + + {% endif %} + + {% if user.facebook %} + + + {% trans 'Facebook' %} + {% include "elements/icons/link_external.html" %} + + {% endif %} + + {% if user.github %} + + + {% trans 'Github' %} + {% include "elements/icons/link_external.html" %} + + {% endif %} + + {% if user.linkedin %} + + + {% trans 'Linkedin' %} + {% include "elements/icons/link_external.html" %} + + {% endif %} +

    +{% endif %} \ No newline at end of file diff --git a/templates/elements/journal/how_to_cite.html b/templates/elements/journal/how_to_cite.html new file mode 100644 index 0000000..a1434db --- /dev/null +++ b/templates/elements/journal/how_to_cite.html @@ -0,0 +1,7 @@ +{% for author in article.frozen_authors.all %}{% if not forloop.first and not forloop.last %}, {% elif forloop.last and not forloop.first %}& {% endif %}{{ author.citation_name }} +{% endfor %} +({{ article.date_published.year }}) “{{ article.title|safe }}”, +{{ journal.name }}.{% if article.issue.volume %} {{ article.issue.volume }}{% endif %}{% if article.issue.issue %}({{ article.issue.issue }}).{% endif %} +{% if article.identifier.id_type == 'doi' %} + {% include "elements/doi_display.html" with doi=article.identifier.identifier title=article.title %} +{% endif %}

    \ No newline at end of file diff --git a/templates/elements/journal/issue_block.html b/templates/elements/journal/issue_block.html new file mode 100644 index 0000000..0fb74c2 --- /dev/null +++ b/templates/elements/journal/issue_block.html @@ -0,0 +1,28 @@ +{% regroup articles by section as grouped_articles %} +{% for section, section_articles in grouped_articles %} +
    + {% if level == "deep" %} +

    + {% if section.plural and section_articles|length >= 2 %} + {{ section.plural }} + {% else %} + {{ section.name }} + {% endif %} +

    + {% else %} +

    + {% if section.plural and section_articles|length >= 2 %} + {{ section.plural }} + {% else %} + {{ section.name }} + {% endif %} +

    + {% endif %} + +
    + {% for article in section_articles %} + {% include "elements/article_listing.html" with article=article level=level %} + {% endfor %} +
    +
    +{% endfor %} \ No newline at end of file diff --git a/templates/elements/journal/issue_list.html b/templates/elements/journal/issue_list.html new file mode 100644 index 0000000..167bf13 --- /dev/null +++ b/templates/elements/journal/issue_list.html @@ -0,0 +1,40 @@ +{% load svg_or_image from press_url %} +{% load static %} +{% load i18n %} + +
    + {% for issue in issues %} +
    +
    +
    + {% if level == "deep" %} +

    + + {{ issue.display_title_a11y }} +

    + {% else %} +

    + + {{ issue.display_title_a11y }} +

    + {% endif %} + {% if issue.date %} +

    {{ issue.date|date:"F Y" }}

    + {% endif %} +

    {{ issue.articles.all.count }} {% trans "items" %}

    + + + {% trans "View issue" %} + +
    +
    +
    + {% empty %} +
    +
    +

    {% trans 'This journal has no issues' %}.

    +
    +
    + {% endfor %} +
    \ No newline at end of file diff --git a/templates/elements/journal/issue_list_by_decade.html b/templates/elements/journal/issue_list_by_decade.html new file mode 100644 index 0000000..4ede25c --- /dev/null +++ b/templates/elements/journal/issue_list_by_decade.html @@ -0,0 +1,17 @@ +

    + {% blocktrans %} + Issues are grouped by decade. Select a decade to view the issues + published during that decade. + {% endblocktrans %} +

    + +{% for decade, issues in issues_by_decade.items %} +

    {{ decade }}

    + {% include "elements/journal/issue_list.html" with issues=issues level="deep" %} +{% endfor %} \ No newline at end of file diff --git a/templates/elements/journal/issue_paginator.html b/templates/elements/journal/issue_paginator.html new file mode 100644 index 0000000..259edfd --- /dev/null +++ b/templates/elements/journal/issue_paginator.html @@ -0,0 +1,33 @@ +{% load pages %} + +{% if articles and articles.paginator %} +
    +
    + +
    +
    +{% endif %} diff --git a/templates/elements/journal/issue_sidebar.html b/templates/elements/journal/issue_sidebar.html new file mode 100644 index 0000000..78dc725 --- /dev/null +++ b/templates/elements/journal/issue_sidebar.html @@ -0,0 +1,42 @@ +{% load i18n %} + diff --git a/templates/elements/journal/issue_top.html b/templates/elements/journal/issue_top.html new file mode 100644 index 0000000..a0e4cdb --- /dev/null +++ b/templates/elements/journal/issue_top.html @@ -0,0 +1,31 @@ +{% load i18n %} +{% load alt_text %} + +{% if issue.large_image %} +
    + {% get_alt_text obj=issue file_path=issue.hero_image_url default=issue.display_title_a11y %} +
    +
    + {% if level == "deep" %} +

    {{ issue.display_title }}

    + {% else %} +

    {{ issue.display_title }}

    + {% endif %} +
    +
    +
    +{% else %} + {% if level == "deep" %} +

    {{ issue.display_title }}

    + {% else %} +

    {{ issue.display_title }}

    + {% endif %} + {% if issue.issue_description %}

    {{ issue.issue_description|safe }}

    {% endif %} +{% endif %} + +{% if issue.journal.display_issue_doi and issue.doi_url %} +

    + {% include "elements/doi_display.html" with doi=issue.doi_url title=issue.display_title %} +

    +{% endif %} +
    \ No newline at end of file diff --git a/templates/elements/journal/keywords_block.html b/templates/elements/journal/keywords_block.html new file mode 100644 index 0000000..30d0577 --- /dev/null +++ b/templates/elements/journal/keywords_block.html @@ -0,0 +1,12 @@ +{% load i18n %} + + +

    {% trans "Keywords used by articles in this journal are listed below. Select a keyword to view which articles use it." %}

    + + \ No newline at end of file diff --git a/templates/elements/journal/reading.html b/templates/elements/journal/reading.html new file mode 100644 index 0000000..9503bea --- /dev/null +++ b/templates/elements/journal/reading.html @@ -0,0 +1,33 @@ +
    +

    {% trans 'Text display options' %}

    +
    + + + +
    +
    \ No newline at end of file diff --git a/templates/elements/journal/share.html b/templates/elements/journal/share.html new file mode 100644 index 0000000..4b4b668 --- /dev/null +++ b/templates/elements/journal/share.html @@ -0,0 +1,16 @@ +{% with article.get_doi_url|default:article.url as share_url %} +

    {% trans "Share" %}

    +
    + + +
    + {% include "elements/button_copy_element.html" with element_id="share-link" %} +
    +
    +{% endwith %} \ No newline at end of file diff --git a/templates/elements/journal/summary_modal.html b/templates/elements/journal/summary_modal.html new file mode 100644 index 0000000..0e67222 --- /dev/null +++ b/templates/elements/journal/summary_modal.html @@ -0,0 +1,21 @@ + \ No newline at end of file diff --git a/templates/elements/journal/table_modal.html b/templates/elements/journal/table_modal.html new file mode 100644 index 0000000..5d55652 --- /dev/null +++ b/templates/elements/journal/table_modal.html @@ -0,0 +1,15 @@ + \ No newline at end of file diff --git a/templates/elements/journal_footer.html b/templates/elements/journal_footer.html new file mode 100644 index 0000000..aea6539 --- /dev/null +++ b/templates/elements/journal_footer.html @@ -0,0 +1,94 @@ +{% load i18n %} +{% load next_url %} +
    +
    +
    +
      + {% if request.journal.issn %}
    • ISSN: {{ request.journal.issn }}
    • {% endif %} + {% if request.journal.print_issn %}
    • {% trans 'Print ISSN' %}: {{ request.journal.print_issn }}
    • {% endif %} + {% if journal_settings.general.publisher_name %} +
    • + {% trans 'Published by' %} + {% if journal_settings.general.publisher_url %} + + {{ journal_settings.general.publisher_name }} + + {% else %} + {{ journal_settings.general.publisher_name }} + {% endif %} +
    • + {% endif %} +
    +
    +
    +
    + + + +
    +
    +{% if request.journal.press.journal_footer_text %} +
    + +
    +{% endif %} diff --git a/templates/elements/license_block.html b/templates/elements/license_block.html new file mode 100644 index 0000000..30b0d2b --- /dev/null +++ b/templates/elements/license_block.html @@ -0,0 +1,15 @@ +
    + {% for license in request.journal.licence_set.all %} + {% if license.available_for_submission %} +
    + + + {{ license }} + {% include "elements/icons/link_external.html" %} + + +
    +
    {{ license.text|safe }}
    + {% endif %} + {% endfor %} +
    \ No newline at end of file diff --git a/templates/elements/nav_element.html b/templates/elements/nav_element.html new file mode 100644 index 0000000..3de1675 --- /dev/null +++ b/templates/elements/nav_element.html @@ -0,0 +1,17 @@ +{# Not used #} + +{% if item.has_sub_nav %} + +{% elif not item.for_footer %} + +{% endif %} diff --git a/templates/elements/open_modal.html b/templates/elements/open_modal.html new file mode 100644 index 0000000..086ab67 --- /dev/null +++ b/templates/elements/open_modal.html @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/templates/elements/pagination.html b/templates/elements/pagination.html new file mode 100644 index 0000000..ff84a24 --- /dev/null +++ b/templates/elements/pagination.html @@ -0,0 +1,86 @@ +{% load pages %} + +
    +
    + {% if is_paginated %} + + {% endif %} +
    +
    + +
    + +
    +
    +
    diff --git a/templates/elements/preprint_block.html b/templates/elements/preprint_block.html new file mode 100644 index 0000000..a60c737 --- /dev/null +++ b/templates/elements/preprint_block.html @@ -0,0 +1,31 @@ +{% load dates %} + +{% for preprint in preprints %} + +
    +
    +
    +

    + {{ preprint.title|safe }} +

    +

    + +

      + {% for author in preprint.authors.all %} +
    • {{ author.full_name }}
    • + {% endfor %} +
    + +

    +

    + + + +

    +
    +
    +
    + +{% endfor %} diff --git a/templates/elements/press_footer.html b/templates/elements/press_footer.html new file mode 100644 index 0000000..d6edeb9 --- /dev/null +++ b/templates/elements/press_footer.html @@ -0,0 +1,48 @@ +{% load i18n %} +{% load next_url %} + +
    +
    + {{ press.footer_description|default:""|safe }} +
    +
    +

    +

    +

    +
    +
    diff --git a/templates/elements/public_reviews.html b/templates/elements/public_reviews.html new file mode 100644 index 0000000..97533b9 --- /dev/null +++ b/templates/elements/public_reviews.html @@ -0,0 +1,40 @@ + {% for review in article.public_reviews %} + +{% endfor %} diff --git a/templates/elements/sections_block.html b/templates/elements/sections_block.html new file mode 100644 index 0000000..2fa3a7d --- /dev/null +++ b/templates/elements/sections_block.html @@ -0,0 +1,41 @@ +

    {% trans 'Sections' %}

    + + + + + + + + + + + + + {% for section in sections %} + + + + + + + + + {% empty %} + {% endfor %} + +
    {% trans 'Sections submission information' %}
    {% trans 'Section or article type' %}{% trans 'Public Submissions' %}{% trans 'Peer Reviewed' %}{% trans 'Indexed' %}
    {{ section.name }}{% if section.public_submissions %} + {% trans 'Yes' %} + {% else %} + {% trans 'No' %} + {% endif %} + {% if section.number_of_reviewers > 0 %} + {% trans 'Yes' %} + {% else %} + {% trans 'No' %} + {% endif %} + {% if section.indexing %} + {% trans 'Yes' %} + {% else %} + {% trans 'No' % } + {% endif %} +
    diff --git a/templates/elements/sorting.html b/templates/elements/sorting.html new file mode 100644 index 0000000..0e6b533 --- /dev/null +++ b/templates/elements/sorting.html @@ -0,0 +1,36 @@ +{% load pages %} + +{% if order_by_choices %} +
    +
    +

    + {% blocktrans count result_count=page_obj.paginator.count %} + 1 result + {% plural %} + {{ result_count }} results + {% endblocktrans %} +

    +
    +
    +
    +
    + +
    + +
    +
    +
    +{% endif %} diff --git a/templates/journal/article.html b/templates/journal/article.html new file mode 100644 index 0000000..e11fbbf --- /dev/null +++ b/templates/journal/article.html @@ -0,0 +1,428 @@ +{% extends "core/base.html" %} +{% load static %} +{% load hooks %} +{% load i18n %} +{% load dates %} +{% load alt_text %} + +{% block title %} + {% include "common/elements/journal/article_title.html" %} +{% endblock %} + +{% block head %} + + {% include "elements/article_meta_tags.html" %} +{% endblock %} + +{% block body %} +
    + {% if not journal_settings.article.disable_article_large_image %} +
    + {% if article.large_image_file.id or article.issue.large_image or journal.default_large_image %} + {% if article.large_image_file.id %} + {% get_alt_text obj=article.large_image_file default=article.title|striptags as image_alt %} + {% elif article.issue.large_image %} + {% get_alt_text file_path=article.issue.large_image.url default=article.title|striptags as image_alt %} + {% else %} + {% get_alt_text file_path=journal.default_large_image.url default=article.title|striptags as image_alt %} + {% endif %} +
    + {{ image_alt }} + {% else %} +
    + + {% endif %} +
    +
    +

    {{ article.section.name }}

    +

    {{ article.title|safe }}

    + {% if article.is_published or proofing %} + {% include "common/elements/journal/article_authors_br.html" %} + {% endif %} +
    +
    +
    +
    + {% endif %} + +
    + + {% include "elements/journal/reading.html" %} + +
    + +
    +
    + {% if journal_settings.article.disable_article_large_image %} + {{ article.section.name }} +

    {{ article.title|safe }}

    + {% endif %} + {% if article.abstract and article.abstract != '' %} +

    {% trans "Abstract" %}

    +

    {{ article.abstract | safe }}

    + {% endif %} + {% if journal_settings.general.keyword_list_page %} + {% include "elements/journal/article_keywords.html" with keywords=article.keywords linked="True" %} + {% else %} + {% include "elements/journal/article_keywords.html" with keywords=article.keywords %} + {% endif %} + {% if article.is_published or proofing %} + {% include "elements/journal/cite.html" %} + {% endif %} + {% if article.rights %} +

    {% trans "Rights" %}:

    +

    {{ article.rights | safe }}

    + {% endif %} + {% if article.is_published or proofing %} +
    +

    {% trans 'Files' %}

    + {% if galleys %} + + {% else %} +

    {% trans 'Downloads are not available for this article.' %}

    + {% endif %} +
    + {% endif %} + + {% include "elements/funder_info_for_readers.html" %} + + {% if article.publisher_notes.all %} +
    +

    {% trans "Publisher Notes" %}

    +
      + {% for note in article.publisher_notes.all %} +
    • {{ note.text }}
    • + {% endfor %} +
    +
    + {% endif %} + + {% if article_content %} +
    +
    + {{ article_content|safe }} +
    + {% hook 'article_footer_block' %} +
    +
    +
    + {% endif %} +
    +
    +
    +
    +
    +
    +
    + {% include "common/elements/altmetric_badges.html" with article=article %} + {% if journal_settings.article.disable_article_large_image %} +

    + {% blocktrans count counter=article.frozen_authors.count %} + Author + {% plural %} + Authors + {% endblocktrans %} +

    + {% include "common/elements/journal/article_authors_ul.html" %} + {% endif %} + + {% if article.is_published or proofing %} + {% include "elements/journal/share.html" %} + {% spaceless %} +

    {% trans "Files" %}

    + {% if galleys %} + + {% if proofing %} +

    + + Note to proofreader: Download links on this page begin to work when the article is published. +

    + {% endif %} + {% else %} +

    {% trans 'Downloads are not available for this article.' %}

    + {% endif %} + {% endspaceless %} + {% endif %} + {% if article.supplementary_files.all %} +

    {% trans "Supplementary Files" %}

    + + {% endif %} + + {% include "elements/journal/article_issue_list.html" %} + +

    {% trans "Information" %}

    +
      + {% if journal_settings.article.display_date_submitted and article.date_submitted %} +
    • + {% trans "Submitted on" %} {{ article.date_submitted|date_human }} +
    • + {% endif %} + {% if journal_settings.article.display_date_accepted and article.date_accepted %} +
    • + {% trans "Accepted on" %} {{ article.date_accepted|date_human }} +
    • + {% endif %} + {% if article.is_published or proofing %} +
    • + {% trans "Published on" %} {{ article.date_published|date_human }} +
    • + {% endif %} + {% if article.page_range %} +
    • {% trans "Pages" %}: {{ article.page_range }}
    • + {% endif %} + {% if article.article_number %} +
    • {% trans "Article Number" %}: {{ article.article_number }}
    • + {% endif %} + {% if article.publisher_name %} +
    • {% trans "Publisher" %}: {{ article.publisher_name }}
    • + {% endif %} + {% if article.publication_title %} +
    • {% trans "Original Publication" %}: {{ article.publication_title }}
    • + {% endif %} + {% if article.publication_title %} +
    • {% trans "Original ISSN" %}: {{ article.ISSN_override }}
    • + {% endif %} + {% if article.peer_reviewed %} +
    • {% trans "Peer Reviewed" %} + +
    • + {% endif %} + {% if article.license %} +
    • {% trans "Licence" %} + + {{ article.license.name }} + {% include "elements/icons/link_external.html" %} + +
    • + {% endif %} + {% if journal_settings.general.submission_summary and article.non_specialist_summary %} +
    • + + {% trans 'Non Specialist Summary' %} + {% include "elements/icons/link_modal.html" %} + +
    • + {% endif %} +
    + {% if article.competing_interests %} +

    {% trans "Competing Interests" %}

    +
      +
    • {{ article.competing_interests|safe }}
    • +
    + {% endif %} + {% for field in article.custom_fields %} +

    {% trans field.field.name %}

    +

    {{ field.answer|safe }}

    + {% endfor %} + {% if article.is_published or proofing %} + + {% if journal_settings.general.open_peer_review %} + {% if article.public_reviews.count > 0 %} +

    {% trans "Open Peer Reviews" %}

    + + {% endif %} + {% endif %} + + {% if not request.journal.disable_metrics_display %} +

    {% trans "Metrics" %}

    +
      +
    • {% trans "Views" %}: {{ article.metrics.views }}
    • + {% if galleys %} +
    • {% trans "Downloads" %}: {{ article.metrics.downloads }}
    • + {% endif %} + {% if article.metrics.alm.twitter %} +
    • {% trans "Twitter" %}: {{ article.metrics.alm.twitter }}
    • {% endif %} + {% if article.metrics.alm.wikipedia %} +
    • {% trans "Wikipedia" %}: {{ article.metrics.alm.wikipedia }}
    • {% endif %} + {% if article.metrics.alm.reddit %} +
    • {% trans "Reddit" %}: {{ article.metrics.alm.reddit }}
    • {% endif %} + {% if article.citation_count and not journal_settings.article.suppress_citations_metric %} +
    • {% trans "Citations" %}: {{ article.citation_count }}
    • {% endif %} +
    + {% endif %} +

    {% trans "Citation" %}

    +
    + + + + + RIS + {% include "elements/icons/link_download.html" %} + + + BibTeX + {% include "elements/icons/link_download.html" %} + +
    +
    + {% if article.preprint and article.preprint.is_published %} +

    {{ article.preprint.repository.object_name }}

    +

    This article is linked to + a {{ article.preprint.repository.object_name }} + in {{ article.preprint.repository.name }}.

    +

    + {{ article.preprint.title }} +

    + {% endif %} +

    {% trans 'File Checksums' %}

    (MD5) + {% if galleys %} +
      + {% for galley in galleys %} +
    • + {{ galley.label }}: {{ galley.file.checksum }} +
    • + {% endfor %} +
    + {% else %} +

    {% trans 'File Checksums are not available for this article.' %}

    + {% endif %} + + {% if journal_settings.general.use_credit and author.credits.exists %} +

    {% trans 'CRediT Roles' %}

    +
      + {% for author, credit_records in article.authors_and_credits.items %} +
    • + {{ author.full_name }}: + {% for record in credit_records %} +
        +
      • {{ record }}
      • +
      + {% endfor %} +
    • + {% endfor %} +
    +

    + + More information about CRediT. + {% include "elements/icons/link_external.html" %} + +

    + {% endif %} + {% endif %} +
    + {% hook 'article_sidebar' %} +
    +
    +
    + {% if article_content %} +
    +
    +
    +
    +

    {% trans "Table of Contents" %}

    +
      +
      +
      +
      +
      + {% endif %} +
      +
      + + {% include "elements/journal/citation_modals.html" %} + {% if journal_settings.general.submission_summary %} + {% include "elements/journal/summary_modal.html" %} + {% endif %} + {% include "elements/public_reviews.html" %} + {% for table in tables_in_galley %} + {% include "elements/journal/table_modal.html" with content=table.content tableid=table.id %} + {% endfor %} + +{% endblock body %} + +{% block js %} + + + + {% hook 'article_js_block' %} + + + + + + + +{% endblock js %} diff --git a/templates/journal/article_list.html b/templates/journal/article_list.html new file mode 100644 index 0000000..fe4511e --- /dev/null +++ b/templates/journal/article_list.html @@ -0,0 +1,63 @@ +{% extends "core/base.html" %} + +{% load static %} +{% load i18n %} +{% load bootstrap4 %} + +{% block title %}{% trans "Articles" %}{% endblock %} + +{% block body %} +
      +
      +

      {% trans "Articles" %}

      +
      +
      +
      + {% include "elements/sorting.html" with form_id=facet_form.id %} + {% for article in article_list %} + {% include "elements/article_listing.html" with article=article %} + {% empty %} + {% trans 'No articles to display.' %} + {% endfor %} + {% include "elements/pagination.html" with form_id=facet_form.id %} +
      +
      +
      +
      +
      +
      +

      {% trans 'Search' %}

      +
      + {% csrf_token %} +
      + {% if not keyword %} + {% bootstrap_field search_form.article_search %} + {% else %} + {% trans 'You are currently browsing by keyword.' %}' +

      + + {% trans "Search for an article" %} + +

      + {% endif %} +
      + +
      + +
      +
      +
      +
      +
      + {% include "elements/journal/article_list_filters.html" %} +
      +
      +{% endblock body %} diff --git a/templates/journal/articles.html b/templates/journal/articles.html new file mode 100644 index 0000000..a03f30d --- /dev/null +++ b/templates/journal/articles.html @@ -0,0 +1,105 @@ + + +{% extends "core/base.html" %} +{% load hooks %} +{% load i18n %} + +{% block title %}{% trans "Articles" %}{% endblock %} + +{% block body %} +
      +
      +

      {% trans 'Articles' %}

      +
      +
      + {% if pinned_articles and articles.number == 1 and not active_filters %} + {% for article in pinned_articles %} + {% include "elements/article_listing.html" with article=article %} + {% endfor %} + {% endif %} + + {% for article in articles %} + {% include "elements/article_listing.html" with article=article %} + {% empty %} +

      {% trans "No articles to display" %}.

      + {% endfor %} + +
      +
      + +
      +
      +
      +
      +
      +
      +
      + {% csrf_token %} +
      +

      {% trans 'Sort and Filter' %}

      +
      + +
      +
      + +
      +
      +
      + {% trans 'Section Filters' %} + {% for section in sections %} + + +
      + {% endfor %} +
      +
      + + {% if active_filters %} + {% endif %} +
      +
      +
      +
      +
      +
      +
      +{% endblock %} diff --git a/templates/journal/authors.html b/templates/journal/authors.html new file mode 100644 index 0000000..f0ff41f --- /dev/null +++ b/templates/journal/authors.html @@ -0,0 +1,45 @@ +{% extends "core/base.html" %} +{% load static %} +{% load i18n %} + +{% block title %}Authors{% endblock title %} +{% block page_title %}Authors{% endblock page_title %} + +{% block body %} + +

      {% trans 'Authors' %}

      +
      + + {% for author in author_list %} +
      +
      + {% if author.profile_image %}{% blocktrans with name=author.full_name %}Headshot photograph of {{ name }}{% endblocktrans %}{% else %}{% trans 'A generic headshot photograph of a person' %}{% endif %} +
      +

      {{ author.full_name }}

      +

      + {{ author.affiliation }} +

      + + {% if author.enable_public_profile %} +

      + + + {% trans 'View Profile' %} + + +

      + {% endif %} + + {% include "elements/journal/editorial_social_content.html" with user=author %} +
      +
      +
      + {% endfor %} + +
      + +{% endblock body %} diff --git a/templates/journal/become_reviewer.html b/templates/journal/become_reviewer.html new file mode 100644 index 0000000..aa05d60 --- /dev/null +++ b/templates/journal/become_reviewer.html @@ -0,0 +1,24 @@ +{% extends "core/base.html" %} +{% load i18n %} +{% load next_url %} + +{% block page_title %}{% trans "Become a Reviewer" %}{% endblock %} +{% block title %}{% trans "Become a Reviewer" %}{% endblock %} + +{% block body %} +

      Become a Reviewer

      +

      {{ message }}

      + + {% if not code == 'already-reviewer' %} + {% if code == 'not-logged-in' %} + + {% trans "Log in" %} + + {% else %} +
      + {% csrf_token %} + +
      + {% endif %} + {% endif %} +{% endblock body %} diff --git a/templates/journal/collections.html b/templates/journal/collections.html new file mode 100644 index 0000000..155445a --- /dev/null +++ b/templates/journal/collections.html @@ -0,0 +1,42 @@ +{% extends "core/base.html" %} +{% load static %} +{% load hooks %} +{% load i18n %} +{% load dates %} +{% load alt_text %} + +{% block page_title %}{% trans issue_type.plural_name %}{% endblock %} +{% block title %}{% trans issue_type.plural_name %}{% endblock %} + +{% block body %} +

      {% trans issue_type.plural_name %}

      +
      + {% for collection in collections %} +
      +
      + {% get_alt_text obj=collection file_path=collection.hero_image_url default=collection.issue_title|striptags %} +
      + +

      {{ collection.issue_title|safe }}

      +
      +

      Published: {{ collection.date|date_human }}

      + {% if collection.short_description %} +

      {{ collection.short_description|safe }}

      + {% else %} +

      {{ collection.issue_description|safe }}

      + {% endif %} +
      +
      +
      + {% empty %} +

      {% trans 'There are no collections to display' %}

      + {% endfor %} +
      + + +{% endblock %} diff --git a/templates/journal/contact.html b/templates/journal/contact.html new file mode 100644 index 0000000..548f9c3 --- /dev/null +++ b/templates/journal/contact.html @@ -0,0 +1,47 @@ +{% extends "core/base.html" %} +{% load bootstrap4 %} +{% load i18n %} + +{% block title %}{% trans "Contact" %}{% endblock title %} + +{% block body %} +
      + +
      +

      {% trans 'Contact us' %}

      + +
      + {% for contact in contacts %} +
      {{ contact.name }}
      +
      {{ contact.role }}
      + {% endfor %} +
      + {% if journal_settings.general.contact_info %} +

      {% trans 'Contact Information' %}

      + {{ journal_settings.general.contact_info|safe }} + {% endif %} +
      +
      +

      {% trans "Contact" %}

      +

      {% trans "All fields are required." %}

      +
      + {% include "elements/forms/errors.html" with form=contact_form %} + {% csrf_token %} +
      +
      + +
      + {% bootstrap_field contact_form.sender %} + {% bootstrap_field contact_form.subject %} + {% bootstrap_field contact_form.body %} + {% bootstrap_field contact_form.captcha %} + +
      +
      + +
      +{% endblock body %} diff --git a/templates/journal/editorial_team.html b/templates/journal/editorial_team.html new file mode 100644 index 0000000..4fbe25c --- /dev/null +++ b/templates/journal/editorial_team.html @@ -0,0 +1,55 @@ +{% extends "core/base.html" %} +{% load static %} + +{% block title %}{{ journal_settings.styling.editorial_group_page_name }}{% endblock title %} + +{% block body %} +
      +
      +

      {{ journal_settings.styling.editorial_group_page_name }}

      +
      +
      + + {% for group in editorial_groups %} + {% if not journal_settings.styling.hide_editorial_group_names %} +
      +
      +

      {{ group.name }}

      + {% if group.description %} +

      {{ group.description|safe }}

      + {% endif %} +
      +
      + {% endif %} + +
      + {% for member in group.members %} +
      +
      + {% include "common/elements/journal/editorial_team_image.html" with group=group classes="card-img-top card-img" %} +
      +

      {{ member.user.full_name }}

      +

      + + {{ member.user.affiliation }}{% include "common/elements/journal/editorial_team_country.html" %} + +

      + {% if member.user.enable_public_profile %} +

      + + + {% trans 'View Profile' %} + + +

      + {% endif %} + {% include "elements/journal/editorial_social_content.html" with user=member.user %} +
      +
      +
      + {% endfor %} +
      + {% endfor %} +{% endblock %} diff --git a/templates/journal/full-text-search.html b/templates/journal/full-text-search.html new file mode 100644 index 0000000..bccd335 --- /dev/null +++ b/templates/journal/full-text-search.html @@ -0,0 +1,65 @@ +{% extends "core/base.html" %} +{% load hooks %} +{% load i18n %} +{% load bootstrap4 %} + +{% hook 'filter_search' %} + +{% block page_title %}{% trans "Search" %}{% endblock %} + +{% block title %}{% trans "Search" %}{% endblock %} + +{% block body %} + +

      {% trans 'Article Search Results' %}

      + + {% if search_term %} +

      Searching for: {{ search_term }}

      + {% elif keyword %} +

      Keyword: {{ keyword }}

      + {% endif %} + +
      +
      + + {% for article in articles %} + {% include "elements/article_listing.html" with article=article %} + {% empty %} +

      {% trans "No articles to display" %}.

      + {% endfor %} + +
      +
      +
      +
      +
      +
      + {% if not keyword %} + {% include 'elements/forms/errors.html' with form=form%} + {% bootstrap_form form %} + {% else %} + {% trans "You are currently browsing by keyword" %}. {% trans 'Search for an article' %}. + {% endif %} +
      + {% if all_keywords %} +
      + +
      + {% endif %} +
      + +
      +
      +
      +
      +
      +
      +{% endblock %} diff --git a/templates/journal/homepage_elements/about.html b/templates/journal/homepage_elements/about.html new file mode 100644 index 0000000..cad5ba6 --- /dev/null +++ b/templates/journal/homepage_elements/about.html @@ -0,0 +1,13 @@ +{% load i18n %} +
      +
      +
      +
      +
      +

      {{ title_value|safe }}

      +

      {{ journal_settings.general.journal_description|safe }}

      +
      +
      +
      +
      +
      \ No newline at end of file diff --git a/templates/journal/homepage_elements/carousel.html b/templates/journal/homepage_elements/carousel.html new file mode 100644 index 0000000..a19ff64 --- /dev/null +++ b/templates/journal/homepage_elements/carousel.html @@ -0,0 +1,54 @@ +{% load i18n %} +
      +
      +

      {% trans 'Latest Articles & News' %}

      + +
      +
      diff --git a/templates/journal/homepage_elements/featured.html b/templates/journal/homepage_elements/featured.html new file mode 100644 index 0000000..12b3310 --- /dev/null +++ b/templates/journal/homepage_elements/featured.html @@ -0,0 +1,54 @@ +{% load static %} +{% load i18n %} +{% load alt_text %} +
      +
      +
      + +
      + {% for fa in featured_articles %} +
      +
      + {% if not journal_settings.article.disable_article_large_image %} + {% if fa.article.large_image_file %} + {% get_alt_text obj=fa.article.large_image_file default=fa.article.title|striptags as image_alt %} + {{ image_alt }} + {% elif fa.article.issue.large_image %} + {% get_alt_text file_path=fa.article.issue.large_image.url default=fa.article.title|striptags as image_alt %} + {{ image_alt }} + {% elif fa.article.journal.default_large_image %} + {% get_alt_text file_path=fa.article.journal.default_large_image.url default=fa.article.title|striptags as image_alt %} + {{ image_alt }} + {% else %} + {{ fa.article.title|striptags }} + {% endif %} + {% endif %} +
      +

      {{ fa.article.title }}

      +

      {{ fa.article.author_list }}

      +

      + {% if fa.article.is_remote %} + + {{ fa.article.title|safe|truncatechars:200 }} + {% include "elements/icons/link_external.html" %} + + {% else %} + + {{ fa.article.title|safe|truncatechars:200 }} + + {% endif %} +

      +
      +
      +
      + {% endfor %} +
      +
      \ No newline at end of file diff --git a/templates/journal/homepage_elements/html_block.html b/templates/journal/homepage_elements/html_block.html new file mode 100644 index 0000000..0e86fc8 --- /dev/null +++ b/templates/journal/homepage_elements/html_block.html @@ -0,0 +1 @@ +{{ html_content|safe }} \ No newline at end of file diff --git a/templates/journal/homepage_elements/issue_block.html b/templates/journal/homepage_elements/issue_block.html new file mode 100644 index 0000000..c704627 --- /dev/null +++ b/templates/journal/homepage_elements/issue_block.html @@ -0,0 +1,4 @@ +
      + {% include 'elements/journal/issue_top.html' with level="deep" %} + {% include 'elements/journal/issue_block.html' with level="deep" %} +
      \ No newline at end of file diff --git a/templates/journal/homepage_elements/journals.html b/templates/journal/homepage_elements/journals.html new file mode 100644 index 0000000..8aad577 --- /dev/null +++ b/templates/journal/homepage_elements/journals.html @@ -0,0 +1,29 @@ +
      +
      +
      +

      {% trans 'Featured Journals' %}

      +
      + {% for current_journal in featured_journals %} +
      +
      + {{ current_journal.name }}'s cover image. + +
      +
      + {% endfor %} +
      diff --git a/templates/journal/homepage_elements/news.html b/templates/journal/homepage_elements/news.html new file mode 100644 index 0000000..d503e71 --- /dev/null +++ b/templates/journal/homepage_elements/news.html @@ -0,0 +1,23 @@ +{% load svg from press_url %} +{% load truncate %} +{% load i18n %} +{% load dates %} + +
      +
      +
      +

      {% trans "Latest" %} {{ journal_settings.news.news_title }} {% trans "Posts" %}

      +
      + {% for item in news_items %} +
      +
      +
      +

      {{ item.title|safe }}

      + +

      {{ item.body|striptags|truncatesmart:400 }}

      +
      +
      +
      + {% endfor %} +
      +
      diff --git a/templates/journal/homepage_elements/popular.html b/templates/journal/homepage_elements/popular.html new file mode 100644 index 0000000..71aee1d --- /dev/null +++ b/templates/journal/homepage_elements/popular.html @@ -0,0 +1,59 @@ +{% load static %} +{% load i18n %} +{% load alt_text %} + +
      +
      +
      + {% if most_downloaded %} + + {% else %} + + {% endif %} +
      + {% for article in popular_articles %} +
      +
      + {% if not journal_settings.article.disable_article_large_image %} + {% if article.large_image_file %} + {% get_alt_text obj=article.large_image_file default=article.title|striptags as image_alt %} + {{ image_alt }} + {% elif article.issue.large_image %} + {% get_alt_text file_path=article.issue.large_image.url default=article.title|striptags as image_alt %} + {{ image_alt }} + {% elif article.journal.default_large_image %} + {% get_alt_text file_path=article.journal.default_large_image.url default=article.title|striptags as image_alt %} + {{ image_alt }} + {% else %} + {{ article.title|striptags }} + {% endif %} + {% endif %} +
      +

      {{ article.title }}

      +

      {{ article.author_list }}

      +

      + {% if article.is_remote %} + + {{ article.title|safe|truncatechars:200 }} + {% include "elements/icons/link_external.html" %} + + {% else %} + + {{ article.title|safe|truncatechars:200 }} + + {% endif %} +

      +
      +
      +
      + {% endfor %} +
      +
      \ No newline at end of file diff --git a/templates/journal/homepage_elements/preprints.html b/templates/journal/homepage_elements/preprints.html new file mode 100644 index 0000000..de4b74e --- /dev/null +++ b/templates/journal/homepage_elements/preprints.html @@ -0,0 +1,9 @@ +{% load static %} +{% load i18n %} + +
      +
      +

      {% trans 'Featured Preprints' %}

      +
      + {% include "elements/preprint_block.html" with preprints=preprints %} +
      diff --git a/templates/journal/index.html b/templates/journal/index.html new file mode 100644 index 0000000..7d0d452 --- /dev/null +++ b/templates/journal/index.html @@ -0,0 +1,28 @@ +{% extends "core/base.html" %} +{% load truncate %} + +{% block body %} +

      {{ request.journal.name }} {% trans 'Home Page' %}

      + {% for element in homepage_elements %} +
      + {% include element.template_path %} +
      + {% endfor %} +{% endblock body %} + +{% block js %} + +{% endblock js %} diff --git a/templates/journal/issue.html b/templates/journal/issue.html new file mode 100644 index 0000000..63751d3 --- /dev/null +++ b/templates/journal/issue.html @@ -0,0 +1,15 @@ +{% extends "core/base.html" %} + +{% block title %} + {{ block.super }} | + {% if issue.issue_type.code == 'collection' %} + {% trans "Collection" %}: {{ issue.title }} + {% else %} + {% trans "Issue" %}: {{ issue }} + {% endif %} + {% endblock %} +{% block page_title %}{{ issue.display_title }}{% endblock %} + +{% block body %} +{% include "journal/issue_display.html" %} +{% endblock body %} diff --git a/templates/journal/issue_display.html b/templates/journal/issue_display.html new file mode 100644 index 0000000..396c362 --- /dev/null +++ b/templates/journal/issue_display.html @@ -0,0 +1,19 @@ +{% load i18n %} +{% load pages %} + +
      +
      + + {% include "elements/journal/issue_top.html" with level="shallow" %} + {% include "elements/journal/issue_block.html" with level="shallow" %} + {% include "elements/journal/issue_paginator.html" %} + + +
      + + {% if show_sidebar %} + {% include "elements/journal/issue_sidebar.html" %} + + {% endif %} + +
      diff --git a/templates/journal/issues.html b/templates/journal/issues.html new file mode 100644 index 0000000..3589e6b --- /dev/null +++ b/templates/journal/issues.html @@ -0,0 +1,30 @@ +{% extends "core/base.html" %} +{% load static %} +{% load hooks %} +{% load i18n %} + +{% block page_title %}{% trans "Issues" %}{% endblock %} + +{% block body %} + +
      +
      +

      {% trans issue_type.plural_name %}

      + {% if request.journal.current_issue %} +

      {% trans 'The current issue is' %}: + + {{ request.journal.current_issue.display_title }} - {{ request.journal.current_issue.articles.all.count }} {% trans "items" %} + +

      + {% endif %} + + {% if request.journal.display_issues_grouped_by_decade %} + {% include "elements/journal/issue_list_by_decade.html" %} + {% else %} + {% include "elements/journal/issue_list.html" %} + {% endif %} +
      +
      +{% endblock %} diff --git a/templates/journal/keyword.html b/templates/journal/keyword.html new file mode 100644 index 0000000..939eac5 --- /dev/null +++ b/templates/journal/keyword.html @@ -0,0 +1,20 @@ +{% extends "core/base.html" %} +{% load i18n %} + +{% block page_title %}{% trans "Keyword" %}: {{ keyword.word }}{% endblock %} +{% block title %}{% trans "Keyword" %}: {{ keyword.word }}{% endblock %} + +{% block body %} +
      +

      {% trans "Keyword" %}: {{ keyword.word }}

      +
      +

      {% trans 'Back to Keywords List' %}

      + +

      {% trans "Articles that use this keyword are listed below." %}

      + + {% for article in articles %} + {% include "elements/article_listing.html" with article=article %} + {% endfor %} +
      +
      +{% endblock %} \ No newline at end of file diff --git a/templates/journal/keywords.html b/templates/journal/keywords.html new file mode 100644 index 0000000..964c7e5 --- /dev/null +++ b/templates/journal/keywords.html @@ -0,0 +1,13 @@ +{% extends "core/base.html" %} +{% load i18n %} + +{% block page_title %}{% trans "Keywords" %}{% endblock %} +{% block title %}{% trans "Keywords" %}{% endblock %} + +{% block body %} +
      +
      + {% include "elements/journal/keywords_block.html" %} +
      +
      +{% endblock %} \ No newline at end of file diff --git a/templates/journal/print.html b/templates/journal/print.html new file mode 100644 index 0000000..943135b --- /dev/null +++ b/templates/journal/print.html @@ -0,0 +1,39 @@ +{% load static %} +{% load hooks %} +{% load i18n %} + + + + {% include "common/elements/journal/article_title.html" %} + + {% include "elements/article_meta_tags.html" %} + + +

      {{ article.section.name }}

      +

      {{ article.title|safe }}

      +

      + + {% blocktrans count counter=article.frozen_authors.count %} + Author + {% plural %} + Authors + {% endblocktrans %} + +

      +{% include "common/elements/journal/article_authors_ul.html" %} + +

      {% trans "Abstract" %}

      +

      {{ article.abstract | safe }}

      +{% if article.keywords %} +

      {% trans "Keywords" %}: +

      +

      {% endif %} +

      {% trans "How to Cite" %}: + {% include "elements/journal/how_to_cite.html" with article=article %} + {{ article_content|safe }} + + diff --git a/templates/journal/search.html b/templates/journal/search.html new file mode 100644 index 0000000..df95e6f --- /dev/null +++ b/templates/journal/search.html @@ -0,0 +1,76 @@ +{% extends "core/base.html" %} +{% load hooks %} +{% load i18n %} + +{% hook 'filter_search' %} + +{% block page_title %}{% trans "Search" %}{% endblock %} + +{% block title %}{% trans "Search" %}{% endblock %} + +{% block body %} + +

      {% trans 'Article Search Results' %}

      + + {% if search_term %} +

      Searching for: {{ search_term }}

      + {% elif keyword %} +

      Keyword: {{ keyword }}

      + {% endif %} + +
      +
      + + + {% for article in articles %} + {% include "elements/article_listing.html" with article=article %} + {% empty %} +

      {% trans "No articles to display" %}.

      + {% endfor %} + +
      +
      +
      +
      +
      + {% csrf_token %} +
      + {% if not keyword %} + {{ form.article_search.errors }} + + {{ form.article_search }} + + {% else %} + {% trans 'You are currently browsing by keyword.' %} + {% trans 'Search for an article' %}. + {% endif %} +
      +
      + +
      +
      + + {{ form.sort.errors }} + {{ form.sort }} +
      +
      + +
      +
      +
      +
      +
      +
      +{% endblock %} diff --git a/templates/journal/submissions.html b/templates/journal/submissions.html new file mode 100644 index 0000000..5513b92 --- /dev/null +++ b/templates/journal/submissions.html @@ -0,0 +1,47 @@ +{% extends "core/base.html" %} +{% load i18n %} +{% load static %} +{% load next_url %} + +{% block title %}{% trans 'Submissions' %}{% endblock title %} + +{% block body %} +
      +
      +

      {% trans 'Submissions' %}

      + {% if journal_settings.general.disable_journal_submission %} +

      {{ journal_settings.general.disable_journal_submission_message|safe }}

      + {% endif %} + {{ journal_settings.general.submission_intro_text|safe }} + +
      + {% if not request.user.is_authenticated %} + + {% trans 'Register' %} + + + {% trans 'Log in' %} + {% else %} + {% trans 'Start Submission' %}{% endif %} +
      + + {% for item in submission_items %} + {% if item.title == 'licences' %} +

      + {{ item.title|capfirst }} +

      +

      {% trans "The following licences are allowed:" %}

      + {% include "elements/license_block.html" %} + {% elif item.title == 'sections' %} + {% include "elements/sections_block.html" %} + {% elif item.get_display_text %} +

      + {{ item.title|capfirst }} +

      + {{ item.get_display_text|safe }} + + {% endif %} + {% endfor %} +
      +
      +{% endblock body %} diff --git a/templates/press/cms/page.html b/templates/press/cms/page.html new file mode 100644 index 0000000..44720a8 --- /dev/null +++ b/templates/press/cms/page.html @@ -0,0 +1,20 @@ +{% extends "core/base.html" %} + +{% block title %}{{ page.display_name }}{% endblock title %} + + +{% block navbar %} + {% include "press/nav.html" %} +{% endblock navbar %} + +{% block body %} +
      +
      +
      +

      {{ page.display_name }}

      + + {{ page.content|safe }} +
      +
      +
      +{% endblock body %} diff --git a/templates/press/core/news/index.html b/templates/press/core/news/index.html new file mode 100644 index 0000000..0cff552 --- /dev/null +++ b/templates/press/core/news/index.html @@ -0,0 +1,69 @@ +{% extends "core/base.html" %} +{% load truncate %} +{% load dates %} +{% load pages %} + +{% block title %}News{% endblock title %} + +{% block body %} +
      +
      +

      {% trans 'News' %}

      + {% if tag %}

      Filtering tag: {{ tag }}

      {% endif %} +
      + {% for item in news_items %} +
      +

      {{ item.title }}

      + +

      {{ item.body|striptags|truncatesmart:400 }}

      + + {% trans 'Read More.' %} + + +
      + {% empty %} +

      {% trans 'This journal currently has no news items to display' %}.

      + {% endfor %} +
      +
      +
      + +
      +
      +{% endblock body %} diff --git a/templates/press/core/news/item.html b/templates/press/core/news/item.html new file mode 100644 index 0000000..7a5e673 --- /dev/null +++ b/templates/press/core/news/item.html @@ -0,0 +1,29 @@ +{% extends "core/base.html" %} +{% load truncate %} +{% load dates %} + +{% block title %}{{ news_item.title }}{% endblock title %} + +{% block body %} +
      +
      +

      {{ news_item.title }}

      + +
      +
      + +

      {{ news_item.body|safe }}

      +
      + {% if news_item.tags.all %} +

      {% trans 'Tags' %} 

      +
        + {% for tag in news_item.tags.all %} +
      • {{ tag.text }}
      • + {% endfor %} +
      + {% endif %} + {% trans 'Back to News List' %} +
      +
      + +{% endblock body %} diff --git a/templates/press/editorial_team.html b/templates/press/editorial_team.html new file mode 100644 index 0000000..1f69df7 --- /dev/null +++ b/templates/press/editorial_team.html @@ -0,0 +1 @@ +{% include 'journal/editorial_team.html' %} diff --git a/templates/press/homepage_elements/journals_and_html.html b/templates/press/homepage_elements/journals_and_html.html new file mode 100644 index 0000000..2b5bb2b --- /dev/null +++ b/templates/press/homepage_elements/journals_and_html.html @@ -0,0 +1,34 @@ +
      +
      +
      +
      + +
      + {% for current_journal in featured_journals %} +
      + +
      + {% endfor %} +
      +
      +
      + {{ html_block_content|safe }} +
      +
      \ No newline at end of file diff --git a/templates/press/journal/contact.html b/templates/press/journal/contact.html new file mode 100644 index 0000000..0cd24a2 --- /dev/null +++ b/templates/press/journal/contact.html @@ -0,0 +1,43 @@ +{% extends "core/base.html" %} +{% load bootstrap4 %} +{% load i18n %} + +{% block title %}{% trans "Contact" %}{% endblock title %} + +{% block body %} +
      + +
      +

      {% trans 'Contact us' %}

      + +
      + {% for contact in contacts %} +
      {{ contact.name }}
      +
      {{ contact.role }}
      + {% endfor %} +
      +
      +
      +

      {% trans "Contact" %}

      +

      {% trans "All fields are required." %}

      +
      + {% include "elements/forms/errors.html" with form=contact_form %} + {% csrf_token %} +
      +
      + +
      + {% bootstrap_field contact_form.sender %} + {% bootstrap_field contact_form.subject %} + {% bootstrap_field contact_form.body %} + {% bootstrap_field contact_form.captcha %} + +
      +
      + +
      +{% endblock body %} diff --git a/templates/press/nav.html b/templates/press/nav.html new file mode 100644 index 0000000..0016701 --- /dev/null +++ b/templates/press/nav.html @@ -0,0 +1,94 @@ +{% load svg from press_url %} +{% load roles %} +{% load i18n %} +{% load hooks %} +{% load next_url %} + + diff --git a/templates/press/press_index.html b/templates/press/press_index.html new file mode 100644 index 0000000..3d7103f --- /dev/null +++ b/templates/press/press_index.html @@ -0,0 +1,12 @@ +{% extends "core/base.html" %} +{% load static %} + +{% block navbar %} + {% include "press/nav.html" %} +{% endblock navbar %} + +{% block body %} + {% for element in homepage_elements %} + {% include element.template_path %} + {% endfor %} +{% endblock body %} diff --git a/templates/press/press_journals.html b/templates/press/press_journals.html new file mode 100644 index 0000000..6d6d003 --- /dev/null +++ b/templates/press/press_journals.html @@ -0,0 +1,87 @@ +{% extends "core/base.html" %} +{% load static %} +{% load settings i18n %} + +{% block title %}{{ request.press.name }} | Journals{% endblock title %} + +{% block body %} +
      +
      +

      {% trans 'Journals' %}

      +
      +
      + + {% trans "Skip to filter" %} + + {% for current_journal in journals %} + {% setting_var current_journal 'disable_journal_submission' as submission_disabled %} +
      +
      + {% if current_journal.name != +
      +
      + {{ current_journal.name|lower }} +

      {{ current_journal.name }}

      + {{ current_journal.description_for_press|safe }} +
      + {% if current_journal.is_remote %} + {% if not submission_disabled %} + + {% trans 'Submit' %} + {% include "elements/icons/link_external.html" %} + + {% endif %} + + {% trans 'View' %} + {% include "elements/icons/link_external.html" %} + + {% else %} + {% if not submission_disabled %} + + {% trans 'Submit' %} + {% endif %} + + {% trans 'View' %} + {% if current_journal.current_issue %} + + {% trans 'Current Issue' %} + {% elif current_journal.serial_issues.count > 0 %} + + {{ current_journal.issue_type_plural_name }} + {% endif %} + {% endif %} +
      +
      +
      + {% empty %} +

      {% trans 'No journals to list' %}.

      + {% endfor %} +
      +
      +
      + + {% include "common/elements/skip_to_main_content.html" %} +
      +
      +
      +{% endblock body %} + +{% block js %} + +{% endblock %} diff --git a/templates/repository/about.html b/templates/repository/about.html new file mode 100644 index 0000000..b0b5e0a --- /dev/null +++ b/templates/repository/about.html @@ -0,0 +1,13 @@ +{% extends "core/base.html" %} +{% load i18n %} + +{% block title %}{% trans 'About' %} {{ request.repository.name }}{% endblock %} + +{% block body %} +
      +
      +

      {% trans 'About' %} {{ request.repository.name }}

      + {{ request.repository.about|safe }} +
      +
      +{% endblock %} diff --git a/templates/repository/elements/preprint_home_listing.html b/templates/repository/elements/preprint_home_listing.html new file mode 100644 index 0000000..014cc51 --- /dev/null +++ b/templates/repository/elements/preprint_home_listing.html @@ -0,0 +1,14 @@ +{% load i18n %} + +{% for preprint in preprints %} +
      +
      +

      + + {{ preprint.title|safe }} + +

      + +
      +
      +{% endfor %} diff --git a/templates/repository/elements/preprint_listing.html b/templates/repository/elements/preprint_listing.html new file mode 100644 index 0000000..28e0836 --- /dev/null +++ b/templates/repository/elements/preprint_listing.html @@ -0,0 +1,33 @@ +{% load truncate %} +{% load dates %} +{% load i18n %} + +{% for preprint in preprints %} +
      +

      + + {{ preprint.title|safe }} + +

      + + + {% if preprint.abstract %} +

      {{ preprint.abstract|striptags|truncatesmart:300 }}

      + {% endif %} +
      +{% empty %} +

      {% trans 'No results found.' %}

      +{% endfor %} diff --git a/templates/repository/home.html b/templates/repository/home.html new file mode 100644 index 0000000..1139418 --- /dev/null +++ b/templates/repository/home.html @@ -0,0 +1,87 @@ +{% extends "core/base.html" %} +{% load i18n %} +{% load static %} +{% load alt_text %} + +{% block title %}{{ request.repository.name }}{% endblock %} + +{% block body %} + +{% if request.repository.hero_image or request.repository.default_large_image %} +
      +
      + {% get_alt_text file_path=request.repository.best_large_image_url default=request.repository.name %} +
      +
      +

      {{ request.repository.name }}

      + {% if request.repository.description %} +

      {{ request.repository.description|striptags|truncatechars:200 }}

      + {% endif %} +
      +
      +
      +
      +{% else %} +
      +

      {{ request.repository.name }}

      + {% if request.repository.description %} +

      {{ request.repository.description|safe }}

      + {% endif %} +
      +{% endif %} + + + +{% if preprints %} +
      +
      +

      {% trans 'Latest' %} {{ request.repository.object_name_plural|capfirst }}

      +
      +
      +
      + {% include "repository/elements/preprint_home_listing.html" with preprints=preprints %} +
      + +{% else %} +
      +
      +

      {% trans 'No' %} {{ request.repository.object_name_plural }} {% trans 'have been published yet.' %}

      +
      +
      +{% endif %} + +{% endblock %} diff --git a/templates/repository/list.html b/templates/repository/list.html new file mode 100644 index 0000000..bf8040f --- /dev/null +++ b/templates/repository/list.html @@ -0,0 +1,87 @@ +{% extends "core/base.html" %} +{% load i18n %} +{% load pages %} + +{% block title %}{{ request.repository.name }} {{ request.repository.object_name_plural|capfirst }}{% endblock %} + +{% block body %} +
      +
      +

      {{ request.repository.object_name_plural|capfirst }}

      +

      + {% if search_term %} + {% blocktrans with term=search_term count=preprints.paginator.count %}Search for {{ term }} ({{ count }} results){% endblocktrans %} + {% elif subject %} + {% trans 'Filtering by Subject:' %} {{ subject }} + {% else %} + {% with count=preprints.paginator.count %} + {% blocktrans count count as n %}There is {{ n }} {{ object_name }} listed.{% plural %}There are {{ n }} {{ object_name_plural }} listed.{% endblocktrans %} + {% endwith %} + {% endif %} +

      + + {% include "repository/elements/preprint_listing.html" with preprints=preprints %} + +
      + +
      +
      + +
      +
      +
      +

      {% trans 'Search' %}

      +
      + {% csrf_token %} +
      + +
      + +
      +
      +
      + {% trans 'You can search by title, keywords, author name, or author affiliation.' %} +
      +
      + +
      +
      +

      {% trans 'Browse' %}

      + + {% trans 'Browse by Subject' %} + +
      +
      +
      +
      +{% endblock %} diff --git a/templates/repository/list_subjects.html b/templates/repository/list_subjects.html new file mode 100644 index 0000000..d5ea57d --- /dev/null +++ b/templates/repository/list_subjects.html @@ -0,0 +1,17 @@ +{% extends "core/base.html" %} +{% load i18n %} +{% load pages %} + +{% block title %}{{ request.repository.name }} {% trans 'Subjects' %}{% endblock %} + +{% block body %} +
      +
      +

      {% trans 'Subjects' %}

      +

      {% trans 'Select a subject to view' %} {{ request.repository.object_name_plural }} {% trans 'in that subject.' %}

      +
        + {% include "common/repository/subject_tree.html" with subjects=top_level_subjects %} +
      +
      +
      +{% endblock %} diff --git a/templates/repository/nav.html b/templates/repository/nav.html new file mode 100644 index 0000000..3a5dcf4 --- /dev/null +++ b/templates/repository/nav.html @@ -0,0 +1,50 @@ +{% load static %} +{% load i18n %} +{% load hooks %} +{% load next_url %} + + diff --git a/templates/repository/preprint.html b/templates/repository/preprint.html new file mode 100644 index 0000000..9e46cef --- /dev/null +++ b/templates/repository/preprint.html @@ -0,0 +1,261 @@ +{% extends "core/base.html" %} +{% load static %} +{% load hooks %} +{% load i18n %} +{% load alt_text %} +{% load bootstrap4 %} +{% load next_url %} +{% load dates %} + +{% block title %}{{ preprint.title|striptags }}{% endblock %} + +{% block head %} + {% include "common/metadata/preprint_dc.html" %} + {% include "common/metadata/preprint_citation.html" %} +{% endblock %} + +{% block body %} + +{% if request.repository.hero_image or request.repository.default_large_image %} +
      +
      +
      + {% get_alt_text file_path=request.repository.best_large_image_url default=preprint.title|striptags %} +
      +
      +

      {{ preprint.title|safe }}

      +
      +
      +
      +
      +
      +{% endif %} + +
      + +
      +
      + + {% if not request.repository.hero_image and not request.repository.default_large_image %} +

      {{ preprint.title|safe }}

      + {% endif %} + +

      + {% trans 'This is a' %} {{ request.repository.object_name }} {% trans 'and has not been peer reviewed.' %} + {% if preprint.doi %} + {% trans 'The published version of this' %} {{ request.repository.object_name }} {% trans 'is available:' %} + {% include "elements/doi_display.html" with doi=preprint.doi title=preprint.title %} + {% elif preprint.article %} + {% blocktrans with url=preprint.article.url journal=preprint.article.journal.name %}A published version of this preprint is available on {{ journal }}.{% endblocktrans %} + {% endif %} + {% blocktrans with version=preprint.current_version.version object_name=request.repository.object_name %}This is version {{ version }} of this {{ object_name }}.{% endblocktrans %} +

      + + {% if preprint.current_version_file_type == 'html' %} +
      + {{ preprint.current_version.html|safe }} +
      + {% elif preprint.current_version_file_type == 'pdf' %} + + {% else %} + {% if preprint.current_version.file %} +

      {% trans 'This' %} {{ request.repository.object_name }} {% trans 'has no visible version.' %}

      + + {{ request.repository.object_name }} + {% include "elements/icons/link_download.html" %} + + {% else %} +

      {% trans 'This' %} {{ request.repository.object_name }} {% trans 'does not have any files associated with it.' %}

      + {% endif %} + {% endif %} + + {% if request.repository.enable_comments or request.repository.enable_invited_comments %} +
      +
      + {% if request.repository.enable_comments %} +

      {% trans 'Add a Comment' %}

      + {% if request.user.is_authenticated %} +
      + {% csrf_token %} + {% bootstrap_form form %} + +
      +
      + {% else %} +

      + {% url_with_return 'core_login' as login_url %} + {% blocktrans %}You must log in to post a comment.{% endblocktrans %} +

      + {% endif %} + {% endif %} + +

      {% trans 'Comments' %}

      + {% for comment in comments %} +
      +
      + {% if comment.author.profile_image and not comment.review.anonymous %} + {% blocktrans with name=comment.author.full_name %}Profile image of {{ name }}{% endblocktrans %} + {% else %} + {% trans 'Generic profile image' %} + {% endif %} +
      +
      + {% if comment.review %} +

      {% trans 'Invited Review Comment' %} #{{ comment.pk }} + {% if comment.review.anonymous %}{% trans 'Anonymous' %}{% else %}{{ comment.author.full_name }}{% endif %} + — {{ comment.date_time }}

      + {{ comment.body|safe }} + {% else %} +

      {% trans 'Comment' %} #{{ comment.pk }} {{ comment.author.full_name }} — {{ comment.date_time }}

      +

      {{ comment.body|linebreaksbr }}

      + {% endif %} +
      +
      + {% empty %} +

      {% trans 'There are no comments for this' %} {{ request.repository.object_name }}.

      + {% endfor %} +
      +
      + {% endif %} + +
      +
      + +
      +
      +
      +
      + + {% if preprint.current_version.file %} +

      {% trans 'Downloads' %}

      + + {% endif %} + + {% if preprint.supplementaryfiles %} +

      {% trans 'Supplementary Files' %}

      +
        + {% for link in preprint.supplementaryfiles %} +
      • {{ link.label }}
      • + {% empty %} +
      • {% trans 'No supplementary files.' %}
      • + {% endfor %} +
      + {% endif %} + +

      {% trans 'Authors' %}

      +

      + {% for author in preprint.authors %} + {{ author.full_name }} + {% if author.orcid %} +   + ORCID + + {% endif %} + {% if not forloop.last %}, {% endif %} + {% endfor %} +

      + + {% if preprint.abstract %} +

      {% trans 'Abstract' %}

      +

      {{ preprint.abstract|safe }}

      + {% endif %} + + {% if preprint.preprint_doi %} +

      {% trans 'DOI' %}

      +

      {% include "elements/doi_display.html" with doi=preprint.preprint_doi title=preprint.title %}

      + {% endif %} + + {% if preprint.subject.all %} +

      {% trans 'Subjects' %}

      +

      {% include "common/repository/subject_display.html" %}

      + {% endif %} + + {% if preprint.keywords.all %} +

      {% trans 'Keywords' %}

      +
        + {% for keyword in preprint.keywords.all %} +
      • {{ keyword.word }}
      • + {% endfor %} +
      + {% endif %} + +

      {% trans 'Dates' %}

      +
        +
      • {% trans 'Published:' %} {{ preprint.date_published|date_human }}
      • + {% if preprint.preprintversion_set.count > 0 and preprint.current_version and preprint.current_version.date_time > preprint.date_published %} +
      • {% trans 'Last Updated:' %} {{ preprint.current_version.date_time|date_human }}
      • + {% endif %} +
      + + {% if preprint.preprintversion_set.count > 1 %} +

      {% trans 'Older Versions' %}

      + + {% endif %} + + {% if preprint.license %} +

      {% trans 'License' %}

      +

      + {% if preprint.license.url %} + + {{ preprint.license.name }} + {% include "elements/icons/link_external.html" %} + + {% else %} + {{ preprint.license.name }} + {% endif %} +

      + {% endif %} + + {% if preprint.display_additional_fields %} +

      {% trans 'Additional Metadata' %}

      + {% for answer in preprint.display_additional_fields %} +

      {{ answer.field.name }}:
      {{ answer.answer|safe }}

      + {% endfor %} + {% endif %} + + {% if request.repository.display_public_metrics %} +

      {% trans 'Metrics' %}

      +
        +
      • {% trans 'Views:' %} {{ preprint.views.count }}
      • +
      • {% trans 'Downloads:' %} {{ preprint.downloads.count }}
      • +
      + {% endif %} + + {% hook 'article_sidebar' %} + +
      +
      +
      +
      + +
      + +{% hook 'article_footer_block' %} +{% endblock %}