Compare commits

...

11 Commits

Author SHA1 Message Date
Mojib Wali
804bd108c5 v1.1.0 2020-12-04 10:21:04 +01:00
Mojib Wali
bbea43d227 Refactor header (#116)
* bugfix(ui): home text & icon collapse in small screen.

* added home text & icon inside span tag.
* inline css with nowrap white-space.

* refactor(ui): adding the text of 'Library & Archives', This closes #110

* bugfix(format): adding new line a the end of the file.

* refactor(ui): changing the text to capital letters, to match the other.

* adding extra css for position/style of the text.

* style(ui): fixed misspelled.

* bugfix(format): adding new line a the end of the file.

* modification(ui): from Logout/SignUp to Sign up

* modification(ui): changing texts to - Log in, Log out and Sign up

removing icons from header.
2020-12-04 10:14:02 +01:00
Mojib Wali
84f963b407 ci(repo): migrate to github actions. (#119)
tests(repo): modified to github actions.
2020-12-03 15:19:45 +01:00
Mojib Wali
e45832be2b v1.0.9
Patch change - October release data model fields updated.
2020-11-13 09:28:32 +01:00
mb
75bb5377c8 migrate(datamodel):changed fields to match the new data model structure.
* Orcid => orcid
* filter contributertype_title deprecated
* records.metadata.title and for additional title there is a new field additional_titles.
* records.metadata.description and for additional description there is a new field additional_descriptions.
This closes #114.
2020-11-12 11:12:55 +01:00
Mojib Wali
e4fc2ff14d v1.0.8 2020-10-21 10:59:42 +02:00
Mojib Wali
b33274a3ea repository transfer
Repository transfer from https://github.com/mb-wali to https://github.com/tu-graz-library.

* updated badges
* readthedocs - URL paths 
* Setup.py repository URL
2020-10-21 10:53:10 +02:00
Mojib Wali
11abd513e9 v1.0.7 2020-10-21 09:48:57 +02:00
Mojib Wali
4e35220e5b Update README.rst
badge for code style black.
2020-10-21 09:43:48 +02:00
mb
9126efbe42 repository logo set to library logo. This closes #109 2020-10-21 09:37:54 +02:00
Mojib Wali
2227e8d204 v1.0.6 2020-10-15 11:43:06 +02:00
21 changed files with 106 additions and 96 deletions

View File

@@ -32,8 +32,8 @@ indent_size = 4
[*.{css,html,js,json,yml}] [*.{css,html,js,json,yml}]
indent_size = 2 indent_size = 2
# Matches the exact files either package.json or .travis.yml # Matches the exact files either package.json or .github/workflows/*.yml
[{package.json,.travis.yml}] [{package.json, .github/workflows/*.yml}]
indent_size = 2 indent_size = 2
# Dockerfile # Dockerfile

54
.github/workflows/tests.yml vendored Normal file
View File

@@ -0,0 +1,54 @@
name: CI
on:
push:
branches: master
pull_request:
branches: master
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '0 3 * * 6'
workflow_dispatch:
inputs:
reason:
description: 'Reason'
required: false
default: 'Manual trigger'
jobs:
Tests:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: [3.6, 3.7, 3.8]
requirements-level: [min, pypi]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Generate dependencies
run: |
python -m pip install --upgrade pip setuptools py wheel requirements-builder
requirements-builder -e all --level=${{ matrix.requirements-level }} setup.py > .${{ matrix.requirements-level }}-${{ matrix.python-version }}-requirements.txt
- name: Cache pip
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('.${{ matrix.requirements-level }}-${{ matrix.python-version }}-requirements.txt') }}
- name: Install dependencies
run: |
pip install -r .${{matrix.requirements-level}}-${{ matrix.python-version }}-requirements.txt
pip install .[all]
pip freeze
- name: Run tests
run: |
./run-tests.sh

View File

@@ -1,55 +0,0 @@
# -*- coding: utf-8 -*-
#
# 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.
branches:
except:
- /^v\d+\.\d+(\.\d+)?(\S*)?$/
notifications:
email: false
sudo: false
language: python
matrix:
fast_finish: true
allow_failures:
# To allow failures, you need to specify the full environment
- env: REQUIREMENTS=devel
cache:
- pip
env:
- REQUIREMENTS=lowest
- REQUIREMENTS=release
- REQUIREMENTS=devel
python:
- "3.6"
- "3.7"
- "3.8"
before_install:
- "nvm install 6; nvm use 6"
- "travis_retry pip install --upgrade pip setuptools py"
- "travis_retry pip install twine wheel coveralls requirements-builder"
- "requirements-builder -e all --level=min setup.py > .travis-lowest-requirements.txt"
- "requirements-builder -e all --level=pypi setup.py > .travis-release-requirements.txt"
- "requirements-builder -e all --level=dev --req requirements-devel.txt setup.py > .travis-devel-requirements.txt"
install:
- "travis_retry pip install -r .travis-${REQUIREMENTS}-requirements.txt"
- "travis_retry pip install -e .[all]"
script:
- "./run-tests.sh"
after_success:
- coveralls

View File

@@ -10,7 +10,7 @@ Types of Contributions
Report Bugs Report Bugs
~~~~~~~~~~~ ~~~~~~~~~~~
Report bugs at https://github.com/mb-wali/invenio-theme-tugraz/issues. Report bugs at https://github.com/tu-graz-library/invenio-theme-tugraz/issues.
If you are reporting a bug, please include: If you are reporting a bug, please include:
@@ -41,7 +41,7 @@ Submit Feedback
~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~
The best way to send feedback is to file an issue at The best way to send feedback is to file an issue at
https://github.com/mb-wali/invenio-theme-tugraz/issues. https://github.com/tu-graz-library/invenio-theme-tugraz/issues.
If you are proposing a feature: If you are proposing a feature:
@@ -55,7 +55,7 @@ Get Started!
Ready to contribute? Here's how to set up `invenio-theme-tugraz` for local development. Ready to contribute? Here's how to set up `invenio-theme-tugraz` for local development.
1. Fork the `https://github.com/mb-wali/invenio-theme-tugraz.git` repo on GitHub. 1. Fork the `https://github.com/tu-graz-library/invenio-theme-tugraz.git` repo on GitHub.
2. Clone your fork locally: 2. Clone your fork locally:
.. code-block:: console .. code-block:: console
@@ -114,5 +114,5 @@ Before you submit a pull request, check that it meets these guidelines:
2. If the pull request adds functionality, the docs should be updated. Put 2. If the pull request adds functionality, the docs should be updated. Put
your new functionality into a function with a docstring. your new functionality into a function with a docstring.
3. The pull request should work for Python 2.7, 3.5 and 3.6. Check 3. The pull request should work for Python 2.7, 3.5 and 3.6. Check
https://travis-ci.com/github/mb-wali/invenio-theme-tugraz/pull_requests https://github.com/tu-graz-library/invenio-theme-tugraz/actions?query=event%3Apull_request
and make sure that the tests pass for all supported Python versions. and make sure that the tests pass for all supported Python versions.

View File

@@ -36,3 +36,4 @@ recursive-include invenio_theme_tugraz *.ico
recursive-include tests *.py recursive-include tests *.py
recursive-include invenio_theme_tugraz *.jpg recursive-include invenio_theme_tugraz *.jpg
recursive-include invenio_theme_tugraz *.gitkeep recursive-include invenio_theme_tugraz *.gitkeep
recursive-include .github/workflows *.yml

View File

@@ -9,17 +9,17 @@
invenio-theme-tugraz invenio-theme-tugraz
====================== ======================
.. image:: https://travis-ci.com/mb-wali/invenio-theme-tugraz.svg .. image:: https://github.com/tu-graz-library/invenio-theme-tugraz/workflows/CI/badge.svg
:target: https://travis-ci.com/github/mb-wali/invenio-theme-tugraz :target: https://github.com/tu-graz-library/invenio-theme-tugraz/actions
.. image:: https://img.shields.io/pypi/dm/invenio-theme-tugraz.svg .. image:: https://img.shields.io/pypi/dm/invenio-theme-tugraz.svg
:target: https://pypi.python.org/pypi/invenio-theme-tugraz :target: https://pypi.python.org/pypi/invenio-theme-tugraz
.. image:: https://img.shields.io/github/tag/mb-wali/invenio-theme-tugraz.svg .. image:: https://img.shields.io/github/tag/tu-graz-library/invenio-theme-tugraz.svg
:target: https://github.com/mb-wali/invenio-theme-tugraz/releases :target: https://github.com/tu-graz-library/invenio-theme-tugraz/releases
.. image:: https://img.shields.io/github/license/mb-wali/invenio-theme-tugraz.svg .. image:: https://img.shields.io/github/license/tu-graz-library/invenio-theme-tugraz.svg
:target: https://github.com/mb-wali/invenio-theme-tugraz/blob/master/LICENSE :target: https://github.com/tu-graz-library/invenio-theme-tugraz/blob/master/LICENSE
.. image:: https://readthedocs.org/projects/invenio-theme-tugraz/badge/?version=latest .. image:: https://readthedocs.org/projects/invenio-theme-tugraz/badge/?version=latest
:target: https://invenio-theme-tugraz.readthedocs.io/en/latest/?badge=latest :target: https://invenio-theme-tugraz.readthedocs.io/en/latest/?badge=latest
@@ -27,6 +27,8 @@
.. image:: https://img.shields.io/coveralls/mb-wali/invenio-theme-tugraz.svg .. image:: https://img.shields.io/coveralls/mb-wali/invenio-theme-tugraz.svg
:target: https://coveralls.io/r/mb-wali/invenio-theme-tugraz :target: https://coveralls.io/r/mb-wali/invenio-theme-tugraz
.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
:target: https://github.com/psf/black
TU Graz standard theme. TU Graz standard theme.

View File

@@ -116,13 +116,13 @@ html_theme = "alabaster"
html_theme_options = { html_theme_options = {
"description": "invenio module for TUGRAZ theme.", "description": "invenio module for TUGRAZ theme.",
"github_user": "inveniosoftware", "github_user": "TU Graz",
"github_repo": "invenio-theme-tugraz", "github_repo": "invenio-theme-tugraz",
"github_button": False, "github_button": False,
"github_banner": True, "github_banner": True,
"show_powered_by": False, "show_powered_by": False,
"extra_nav_links": { "extra_nav_links": {
"invenio-theme-tugraz@GitHub": "https://github.com/mb-wali/invenio-theme-tugraz", "invenio-theme-tugraz@GitHub": "https://github.com/tu-graz-library/invenio-theme-tugraz",
"invenio-theme-tugraz@PyPI": "https://pypi.python.org/pypi/invenio-theme-tugraz/", "invenio-theme-tugraz@PyPI": "https://pypi.python.org/pypi/invenio-theme-tugraz/",
}, },
} }

View File

@@ -39,8 +39,9 @@
.affiliation-text { .affiliation-text {
display: table-cell; display: table-cell;
font-size: 17px; font-size: 12px;
vertical-align: middle; line-height: 17px;
letter-spacing: 2px;
white-space: nowrap; white-space: nowrap;
} }
@@ -248,3 +249,7 @@ svg:not(:root) {
.inline-elements{ .inline-elements{
display: flex; display: flex;
} }
span.home-inline{
white-space: nowrap;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@@ -5,14 +5,14 @@
{%- if config.SECURITY_REGISTERABLE %} {%- if config.SECURITY_REGISTERABLE %}
<div class="short-menu-right-button"> <div class="short-menu-right-button">
<a href="{{ url_for('security.register') }}"> <a href="{{ url_for('security.register') }}">
<i class="user plus icon circular"></i> {{_ ("Sign Up")}} {{_ ("Sign up")}}
</a> </a>
</div> </div>
{%- endif %} {%- endif %}
<div class="short-menu-right-button"> <div class="short-menu-right-button">
<a href="{{url_for_security('login', next=request.path)}}" style="text-decoration:none"> <a href="{{url_for_security('login', next=request.path)}}" style="text-decoration:none">
<i class="sign in icon circular"></i> {{_ ("Log in")}} {{_ ("Log in")}}
</a> </a>
</div> </div>
@@ -27,7 +27,7 @@
</div> </div>
<div class="short-menu-right-button"> <div class="short-menu-right-button">
<a class="dropdown-item" href="{{url_for_security('logout')}}"> <a class="dropdown-item" href="{{url_for_security('logout')}}">
<i class="sign out icon circular"></i>{{_('Logout')}} {{_('Sign out')}}
</a> </a>
</div> </div>

View File

@@ -56,7 +56,7 @@
{%- if security.registerable %} {%- if security.registerable %}
<div class="ui primary segment padded text-muted"> <div class="ui primary segment padded text-muted">
{% trans sitename=config.ACCOUNTS_SITENAME %}New to {{ sitename }}?{% endtrans %} {% trans sitename=config.ACCOUNTS_SITENAME %}New to {{ sitename }}?{% endtrans %}
<a href="{{ url_for_security('register', next=request.args.get('next')) }}">{{ _('Sign Up') }}</a> <a href="{{ url_for_security('register', next=request.args.get('next')) }}">{{ _('Sign up') }}</a>
</div> </div>
{%- endif %} {%- endif %}
{%- endblock registerable %} {%- endblock registerable %}

View File

@@ -77,7 +77,7 @@
<div class="centered row"> <div class="centered row">
<button type="submit" class="ui fluid large submit button"> <button type="submit" class="ui fluid large submit button">
<i class="ui edit outline icon"></i>{{ _('Sign Up') }} <i class="ui edit outline icon"></i>{{ _('Sign up') }}
</button> </button>
</div> </div>
</form> </form>

View File

@@ -19,8 +19,9 @@
<div class="ui container"> <div class="ui container">
<div class="ui grid stackable container"> <div class="ui grid stackable container">
<div class="three column row centered" style="padding-bottom: 0;"> <div class="three column row centered" style="padding-bottom: 0;">
<div class="two wide column main-menu-entry main-menu-entry-svg"> <div class="two wide column main-menu-entry">
<a href="{{url_for('invenio_theme_tugraz.index')}}" title="Home"> <a href="{{url_for('invenio_theme_tugraz.index')}}" title="Home">
<span class="home-inline">
<svg shape-rendering="geometricPrecision" id="int-menu-q-home-icon" <svg shape-rendering="geometricPrecision" id="int-menu-q-home-icon"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg"
version="1.1" xml:space="preserve" height="36.997" width="35.969" version="1.1" xml:space="preserve" height="36.997" width="35.969"
@@ -32,6 +33,7 @@
</polyline> </polyline>
</svg> </svg>
{{_ ("Home")}} {{_ ("Home")}}
</span>
</a> </a>
</div> </div>
{%- for item in current_menu.submenu('main').children|sort(attribute='order') if item.visible recursive %} {%- for item in current_menu.submenu('main').children|sort(attribute='order') if item.visible recursive %}

View File

@@ -70,7 +70,7 @@
<h4> <h4>
<a href="{{ record_url }}"> <a href="{{ record_url }}">
{{r.metadata.titles[0].title}} {{r.metadata.title}}
</a> </a>
</h4> </h4>
@@ -80,7 +80,7 @@
<p class="hidden-xs"> <p class="hidden-xs">
<a href="{{record_url}}"> <a href="{{record_url}}">
{{ r.metadata.descriptions[0].description | striptags | truncate(300) }} {{ r.metadata.description | striptags | truncate(300) }}
</a> </a>
</p> </p>

View File

@@ -12,8 +12,8 @@
{%- for creators in authors_list %} {%- for creators in authors_list %}
{%- if creators.identifiers.Orcid %} {%- if creators.identifiers.orcid %}
<a href="{{creators.identifiers.Orcid|pid_url('orcid')}}" target="_blank" ><img class="inline-orcid" src="{{ url_for('static', filename='extra/orcid.png')}}" /></a> <a href="{{creators.identifiers.orcid|pid_url('orcid')}}" target="_blank" ><img class="inline-orcid" src="{{ url_for('static', filename='extra/orcid.png')}}" /></a>
{%- endif %} {%- endif %}
<span class="text-muted" {% if creators.affiliations %} {% for affiliation in creators.affiliations %} data-toggle="tooltip" title="{{affiliation.name}}" {%- endfor %} {% endif %}>{{creators.name}}</span> <span class="text-muted" {% if creators.affiliations %} {% for affiliation in creators.affiliations %} data-toggle="tooltip" title="{{affiliation.name}}" {%- endfor %} {% endif %}>{{creators.name}}</span>
@@ -25,7 +25,7 @@
<!--TODO: contributers--> <!--TODO: contributers-->
{%- macro contributors(contributors_list) %} {%- macro contributors(contributors_list) %}
{%- for group in contributors_list|groupby('type')%} {%- for group in contributors_list|groupby('type')%}
<h5>{{group.grouper|contributortype_title}}(s)</h5> <h5>{{group.grouper}}(s)</h5>
{{authors(group.list)}} {{authors(group.list)}}
{%- endfor %} {%- endfor %}
{%- endmacro %} {%- endmacro %}

View File

@@ -58,13 +58,15 @@
<div class="left floated left aligned six wide column" id="repo-logo"> <div class="left floated left aligned six wide column" id="repo-logo">
<div class="inline-elements"> <div class="inline-elements">
<div class="repo-img"> <div class="repo-img">
<img height="51.862" src="{{ url_for('static', filename='images/Icon_1_v2.svg')}}"> <img height="51.862" src="{{ url_for('static', filename='images/library_logo.png')}}">
</div> </div>
<div class="affiliation-text"> <div class="affiliation-text">
<a title="RDM" href="{{url_for('invenio_theme_tugraz.index')}}"> <a title="RDM" href="{{url_for('invenio_theme_tugraz.index')}}">
TU Graz TU GRAZ
<br> <br>
{{_ ("Repository")}} {{_ ("REPOSITORY")}}
<br>
{{_ ("LIBRARY & ARCHIVES")}}
</a> </a>
</div> </div>
</div> </div>

View File

@@ -12,4 +12,4 @@ This file is imported by ``invenio_theme_tugraz.__init__``,
and parsed by ``setup.py``. and parsed by ``setup.py``.
""" """
__version__ = "1.0.5" __version__ = "1.1.0"

View File

@@ -7,6 +7,6 @@
# details. # details.
[pytest] [pytest]
addopts = --isort --pydocstyle --pycodestyle --doctest-glob="*.rst" --doctest-modules --cov=invenio_theme_tugraz --cov-report=term-missing addopts = --isort --pydocstyle --pycodestyle --doctest-glob="*.rst" --doctest-modules --cov=invenio_theme_tugraz --cov-report=term-missing tests invenio_theme_tugraz
testpaths = tests invenio_theme_tugraz testpaths = tests invenio_theme_tugraz
live_server_scope = module live_server_scope = module

View File

@@ -7,10 +7,9 @@
# modify it under the terms of the MIT License; see LICENSE file for more # modify it under the terms of the MIT License; see LICENSE file for more
# details. # details.
docker-services-cli up postgresql es redis python -m check_manifest --ignore ".*-requirements.txt"
python -m check_manifest --ignore ".travis-*" && \ python -m sphinx.cmd.build -qnNW docs docs/_build/html
python -m sphinx.cmd.build -qnNW docs docs/_build/html && \ docker-services-cli --verbose up es postgresql redis
docker-services-cli up es postgresql redis
python -m pytest python -m pytest
tests_exit_code=$? tests_exit_code=$?
docker-services-cli down docker-services-cli down

View File

@@ -71,7 +71,7 @@ setup(
license="MIT", license="MIT",
author="mojib wali", author="mojib wali",
author_email="mojib.wali@tugraz.at", author_email="mojib.wali@tugraz.at",
url="https://github.com/mb-wali/invenio-theme-tugraz", url="https://github.com/tu-graz-library/invenio-theme-tugraz",
packages=packages, packages=packages,
zip_safe=False, zip_safe=False,
include_package_data=True, include_package_data=True,