From 347f3edc030b772404a5b5591423100b6a49aea0 Mon Sep 17 00:00:00 2001 From: mb Date: Fri, 17 Jul 2020 22:13:36 +0200 Subject: [PATCH] fixed mapping on creators for authors.html fixed margin of h2,h4 plus added some css style. --- .../less/invenio_theme_tugraz/frontpage.less | 11 ++------- .../less/invenio_theme_tugraz/macros.less | 18 ++++++++++++++ .../less/invenio_theme_tugraz/theme.less | 1 + invenio_theme_tugraz/static/orcid.png | Bin 0 -> 566 bytes .../invenio_theme_tugraz/benefits.html | 10 ++++++++ .../templates/invenio_theme_tugraz/index.html | 23 ++++-------------- .../invenio_theme_tugraz/macros/authors.html | 17 ++++++++----- setup.py | 5 ++-- 8 files changed, 50 insertions(+), 35 deletions(-) create mode 100644 invenio_theme_tugraz/assets/semantic-ui/less/invenio_theme_tugraz/macros.less create mode 100644 invenio_theme_tugraz/static/orcid.png create mode 100644 invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html diff --git a/invenio_theme_tugraz/assets/semantic-ui/less/invenio_theme_tugraz/frontpage.less b/invenio_theme_tugraz/assets/semantic-ui/less/invenio_theme_tugraz/frontpage.less index ddae5b5..fc1c1b5 100644 --- a/invenio_theme_tugraz/assets/semantic-ui/less/invenio_theme_tugraz/frontpage.less +++ b/invenio_theme_tugraz/assets/semantic-ui/less/invenio_theme_tugraz/frontpage.less @@ -8,8 +8,8 @@ h4{ display: block; - margin-block-start: 1.33em; - margin-block-end: 1.33em; + margin-block-start: 0.33em; + margin-block-end: 0.33em; margin-inline-start: 0px; margin-inline-end: 0px; } @@ -21,10 +21,3 @@ h2{ margin-inline-end: 0px; } -p{ - display: block; - margin-block-start: 1em; - margin-block-end: 1em; - margin-inline-start: 0px; - margin-inline-end: 0px; -} diff --git a/invenio_theme_tugraz/assets/semantic-ui/less/invenio_theme_tugraz/macros.less b/invenio_theme_tugraz/assets/semantic-ui/less/invenio_theme_tugraz/macros.less new file mode 100644 index 0000000..dc7072e --- /dev/null +++ b/invenio_theme_tugraz/assets/semantic-ui/less/invenio_theme_tugraz/macros.less @@ -0,0 +1,18 @@ +/* + * Copyright (C) 2020 TUGRAZ. + * Copyright (C) 2020 mojib wali. + * + * invenio-theme-tugraz is free software; you can redistribute it and/or modify it + * under the terms of the MIT License; see LICENSE file for more details. + */ + +/* +* authors.html +*/ +.inline-orcid { + height: 14px; +} + +.text-muted { + color: #777; +} diff --git a/invenio_theme_tugraz/assets/semantic-ui/less/invenio_theme_tugraz/theme.less b/invenio_theme_tugraz/assets/semantic-ui/less/invenio_theme_tugraz/theme.less index 03b19e2..db2edaa 100644 --- a/invenio_theme_tugraz/assets/semantic-ui/less/invenio_theme_tugraz/theme.less +++ b/invenio_theme_tugraz/assets/semantic-ui/less/invenio_theme_tugraz/theme.less @@ -10,6 +10,7 @@ @import "footer"; @import "overrides"; @import "frontpage"; +@import "macros"; @import (css) url("https://fonts.googleapis.com/css?family=Source+Sans+Pro&display=swap"); diff --git a/invenio_theme_tugraz/static/orcid.png b/invenio_theme_tugraz/static/orcid.png new file mode 100644 index 0000000000000000000000000000000000000000..78e605055d01b04d897bcf0c3118da58a83d96fb GIT binary patch literal 566 zcmV-60?GY}P)=?v&41w5) z9A6Yb&17JK3d~1Waqh`PhF71@Gu(f-mE52LnW@MEO^O&13UWQj7q7mYWBB#`HaNJ@ z!TayGz>awG@etOC2bs+RP3IVZhg}kE2`e)%+`?afzc73NS_T5#Y!YBGbP%_hlUB$Lk|!*9o6tJH}i2L%pHB&K&1@b%Yopvx=3 zKERP66qp#O0B*io38uw)4H*dLWO4wOu&1sCpa{oj!2?PRXJh7JP!|gav!8sxNUjf< zphYfO02HZC(BkCg>y^NKaT{I90Z=mCNNfQIN-2?s$1o!qXgDb6V*wi(p=Hs1^yCV1 z9Vk`Yd%F#s9Cam=F(dcS7jP~H$z!V{fTgM;tSm}|)&Xz;Dk4A_1};CJOKJ!v!c!5n zCYr!NJum@QyV0-0f%+toLZ3`PHk>Y%J|nH0EdT)q0QA7Oe=K+?{r~^~07*qoM6N<$ Ef>fj8`v3p{ literal 0 HcmV?d00001 diff --git a/invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html b/invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html new file mode 100644 index 0000000..94c6d87 --- /dev/null +++ b/invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html @@ -0,0 +1,10 @@ + +
    +
  • {{_('Safe')}} — {{_('your research is stored safely for the future in CERN’s Data Centre for as long as CERN exists.')}}
  • +
  • {{_('Trusted')}} — {{_('built and operated by CERN and OpenAIRE to ensure that everyone can join in Open Science.')}}
  • +
  • {{_('Citeable')}} — {{_('every upload is assigned a Digital Object Identifier (DOI), to make them citable and trackable.')}}
  • +
  • {{_('No waiting time')}} — {{_('Uploads are made available online as soon as you hit publish, and your DOI is registered within seconds.')}}
  • +
  • {{_('Open or closed')}} — {{_('Share e.g. anonymized clinical trial data with only medical professionals via our restricted access mode.')}}
  • +
  • {{_('Versioning')}} — {{_("Easily update your dataset with our versioning feature.")}}
  • +
  • {{_('Usage statisics')}} — {{_("All uploads display standards compliant usage statistics")}}
  • +
\ No newline at end of file diff --git a/invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html b/invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html index 79ed2c5..cd80cc9 100644 --- a/invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html +++ b/invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html @@ -9,7 +9,7 @@ {%- extends config.INVENIO_THEME_TUGRAZ_BASE_TEMPLATE %} -{%- from "invenio_theme_tugraz/macros/authors.html" import authors -%} +{%- from "invenio_theme_tugraz/macros/authors.html" import creators -%} {%- block page_body %} @@ -46,12 +46,12 @@

{{r.titles[0].title}}

-

{{ authors(r.creators) }}

+

{{ creators(r.creators) }}

-
{% trans user=userprofile, date=creation_date|dateformat('long') %}Uploaded on - {{date}}{% endtrans %}
+ {% trans user=userprofile, date=creation_date|dateformat('long') %}Uploaded on + {{date}}{% endtrans %} {%- if not loop.last %}
@@ -85,20 +85,7 @@

Why use {{config.THEME_SITENAME}}?

-
    -
  • Safe — your research is stored safely for the future in CERN’s Data Centre for as long as - CERN exists.
  • -
  • Trusted — built and operated by CERN and OpenAIRE to ensure that everyone can join in - Open Science.
  • -
  • Citeable — every upload is assigned a Digital Object Identifier (DOI), to make them - citable and trackable.
  • -
  • No waiting time — Uploads are made available online as soon as you hit publish, and your - DOI is registered within seconds.
  • -
  • Open or closed — Share e.g. anonymized clinical trial data with only medical - professionals via our restricted access mode.
  • -
  • Versioning — Easily update your dataset with our versioning feature.
  • -
  • Usage statisics — All uploads display standards compliant usage statistics
  • -
+ {% include "invenio_theme_tugraz/benefits.html" %}
diff --git a/invenio_theme_tugraz/templates/invenio_theme_tugraz/macros/authors.html b/invenio_theme_tugraz/templates/invenio_theme_tugraz/macros/authors.html index 4105f32..d3a9d63 100644 --- a/invenio_theme_tugraz/templates/invenio_theme_tugraz/macros/authors.html +++ b/invenio_theme_tugraz/templates/invenio_theme_tugraz/macros/authors.html @@ -8,16 +8,21 @@ details. #} -{%- macro authors(authors_list) %} -{%- for author in authors_list %} -{%- if author.orcid %} - +{%- macro creators (authors_list) %} + +{%- for creators in authors_list %} + +{%- if creators.identifiers.Orcid %} + {%- endif %} -{{author.name}}{% if not loop.last %}; {% endif %} + +{{creators.name}} +{% if not loop.last %}; {% endif %} + {%- endfor %} {%- endmacro %} - + {%- macro contributors(contributors_list) %} {%- for group in contributors_list|groupby('type')%}
{{group.grouper|contributortype_title}}(s)
diff --git a/setup.py b/setup.py index 3e5db2a..2128e88 100644 --- a/setup.py +++ b/setup.py @@ -17,12 +17,13 @@ history = open('CHANGES.rst').read() tests_require = [ 'check-manifest>=0.25', - 'coverage>=4.0', + # coverage pinned because of https://github.com/nedbat/coveragepy/issues/716 + 'coverage>=4.0,<5.0.0', 'isort>=4.3.3, <5.0.0', 'pydocstyle>=2.0.0', 'pytest-cov>=2.5.1', 'pytest-pep8>=1.0.6', - 'pytest-invenio>=1.2.1', + 'pytest-invenio>=1.3.2', ] extras_require = {