Whole project format with some minor codestyle fixes

This commit is contained in:
2025-05-14 13:23:23 +01:00
parent 5c9dc284e8
commit 38e3dccdfd
28 changed files with 1131 additions and 959 deletions

View File

@@ -3,15 +3,15 @@
"workspaces": { "workspaces": {
"": { "": {
"devDependencies": { "devDependencies": {
"@eslint/css": "^0.7.0", "@eslint/css": "latest",
"@eslint/js": "^9.26.0", "@eslint/js": "latest",
"@eslint/json": "^0.12.0", "@eslint/json": "latest",
"eslint": "^9.26.0", "eslint": "latest",
"eslint-plugin-react": "^7.37.5", "eslint-plugin-react": "latest",
"globals": "^16.1.0", "globals": "latest",
"lint-staged": "^16.0.0", "lint-staged": "latest",
"prettier": "^3.5.3", "prettier": "latest",
"prettier-plugin-jinja-template": "^2.1.0", "prettier-plugin-jinja-template": "latest",
}, },
}, },
}, },
@@ -78,8 +78,6 @@
"array.prototype.findlast": ["array.prototype.findlast@1.2.5", "", { "dependencies": { "call-bind": "^1.0.7", "define-properties": "^1.2.1", "es-abstract": "^1.23.2", "es-errors": "^1.3.0", "es-object-atoms": "^1.0.0", "es-shim-unscopables": "^1.0.2" } }, "sha512-CVvd6FHg1Z3POpBLxO6E6zr+rSKEQ9L6rZHAaY7lLfhKsWYUBBOuMs0e9o24oopj6H+geRCX0YJ+TJLBK2eHyQ=="], "array.prototype.findlast": ["array.prototype.findlast@1.2.5", "", { "dependencies": { "call-bind": "^1.0.7", "define-properties": "^1.2.1", "es-abstract": "^1.23.2", "es-errors": "^1.3.0", "es-object-atoms": "^1.0.0", "es-shim-unscopables": "^1.0.2" } }, "sha512-CVvd6FHg1Z3POpBLxO6E6zr+rSKEQ9L6rZHAaY7lLfhKsWYUBBOuMs0e9o24oopj6H+geRCX0YJ+TJLBK2eHyQ=="],
"array.prototype.flat": ["array.prototype.flat@1.3.3", "", { "dependencies": { "call-bind": "^1.0.8", "define-properties": "^1.2.1", "es-abstract": "^1.23.5", "es-shim-unscopables": "^1.0.2" } }, "sha512-rwG/ja1neyLqCuGZ5YYrznA62D4mZXg0i1cIskIUKSiqF3Cje9/wXAls9B9s1Wa2fomMsIv8czB8jZcPmxCXFg=="],
"array.prototype.flatmap": ["array.prototype.flatmap@1.3.3", "", { "dependencies": { "call-bind": "^1.0.8", "define-properties": "^1.2.1", "es-abstract": "^1.23.5", "es-shim-unscopables": "^1.0.2" } }, "sha512-Y7Wt51eKJSyi80hFrJCePGGNo5ktJCslFuboqJsbf57CCPcm5zztluPlc4/aD8sWsKvlwatezpV4U1efk8kpjg=="], "array.prototype.flatmap": ["array.prototype.flatmap@1.3.3", "", { "dependencies": { "call-bind": "^1.0.8", "define-properties": "^1.2.1", "es-abstract": "^1.23.5", "es-shim-unscopables": "^1.0.2" } }, "sha512-Y7Wt51eKJSyi80hFrJCePGGNo5ktJCslFuboqJsbf57CCPcm5zztluPlc4/aD8sWsKvlwatezpV4U1efk8kpjg=="],
"array.prototype.tosorted": ["array.prototype.tosorted@1.1.4", "", { "dependencies": { "call-bind": "^1.0.7", "define-properties": "^1.2.1", "es-abstract": "^1.23.3", "es-errors": "^1.3.0", "es-shim-unscopables": "^1.0.2" } }, "sha512-p6Fx8B7b7ZhL/gmUsAy0D15WhvDccw3mnGNbZpi3pmeJdxtWsj2jEaI4Y6oo3XiHfzuSgPwKc04MYt6KgvC/wA=="], "array.prototype.tosorted": ["array.prototype.tosorted@1.1.4", "", { "dependencies": { "call-bind": "^1.0.7", "define-properties": "^1.2.1", "es-abstract": "^1.23.3", "es-errors": "^1.3.0", "es-shim-unscopables": "^1.0.2" } }, "sha512-p6Fx8B7b7ZhL/gmUsAy0D15WhvDccw3mnGNbZpi3pmeJdxtWsj2jEaI4Y6oo3XiHfzuSgPwKc04MYt6KgvC/wA=="],
@@ -358,7 +356,7 @@
"json-stable-stringify-without-jsonify": ["json-stable-stringify-without-jsonify@1.0.1", "", {}, "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw=="], "json-stable-stringify-without-jsonify": ["json-stable-stringify-without-jsonify@1.0.1", "", {}, "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw=="],
"jsx-ast-utils": ["jsx-ast-utils@3.3.5", "", { "dependencies": { "array-includes": "^3.1.6", "array.prototype.flat": "^1.3.1", "object.assign": "^4.1.4", "object.values": "^1.1.6" } }, "sha512-ZZow9HBI5O6EPgSJLUb8n2NKgmVWTwCvHGwFuJlMjvLFqlGG6pjirPhtdsseaLZjSibD8eegzmYpUZwoIlj2cQ=="], "jsx-ast-utils": ["jsx-ast-utils@2.4.1", "", { "dependencies": { "array-includes": "^3.1.1", "object.assign": "^4.1.0" } }, "sha512-z1xSldJ6imESSzOjd3NNkieVJKRlKYSOtMG8SFyCj2FIrvSaSuli/WjpBkEzCBoR9bYYYFgqJw61Xhu7Lcgk+w=="],
"keyv": ["keyv@4.5.4", "", { "dependencies": { "json-buffer": "3.0.1" } }, "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw=="], "keyv": ["keyv@4.5.4", "", { "dependencies": { "json-buffer": "3.0.1" } }, "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw=="],

View File

@@ -5,13 +5,27 @@ import json from "@eslint/json";
import css from "@eslint/css"; import css from "@eslint/css";
import { defineConfig } from "eslint/config"; import { defineConfig } from "eslint/config";
export default defineConfig([ export default defineConfig([
{ files: ["**/*.{js,mjs,cjs,jsx}"], plugins: { js }, extends: ["js/recommended"] }, { files: ["**/*.{js,mjs,cjs,jsx}"], plugins: { js }, extends: ["js/recommended"] },
{ files: ["**/*.{js,mjs,cjs,jsx}"], languageOptions: { globals: globals.browser } }, { files: ["**/*.{js,mjs,cjs,jsx}"], languageOptions: { globals: globals.browser } },
pluginReact.configs.flat.recommended, pluginReact.configs.flat.recommended,
{ files: ["**/*.json"], plugins: { json }, language: "json/json", extends: ["json/recommended"] }, {
{ files: ["**/*.jsonc"], plugins: { json }, language: "json/jsonc", extends: ["json/recommended"] }, files: ["**/*.json"],
{ files: ["**/*.json5"], plugins: { json }, language: "json/json5", extends: ["json/recommended"] }, plugins: { json },
language: "json/json",
extends: ["json/recommended"],
},
{
files: ["**/*.jsonc"],
plugins: { json },
language: "json/jsonc",
extends: ["json/recommended"],
},
{
files: ["**/*.json5"],
plugins: { json },
language: "json/json5",
extends: ["json/recommended"],
},
{ files: ["**/*.css"], plugins: { css }, language: "css/css", extends: ["css/recommended"] }, { files: ["**/*.css"], plugins: { css }, language: "css/css", extends: ["css/recommended"] },
]); ]);

View File

@@ -33,7 +33,7 @@ async function generateForm() {
}); });
} }
$(function() { $(function () {
// called when DOM is ready // called when DOM is ready
const generateFormElement = document.getElementById("generate-unlock-form"); const generateFormElement = document.getElementById("generate-unlock-form");
if (generateFormElement) { if (generateFormElement) {

View File

@@ -91,7 +91,7 @@
} }
} }
.field>input::selection { .field > input::selection {
background: @fieldInputSelectionBackground; background: @fieldInputSelectionBackground;
} }

View File

@@ -23,7 +23,6 @@
color: @primaryText; color: @primaryText;
} }
/*** /***
* login background color * login background color
* from : rgba(13,95,137,.8) * from : rgba(13,95,137,.8)
@@ -34,7 +33,6 @@
background-color: @primaryBackground; background-color: @primaryBackground;
} }
/*** /***
* login & sigup page title * login & sigup page title
* from : #0377cd * from : #0377cd
@@ -44,7 +42,6 @@
color: @primaryText; color: @primaryText;
} }
/*** /***
* anchor color * anchor color
* from : #ef4444 * from : #ef4444
@@ -54,7 +51,6 @@ a {
color: @iformBlue; color: @iformBlue;
} }
/*** /***
* force: the font changes * force: the font changes
***/ ***/
@@ -71,8 +67,8 @@ pre,
.ui.button, .ui.button,
.ui.items, .ui.items,
.ui.accordion .title:not(.ui), .ui.accordion .title:not(.ui),
.ui.items>.item>.content>.header, .ui.items > .item > .content > .header,
.ui.modal>.header, .ui.modal > .header,
.ui.menu, .ui.menu,
.ui.header, .ui.header,
.ui.form input[type], .ui.form input[type],
@@ -84,7 +80,6 @@ pre {
font-size: 14px; font-size: 14px;
} }
/*** /***
* search.button * search.button
***/ ***/
@@ -97,7 +92,6 @@ pre {
* accordion title * accordion title
***/ ***/
.ui.accordion.styled { .ui.accordion.styled {
.title, .title,
.title.active { .title.active {
background-color: @greyLight; background-color: @greyLight;
@@ -164,7 +158,6 @@ pre {
&.embargoed { &.embargoed {
background-color: @accessRightEmbargoed; background-color: @accessRightEmbargoed;
;
} }
&.metadata-only { &.metadata-only {
@@ -174,14 +167,14 @@ pre {
@font-face { @font-face {
font-family: "Source Sans Pro"; font-family: "Source Sans Pro";
src: url('./fonts/SourceSansPro/SourceSansPro-Regular.ttf') format('truetype'); src: url("./fonts/SourceSansPro/SourceSansPro-Regular.ttf") format("truetype");
font-weight: 400; font-weight: 400;
font-style: normal; font-style: normal;
} }
@font-face { @font-face {
font-family: "Source Sans Pro"; font-family: "Source Sans Pro";
src: url('./fonts/SourceSansPro/SourceSansPro-Italic.ttf') format('truetype'); src: url("./fonts/SourceSansPro/SourceSansPro-Italic.ttf") format("truetype");
font-weight: 400; font-weight: 400;
font-style: italic; font-style: italic;
} }

View File

@@ -15,7 +15,7 @@
.creator:not(:last-child):after { .creator:not(:last-child):after {
color: @greyDark; color: @greyDark;
content: ';'; content: ";";
} }
.creator { .creator {

View File

@@ -30,7 +30,9 @@
.no-decoration { .no-decoration {
color: inherit; color: inherit;
text-decoration: none; text-decoration: none;
transition: background-color 0.15s ease 0s, color 0.15s ease 0s; transition:
background-color 0.15s ease 0s,
color 0.15s ease 0s;
outline: none; outline: none;
} }
@@ -42,7 +44,8 @@
border: 1px solid #bfb5b5; border: 1px solid #bfb5b5;
} }
.random-records-frontpage {} .random-records-frontpage {
}
.random-records-frontpage .grid .column { .random-records-frontpage .grid .column {
width: 380px !important; width: 380px !important;

View File

@@ -15,57 +15,57 @@
//@navbar_background_color: #FFFFFF; //@navbar_background_color: #FFFFFF;
// badge colors, accessibility // badge colors, accessibility
@accessRight : #E9711C; @accessRight: #e9711c;
@accessRightOpen : @accessRight; @accessRightOpen: @accessRight;
@accessRightRestricted: #FBBD08; @accessRightRestricted: #fbbd08;
@accessRightEmbargoed : #DB2828; @accessRightEmbargoed: #db2828;
@accessRightClosed : @accessRightEmbargoed; @accessRightClosed: @accessRightEmbargoed;
@accessRightMetadata : #2185D0; @accessRightMetadata: #2185d0;
@schema: #17B3F3; @schema: #17b3f3;
// primary colors of I-Form // primary colors of I-Form
@iformBlack : #140826; @iformBlack: #140826;
@iformBlue: #060E9F; @iformBlue: #060e9f;
@iformLightGreen: #08E673; @iformLightGreen: #08e673;
@iformDarkGreen: #069F4B; @iformDarkGreen: #069f4b;
@iformCyan: #02E8F7; @iformCyan: #02e8f7;
// general // general
@primaryBackground: #FFF; @primaryBackground: #fff;
@primaryText : #000; @primaryText: #000;
// accent colors // accent colors
@greyDark : #777; @greyDark: #777;
@greyLight : #E0E1E2; @greyLight: #e0e1e2;
@labelKeywordBackground: #E8E8E8; @labelKeywordBackground: #e8e8e8;
// link and button colors // link and button colors
@primaryLinkInverted : @primaryText; @primaryLinkInverted: @primaryText;
@primaryLinkBackgroundInverted: @primaryBackground; @primaryLinkBackgroundInverted: @primaryBackground;
@primaryLink : @primaryBackground; @primaryLink: @primaryBackground;
@primaryLinkHoverBackground : @primaryText; @primaryLinkHoverBackground: @primaryText;
@primaryButton : @primaryBackground; @primaryButton: @primaryBackground;
@primaryButtonHoverBackground : @primaryText; @primaryButtonHoverBackground: @primaryText;
@primaryButtonInverted : @primaryText; @primaryButtonInverted: @primaryText;
// account (signin, signup) specific // account (signin, signup) specific
@primaryFormAccounts : @primaryBackground; @primaryFormAccounts: @primaryBackground;
@formAccountsInputPlaceholder : silver; @formAccountsInputPlaceholder: silver;
@fieldInputSelectionBackground: #50A2CE; @fieldInputSelectionBackground: #50a2ce;
@signInBackground : #245B78; @signInBackground: #245b78;
// footer specific // footer specific
@footerGrey : #5E5E5E; @footerGrey: #5e5e5e;
@footerBottomBackground: #F2F2F2; @footerBottomBackground: #f2f2f2;
// record specific // record specific
@recordVersionBackground : #F2F2F2; @recordVersionBackground: #f2f2f2;
@randomRecordsFrontpageArticle: #22242626; @randomRecordsFrontpageArticle: #22242626;
// input // input
@outlineColor: #85B7D9; @outlineColor: #85b7d9;
// notification // notification
@notificationBackground: #FFFAF3; @notificationBackground: #fffaf3;
@notificationBorder: #E2D5C2; @notificationBorder: #e2d5c2;

View File

@@ -5,7 +5,6 @@
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.
#} #}
{% extends config.THEME_ERROR_TEMPLATE %} {% extends config.THEME_ERROR_TEMPLATE %}
{% block message %} {% block message %}

View File

@@ -6,44 +6,64 @@
details. details.
#} #}
<!DOCTYPE html> {% set lang_attr = g.ln.split('_', 1)[0]|safe if g.ln else '' %}
<html{% if html_css_classes %} class="{{ html_css_classes|join(' ') }}"{% endif %} lang="{{ current_i18n.locale.language|safe }}" dir="{{ current_i18n.locale.text_direction }}"> {% set html_class_attr = html_css_classes|join(' ') if html_css_classes else '' %}
{% set body_class_attr = body_css_classes|join(' ') if body_css_classes else '' %}
{% set rtl_attr = rtl_direction|safe if rtl_direction and g.ln else '' %}
<!doctype html>
<html
{% if html_class_attr %}class="{{ html_class_attr }}"{% endif %}
lang="{{ lang_attr }}"
dir="{{ rtl_attr }}"
>
<head> <head>
{%- block head %} {%- block head %}
{%- block head_meta %} {%- block head_meta %}
<meta charset="utf-8"> <meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1" />
{%- if description %}<meta name="description" content="{{ description }}" />{% endif %} {%- if description %}
<meta name="description" content="{{ description }}" />
{% endif %}
{%- if keywords %}<meta name="keywords" content="{{ keywords }}" />{% endif %} {%- if keywords %}<meta name="keywords" content="{{ keywords }}" />{% endif %}
{%- if config.get('THEME_GOOGLE_SITE_VERIFICATION', None) %} {%- if config.get('THEME_GOOGLE_SITE_VERIFICATION', None) %}
{%- for google_id in config.THEME_GOOGLE_SITE_VERIFICATION %} {%- for google_id in config.THEME_GOOGLE_SITE_VERIFICATION %}
<meta name="google-site-verification" content="{{google_id}}"/> <meta name="google-site-verification" content="{{ google_id }}" />
{%- endfor %} {%- endfor %}
{%- endif %} {%- endif %}
{%- endblock head_meta %} {%- endblock head_meta %}
{%- block head_title %} {%- block head_title %}
{%- set title = title or config.THEME_SITENAME %} {%- set title = title or config.THEME_SITENAME %}
<title>{{title}}</title> <title>{{ title }}</title>
{%- endblock head_title %} {%- endblock head_title %}
{%- block head_links %} {%- block head_links %}
<link rel="shortcut icon" href="{{ url_for('static', filename='favicon.ico') }}"/> <link rel="shortcut icon" href="{{ url_for('static', filename='favicon.ico') }}" />
{%- if keywords %}<link rel="canonical" href="{{ canonical_url }}"/>{% endif %} {%- if keywords %}<link rel="canonical" href="{{ canonical_url }}" />{% endif %}
{%- block head_links_langs %} {%- block head_links_langs %}
{%- if alternate_urls %} {%- if alternate_urls %}
{%- for alt_ln, alternate_url in alternate_urls.items() %} {%- for alt_ln, alternate_url in alternate_urls.items() %}
<link rel="alternate" hreflang="{{ alt_ln }}" href="{{ alternate_url }}"/> <link
rel="alternate"
hreflang="{{ alt_ln }}"
href="{{ alternate_url }}"
/>
{%- endfor %} {%- endfor %}
{%- endif %} {%- endif %}
{%- endblock %} {%- endblock %}
{%- block head_apple_icons %} {%- block head_apple_icons %}
{%- for size in [144, 114, 72, 57] %} {%- for size in [144, 114, 72, 57] %}
{%- set icon_name = 'apple-touch-icon-%d-precomposed.png' | format(size) %} {%- set icon_name = 'apple-touch-icon-%d-precomposed.png' | format(size) %}
<link rel="apple-touch-icon-precomposed" sizes="{{ size }}x{{ size }}" href="{{ url_for('static', filename=icon_name) }}"/> <link
rel="apple-touch-icon-precomposed"
sizes="{{ size }}x{{ size }}"
href="{{ url_for('static', filename=icon_name) }}"
/>
{%- endfor %} {%- endfor %}
{%- endblock head_apple_icons %} {%- endblock head_apple_icons %}
{%- endblock head_links %} {%- endblock head_links %}
{%- block header %}{% endblock header %} {%- block header %}
{% endblock header %}
{%- block css %} {%- block css %}
{{ webpack['theme.css'] }} {{ webpack['theme.css'] }}
{{ webpack['invenio-theme-iform-theme.css'] }} {{ webpack['invenio-theme-iform-theme.css'] }}
@@ -55,17 +75,30 @@
{%- endblock css %} {%- endblock css %}
{%- endblock head %} {%- endblock head %}
</head> </head>
<body ng-csp {% if body_css_classes %} class="{{ body_css_classes|join(' ') }}"{% endif %}{% if g.ln %} lang="{{ g.ln.split('_', 1)[0]|safe }}"{% if rtl_direction %} {{ rtl_direction|safe }}{% endif %}{% endif %} itemscope itemtype="http://schema.org/WebPage" data-spy="scroll" data-target=".scrollspy-target"> <body
ng-csp
{% if body_class_attr %}class="{{ body_class_attr }}"{% endif %}
{% if lang_attr %}lang="{{ lang_attr }}"{% endif %}
{{ rtl_attr }}
itemscope
itemtype="http://schema.org/WebPage"
data-spy="scroll"
data-target=".scrollspy-target"
>
{% if not config.THEME_IFORM_PRODUCTION %} {% if not config.THEME_IFORM_PRODUCTION %}
<div class="ui sticky test-instance"> <div class="ui sticky test-instance">
<h4>{{_ ("Test Instance") }}</h4> <h4>"Test Instance"</h4>
<p>{{_ ("This is the test instance of the I-Form Repository.") }}</p> <p>"This is the test instance of the I-Form Repository."</p>
</div> </div>
{% endif %} {% endif %}
{%- block body %} {%- block body %}
{%- block browserupgrade %} {%- block browserupgrade %}
<!--[if lt IE 8]> <!--[if lt IE 8]>
<p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p> <p class="browserupgrade">
You are using an <strong>outdated</strong> browser. Please
<a href="http://browsehappy.com/">upgrade your browser</a> to improve your
experience.
</p>
<![endif]--> <![endif]-->
{%- endblock browserupgrade %} {%- endblock browserupgrade %}
{%- block body_inner %} {%- block body_inner %}
@@ -76,8 +109,7 @@
{%- block flashmessages %} {%- block flashmessages %}
{%- from "invenio_theme/macros/messages.html" import flashed_messages with context -%} {%- from "invenio_theme/macros/messages.html" import flashed_messages with context -%}
{{ flashed_messages() }} {{ flashed_messages() }}
{%- endblock flashmessages %}
{%- endblock %}
{%- endblock navbar_header %} {%- endblock navbar_header %}
{# {#
@@ -87,13 +119,14 @@
#} #}
{%- block page_body %} {%- block page_body %}
{% include "invenio_theme/body.html" %} {% include "invenio_theme/body.html" %}
{%- endblock page_body %} {%- endblock page_body %}
{%- endblock body_inner %} {%- endblock body_inner %}
{%- block javascript %} {%- block javascript %}
{% include config.THEME_JAVASCRIPT_TEMPLATE %} {% include config.THEME_JAVASCRIPT_TEMPLATE %}
{%- endblock javascript %} {%- endblock javascript %}
{%- block trackingcode %}{% include config.THEME_TRACKINGCODE_TEMPLATE %} {%- block trackingcode %}
{% include config.THEME_TRACKINGCODE_TEMPLATE %}
{%- endblock %} {%- endblock %}
{%- endblock body %} {%- endblock body %}
</body> </body>

View File

@@ -1,34 +1,32 @@
{%- if config.ACCOUNTS %} {%- if config.ACCOUNTS %}
{%- if not current_user.is_authenticated %} {%- if not current_user.is_authenticated %}
{%- 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') }}" class="no-decoration"> <a href="{{ url_for('security.register') }}" class="no-decoration">
{{_ ("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)}}" class="no-decoration"> <a href="{{ url_for_security('login', next=request.path) }}" class="no-decoration">
{{_ ("Log in")}} {{ _ ("Log in") }}
</a> </a>
</div> </div>
{%- else %}
{%- if config.USERPROFILES %}
{%- else %} <div class="short-menu-right-button">
{%- if config.USERPROFILES %}
<div class="short-menu-right-button">
<a href="{{ url_for('invenio_userprofiles.profile') }}" class="no-decoration"> <a href="{{ url_for('invenio_userprofiles.profile') }}" class="no-decoration">
<i class="user icon"></i> {{ current_user.email }} <i class="user icon"></i> {{ current_user.email }}
</a> </a>
</div> </div>
<div class="short-menu-right-button"> <div class="short-menu-right-button">
<a class="dropdown-item no-decoration" href="{{url_for_security('logout')}}">Sign out</a> <a class="dropdown-item no-decoration" href="{{ url_for_security('logout') }}"
</div> >Sign out</a
>
{%- endif %} </div>
{%- endif %} {%- endif %}
{%- endif %}
{%- endif %} {%- endif %}

View File

@@ -5,18 +5,14 @@
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.
#} #}
{% extends config.INVENIO_THEME_IFORM_ACCOUNT_BASE %} {% extends config.INVENIO_THEME_IFORM_ACCOUNT_BASE %}
{% from "invenio_accounts/_macros.html" import render_field, form_errors %} {% from "invenio_accounts/_macros.html" import render_field, form_errors %}
{%- from "invenio_oauthclient/_macros.html" import oauth_button %} {%- from "invenio_oauthclient/_macros.html" import oauth_button %}
{% block page_body %} {% block page_body %}
<div class="spacer-long"></div> <div class="spacer-long"></div>
<div class="spacer-long"></div> <div class="spacer-long"></div>
<div class="ui container"> <div class="ui container">
<div class="ui centered grid padded"> <div class="ui centered grid padded">
<div class="ui padded segments large form"> <div class="ui padded segments large form">
<div class="ui login segment padded"> <div class="ui login segment padded">
<div class="divider hidden"></div> <div class="divider hidden"></div>
@@ -33,9 +29,16 @@
</div> </div>
{% for name in config.SSO_SAML_IDPS.keys() %} {% for name in config.SSO_SAML_IDPS.keys() %}
<div class="field"> <div class="field">
<a class="login-page-button ui fluid large button" href="{{ url_for('sso_saml.sso', idp=name) }}"> <a
Log in with {{ config.SSO_SAML_IDPS[name]['title']|default("SAML", true) }} class="login-page-button ui fluid large button"
<img src="{{ url_for('static', filename=config.INVENIO_THEME_IFORM_ICON)}}" height="20px" /> href="{{ url_for('sso_saml.sso', idp=name) }}"
>
Log in with
{{ config.SSO_SAML_IDPS[name]['title']|default("SAML", true) }}
<img
src="{{ url_for('static', filename=config.INVENIO_THEME_IFORM_ICON) }}"
height="20px"
/>
</a> </a>
</div> </div>
{% endfor %} {% endfor %}
@@ -54,12 +57,20 @@
<i class="user icon button"></i> <i class="user icon button"></i>
</div> </div>
<div class="content {{ accordion_active }}"> <div class="content {{ accordion_active }}">
<form action="{{ url_for_security('login') }}" method="POST" name="login_user_form" class="ui large form"> <form
action="{{ url_for_security('login') }}"
method="POST"
name="login_user_form"
class="ui large form"
>
{{ form.hidden_tag() }} {{ form.hidden_tag() }}
{{ form_errors(form) }} {{ form_errors(form) }}
{{ render_field(form.email, icon="user icon", autofocus=True, errormsg=False) }} {{ render_field(form.email, icon="user icon", autofocus=True, errormsg=False) }}
{{ render_field(form.password, icon="lock icon", errormsg=False) }} {{ render_field(form.password, icon="lock icon", errormsg=False) }}
<button type="submit" class="ui fluid large submit button"> <button
type="submit"
class="ui fluid large submit button"
>
<i class="ui sign-in icon"></i>Log In <i class="ui sign-in icon"></i>Log In
</button> </button>
</form> </form>
@@ -75,7 +86,10 @@
{%- 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 %}
@@ -83,12 +97,15 @@
{%- block recoverable %} {%- block recoverable %}
{%- if security.recoverable %} {%- if security.recoverable %}
<div class="ui basic segment padded"> <div class="ui basic segment padded">
<a class="ui inverted header tiny" <a
href="{{ url_for_security('forgot_password') }}">Forgot password?</a> class="ui inverted header tiny"
href="{{ url_for_security('forgot_password') }}"
>Forgot password?</a
>
</div> </div>
{%- endif %} {%- endif %}
{%- endblock recoverable %} {%- endblock recoverable %}
</div> </div>
</div> </div>
</div> </div>
{% endblock page_body %} {% endblock page_body %}

View File

@@ -5,16 +5,13 @@
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.
#} #}
{% extends config.INVENIO_THEME_IFORM_ACCOUNT_BASE %} {% extends config.INVENIO_THEME_IFORM_ACCOUNT_BASE %}
{% from "invenio_accounts/_macros.html" import render_field, form_errors %} {% from "invenio_accounts/_macros.html" import render_field, form_errors %}
{% block page_body %} {% block page_body %}
<div class="spacer-long"></div> <div class="spacer-long"></div>
<div class="ui container">
<div class="ui container">
<div class="ui stackable two column grid"> <div class="ui stackable two column grid">
<div class="centered row"> <div class="centered row">
<h1 class="ui header">Create an Account</h1> <h1 class="ui header">Create an Account</h1>
@@ -24,15 +21,19 @@
<div class="ui basic segment"> <div class="ui basic segment">
<h4 class="ui header">Citeable. Discoverable.</h4> <h4 class="ui header">Citeable. Discoverable.</h4>
<p class="bodytext"> <p class="bodytext">
Uploads get a Digital Object Identifier (DOI) to make them easily and uniquely citeable. Uploads get a Digital Object Identifier (DOI) to make them easily and
uniquely citeable.
</p>
<h4 class="ui header">Communities.</h4> <h4 class="ui header">Communities.</h4>
<p class="bodytext"> <p class="bodytext">
Accept or reject uploads to your own community (e.g workshops, EU projects, institutions or entire disciplines). Accept or reject uploads to your own community (e.g workshops, EU projects,
</h5> institutions or entire disciplines).
</p>
<h4 class="ui header">Trusted Research Data Management</h4> <h4 class="ui header">Trusted Research Data Management</h4>
<p class="bodytext"> <p class="bodytext">
Built on top of I-Form expertise in the managing of research data. Built on top of I-Form expertise in the managing of research data.
</h5> </p>
</div> </div>
</div> </div>
@@ -40,11 +41,19 @@
{# Sigup with SSO #} {# Sigup with SSO #}
{%- if config.INVENIO_CONFIG_IFORM_SHIBBOLETH %} {%- if config.INVENIO_CONFIG_IFORM_SHIBBOLETH %}
<div class="ui divider"></div> <div class="ui divider"></div>
<a href="{{ url_for("sso_saml.sso", idp="idp") }}" class="login-page-button ui fluid large button"> <a
href="{{ url_for("sso_saml.sso", idp="idp") }}"
class="login-page-button ui fluid large button"
>
<span style="font-size: 18px;">Sign up with I-Form</span> <span style="font-size: 18px;">Sign up with I-Form</span>
<img src="{{ url_for("static", filename=config.INVENIO_THEME_IFORM_ICON) }}" height="20px" /> <img
src="{{ url_for("static", filename=config.INVENIO_THEME_IFORM_ICON) }}"
height="20px"
/>
</a> </a>
<div class="ui inverted horizontal divider"><span class="text-color">{{_ ("Or") }}</span></div> <div class="ui inverted horizontal divider">
<span class="text-color">{{ _ ("Or") }}</span>
</div>
{%- endif %} {%- endif %}
{%- block form_header %} {%- block form_header %}
@@ -62,7 +71,12 @@
<i class="user icon button"></i> <i class="user icon button"></i>
</div> </div>
<div class="content {{ accordion_active }}"> <div class="content {{ accordion_active }}">
<form class="ui large form" action="{{ url_for_security("register") }}" method="POST" name="register_user_form"> <form
class="ui large form"
action="{{ url_for_security("register") }}"
method="POST"
name="register_user_form"
>
{{ form_errors(form) }} {{ form_errors(form) }}
{{ form.hidden_tag() }} {{ form.hidden_tag() }}
{%- block registration_form_fields scoped %} {%- block registration_form_fields scoped %}
@@ -90,7 +104,5 @@
<div class="ui divider"></div> <div class="ui divider"></div>
</div> </div>
</div> </div>
</div> </div>
{% endblock page_body %} {% endblock page_body %}

View File

@@ -6,14 +6,14 @@
details. details.
#} #}
<!DOCTYPE html> <!doctype html>
<html lang="{{ current_i18n.locale.language|safe }}" dir="{{ current_i18n.locale.text_direction }}"> <html lang="{{ current_i18n.locale.language|safe }}" dir="{{ current_i18n.locale.text_direction }}">
<head> <head>
{%- block head %} {%- block head %}
{%- block head_meta %} {%- block head_meta %}
<meta charset="utf-8"> <meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1" />
{%- if description %} {%- if description %}
<meta name="description" content="{{ description }}" /> <meta name="description" content="{{ description }}" />
@@ -25,33 +25,38 @@
{%- if config.get("THEME_GOOGLE_SITE_VERIFICATION", None) %} {%- if config.get("THEME_GOOGLE_SITE_VERIFICATION", None) %}
{%- for google_id in config.THEME_GOOGLE_SITE_VERIFICATION %} {%- for google_id in config.THEME_GOOGLE_SITE_VERIFICATION %}
<meta name="google-site-verification" content="{{google_id}}"/> <meta name="google-site-verification" content="{{ google_id }}" />
{%- endfor %} {%- endfor %}
{%- endif %} {%- endif %}
{%- endblock head_meta %} {%- endblock head_meta %}
{%- block head_title %} {%- block head_title %}
{%- set title = title or config.THEME_SITENAME %} {%- set title = title or config.THEME_SITENAME %}
<title>{{title}}</title> <title>{{ title }}</title>
{%- endblock head_title %} {%- endblock head_title %}
{%- block head_links %} {%- block head_links %}
<link rel="shortcut icon" href="{{ url_for("static", filename="favicon.ico") }}"/> <link rel="shortcut icon" href="{{ url_for("static", filename="favicon.ico") }}" />
{%- if keywords %} {%- if keywords %}
<link rel="canonical" href="{{ canonical_url }}"/> <link rel="canonical" href="{{ canonical_url }}" />
{% endif %} {% endif %}
{%- block head_links_langs %} {%- block head_links_langs %}
{%- if alternate_urls %} {%- if alternate_urls %}
{%- for alt_ln, alternate_url in alternate_urls.items() %} {%- for alt_ln, alternate_url in alternate_urls.items() %}
<link rel="alternate" hreflang="{{ alt_ln }}" href="{{ alternate_url }}"/> <link
rel="alternate"
hreflang="{{ alt_ln }}"
href="{{ alternate_url }}"
/>
{%- endfor %} {%- endfor %}
{%- endif %} {%- endif %}
{%- endblock %} {%- endblock %}
{%- endblock head_links %} {%- endblock head_links %}
{%- block header %}{% endblock header %} {%- block header %}
{% endblock header %}
{%- block css %} {%- block css %}
{{ webpack["theme.css"] }} {{ webpack["theme.css"] }}
@@ -60,11 +65,20 @@
{%- endblock head %} {%- endblock head %}
</head> </head>
<body itemscope itemtype="http://schema.org/WebPage" data-spy="scroll" data-target=".scrollspy-target"> <body
itemscope
itemtype="http://schema.org/WebPage"
data-spy="scroll"
data-target=".scrollspy-target"
>
{%- block body %} {%- block body %}
{%- block browserupgrade %} {%- block browserupgrade %}
<!--[if lt IE 10]> <!--[if lt IE 10]>
<p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p> <p class="browserupgrade">
You are using an <strong>outdated</strong> browser. Please
<a href="http://browsehappy.com/">upgrade your browser</a> to improve your
experience.
</p>
<![endif]--> <![endif]-->
{%- endblock browserupgrade %} {%- endblock browserupgrade %}

View File

@@ -11,11 +11,29 @@
<ul> <ul>
<li><strong>Safe</strong> &mdash; Your research results are permanently available.</li> <li><strong>Safe</strong> &mdash; Your research results are permanently available.</li>
<li><strong>Trusted</strong> &mdash; A service from I-Form, based on software developed by CERN.</li> <li>
<li><strong>Citeable</strong> &mdash; Every upload is assigned a Digital Object Identifier (DOI).</li> <strong>Trusted</strong> &mdash; A service from I-Form, based on software developed by
<li><strong>No waiting time</strong> &mdash; Uploads are made available online as soon as you hit publish. Your DOI is registered within seconds.</li> CERN.
<li><strong>Open or closed</strong> &mdash; You determine the visibility of your uploads. A restricted access mode is possible.</li> </li>
<li><strong>Versioning</strong> &mdash; Easily update your dataset with the versioning feature.</li> <li>
<li><strong>Usage statistics</strong> &mdash; All uploads display standards compliant usage statistics. <a href="help/statistics">(More)</a></li> <strong>Citeable</strong> &mdash; Every upload is assigned a Digital Object Identifier
(DOI).
</li>
<li>
<strong>No waiting time</strong> &mdash; Uploads are made available online as soon as
you hit publish. Your DOI is registered within seconds.
</li>
<li>
<strong>Open or closed</strong> &mdash; You determine the visibility of your uploads. A
restricted access mode is possible.
</li>
<li>
<strong>Versioning</strong> &mdash; Easily update your dataset with the versioning
feature.
</li>
<li>
<strong>Usage statistics</strong> &mdash; All uploads display standards compliant usage
statistics. <a href="help/statistics">(More)</a>
</li>
</ul> </ul>
</div> </div>

View File

@@ -5,14 +5,13 @@
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.
#} #}
{% extends config.THEME_ERROR_TEMPLATE %}
{% extends config.THEME_ERROR_TEMPLATE %} {% block message %}
<h1>Internal server error</h1>
{% block message %}
<h1> Internal server error </h1>
<p> <p>
Please contact <a href="mailto:{{config.THEME_IFORM_SUPPORT_EMAIL}}">our support</a> to let Please contact <a href="mailto:{{ config.THEME_IFORM_SUPPORT_EMAIL }}">our support</a> to
us know about this error. let us know about this error.
</p> </p>
{# TODO: provide g.sentry_event_id here once sentry is configured, cf. invenio_theme/500.html #} {# TODO: provide g.sentry_event_id here once sentry is configured, cf. invenio_theme/500.html #}
{% endblock message %} {% endblock message %}

View File

@@ -24,43 +24,56 @@
<h2>Repository</h2> <h2>Repository</h2>
<div class="ui list"> <div class="ui list">
<div class="item"> <div class="item">
<a href="https://tu-graz-library.github.io/docs-repository" title="Repository documentation" <a
target="_blank"> href="https://tu-graz-library.github.io/docs-repository"
title="Repository documentation"
target="_blank"
>
Documentation <i class="external alternate icon"></i> Documentation <i class="external alternate icon"></i>
</a> </a>
</div> </div>
<div class="item"> <div class="item">
<a href="{{ url_for('invenio_config_iform.guide') }}" <a
title="Quick guide" target="_blank"> href="{{ url_for('invenio_config_iform.guide') }}"
title="Quick guide"
target="_blank"
>
Reference Guide <i class="download icon"></i> Reference Guide <i class="download icon"></i>
</a> </a>
</div> </div>
<div class="item"> <div class="item">
<a href="{{ url_for('invenio_app_rdm.help_search') }}" <a
title="Search guide"> href="{{ url_for('invenio_app_rdm.help_search') }}"
title="Search guide"
>
Search Guide<i class="angle right icon"></i> Search Guide<i class="angle right icon"></i>
</a> </a>
</div> </div>
<div class="item"> <div class="item">
<a href="{{ url_for('invenio_config_iform.gdpr') }}" <a
title="General Data Protection Rights" target="_blank"> href="{{ url_for('invenio_config_iform.gdpr') }}"
title="General Data Protection Rights"
target="_blank"
>
Data Protection <i class="download icon"></i> Data Protection <i class="download icon"></i>
</a> </a>
</div> </div>
<div class="item"> <div class="item">
<a href="{{ url_for('invenio_config_iform.terms') }}" <a
title="Terms and Conditions" target="_blank"> href="{{ url_for('invenio_config_iform.terms') }}"
title="Terms and Conditions"
target="_blank"
>
Terms and Conditions <i class="download icon"></i> Terms and Conditions <i class="download icon"></i>
</a> </a>
</div> </div>
</div> </div>
</div> </div>
<div class="column"> <div class="column">
<h2>Features</h2> <h2>Features</h2>
@@ -73,7 +86,6 @@
</div> </div>
</div> </div>
<!-- <div class="column"> <!-- <div class="column">
<h2>Connected Services</h2> <h2>Connected Services</h2>
<div class="ui list"> <div class="ui list">
@@ -105,7 +117,6 @@
<div class="item">to change the font size.</div> <div class="item">to change the font size.</div>
</div> </div>
</div> </div>
</div> </div>
<div class="ui divider"></div> <div class="ui divider"></div>
@@ -114,20 +125,32 @@
<div class="column"> <div class="column">
<div class="logos"> <div class="logos">
<strong>Powered by</strong> <strong>Powered by</strong>
<a href="http://inveniosoftware.org/products/rdm" target="_blank" title="invenioRDM"> <a
<img src="{{ url_for("static", filename="images/inveniordm-tail.svg")}}" href="http://inveniosoftware.org/products/rdm"
target="_blank"
title="invenioRDM"
>
<img
src="{{ url_for("static", filename="images/inveniordm-tail.svg") }}"
alt="InvenioRDM logo" alt="InvenioRDM logo"
style="display: block; height: 90px; margin-top: 8px;"> style="display: block; height: 90px; margin-top: 8px;"
/>
</a> </a>
</div> </div>
</div> </div>
<div class="column"> <div class="column">
<div class="logos"> <div class="logos">
<strong>Funded by</strong> <strong>Funded by</strong>
<a href="https://www.sfi.ie" target="_blank" title="Science Foundation Ireland"> <a
<img src="{{ url_for("static", filename="images/SFI_logo.png")}}" href="https://www.sfi.ie"
target="_blank"
title="Science Foundation Ireland"
>
<img
src="{{ url_for("static", filename="images/SFI_logo.png") }}"
alt="Science Foundation Ireland" alt="Science Foundation Ireland"
style="display: block; height: auto; margin-top: 15px; width: 230px;"> style="display: block; height: auto; margin-top: 15px; width: 230px;"
/>
</a> </a>
</div> </div>
</div> </div>

View File

@@ -30,7 +30,11 @@
<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"> <div class="two wide column main-menu-entry">
<a href="{{url_for('invenio_theme_iform.index')}}" title="Home" class="no-decoration"> <a
href="{{ url_for('invenio_theme_iform.index') }}"
title="Home"
class="no-decoration"
>
<span class="home-inline"> <span class="home-inline">
{%- include "invenio_theme_iform/home_icon.svg" %} Home {%- include "invenio_theme_iform/home_icon.svg" %} Home
</span> </span>
@@ -38,21 +42,22 @@
</div> </div>
<div class="two wide column main-menu-entry"> <div class="two wide column main-menu-entry">
<a role="menuitem" href="/communities" class="no-decoration">Communities</a> <a role="menuitem" href="/communities" class="no-decoration"
>Communities</a
>
</div> </div>
<div class="two wide column main-menu-entry"> <div class="two wide column main-menu-entry">
<a role="menuitem" href="/me/overview" class="no-decoration">Dashboard</a> <a role="menuitem" href="/me/overview" class="no-decoration"
>Dashboard</a
>
</div> </div>
</div> </div>
<div id="margin-divider" class="ui divider main-menu-underline-line"> <div id="margin-divider" class="ui divider main-menu-underline-line"></div>
</div>
</div> </div>
<div class="spacer"></div> <div class="spacer"></div>
</div> </div>
</nav> </nav>
{%- endblock navbar %} {%- endblock navbar %}

View File

@@ -5,7 +5,6 @@
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.
#} #}
{%- extends config.INVENIO_THEME_IFORM_BASE_TEMPLATE %} {%- extends config.INVENIO_THEME_IFORM_BASE_TEMPLATE %}
{%- block javascript %} {%- block javascript %}
@@ -13,14 +12,11 @@
{%- endblock javascript %} {%- endblock javascript %}
{%- block page_body %} {%- block page_body %}
<div class="ui container">
<div class="ui container">
<div class="ui divider hidden"></div> <div class="ui divider hidden"></div>
<div class="ui stackable grid"> <div class="ui stackable grid">
{% include "invenio_theme_iform/frontpage_overview.html" %} {% include "invenio_theme_iform/frontpage_overview.html" %}
{% include "invenio_theme_iform/recent_uploads.html" %} {% include "invenio_theme_iform/recent_uploads.html" %}
<!---segments--> <!---segments-->
@@ -29,7 +25,5 @@
{% include "invenio_theme_iform/benefits.html" %} {% include "invenio_theme_iform/benefits.html" %}
</div> </div>
</div> </div>
</div> </div>
{%- endblock %} {%- endblock %}

View File

@@ -9,22 +9,31 @@
{%- macro creators (authors_list) %} {%- macro creators (authors_list) %}
{%- for creators in authors_list %} {%- for creators in authors_list %}
{%- if creators.identifiers and creators.identifiers.orcid %} {%- if creators.identifiers and 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"
{%- endif %} ><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-tooltip="{{affiliation.name}}" data-inverted="" {%- endfor %} {% endif %}>{{creators.person_or_org.name}}</span> <span
{% if not loop.last %}; {% endif %} class="text-muted"
{% if creators.affiliations %}{% for affiliation in creators.affiliations %}
{%- endfor %} data-tooltip="{{ affiliation.name }}" data-inverted=""
{%- endfor %}{% endif %}
>{{ creators.person_or_org.name }}</span
>
{% if not loop.last %};{% endif %}
{%- endfor %}
{%- endmacro %} {%- endmacro %}
<!--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}}(s)</h5> <h5>{{ group.grouper }}(s)</h5>
{{authors(group.list)}} {{ authors(group.list) }}
{%- endfor %} {%- endfor %}
{%- endmacro %} {%- endmacro %}

View File

@@ -6,7 +6,8 @@
details. details.
#} #}
{% set options = [ {%
set options = [
{ {
"key": "records", "key": "records",
"text": "All", "text": "All",
@@ -28,7 +29,7 @@
"value": url_for("invenio_records_lom.search"), "value": url_for("invenio_records_lom.search"),
"title": "oer", "title": "oer",
} }
] ]
%} %}
<div class="ui container"> <div class="ui container">
@@ -38,7 +39,7 @@
<div class="short-menu-left-search"> <div class="short-menu-left-search">
<div style="display: inline-block;"> <div style="display: inline-block;">
<div class="item p-0 search-bar rel-mr-1"> <div class="item p-0 search-bar rel-mr-1">
<div id="header-search-bar" data-options='{{ options | tojson }}'></div> <div id="header-search-bar" data-options="{{ options | tojson }}"></div>
</div> </div>
</div> </div>
</div> </div>
@@ -52,22 +53,23 @@
</div> </div>
</div> </div>
<!----END MENU-------------------------------------------------------------> <!----END MENU------------------------------------------------------------->
<div class="ui grid" id="main-logo"> <div class="ui grid" id="main-logo">
<!-- Left --> <!-- Left -->
<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">{%- include "invenio_theme_iform/repository_logo.svg" %}</div>
{%- include "invenio_theme_iform/repository_logo.svg" %}
</div>
<div class="affiliation-text"> <div class="affiliation-text">
<a title="Home" href="{{url_for("invenio_theme_iform.index")}}" class="no-decoration"> <a
title="Home"
href="{{ url_for("invenio_theme_iform.index") }}"
class="no-decoration"
>
I-FORM I-FORM
<br> <br />
RESEARCH DATA RESEARCH DATA
<br> <br />
REPOSITORY REPOSITORY
</a> </a>
</div> </div>
@@ -81,7 +83,12 @@
<div class="affiliation-logo-claim-single">Through</div> <div class="affiliation-logo-claim-single">Through</div>
<div class="affiliation-logo-claim-single">Expertise</div> <div class="affiliation-logo-claim-single">Expertise</div>
</div> </div>
<a href="https://www.i-form.ie" title="I-Form Home" target="_blank" class="no-decoration"> <a
href="https://www.i-form.ie"
title="I-Form Home"
target="_blank"
class="no-decoration"
>
{%- include "invenio_theme_iform/iform_logo.svg" %} {%- include "invenio_theme_iform/iform_logo.svg" %}
</a> </a>
</div> </div>

View File

@@ -5,7 +5,6 @@
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.
#} #}
{%- extends config.INVENIO_THEME_IFORM_BASE_TEMPLATE %} {%- extends config.INVENIO_THEME_IFORM_BASE_TEMPLATE %}
{%- set active_dashboard_menu_item = "overview" %} {%- set active_dashboard_menu_item = "overview" %}
@@ -31,16 +30,26 @@
<div class="ui segment" style="height: 480px"> <div class="ui segment" style="height: 480px">
<h2>Research Results</h2> <h2>Research Results</h2>
<a class="ui left floated image" href="/me/uploads"> <a class="ui left floated image" href="/me/uploads">
<img width="400px" alt="Research Results" src="{{ url_for("static", filename="images/diamond.svg") }}"> <img
width="400px"
alt="Research Results"
src="{{ url_for("static", filename="images/diamond.svg") }}"
/>
</a> </a>
<div class="ui right floated text">Overview: Description for research results</div> <div class="ui right floated text">
Overview: Description for research results
</div>
</div> </div>
</div> </div>
<div class="column"> <div class="column">
<div class="ui segment" style="height: 480px"> <div class="ui segment" style="height: 480px">
<h2>Communities</h2> <h2>Communities</h2>
<a class="ui left floated image" href="/me/communities"> <a class="ui left floated image" href="/me/communities">
<img width="400px" alt="Communities" src="{{ url_for("static", filename="images/group-discussion.svg") }}"> <img
width="400px"
alt="Communities"
src="{{ url_for("static", filename="images/group-discussion.svg") }}"
/>
</a> </a>
<div>Overview: Description of Communities</div> <div>Overview: Description of Communities</div>
</div> </div>
@@ -49,12 +58,17 @@
<div class="ui segment" style="height: 480px"> <div class="ui segment" style="height: 480px">
<h2>Requests</h2> <h2>Requests</h2>
<a class="ui left floated image" href="/me/requests"> <a class="ui left floated image" href="/me/requests">
<img width="400px" alt="Requests" src="{{ url_for("static", filename="images/umbrella.svg") }}"> <img
width="400px"
alt="Requests"
src="{{ url_for("static", filename="images/umbrella.svg") }}"
/>
</a> </a>
<div>Overview: Description of Requests</div> <div>Overview: Description of Requests</div>
</div> </div>
</div> </div>
{% else %} {# not is_iform_authenticated #} {% else %}
{# not is_iform_authenticated #}
{# 1 column: greyed out Research-Uploads #} {# 1 column: greyed out Research-Uploads #}
<div class="column"> <div class="column">
{# a modal's HTML can be placed anywhere, so I placed it here, right before it's used #} {# a modal's HTML can be placed anywhere, so I placed it here, right before it's used #}
@@ -63,16 +77,24 @@
<div class="content"> <div class="content">
<p> <p>
To ensure a well-curated repository, new users need to get unlocked To ensure a well-curated repository, new users need to get unlocked
before being allowed to upload. Once unlocked, you can upload your research, before being allowed to upload. Once unlocked, you can upload your
request its inclusion in a community, generate a DOI for it, and publish it. research, request its inclusion in a community, generate a DOI for
it, and publish it.
{# TODO: extra lines on policy about who gets accepted how for Research-Uploads #} {# TODO: extra lines on policy about who gets accepted how for Research-Uploads #}
</p> </p>
<div id="anchor-unlock-form"> {# will be replaced with ZammadForm when generating it #} <div id="anchor-unlock-form">
<button class="ui fluid button" onclick=" {# will be replaced with ZammadForm when generating it #}
<button
class="ui fluid button"
onclick="
$('#iform-unlock-modal') $('#iform-unlock-modal')
.modal('hide')" .modal('hide')"
>Got it!</button> >
<button id="generate-unlock-form" class="ui fluid button">Request unlocking</button> Got it!
</button>
<button id="generate-unlock-form" class="ui fluid button">
Request unlocking
</button>
</div> </div>
</div> </div>
</div> </div>
@@ -80,11 +102,18 @@
{# actual column contents start here #} {# actual column contents start here #}
<div class="ui disabled segment" style="height: 480px"> <div class="ui disabled segment" style="height: 480px">
<h2>Research Results</h2> <h2>Research Results</h2>
<div class="ui left floated image" style="cursor: pointer" onclick=" <div
class="ui left floated image"
style="cursor: pointer"
onclick="
$('#iform-unlock-modal') $('#iform-unlock-modal')
.modal('show')" .modal('show')"
> >
<img width="400px" alt="Research Results" src="{{ url_for("static", filename="images/diamond.svg") }}"> <img
width="400px"
alt="Research Results"
src="{{ url_for("static", filename="images/diamond.svg") }}"
/>
</div> </div>
<div class="ui right floated text"> <div class="ui right floated text">
Overview: Description for research results Overview: Description for research results
@@ -97,7 +126,11 @@
<div class="ui segment" style="height: 480px"> <div class="ui segment" style="height: 480px">
<h2>Publications</h2> <h2>Publications</h2>
<a class="ui left floated image" href="/publications/uploads"> <a class="ui left floated image" href="/publications/uploads">
<img width="400px" alt="Publications" src="{{ url_for("static", filename="images/library-book-svgrepo-com.svg") }}"> <img
width="400px"
alt="Publications"
src="{{ url_for("static", filename="images/library-book-svgrepo-com.svg") }}"
/>
</a> </a>
<div>Overview: Description for publications</div> <div>Overview: Description for publications</div>
</div> </div>
@@ -107,12 +140,15 @@
<div class="ui segment" style="height: 480px"> <div class="ui segment" style="height: 480px">
<h2>Educational Resources</h2> <h2>Educational Resources</h2>
<a class="ui left floated image" href="/oer/uploads"> <a class="ui left floated image" href="/oer/uploads">
<img width="400px" alt="Open Educational Resources" src="{{ url_for("static", filename="images/play.svg") }}"> <img
width="400px"
alt="Open Educational Resources"
src="{{ url_for("static", filename="images/play.svg") }}"
/>
</a> </a>
<div>Overview: Description for open educational resources</div> <div>Overview: Description for open educational resources</div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
{%- endblock %} {%- endblock %}

View File

@@ -28,15 +28,17 @@
</span> </span>
{# Resource type badge #} {# Resource type badge #}
{% if r.metadata.types | length > 0%} {% if r.metadata.types | length > 0 %}
<span class="ui label grey" data-tooltip="Resource type" data-inverted=""> <span class="ui label grey" data-tooltip="Resource type" data-inverted="">
{{ r.metadata.types[0] }} {{ r.metadata.types[0] }}
</span> </span>
{% endif %} {% endif %}
<span class="ui label access-status {{ r.access_status.id }}" <span
class="ui label access-status {{ r.access_status.id }}"
data-tooltip="{{ r.access_status.description_l10n }}" data-tooltip="{{ r.access_status.description_l10n }}"
data-inverted=""> data-inverted=""
>
<i class="icon {{ r.access_status.icon }}"></i> <i class="icon {{ r.access_status.icon }}"></i>
{{ r.access_status.title_l10n }} {{ r.access_status.title_l10n }}
</span> </span>
@@ -47,9 +49,7 @@
</div> </div>
<h4> <h4>
<a href="{{ record_url }}" class="no-decoration"> <a href="{{ record_url }}" class="no-decoration"> {{ r.metadata.titles[0] }} </a>
{{ r.metadata.titles[0] }}
</a>
</h4> </h4>
<p> <p>
@@ -59,7 +59,7 @@
</p> </p>
<p class="hidden-xs"> <p class="hidden-xs">
<a href="{{record_url}}" class="no-decoration"> <a href="{{ record_url }}" class="no-decoration">
{{ r.metadata.descriptions | join(" ") | striptags | truncate(300) }} {{ r.metadata.descriptions | join(" ") | striptags | truncate(300) }}
</a> </a>
</p> </p>

View File

@@ -8,10 +8,10 @@ const config = {
{ {
files: ["*.html"], files: ["*.html"],
options: { options: {
parser: "jinja-template" parser: "jinja-template",
} },
} },
] ],
}; };
export default config; export default config;