Skip to content

Commit 1cd3756

Browse files
committed
724
1 parent 9697388 commit 1cd3756

File tree

4 files changed

+134
-0
lines changed

4 files changed

+134
-0
lines changed
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
/*
2+
3+
WARNING: THIS FILE IS NOT ACTUALLY USED (IT IS A REFERENCE EXAMPLE ONLY)
4+
5+
This file (theme.config) should be provided by your Invenio instance.
6+
Examples of how this should be done can be found in
7+
cookiecutter-invenio-instance and cookiecutter-invenio-rdm.
8+
9+
*/
10+
/*
11+
12+
████████╗██╗ ██╗███████╗███╗ ███╗███████╗███████╗
13+
╚══██╔══╝██║ ██║██╔════╝████╗ ████║██╔════╝██╔════╝
14+
██║ ███████║█████╗ ██╔████╔██║█████╗ ███████╗
15+
██║ ██╔══██║██╔══╝ ██║╚██╔╝██║██╔══╝ ╚════██║
16+
██║ ██║ ██║███████╗██║ ╚═╝ ██║███████╗███████║
17+
╚═╝ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝╚══════╝╚══════╝
18+
19+
*/
20+
21+
/*******************************
22+
Theme Selection
23+
*******************************/
24+
25+
/* To override a theme for an individual element
26+
specify theme name below
27+
*/
28+
29+
/* Global */
30+
@site : 'default';
31+
@reset : 'default';
32+
33+
/* Elements */
34+
@button : 'default';
35+
@container : 'default';
36+
@divider : 'default';
37+
@flag : 'default';
38+
@header : 'default';
39+
@icon : 'default';
40+
@image : 'default';
41+
@input : 'default';
42+
@label : 'default';
43+
@list : 'default';
44+
@loader : 'default';
45+
@placeholder : 'default';
46+
@rail : 'default';
47+
@reveal : 'default';
48+
@segment : 'default';
49+
@step : 'default';
50+
51+
/* Collections */
52+
@breadcrumb : 'default';
53+
@form : 'default';
54+
@grid : 'default';
55+
@menu : 'default';
56+
@message : 'default';
57+
@table : 'default';
58+
59+
/* Modules */
60+
@accordion : 'default';
61+
@checkbox : 'default';
62+
@dimmer : 'default';
63+
@dropdown : 'default';
64+
@embed : 'default';
65+
@modal : 'default';
66+
@nag : 'default';
67+
@popup : 'default';
68+
@progress : 'default';
69+
@rating : 'default';
70+
@search : 'default';
71+
@shape : 'default';
72+
@sidebar : 'default';
73+
@sticky : 'default';
74+
@tab : 'default';
75+
@transition : 'default';
76+
77+
/* Views */
78+
@ad : 'default';
79+
@card : 'default';
80+
@comment : 'default';
81+
@feed : 'default';
82+
@item : 'default';
83+
@statistic : 'default';
84+
85+
/*******************************
86+
Folders
87+
*******************************/
88+
89+
/* Path to theme packages */
90+
@themesFolder : '~semantic-ui-less/themes';
91+
92+
/* Path to site override folder */
93+
@siteFolder : '../../less/invenio_theme/theme';
94+
95+
/*******************************
96+
Import Theme
97+
*******************************/
98+
99+
@import (multiple) "themes/invenio/theme.less";
100+
101+
@fontPath : "../../../themes/@{theme}/assets/fonts";
102+
103+
/* End Config */

invenio_app_ils/config.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1081,3 +1081,5 @@ def _(x):
10811081

10821082
# Default template to render.
10831083
PAGES_DEFAULT_TEMPLATE = "invenio_pages/default.html"
1084+
# default app theme
1085+
APP_THEME = ["semantic-ui"]

invenio_app_ils/webpack.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# -*- coding: utf-8 -*-
2+
#
3+
# Copyright (C) 2025 CERN.
4+
#
5+
# Invenio App RDM is free software; you can redistribute it and/or modify it
6+
# under the terms of the MIT License; see LICENSE file for more details.
7+
8+
"""JS/CSS Webpack bundles for theme."""
9+
10+
from invenio_assets.webpack import WebpackThemeBundle
11+
12+
theme = WebpackThemeBundle(
13+
__name__,
14+
"assets",
15+
default="semantic-ui",
16+
themes={
17+
"semantic-ui": dict(
18+
aliases={
19+
# Define Semantic-UI theme configuration needed by
20+
# Invenio-Theme in order to build Semantic UI (in theme.js
21+
# entry point)
22+
# This is a workaround for invenio-app-ils until a better solution is found
23+
"../../theme.config$": "less/theme.config",
24+
},
25+
),
26+
},
27+
)

setup.cfg

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,8 @@ flask.commands =
9797
setup = invenio_app_ils.cli:setup
9898
stats = invenio_stats.cli:stats
9999
vocabulary = invenio_app_ils.vocabularies.cli:vocabulary
100+
invenio_assets.webpack =
101+
invenio_app_ils_theme = invenio_app_ils.webpack:theme
100102
invenio_db.models =
101103
ils_notifications_logs = invenio_app_ils.notifications.models
102104
invenio_admin.views =

0 commit comments

Comments
 (0)