mirror of
https://github.com/Cian-H/invenio-theme-iform.git
synced 2025-12-23 05:01:58 +00:00
Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
804bd108c5 | ||
|
|
bbea43d227 | ||
|
|
84f963b407 | ||
|
|
e45832be2b | ||
|
|
75bb5377c8 | ||
|
|
e4fc2ff14d | ||
|
|
b33274a3ea | ||
|
|
11abd513e9 | ||
|
|
4e35220e5b | ||
|
|
9126efbe42 | ||
|
|
2227e8d204 |
@@ -32,8 +32,8 @@ indent_size = 4
|
||||
[*.{css,html,js,json,yml}]
|
||||
indent_size = 2
|
||||
|
||||
# Matches the exact files either package.json or .travis.yml
|
||||
[{package.json,.travis.yml}]
|
||||
# Matches the exact files either package.json or .github/workflows/*.yml
|
||||
[{package.json, .github/workflows/*.yml}]
|
||||
indent_size = 2
|
||||
|
||||
# Dockerfile
|
||||
|
||||
54
.github/workflows/tests.yml
vendored
Normal file
54
.github/workflows/tests.yml
vendored
Normal 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
|
||||
55
.travis.yml
55
.travis.yml
@@ -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
|
||||
@@ -10,7 +10,7 @@ Types of Contributions
|
||||
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:
|
||||
|
||||
@@ -41,7 +41,7 @@ Submit Feedback
|
||||
~~~~~~~~~~~~~~~
|
||||
|
||||
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:
|
||||
|
||||
@@ -55,7 +55,7 @@ Get Started!
|
||||
|
||||
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:
|
||||
|
||||
.. 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
|
||||
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
|
||||
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.
|
||||
|
||||
@@ -35,4 +35,5 @@ recursive-include invenio_theme_tugraz *.less
|
||||
recursive-include invenio_theme_tugraz *.ico
|
||||
recursive-include tests *.py
|
||||
recursive-include invenio_theme_tugraz *.jpg
|
||||
recursive-include invenio_theme_tugraz *.gitkeep
|
||||
recursive-include invenio_theme_tugraz *.gitkeep
|
||||
recursive-include .github/workflows *.yml
|
||||
14
README.rst
14
README.rst
@@ -9,17 +9,17 @@
|
||||
invenio-theme-tugraz
|
||||
======================
|
||||
|
||||
.. image:: https://travis-ci.com/mb-wali/invenio-theme-tugraz.svg
|
||||
:target: https://travis-ci.com/github/mb-wali/invenio-theme-tugraz
|
||||
.. image:: https://github.com/tu-graz-library/invenio-theme-tugraz/workflows/CI/badge.svg
|
||||
:target: https://github.com/tu-graz-library/invenio-theme-tugraz/actions
|
||||
|
||||
.. image:: https://img.shields.io/pypi/dm/invenio-theme-tugraz.svg
|
||||
:target: https://pypi.python.org/pypi/invenio-theme-tugraz
|
||||
|
||||
.. image:: https://img.shields.io/github/tag/mb-wali/invenio-theme-tugraz.svg
|
||||
:target: https://github.com/mb-wali/invenio-theme-tugraz/releases
|
||||
.. image:: https://img.shields.io/github/tag/tu-graz-library/invenio-theme-tugraz.svg
|
||||
:target: https://github.com/tu-graz-library/invenio-theme-tugraz/releases
|
||||
|
||||
.. image:: https://img.shields.io/github/license/mb-wali/invenio-theme-tugraz.svg
|
||||
:target: https://github.com/mb-wali/invenio-theme-tugraz/blob/master/LICENSE
|
||||
.. image:: https://img.shields.io/github/license/tu-graz-library/invenio-theme-tugraz.svg
|
||||
:target: https://github.com/tu-graz-library/invenio-theme-tugraz/blob/master/LICENSE
|
||||
|
||||
.. image:: https://readthedocs.org/projects/invenio-theme-tugraz/badge/?version=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
|
||||
: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.
|
||||
|
||||
|
||||
@@ -116,13 +116,13 @@ html_theme = "alabaster"
|
||||
|
||||
html_theme_options = {
|
||||
"description": "invenio module for TUGRAZ theme.",
|
||||
"github_user": "inveniosoftware",
|
||||
"github_user": "TU Graz",
|
||||
"github_repo": "invenio-theme-tugraz",
|
||||
"github_button": False,
|
||||
"github_banner": True,
|
||||
"show_powered_by": False,
|
||||
"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/",
|
||||
},
|
||||
}
|
||||
|
||||
@@ -48,4 +48,4 @@
|
||||
}
|
||||
.spacer-long{
|
||||
margin-top: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,8 +39,9 @@
|
||||
|
||||
.affiliation-text {
|
||||
display: table-cell;
|
||||
font-size: 17px;
|
||||
vertical-align: middle;
|
||||
font-size: 12px;
|
||||
line-height: 17px;
|
||||
letter-spacing: 2px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
@@ -248,3 +249,7 @@ svg:not(:root) {
|
||||
.inline-elements{
|
||||
display: flex;
|
||||
}
|
||||
|
||||
span.home-inline{
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
BIN
invenio_theme_tugraz/static/images/library_logo.png
Normal file
BIN
invenio_theme_tugraz/static/images/library_logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.6 KiB |
@@ -5,14 +5,14 @@
|
||||
{%- if config.SECURITY_REGISTERABLE %}
|
||||
<div class="short-menu-right-button">
|
||||
<a href="{{ url_for('security.register') }}">
|
||||
<i class="user plus icon circular"></i> {{_ ("Sign Up")}}
|
||||
{{_ ("Sign up")}}
|
||||
</a>
|
||||
</div>
|
||||
{%- endif %}
|
||||
|
||||
<div class="short-menu-right-button">
|
||||
<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>
|
||||
</div>
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
</div>
|
||||
<div class="short-menu-right-button">
|
||||
<a class="dropdown-item" href="{{url_for_security('logout')}}">
|
||||
<i class="sign out icon circular"></i>{{_('Logout')}}
|
||||
{{_('Sign out')}}
|
||||
</a>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -24,11 +24,11 @@
|
||||
<h3 class="ui login header">{{ _('Log in to Repository') }}</h3>
|
||||
{%- endblock form_header %}
|
||||
|
||||
<!--Login with SSO-->
|
||||
<!--Log in with SSO-->
|
||||
{%- if config.INVENIO_CONFIG_TUGRAZ_SHIBBOLETH %}
|
||||
<div class="login-page-button">
|
||||
<a href="{{ url_for('sso_saml.sso', idp='idp') }}" class="inverted tiny image label">
|
||||
{% trans type='TUGRAZ' %} Login with {{ type }}{% endtrans %}
|
||||
{% trans type='TUGRAZ' %} Log in with {{ type }}{% endtrans %}
|
||||
<img src="{{ url_for('static', filename=config.INVENIO_THEME_TUGRAZ_ICON)}}" height="20px" />
|
||||
</a>
|
||||
</div>
|
||||
@@ -56,7 +56,7 @@
|
||||
{%- if security.registerable %}
|
||||
<div class="ui primary segment padded text-muted">
|
||||
{% 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>
|
||||
{%- endif %}
|
||||
{%- endblock registerable %}
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
|
||||
<div class="centered row">
|
||||
<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>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@@ -19,8 +19,9 @@
|
||||
<div class="ui container">
|
||||
<div class="ui grid stackable container">
|
||||
<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">
|
||||
<span class="home-inline">
|
||||
<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"
|
||||
version="1.1" xml:space="preserve" height="36.997" width="35.969"
|
||||
@@ -32,6 +33,7 @@
|
||||
</polyline>
|
||||
</svg>
|
||||
{{_ ("Home")}}
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
{%- for item in current_menu.submenu('main').children|sort(attribute='order') if item.visible recursive %}
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
|
||||
<h4>
|
||||
<a href="{{ record_url }}">
|
||||
{{r.metadata.titles[0].title}}
|
||||
{{r.metadata.title}}
|
||||
</a>
|
||||
</h4>
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
|
||||
<p class="hidden-xs">
|
||||
<a href="{{record_url}}">
|
||||
{{ r.metadata.descriptions[0].description | striptags | truncate(300) }}
|
||||
{{ r.metadata.description | striptags | truncate(300) }}
|
||||
</a>
|
||||
</p>
|
||||
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
|
||||
{%- for creators in authors_list %}
|
||||
|
||||
{%- 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>
|
||||
{%- 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>
|
||||
{%- endif %}
|
||||
|
||||
<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-->
|
||||
{%- macro contributors(contributors_list) %}
|
||||
{%- for group in contributors_list|groupby('type')%}
|
||||
<h5>{{group.grouper|contributortype_title}}(s)</h5>
|
||||
<h5>{{group.grouper}}(s)</h5>
|
||||
{{authors(group.list)}}
|
||||
{%- endfor %}
|
||||
{%- endmacro %}
|
||||
@@ -58,13 +58,15 @@
|
||||
<div class="left floated left aligned six wide column" id="repo-logo">
|
||||
<div class="inline-elements">
|
||||
<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 class="affiliation-text">
|
||||
<a title="RDM" href="{{url_for('invenio_theme_tugraz.index')}}">
|
||||
TU Graz
|
||||
TU GRAZ
|
||||
<br>
|
||||
{{_ ("Repository")}}
|
||||
{{_ ("REPOSITORY")}}
|
||||
<br>
|
||||
{{_ ("LIBRARY & ARCHIVES")}}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -12,4 +12,4 @@ This file is imported by ``invenio_theme_tugraz.__init__``,
|
||||
and parsed by ``setup.py``.
|
||||
"""
|
||||
|
||||
__version__ = "1.0.5"
|
||||
__version__ = "1.1.0"
|
||||
|
||||
@@ -7,6 +7,6 @@
|
||||
# details.
|
||||
|
||||
[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
|
||||
live_server_scope = module
|
||||
|
||||
@@ -7,10 +7,9 @@
|
||||
# modify it under the terms of the MIT License; see LICENSE file for more
|
||||
# details.
|
||||
|
||||
docker-services-cli up postgresql es redis
|
||||
python -m check_manifest --ignore ".travis-*" && \
|
||||
python -m sphinx.cmd.build -qnNW docs docs/_build/html && \
|
||||
docker-services-cli up es postgresql redis
|
||||
python -m check_manifest --ignore ".*-requirements.txt"
|
||||
python -m sphinx.cmd.build -qnNW docs docs/_build/html
|
||||
docker-services-cli --verbose up es postgresql redis
|
||||
python -m pytest
|
||||
tests_exit_code=$?
|
||||
docker-services-cli down
|
||||
|
||||
Reference in New Issue
Block a user