Skip to content

Commit 4e3b1fb

Browse files
committed
feat(theme): add local custom CSS and logos
Add organisation-specific theming support with local static assets instead of remote CDN. * Add custom CSS files for aoste, fictive, global, and highlands organisations * Add corresponding logo SVG files for each organisation * Configure RERO_ILS_THEME_ORGANISATION_CSS_ENDPOINT to use local /static/themes/css/ endpoint Each organisation CSS customizes header background colors, logo display, and responsive layouts for mobile devices. Co-Authored-by: Peter Weber <[email protected]>
1 parent ca206fa commit 4e3b1fb

File tree

17 files changed

+1214
-70
lines changed

17 files changed

+1214
-70
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ dependencies = [
9191
"flask-admin (>=1.6.1,<2.0.0)",
9292
# needed for name unique in invenio-accounts
9393
"wtforms (<3.2.0)",
94-
"invenio-sip2[sip2]>0.6.25",
94+
"invenio-sip2>0.6.25",
9595
]
9696

9797
[project.optional-dependencies]

rero_ils/config.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -275,9 +275,9 @@ def _(x):
275275
THEME_SETTINGS_TEMPLATE = SETTINGS_TEMPLATE
276276
#: Template for error pages.
277277
THEME_ERROR_TEMPLATE = "rero_ils/page_error.html"
278-
# External CSS for each organisation customization
279-
# For production: change "test" with "prod" on url
280-
RERO_ILS_THEME_ORGANISATION_CSS_ENDPOINT = "https://resources.rero.ch/bib/test/css/"
278+
#: Local path for organisation-specific CSS customization files.
279+
#: CSS files are served from static assets (e.g., aoste.css, global.css).
280+
RERO_ILS_THEME_ORGANISATION_CSS_ENDPOINT = "/static/themes/css/"
281281
#: Template for including a tracking code for web analytics.
282282
THEME_TRACKINGCODE_TEMPLATE = "rero_ils/trackingcode.html"
283283
THEME_JAVASCRIPT_TEMPLATE = "rero_ils/javascript.html"
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
@layer bootstrap {
2+
body#view-aoste nav.rero-ils-header {
3+
background-color: #ffd7d7 !important;
4+
}
5+
6+
body#view-aoste nav.rero-ils-header img.rero-ils-logo {
7+
display: none;
8+
}
9+
10+
div#aoste-logo::before {
11+
content: url('/static/themes/images/logo-aoste.svg');
12+
max-height: 44px;
13+
display: block;
14+
}
15+
16+
#view-aoste .rero-slogan {
17+
margin-bottom: 4em;
18+
}
19+
20+
21+
@media (max-width: 576px) {
22+
.h1, h1 {
23+
font-size: 1.5rem;
24+
}
25+
26+
.h2, h2 {
27+
font-size: 1.2rem;
28+
}
29+
30+
#view-aoste .rero-ils-frontpage {
31+
height: 20vh;
32+
}
33+
34+
#view-aoste .rero-slogan {
35+
margin-bottom: 1em;
36+
}
37+
}
38+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
@layer bootstrap {
2+
body#view-fictive nav.rero-ils-header {
3+
background-color: #4f009e !important;
4+
}
5+
6+
body#view-fictive nav.rero-ils-header img.rero-ils-logo {
7+
display: none;
8+
}
9+
10+
div#fictive-logo::before {
11+
content: url('/static/themes/images/logo-fictive.svg');
12+
max-height: 44px;
13+
display: block;
14+
}
15+
16+
#view-fictive .rero-slogan {
17+
margin-bottom: 4em;
18+
}
19+
20+
21+
@media (max-width: 576px) {
22+
.h1, h1 {
23+
font-size: 1.5rem;
24+
}
25+
26+
.h2, h2 {
27+
font-size: 1.2rem;
28+
}
29+
30+
#view-fictive .rero-ils-frontpage {
31+
height: 20vh;
32+
}
33+
34+
#view-fictive .rero-slogan {
35+
margin-bottom: 1em;
36+
}
37+
}
38+
}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
@layer bootstrap {
2+
body#view-global nav.rero-ils-header {
3+
background-color: #1b4464 !important;
4+
}
5+
6+
body#view-global nav.rero-ils-header img.rero-ils-logo {
7+
display: none;
8+
}
9+
10+
div#global-logo::before {
11+
content: url('/static/themes/images/logo-global.svg');
12+
min-height: 44px;
13+
max-height: 44px;
14+
min-width: 58px;
15+
display: block;
16+
}
17+
18+
#view-global .rero-slogan {
19+
margin-bottom: 4em;
20+
}
21+
22+
@media (max-width: 576px) {
23+
.h1, h1 {
24+
font-size: 1.5rem;
25+
}
26+
27+
.h2, h2 {
28+
font-size: 1.2rem;
29+
}
30+
31+
#view-global .rero-ils-frontpage {
32+
height: 20vh;
33+
}
34+
35+
#view-global .rero-slogan {
36+
margin-bottom: 1em;
37+
}
38+
}
39+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
@layer bootstrap {
2+
body#view-highlands nav.rero-ils-header {
3+
background-color: #333333 !important;
4+
}
5+
6+
body#view-highlands nav.rero-ils-header img.rero-ils-logo {
7+
display: none;
8+
}
9+
10+
div#highlands-logo::before {
11+
content: url('/static/themes/images/logo-highlands.svg');
12+
max-height: 44px;
13+
display: block;
14+
}
15+
16+
#view-highlands .rero-slogan {
17+
margin-bottom: 4em;
18+
}
19+
20+
21+
@media (max-width: 576px) {
22+
.h1, h1 {
23+
font-size: 1.5rem;
24+
}
25+
26+
.h2, h2 {
27+
font-size: 1.2rem;
28+
}
29+
30+
#view-highlands .rero-ils-frontpage {
31+
height: 20vh;
32+
}
33+
34+
#view-highlands .rero-slogan {
35+
margin-bottom: 1em;
36+
}
37+
}
38+
}

rero_ils/theme/static/themes/images/logo-aoste.svg

Lines changed: 266 additions & 0 deletions
Loading

rero_ils/theme/static/themes/images/logo-fictive.svg

Lines changed: 210 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)