Skip to content

Commit 5c69d80

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 e19d2a0 commit 5c69d80

File tree

10 files changed

+1145
-6
lines changed

10 files changed

+1145
-6
lines changed

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: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
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 {
11+
content: url('/static/themes/images/logo-aoste.svg');
12+
max-height: 44px;
13+
}
14+
15+
#view-aoste .rero-slogan {
16+
margin-bottom: 4em;
17+
}
18+
19+
20+
@media (max-width: 576px) {
21+
.h1, h1 {
22+
font-size: 1.5rem;
23+
}
24+
25+
.h2, h2 {
26+
font-size: 1.2rem;
27+
}
28+
29+
#view-aoste .rero-ils-frontpage {
30+
height: 20vh;
31+
}
32+
33+
#view-global .rero-slogan {
34+
margin-bottom: 1em;
35+
}
36+
}
37+
}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
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 {
11+
content: url('/static/themes/images/logo-fictive.svg');
12+
max-height: 44px;
13+
}
14+
15+
#view-fictive .rero-slogan {
16+
margin-bottom: 4em ;
17+
}
18+
19+
20+
@media (max-width: 576px) {
21+
.h1, h1 {
22+
font-size: 1.5rem ;
23+
}
24+
25+
.h2, h2 {
26+
font-size: 1.2rem ;
27+
}
28+
29+
#view-fictive .rero-ils-frontpage {
30+
height: 20vh ;
31+
}
32+
33+
#view-fictive .rero-slogan {
34+
margin-bottom: 1em ;
35+
}
36+
}
37+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
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 {
11+
content: url('/static/themes/images/logo-global.svg');
12+
min-height: 44px;
13+
max-height: 44px;
14+
min-width: 58px;
15+
}
16+
17+
#view-global .rero-slogan {
18+
margin-bottom: 4em;
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-global .rero-ils-frontpage {
31+
height: 20vh;
32+
}
33+
34+
#view-global .rero-slogan {
35+
margin-bottom: 1em;
36+
}
37+
}
38+
}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
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 {
11+
content: url('/static/themes/images/logo-highlands.svg');
12+
max-height: 44px;
13+
}
14+
15+
#view-highlands .rero-slogan {
16+
margin-bottom: 4em;
17+
}
18+
19+
20+
@media (max-width: 576px) {
21+
.h1, h1 {
22+
font-size: 1.5rem;
23+
}
24+
25+
.h2, h2 {
26+
font-size: 1.2rem;
27+
}
28+
29+
#view-highlands .rero-ils-frontpage {
30+
height: 20vh;
31+
}
32+
33+
#view-highlands .rero-slogan {
34+
margin-bottom: 1em;
35+
}
36+
}
37+
}

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)