invenio-theme 4.8.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- invenio_theme/__init__.py +491 -0
- invenio_theme/assets/bootstrap3/js/invenio_theme/admin.js +18 -0
- invenio_theme/assets/bootstrap3/js/invenio_theme/base.js +8 -0
- invenio_theme/assets/bootstrap3/scss/invenio_theme/admin.scss +73 -0
- invenio_theme/assets/bootstrap3/scss/invenio_theme/angular.scss +27 -0
- invenio_theme/assets/bootstrap3/scss/invenio_theme/body.scss +30 -0
- invenio_theme/assets/bootstrap3/scss/invenio_theme/cover.scss +60 -0
- invenio_theme/assets/bootstrap3/scss/invenio_theme/footer.scss +10 -0
- invenio_theme/assets/bootstrap3/scss/invenio_theme/header.scss +18 -0
- invenio_theme/assets/bootstrap3/scss/invenio_theme/input-icon.scss +29 -0
- invenio_theme/assets/bootstrap3/scss/invenio_theme/navbar.scss +22 -0
- invenio_theme/assets/bootstrap3/scss/invenio_theme/styles.scss +21 -0
- invenio_theme/assets/bootstrap3/scss/invenio_theme/theme.scss +7 -0
- invenio_theme/assets/bootstrap3/scss/invenio_theme/type.scss +20 -0
- invenio_theme/assets/bootstrap3/scss/invenio_theme/variables.scss +23 -0
- invenio_theme/assets/semantic-ui/js/invenio_theme/Media.js +21 -0
- invenio_theme/assets/semantic-ui/js/invenio_theme/admin.js +16 -0
- invenio_theme/assets/semantic-ui/js/invenio_theme/base.js +9 -0
- invenio_theme/assets/semantic-ui/js/invenio_theme/templates.js +51 -0
- invenio_theme/assets/semantic-ui/js/invenio_theme/theme.js +108 -0
- invenio_theme/assets/semantic-ui/js/invenio_theme/truncate.js +43 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/fonts/Lato-Bold.eot +0 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/fonts/Lato-Bold.ttf +0 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/fonts/Lato-Bold.woff +0 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/fonts/Lato-Bold.woff2 +0 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/fonts/Lato-BoldItalic.eot +0 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/fonts/Lato-BoldItalic.ttf +0 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/fonts/Lato-BoldItalic.woff +0 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/fonts/Lato-BoldItalic.woff2 +0 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/fonts/Lato-Italic.eot +0 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/fonts/Lato-Italic.ttf +0 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/fonts/Lato-Italic.woff +0 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/fonts/Lato-Italic.woff2 +0 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/fonts/Lato-Light.ttf +0 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/fonts/Lato-LightItalic.ttf +0 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/fonts/Lato-Regular.eot +0 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/fonts/Lato-Regular.ttf +0 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/fonts/Lato-Regular.woff +0 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/fonts/Lato-Regular.woff2 +0 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/navbar/navbar.less +246 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/collections/breadcrumb.overrides +3 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/collections/breadcrumb.variables +3 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/collections/form.overrides +52 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/collections/form.variables +3 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/collections/grid.overrides +131 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/collections/grid.variables +11 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/collections/menu.overrides +330 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/collections/menu.variables +5 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/collections/message.overrides +48 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/collections/message.variables +3 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/collections/table.overrides +3 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/collections/table.variables +3 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/elements/button.overrides +136 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/elements/button.variables +34 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/elements/container.overrides +48 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/elements/container.variables +3 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/elements/divider.overrides +12 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/elements/divider.variables +3 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/elements/flag.overrides +3 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/elements/flag.variables +3 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/elements/header.overrides +48 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/elements/header.variables +12 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/elements/icon.overrides +31 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/elements/icon.variables +13 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/elements/image.overrides +22 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/elements/image.variables +3 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/elements/input.overrides +23 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/elements/input.variables +3 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/elements/label.overrides +54 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/elements/label.variables +44 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/elements/list.overrides +3 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/elements/list.variables +3 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/elements/loader.overrides +3 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/elements/loader.variables +3 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/elements/rail.overrides +3 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/elements/rail.variables +3 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/elements/reveal.overrides +3 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/elements/reveal.variables +3 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/elements/segment.overrides +100 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/elements/segment.variables +10 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/elements/step.overrides +3 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/elements/step.variables +3 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/globals/collections.overrides +348 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/globals/job-logs.overrides +16 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/globals/reset.overrides +3 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/globals/reset.variables +3 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/globals/site.overrides +721 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/globals/site.variables +63 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/modules/accordion.overrides +3 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/modules/accordion.variables +3 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/modules/chatroom.overrides +3 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/modules/chatroom.variables +3 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/modules/checkbox.overrides +88 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/modules/checkbox.variables +10 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/modules/dimmer.overrides +3 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/modules/dimmer.variables +3 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/modules/dropdown.overrides +39 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/modules/dropdown.variables +3 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/modules/embed.overrides +3 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/modules/embed.variables +3 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/modules/modal.overrides +3 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/modules/modal.variables +3 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/modules/nag.overrides +3 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/modules/nag.variables +3 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/modules/popup.overrides +3 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/modules/popup.variables +3 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/modules/progress.overrides +11 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/modules/progress.variables +3 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/modules/rating.overrides +3 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/modules/rating.variables +3 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/modules/search.overrides +21 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/modules/search.variables +3 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/modules/shape.overrides +3 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/modules/shape.variables +3 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/modules/sidebar.overrides +3 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/modules/sidebar.variables +3 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/modules/sticky.overrides +3 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/modules/sticky.variables +3 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/modules/tab.overrides +3 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/modules/tab.variables +3 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/modules/transition.overrides +3 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/modules/transition.variables +3 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/theme.less +67 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/views/ad.overrides +3 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/views/ad.variables +3 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/views/card.overrides +3 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/views/card.variables +3 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/views/comment.overrides +3 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/views/comment.variables +3 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/views/feed.overrides +3 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/views/feed.variables +3 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/views/item.overrides +51 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/views/item.variables +3 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/views/statistic.overrides +3 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme/views/statistic.variables +3 -0
- invenio_theme/assets/semantic-ui/less/invenio_theme/theme.config.example +103 -0
- invenio_theme/assets/semantic-ui/scss/invenio_theme/admin.scss +73 -0
- invenio_theme/assets/semantic-ui/scss/invenio_theme/angular.scss +27 -0
- invenio_theme/assets/semantic-ui/scss/invenio_theme/body.scss +30 -0
- invenio_theme/assets/semantic-ui/scss/invenio_theme/cover.scss +60 -0
- invenio_theme/assets/semantic-ui/scss/invenio_theme/footer.scss +10 -0
- invenio_theme/assets/semantic-ui/scss/invenio_theme/header.scss +18 -0
- invenio_theme/assets/semantic-ui/scss/invenio_theme/input-icon.scss +29 -0
- invenio_theme/assets/semantic-ui/scss/invenio_theme/navbar.scss +22 -0
- invenio_theme/assets/semantic-ui/scss/invenio_theme/styles.scss +21 -0
- invenio_theme/assets/semantic-ui/scss/invenio_theme/theme.scss +7 -0
- invenio_theme/assets/semantic-ui/scss/invenio_theme/type.scss +20 -0
- invenio_theme/assets/semantic-ui/scss/invenio_theme/variables.scss +23 -0
- invenio_theme/config.py +182 -0
- invenio_theme/ext.py +90 -0
- invenio_theme/icons.py +54 -0
- invenio_theme/proxies.py +16 -0
- invenio_theme/shared.py +8 -0
- invenio_theme/static/apple-touch-icon-120.png +0 -0
- invenio_theme/static/apple-touch-icon-152.png +0 -0
- invenio_theme/static/apple-touch-icon-167.png +0 -0
- invenio_theme/static/apple-touch-icon-180.png +0 -0
- invenio_theme/static/favicon.ico +0 -0
- invenio_theme/static/images/invenio-white.svg +129 -0
- invenio_theme/static/images/square-placeholder.png +0 -0
- invenio_theme/templates/invenio_theme/401.html +11 -0
- invenio_theme/templates/invenio_theme/403.html +11 -0
- invenio_theme/templates/invenio_theme/404.html +12 -0
- invenio_theme/templates/invenio_theme/429.html +11 -0
- invenio_theme/templates/invenio_theme/500.html +13 -0
- invenio_theme/templates/invenio_theme/admin_header.html +78 -0
- invenio_theme/templates/invenio_theme/admin_layout.html +65 -0
- invenio_theme/templates/invenio_theme/body.html +16 -0
- invenio_theme/templates/invenio_theme/breadcrumbs.html +24 -0
- invenio_theme/templates/invenio_theme/footer.html +22 -0
- invenio_theme/templates/invenio_theme/frontpage.html +13 -0
- invenio_theme/templates/invenio_theme/header.html +72 -0
- invenio_theme/templates/invenio_theme/header_frontpage.html +36 -0
- invenio_theme/templates/invenio_theme/header_login.html +35 -0
- invenio_theme/templates/invenio_theme/javascript.html +6 -0
- invenio_theme/templates/invenio_theme/macros/messages.html +17 -0
- invenio_theme/templates/invenio_theme/macros/truncate.html +15 -0
- invenio_theme/templates/invenio_theme/page.html +100 -0
- invenio_theme/templates/invenio_theme/page_admin.html +164 -0
- invenio_theme/templates/invenio_theme/page_cover.html +65 -0
- invenio_theme/templates/invenio_theme/page_error.html +16 -0
- invenio_theme/templates/invenio_theme/page_settings.html +60 -0
- invenio_theme/templates/invenio_theme/trackingcode.html +4 -0
- invenio_theme/templates/semantic-ui/invenio_theme/401.html +13 -0
- invenio_theme/templates/semantic-ui/invenio_theme/403.html +13 -0
- invenio_theme/templates/semantic-ui/invenio_theme/404.html +13 -0
- invenio_theme/templates/semantic-ui/invenio_theme/429.html +13 -0
- invenio_theme/templates/semantic-ui/invenio_theme/500.html +15 -0
- invenio_theme/templates/semantic-ui/invenio_theme/admin_header.html +78 -0
- invenio_theme/templates/semantic-ui/invenio_theme/admin_layout.html +65 -0
- invenio_theme/templates/semantic-ui/invenio_theme/body.html +16 -0
- invenio_theme/templates/semantic-ui/invenio_theme/breadcrumbs.html +22 -0
- invenio_theme/templates/semantic-ui/invenio_theme/footer.html +23 -0
- invenio_theme/templates/semantic-ui/invenio_theme/frontpage.html +14 -0
- invenio_theme/templates/semantic-ui/invenio_theme/header.html +100 -0
- invenio_theme/templates/semantic-ui/invenio_theme/header_frontpage.html +41 -0
- invenio_theme/templates/semantic-ui/invenio_theme/header_login.html +57 -0
- invenio_theme/templates/semantic-ui/invenio_theme/javascript.html +8 -0
- invenio_theme/templates/semantic-ui/invenio_theme/macros/messages.html +38 -0
- invenio_theme/templates/semantic-ui/invenio_theme/page.html +137 -0
- invenio_theme/templates/semantic-ui/invenio_theme/page_admin.html +164 -0
- invenio_theme/templates/semantic-ui/invenio_theme/page_cover.html +66 -0
- invenio_theme/templates/semantic-ui/invenio_theme/page_error.html +18 -0
- invenio_theme/templates/semantic-ui/invenio_theme/page_settings.html +77 -0
- invenio_theme/templates/semantic-ui/invenio_theme/trackingcode.html +4 -0
- invenio_theme/translations/ar/LC_MESSAGES/messages.po +171 -0
- invenio_theme/translations/bg/LC_MESSAGES/messages.po +167 -0
- invenio_theme/translations/ca/LC_MESSAGES/messages.po +168 -0
- invenio_theme/translations/cs/LC_MESSAGES/messages.po +173 -0
- invenio_theme/translations/da/LC_MESSAGES/messages.po +167 -0
- invenio_theme/translations/de/LC_MESSAGES/messages.po +177 -0
- invenio_theme/translations/el/LC_MESSAGES/messages.po +167 -0
- invenio_theme/translations/es/LC_MESSAGES/messages.po +172 -0
- invenio_theme/translations/et/LC_MESSAGES/messages.po +171 -0
- invenio_theme/translations/fa/LC_MESSAGES/messages.po +167 -0
- invenio_theme/translations/fi/LC_MESSAGES/messages.po +170 -0
- invenio_theme/translations/fr/LC_MESSAGES/messages.po +174 -0
- invenio_theme/translations/hr/LC_MESSAGES/messages.po +167 -0
- invenio_theme/translations/hu/LC_MESSAGES/messages.po +171 -0
- invenio_theme/translations/it/LC_MESSAGES/messages.po +168 -0
- invenio_theme/translations/ja/LC_MESSAGES/messages.po +167 -0
- invenio_theme/translations/ka/LC_MESSAGES/messages.po +167 -0
- invenio_theme/translations/ko/LC_MESSAGES/messages.po +167 -0
- invenio_theme/translations/lt/LC_MESSAGES/messages.po +167 -0
- invenio_theme/translations/messages.pot +163 -0
- invenio_theme/translations/no/LC_MESSAGES/messages.po +167 -0
- invenio_theme/translations/pl/LC_MESSAGES/messages.po +167 -0
- invenio_theme/translations/pt/LC_MESSAGES/messages.po +167 -0
- invenio_theme/translations/ro/LC_MESSAGES/messages.po +171 -0
- invenio_theme/translations/ru/LC_MESSAGES/messages.po +172 -0
- invenio_theme/translations/sk/LC_MESSAGES/messages.po +168 -0
- invenio_theme/translations/sv/LC_MESSAGES/messages.po +173 -0
- invenio_theme/translations/tr/LC_MESSAGES/messages.po +172 -0
- invenio_theme/translations/uk/LC_MESSAGES/messages.po +168 -0
- invenio_theme/translations/zh_CN/LC_MESSAGES/messages.po +170 -0
- invenio_theme/translations/zh_TW/LC_MESSAGES/messages.po +167 -0
- invenio_theme/views.py +55 -0
- invenio_theme/webpack.py +90 -0
- invenio_theme-4.8.1.dist-info/METADATA +56 -0
- invenio_theme-4.8.1.dist-info/RECORD +244 -0
- invenio_theme-4.8.1.dist-info/WHEEL +4 -0
- invenio_theme-4.8.1.dist-info/entry_points.txt +11 -0
- invenio_theme-4.8.1.dist-info/licenses/AUTHORS.rst +24 -0
- invenio_theme-4.8.1.dist-info/licenses/LICENSE +20 -0
|
@@ -0,0 +1,491 @@
|
|
|
1
|
+
# SPDX-FileCopyrightText: 2015-2024 CERN.
|
|
2
|
+
# SPDX-FileCopyrightText: 2022-2025 Graz University of Technology.
|
|
3
|
+
# SPDX-FileCopyrightText: 2025 KTH Royal Institute of Technology.
|
|
4
|
+
# SPDX-License-Identifier: MIT
|
|
5
|
+
|
|
6
|
+
r"""Standard Bootstrap based theme for Invenio.
|
|
7
|
+
|
|
8
|
+
Invenio-Theme mainly consits of:
|
|
9
|
+
|
|
10
|
+
- `Templates and static files` - for integration with `Bootstrap
|
|
11
|
+
<https://getbootstrap.com/>`_ HTML, CSS and JS framework.
|
|
12
|
+
- `Error handlers` - for showing user-friendly 401, 402, 404, and 500 error
|
|
13
|
+
pages.
|
|
14
|
+
- `Menu` - for basic site navigation using `Flask-Menu
|
|
15
|
+
<https://flask-menu.readthedocs.io/>`_
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
Initialization
|
|
20
|
+
--------------
|
|
21
|
+
First create a Flask application and initialize
|
|
22
|
+
:class:`~invenio_theme.ext.InvenioTheme` extension.
|
|
23
|
+
|
|
24
|
+
>>> from flask import Flask, render_template_string
|
|
25
|
+
>>> from invenio_theme import InvenioTheme
|
|
26
|
+
>>> app = Flask('myapp')
|
|
27
|
+
>>> theme = InvenioTheme(app)
|
|
28
|
+
|
|
29
|
+
.. note::
|
|
30
|
+
|
|
31
|
+
There is a new blueprint registered during initialization in order to enable
|
|
32
|
+
loading of templates and static files from Invenio-Theme. The blueprint does
|
|
33
|
+
not have any views registered.
|
|
34
|
+
|
|
35
|
+
In order for the following examples to work, you also need to load the
|
|
36
|
+
`Invenio-I18N <https://invenio-i18n.readthedocs.io>`_ and
|
|
37
|
+
`Invenio-Assets <https://invenio-assets.readthedocs.io>`_:
|
|
38
|
+
|
|
39
|
+
>>> from invenio_i18n import InvenioI18N
|
|
40
|
+
>>> from invenio_assets import InvenioAssets
|
|
41
|
+
>>> i18n = InvenioI18N(app)
|
|
42
|
+
>>> assets = InvenioAssets(app)
|
|
43
|
+
|
|
44
|
+
Basic customizations
|
|
45
|
+
--------------------
|
|
46
|
+
Invenio-Theme makes it easy to perform some simple customizations such as
|
|
47
|
+
changing logo.
|
|
48
|
+
|
|
49
|
+
Logo and name
|
|
50
|
+
~~~~~~~~~~~~~
|
|
51
|
+
The easiest customization you can do is changing the logo and name of your
|
|
52
|
+
Invenio instance. Simply set the :data:`invenio_theme.config.THEME_LOGO` and
|
|
53
|
+
:data:`invenio_theme.config.THEME_SITENAME` configuration variables:
|
|
54
|
+
|
|
55
|
+
>>> app.config.update({
|
|
56
|
+
... 'THEME_LOGO': 'images/...',
|
|
57
|
+
... 'THEME_SITENAME': 'Awesome Site',
|
|
58
|
+
... })
|
|
59
|
+
|
|
60
|
+
The logo path is relative to your static folders. Also, if you don't want a
|
|
61
|
+
logo displayed, you can simply set the value to ``None``.
|
|
62
|
+
|
|
63
|
+
Search bar
|
|
64
|
+
~~~~~~~~~~
|
|
65
|
+
If you don't like having the search bar available in the header, you can
|
|
66
|
+
modify the behaviour by setting
|
|
67
|
+
:data:`invenio_theme.config.THEME_SEARCHBAR` to ``False``:
|
|
68
|
+
|
|
69
|
+
>>> app.config.update({
|
|
70
|
+
... 'THEME_SEARCHBAR': False,
|
|
71
|
+
... })
|
|
72
|
+
|
|
73
|
+
Analytics tracking code
|
|
74
|
+
~~~~~~~~~~~~~~~~~~~~~~~
|
|
75
|
+
If you need to include an analyics tracking code in your HTML pages (e.g. to
|
|
76
|
+
track analytics with Piwik or Google Analytics) you should set the
|
|
77
|
+
:data:`invenio_theme.config.THEME_JAVASCRIPT_TEMPLATE` variable to a template
|
|
78
|
+
which includes the tracking code:
|
|
79
|
+
|
|
80
|
+
>>> app.config.update({
|
|
81
|
+
... 'THEME_JAVASCRIPT_TEMPLATE': 'invenio_theme/trackingcode.html',
|
|
82
|
+
... })
|
|
83
|
+
|
|
84
|
+
Note that ``invenio_theme/trackingcode.html`` is empty so you have to provide
|
|
85
|
+
your own template with the tracking code.
|
|
86
|
+
|
|
87
|
+
Google Site Verification
|
|
88
|
+
~~~~~~~~~~~~~~~~~~~~~~~~
|
|
89
|
+
`Google Webmasters Tools
|
|
90
|
+
<https://www.google.com/webmasters/tools/home?hl=en&pli=1>`_ allows you to
|
|
91
|
+
inspect how Google is indexing your site. In order to see your site, you must
|
|
92
|
+
provide proof of ownership which is done by e.g. including a token generated
|
|
93
|
+
by Google in the meta-tags of your website. You can easily do this with
|
|
94
|
+
Invenio-Theme theme. Simply update the
|
|
95
|
+
:data:`invenio_theme.config.THEME_GOOGLE_SITE_VERIFICATION` configuration
|
|
96
|
+
variable with the list of tokens provided by Google:
|
|
97
|
+
|
|
98
|
+
>>> app.config.update({
|
|
99
|
+
... 'THEME_GOOGLE_SITE_VERIFICATION': ['...token...'],
|
|
100
|
+
... })
|
|
101
|
+
|
|
102
|
+
Templates
|
|
103
|
+
---------
|
|
104
|
+
Templates in Invenio-Theme falls in two categories:
|
|
105
|
+
|
|
106
|
+
* **Page templates** such as the base, cover and settings templates which
|
|
107
|
+
defines a template for an entire page.
|
|
108
|
+
* **Section templates** such as the header and footer templates which is
|
|
109
|
+
included as part of a page templates.
|
|
110
|
+
|
|
111
|
+
Most simple visual changes can be done by just overriding a section template.
|
|
112
|
+
Larger visual changes will likely require changes to one or more of the
|
|
113
|
+
page templates.
|
|
114
|
+
|
|
115
|
+
Overriding templates
|
|
116
|
+
~~~~~~~~~~~~~~~~~~~~
|
|
117
|
+
Most of the time all you need is to customize a small part of an existing
|
|
118
|
+
template. This is best achieved by extending the Invenio-Theme template and
|
|
119
|
+
overriding the template block you would like to customize.
|
|
120
|
+
|
|
121
|
+
For instance, say you wanted to include two logo files instead of only one in
|
|
122
|
+
the header, then you could extend the header template and override the
|
|
123
|
+
``brand`` block like this:
|
|
124
|
+
|
|
125
|
+
.. code-block:: jinja
|
|
126
|
+
|
|
127
|
+
{# mytheme/header.html #}
|
|
128
|
+
{% extends "invenio_theme/header.html" %}
|
|
129
|
+
{% block brand %} ... {% endblock brand %}
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
In order to make Invenio use this new header template you must set it in the
|
|
133
|
+
configuration (assuming the template was saved in a template folder under
|
|
134
|
+
``mytheme/header.html``):
|
|
135
|
+
|
|
136
|
+
>>> app.config.update({
|
|
137
|
+
... 'THEME_HEADER_TEMPLATE': 'mytheme/header.html',
|
|
138
|
+
... })
|
|
139
|
+
|
|
140
|
+
.. warning::
|
|
141
|
+
|
|
142
|
+
In general, if you override a template you should provide the same template
|
|
143
|
+
blocks as the template you override. This is because other Invenio modules
|
|
144
|
+
may rely on these template blocks,
|
|
145
|
+
|
|
146
|
+
Header section template
|
|
147
|
+
~~~~~~~~~~~~~~~~~~~~~~~~
|
|
148
|
+
The header template (``invenio_theme/header.html``) is reponsible for rendering
|
|
149
|
+
the navigation bar (including logo, search bar, menu and login/sign up
|
|
150
|
+
buttons) and flash messages
|
|
151
|
+
|
|
152
|
+
Change the template by updating
|
|
153
|
+
:data:`invenio_theme.config.THEME_HEADER_TEMPLATE`.
|
|
154
|
+
|
|
155
|
+
The template provide a number of blocks which can be overridden. The most
|
|
156
|
+
important ones are (please see the template file for full details):
|
|
157
|
+
|
|
158
|
+
* ``navbar`` - Displays the navigation bar and inlcude other template blocks
|
|
159
|
+
such as ``navbar_header``, ``navbar_nav`` and ``navbar_right``.
|
|
160
|
+
|
|
161
|
+
* ``flashmessages`` - Displays small notification messages such as
|
|
162
|
+
"Successfully logged in."
|
|
163
|
+
|
|
164
|
+
Header login section template
|
|
165
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
166
|
+
The header login template (``invenio_theme/header_login.html``) is responsible
|
|
167
|
+
for rendering the login/sign up buttons as well as a user menu if a user is
|
|
168
|
+
logged in. It is included by the header template and does not define any
|
|
169
|
+
template blocks.
|
|
170
|
+
|
|
171
|
+
Change the template by updating
|
|
172
|
+
:data:`invenio_theme.config.THEME_HEADER_LOGIN_TEMPLATE`
|
|
173
|
+
|
|
174
|
+
Footer section template
|
|
175
|
+
~~~~~~~~~~~~~~~~~~~~~~~
|
|
176
|
+
The footer template (``invenio_theme/footer.html``) is primarily reponsible for
|
|
177
|
+
rendering the language selector and does not contain any template blocks.
|
|
178
|
+
|
|
179
|
+
Change the template by updating
|
|
180
|
+
:data:`invenio_theme.config.THEME_FOOTER_TEMPLATE`
|
|
181
|
+
|
|
182
|
+
Javascript section template
|
|
183
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
184
|
+
If all you need to customize is to load some additional JavaScript, you can
|
|
185
|
+
just override the JavaScript template (``invenio_theme/javascript.html``). This
|
|
186
|
+
template is responsible for including site-wide JavaScript modules.
|
|
187
|
+
|
|
188
|
+
Change the template by updating
|
|
189
|
+
:data:`invenio_theme.config.THEME_JAVASCRIPT_TEMPLATE`
|
|
190
|
+
|
|
191
|
+
Settings page template
|
|
192
|
+
~~~~~~~~~~~~~~~~~~~~~~
|
|
193
|
+
The settings template (``invenio_theme/page_settings.html``) is responsible for
|
|
194
|
+
rendering user settings pages such as the change password dialog.
|
|
195
|
+
|
|
196
|
+
.. image:: static/settings.png
|
|
197
|
+
|
|
198
|
+
Change the template by updating
|
|
199
|
+
:data:`invenio_theme.config.SETTINGS_TEMPLATE`
|
|
200
|
+
|
|
201
|
+
The template provide a number of blocks which can be overridden. The most
|
|
202
|
+
important ones are (please see the template file for full details):
|
|
203
|
+
|
|
204
|
+
* ``settings_menu`` - Renders the left-hand menu and include another template
|
|
205
|
+
block ``settings_menu_item`` which renders an individual menu item.
|
|
206
|
+
|
|
207
|
+
* ``settings_content`` - Renders the right-hand content panel and include three
|
|
208
|
+
template blocks for ``settings_content_title``, ``settings_body`` and
|
|
209
|
+
``settings_form``.
|
|
210
|
+
|
|
211
|
+
Cover page template
|
|
212
|
+
~~~~~~~~~~~~~~~~~~~
|
|
213
|
+
The cover template (``invenio_theme/page_cover.html``) has a simplified layout
|
|
214
|
+
and is used for e.g. displaying the login dialog and sign-up page.
|
|
215
|
+
|
|
216
|
+
.. image:: static/cover.png
|
|
217
|
+
|
|
218
|
+
Change the template by updating
|
|
219
|
+
:data:`invenio_theme.config.COVER_TEMPLATE`
|
|
220
|
+
|
|
221
|
+
The template provide a number of blocks which can be overridden. The most
|
|
222
|
+
important ones are (please see the template file for full details):
|
|
223
|
+
|
|
224
|
+
* ``page_header`` - Includes e.g. the logo and branding.
|
|
225
|
+
|
|
226
|
+
* ``page_body`` - Renders the page body which includes a panel. The panel can
|
|
227
|
+
be customized via the template blocks ``panel`` and ``panel_content`` and by
|
|
228
|
+
setting the template variable ``panel_title``.
|
|
229
|
+
|
|
230
|
+
* ``page_footer`` - Displayed right after the page body.
|
|
231
|
+
|
|
232
|
+
Base page template
|
|
233
|
+
~~~~~~~~~~~~~~~~~~
|
|
234
|
+
The base template (``invenio_theme/page.html``) is responsible for providing a
|
|
235
|
+
basic page skeleton with template blocks that can be overriden by templates
|
|
236
|
+
extending the base template.
|
|
237
|
+
|
|
238
|
+
.. warning::
|
|
239
|
+
|
|
240
|
+
If you override this template it is very important that you provide the same
|
|
241
|
+
template blocks as Invenio is relying on the template block API provided in
|
|
242
|
+
this template.
|
|
243
|
+
|
|
244
|
+
.. image:: static/base.png
|
|
245
|
+
|
|
246
|
+
Change the template by updating
|
|
247
|
+
:data:`invenio_theme.config.BASE_TEMPLATE`
|
|
248
|
+
|
|
249
|
+
The template provide a number of blocks which can be overridden. The most
|
|
250
|
+
important ones are (please see the template file for full details):
|
|
251
|
+
|
|
252
|
+
* ``header`` - Empty block you can override to add extra content in the
|
|
253
|
+
head-tag.
|
|
254
|
+
|
|
255
|
+
* ``css`` - Block containing the link to stylesheets. By default just the
|
|
256
|
+
Invenio-Theme CSS is included. Placed in the head-tag.
|
|
257
|
+
|
|
258
|
+
* ``javascript`` - Block containg the JavaScript tags. By default just
|
|
259
|
+
Invenio-Theme JS is included. Placed in the very end of the page.
|
|
260
|
+
|
|
261
|
+
* ``page_header`` - Block which includes the header section template.
|
|
262
|
+
|
|
263
|
+
* ``page_body`` - Block containing the page content. Normally when using the
|
|
264
|
+
template, this is the only block you need to override.
|
|
265
|
+
|
|
266
|
+
* ``page_footer`` - Block which includes the footer section template.
|
|
267
|
+
|
|
268
|
+
When using the template, a couple of template variables can be set t
|
|
269
|
+
|
|
270
|
+
* ``title`` - Sets the header title-tag.
|
|
271
|
+
|
|
272
|
+
* ``description`` - Sets the description meta-tag.
|
|
273
|
+
|
|
274
|
+
* ``keywords`` - Sets the keywords meta-tag.
|
|
275
|
+
|
|
276
|
+
Error page templates
|
|
277
|
+
~~~~~~~~~~~~~~~~~~~~
|
|
278
|
+
The error template (``invenio_theme/page_error.html``) is used as basis for
|
|
279
|
+
error pages such as unauthorized access, internal server error etc.
|
|
280
|
+
|
|
281
|
+
.. image:: static/error.png
|
|
282
|
+
|
|
283
|
+
Change the template by updating
|
|
284
|
+
:data:`invenio_theme.config.THEME_ERROR_TEMPLATE`. If you wish to just override
|
|
285
|
+
individual error pages you can set the variables:
|
|
286
|
+
|
|
287
|
+
* :data:`invenio_theme.config.THEME_401_TEMPLATE`
|
|
288
|
+
* :data:`invenio_theme.config.THEME_403_TEMPLATE`
|
|
289
|
+
* :data:`invenio_theme.config.THEME_404_TEMPLATE`
|
|
290
|
+
* :data:`invenio_theme.config.THEME_500_TEMPLATE`
|
|
291
|
+
|
|
292
|
+
Front page
|
|
293
|
+
~~~~~~~~~~
|
|
294
|
+
The front page (``invenio_theme/frontpage.html``) is the homepage of the
|
|
295
|
+
application. By default is ``disabled``.
|
|
296
|
+
|
|
297
|
+
Enable the front page view by setting ``THEME_FRONTPAGE`` to ``True``
|
|
298
|
+
:data:`invenio_theme.config.THEME_FRONTPAGE`
|
|
299
|
+
|
|
300
|
+
Change the template by updating:
|
|
301
|
+
:data:`invenio_theme.config.THEME_FRONTPAGE_TEMPLATE`
|
|
302
|
+
|
|
303
|
+
The template provide a number of blocks which can be overridden. The most
|
|
304
|
+
important ones are (please see the template file for full details):
|
|
305
|
+
|
|
306
|
+
* ``page_header`` - Includes e.g. the logo and branding.
|
|
307
|
+
|
|
308
|
+
* ``page_body`` - Renders the page body which includes a panel. The panel can
|
|
309
|
+
be customized via the template blocks ``panel`` and ``panel_content`` and by
|
|
310
|
+
setting the template variable ``panel_title``.
|
|
311
|
+
|
|
312
|
+
Developing Invenio modules
|
|
313
|
+
--------------------------
|
|
314
|
+
.. note::
|
|
315
|
+
|
|
316
|
+
This section is only relevant if you develop Invenio modules that need to be
|
|
317
|
+
able to change style depending on the currently installed theme.
|
|
318
|
+
|
|
319
|
+
This section describes a set of patterns for Invenio modules that allows the
|
|
320
|
+
module to be themeable without hard depdencies on Invenio-Theme, which is
|
|
321
|
+
important as otherwise users of your module cannot change the default styling.
|
|
322
|
+
|
|
323
|
+
Base template pattern
|
|
324
|
+
~~~~~~~~~~~~~~~~~~~~~
|
|
325
|
+
The base template pattern allows your module to extend from the currently
|
|
326
|
+
installed theme's base template.
|
|
327
|
+
|
|
328
|
+
First, create a dummy base template in your module. The dummy base template
|
|
329
|
+
should define the same blocks as you plan to use from the Invenio-Theme
|
|
330
|
+
template. In most cases this means just providing the ``page_body`` block:
|
|
331
|
+
|
|
332
|
+
.. code-block:: jinja
|
|
333
|
+
|
|
334
|
+
{# invenio_foo/base.html #}
|
|
335
|
+
<html><body>
|
|
336
|
+
{% block page_body %}{% endbxlock %}
|
|
337
|
+
</body></html>
|
|
338
|
+
|
|
339
|
+
.. note::
|
|
340
|
+
|
|
341
|
+
Template paths need to be globally unique, so normally you should put your
|
|
342
|
+
templates in a subfolder named according to your module. For instance if
|
|
343
|
+
you are developing Invenio-Foo, then put your base template in
|
|
344
|
+
``invenio_foo/base.html``.
|
|
345
|
+
|
|
346
|
+
Templates you develop in your module should extend from config variable instead
|
|
347
|
+
of directly from the base template:
|
|
348
|
+
|
|
349
|
+
.. code-block:: jinja
|
|
350
|
+
|
|
351
|
+
{# invenio_foo/myview.html #}
|
|
352
|
+
{% extends config.FOO_BASE_TEMPLATE %}
|
|
353
|
+
{% block page_body %} ... {% endblock %}
|
|
354
|
+
|
|
355
|
+
The configuration variable you then set during your Flask extension
|
|
356
|
+
initialization, according to this pattern:
|
|
357
|
+
|
|
358
|
+
.. code-block:: python
|
|
359
|
+
|
|
360
|
+
# invenio_foo/config.py
|
|
361
|
+
FOO_BASE_TEMPLATE = 'invenio_foo/base.html'
|
|
362
|
+
|
|
363
|
+
.. code-block:: python
|
|
364
|
+
|
|
365
|
+
# invenio_foo/ext.py
|
|
366
|
+
from . import config
|
|
367
|
+
|
|
368
|
+
class InvenioFoo(object):
|
|
369
|
+
# ...
|
|
370
|
+
def init_config(app):
|
|
371
|
+
# Set FOO_BASE_TEMPLATE to the theme's
|
|
372
|
+
# base template if theme is installed
|
|
373
|
+
app.config.setdefault(
|
|
374
|
+
'FOO_BASE_TEMPLATE',
|
|
375
|
+
app.config.get('BASE_TEMPLATE'),
|
|
376
|
+
)
|
|
377
|
+
# If no theme is installed, this will set
|
|
378
|
+
# the base template to the module's
|
|
379
|
+
# base template.
|
|
380
|
+
for k in dir(config):
|
|
381
|
+
if k.startswith('FOO_'):
|
|
382
|
+
app.config.setdefault(
|
|
383
|
+
k,
|
|
384
|
+
getattr(config, k))
|
|
385
|
+
|
|
386
|
+
Template rendering pattern
|
|
387
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
388
|
+
In views where you render a template you should normally let the template
|
|
389
|
+
path be defined by a configuration variable. Otherwise it is not possible for
|
|
390
|
+
an instance to override the template.
|
|
391
|
+
|
|
392
|
+
>>> from flask import current_app, render_template
|
|
393
|
+
>>> app.config.update({
|
|
394
|
+
... 'FOO_MYVIEW_TEMPLATE': 'invenio_foo/myview.html'
|
|
395
|
+
... })
|
|
396
|
+
>>> @app.route('/myview')
|
|
397
|
+
... def myview():
|
|
398
|
+
... return render_template(
|
|
399
|
+
... current_app.config['FOO_MYVIEW_TEMPLATE']
|
|
400
|
+
... )
|
|
401
|
+
|
|
402
|
+
Alternatively if only some parts of a template should be customizable you can
|
|
403
|
+
apply the configration variable pattern to the include:
|
|
404
|
+
|
|
405
|
+
.. code-block:: jinja
|
|
406
|
+
|
|
407
|
+
{% extends config.FOO_BASE_TEMPLATE %}
|
|
408
|
+
{% block page_body %}
|
|
409
|
+
{# ... #}
|
|
410
|
+
{%- include config.FOO_MYVIEW_TEMPLATE %}
|
|
411
|
+
{% endblock%}
|
|
412
|
+
|
|
413
|
+
Menus
|
|
414
|
+
~~~~~
|
|
415
|
+
Invenio-Theme defines are couple of menus that Invenio modules can plug into.
|
|
416
|
+
For instance if you want to plug an menu item in the navigation bar you can do
|
|
417
|
+
it like this:
|
|
418
|
+
|
|
419
|
+
>>> menu.submenu(".main.myitem").register("myview2", "My item", order=1)
|
|
420
|
+
>>> @app.route('/myview2')
|
|
421
|
+
... def myview2():
|
|
422
|
+
... return ""
|
|
423
|
+
|
|
424
|
+
By default, any menu items that are children of ``main`` (such as the above
|
|
425
|
+
example) will be displayed on the header of every page, via the
|
|
426
|
+
``page_header`` block.
|
|
427
|
+
|
|
428
|
+
The following menus exists:
|
|
429
|
+
|
|
430
|
+
* ``main`` - Header menu navigation (defined by the base template).
|
|
431
|
+
|
|
432
|
+
* ``settings`` - User settings menu bar (defined by the settings template).
|
|
433
|
+
|
|
434
|
+
To read more about the creation and usage of menus, see :mod:`~flask_menu`.
|
|
435
|
+
|
|
436
|
+
User settings
|
|
437
|
+
~~~~~~~~~~~~~
|
|
438
|
+
If your module allows your users to configure some settings, you can provide
|
|
439
|
+
a setting view that is plugged into the settings menu.
|
|
440
|
+
|
|
441
|
+
First, create your template for your view:
|
|
442
|
+
|
|
443
|
+
.. code-block:: jinja
|
|
444
|
+
|
|
445
|
+
{% extends config.FOO_SETTINGS_TEMPLATE %}
|
|
446
|
+
{% set panel_icon="fa fa-cog" %}
|
|
447
|
+
{% set panel_title="Panel header" %}
|
|
448
|
+
{% block settings_form %}
|
|
449
|
+
...
|
|
450
|
+
{% endblock settings_form %}
|
|
451
|
+
|
|
452
|
+
Next, when creating the view register the view n the ``settings`` menu:
|
|
453
|
+
|
|
454
|
+
.. code-block:: python
|
|
455
|
+
|
|
456
|
+
menu.submenu(".settings.item1").register("settings_item_1", "Item 1", order=2)
|
|
457
|
+
@app.route('/settings/')
|
|
458
|
+
def settings_item_1():
|
|
459
|
+
return render_template('invenio_foo/foo_settings.html')
|
|
460
|
+
|
|
461
|
+
Message flashing
|
|
462
|
+
~~~~~~~~~~~~~~~~
|
|
463
|
+
At any time during a request, you may choose to record a message for the
|
|
464
|
+
user in order to display it only once in the future. This is a great way for
|
|
465
|
+
providing feedback to the user after an action, and Flask provides the method
|
|
466
|
+
:func:`flask.flash` for this purpose. The first parameter is the message, while
|
|
467
|
+
you may optionally supply a second parameter that serves as a category that
|
|
468
|
+
gives context to your message.
|
|
469
|
+
|
|
470
|
+
Invenio-Theme provides a macro in ``invenio_theme/macros/messages.html`` called
|
|
471
|
+
``flashed_messages`` that iterates through stored flash messages for the
|
|
472
|
+
current user and displays them in the current page. The category can be one of
|
|
473
|
+
'info', 'danger', 'warning' or 'success'. Using one of these will attach the
|
|
474
|
+
appropriate Bootstrap class to the message. By default, the current flashed
|
|
475
|
+
messages will be displayed inside the ``page_header`` block in the base
|
|
476
|
+
template.
|
|
477
|
+
|
|
478
|
+
.. code-block:: python
|
|
479
|
+
|
|
480
|
+
@app.route('/myview')
|
|
481
|
+
def settings_item_1():
|
|
482
|
+
flash('Testing flashing', category='info')
|
|
483
|
+
return render_template('...')
|
|
484
|
+
"""
|
|
485
|
+
|
|
486
|
+
from .ext import InvenioTheme
|
|
487
|
+
from .shared import menu
|
|
488
|
+
|
|
489
|
+
__version__ = "4.8.1"
|
|
490
|
+
|
|
491
|
+
__all__ = ("__version__", "InvenioTheme", "menu")
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* SPDX-FileCopyrightText: 2016-2018 CERN.
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
// eslint-disable-next-line no-unused-vars
|
|
6
|
+
import jquery from "jquery";
|
|
7
|
+
// eslint-disable-next-line no-unused-vars
|
|
8
|
+
import bootstrap from "bootstrap-sass/assets/javascripts/bootstrap";
|
|
9
|
+
// eslint-disable-next-line no-unused-vars
|
|
10
|
+
import moment from "moment";
|
|
11
|
+
// eslint-disable-next-line no-unused-vars
|
|
12
|
+
import select2 from "select2";
|
|
13
|
+
// eslint-disable-next-line no-unused-vars
|
|
14
|
+
import AdminLTE from "admin-lte/dist/js/adminlte";
|
|
15
|
+
|
|
16
|
+
// Expose select2 and moment globally
|
|
17
|
+
window.select2 = select2;
|
|
18
|
+
window.moment = moment;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* SPDX-FileCopyrightText: 2017-2018 CERN.
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
// eslint-disable-next-line no-unused-vars
|
|
6
|
+
import jquery from "jquery/dist/jquery";
|
|
7
|
+
// eslint-disable-next-line no-unused-vars
|
|
8
|
+
import bootstrap from "bootstrap-sass/assets/javascripts/bootstrap";
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* SPDX-FileCopyrightText: 2016-2018 CERN.
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
@import "~admin-lte/dist/css/AdminLTE";
|
|
7
|
+
@import "~admin-lte/dist/css/skins/skin-blue";
|
|
8
|
+
@import "~select2/dist/css/select2";
|
|
9
|
+
|
|
10
|
+
.main-header {
|
|
11
|
+
background-color: #2c3e50;
|
|
12
|
+
border-bottom: 3px solid #3b97d3;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.main-sidebar {
|
|
16
|
+
background-color: #2c3e50;
|
|
17
|
+
padding-top: 75px;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.navbar-brand > img {
|
|
21
|
+
max-width: 100%;
|
|
22
|
+
max-height: 50px;
|
|
23
|
+
padding: 10px 0px 3px 0px;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.content-wrapper {
|
|
27
|
+
background-color: white;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.sidebar-toggle {
|
|
31
|
+
margin-top: 5px;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.treeview {
|
|
35
|
+
&.active {
|
|
36
|
+
background-color: #3b97d3;
|
|
37
|
+
padding-bottom: 10px;
|
|
38
|
+
|
|
39
|
+
a {
|
|
40
|
+
color: #2c3e50;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
li.active {
|
|
45
|
+
font-weight: bolder;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.admin-form {
|
|
50
|
+
padding-top: 15px;
|
|
51
|
+
|
|
52
|
+
.form-control[type=checkbox] {
|
|
53
|
+
-webkit-appearance: checkbox;
|
|
54
|
+
appearance: checkbox;
|
|
55
|
+
width: 13px;
|
|
56
|
+
margin-top: 0;
|
|
57
|
+
margin-bottom: 0;
|
|
58
|
+
padding-top: 7px;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
.dropdown-menu {
|
|
65
|
+
li > .navbar-content {
|
|
66
|
+
height: 70px;
|
|
67
|
+
|
|
68
|
+
.user-menu {
|
|
69
|
+
padding: 10px;
|
|
70
|
+
font-size: .9em;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* SPDX-FileCopyrightText: 2015-2019 CERN.
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
// CSS code to allow `ng-csp="no-inline-css"`
|
|
7
|
+
[ng\:cloak],
|
|
8
|
+
[ng-cloak],
|
|
9
|
+
[data-ng-cloak],
|
|
10
|
+
[x-ng-cloak],
|
|
11
|
+
.ng-cloak,
|
|
12
|
+
.x-ng-cloak,
|
|
13
|
+
.ng-hide:not(.ng-hide-animate) {
|
|
14
|
+
display: none !important;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
ng\:form {
|
|
18
|
+
display: block;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.ng-animate-shim {
|
|
22
|
+
visibility:hidden;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.ng-anchor {
|
|
26
|
+
position:absolute;
|
|
27
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* SPDX-FileCopyrightText: 2016-2018 CERN.
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
.error-page.container .row {
|
|
7
|
+
margin-left: 50px;
|
|
8
|
+
margin-top: 100px;
|
|
9
|
+
margin-bottom: 100px;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.marketing {
|
|
13
|
+
padding-top: 50px;
|
|
14
|
+
padding-bottom: 50px;
|
|
15
|
+
|
|
16
|
+
h1, h2 {
|
|
17
|
+
font-weight: normal;
|
|
18
|
+
color: $color1;
|
|
19
|
+
|
|
20
|
+
}
|
|
21
|
+
h2 {
|
|
22
|
+
padding-bottom: 15px;
|
|
23
|
+
}
|
|
24
|
+
h1 {
|
|
25
|
+
padding-bottom: 50px;
|
|
26
|
+
}
|
|
27
|
+
.col-lg-4 {
|
|
28
|
+
text-align: center;
|
|
29
|
+
}
|
|
30
|
+
}
|