Skip to content

Commit 62be6d7

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 8bef0bf commit 62be6d7

File tree

15 files changed

+1192
-46
lines changed

15 files changed

+1192
-46
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: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
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+
display: block;
13+
height: 44px;
14+
width: 58px;
15+
}
16+
17+
#view-aoste .rero-slogan {
18+
margin-bottom: 4em;
19+
}
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-aoste .rero-ils-frontpage {
32+
height: 20vh;
33+
}
34+
35+
#view-aoste .rero-slogan {
36+
margin-bottom: 1em;
37+
}
38+
}
39+
}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
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+
display: block;
13+
height: 44px;
14+
width: 58px;
15+
}
16+
17+
#view-fictive .rero-slogan {
18+
margin-bottom: 4em;
19+
}
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-fictive .rero-ils-frontpage {
32+
height: 20vh;
33+
}
34+
35+
#view-fictive .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-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+
background: url('/static/themes/images/logo-global.svg') no-repeat center / contain;
12+
display: block;
13+
height: 44px;
14+
width: 80px;
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: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
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+
display: block;
13+
height: 44px;
14+
width: 58px;
15+
}
16+
17+
#view-highlands .rero-slogan {
18+
margin-bottom: 4em;
19+
}
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-highlands .rero-ils-frontpage {
32+
height: 20vh;
33+
}
34+
35+
#view-highlands .rero-slogan {
36+
margin-bottom: 1em;
37+
}
38+
}
39+
}

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)