mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
94485: Use relative path for theme CSS
This bug was originally fixed in #1642 but reintroduced in #1805
This commit is contained in:
@@ -413,7 +413,7 @@ describe('ThemeService', () => {
|
|||||||
link.setAttribute('rel', 'stylesheet');
|
link.setAttribute('rel', 'stylesheet');
|
||||||
link.setAttribute('type', 'text/css');
|
link.setAttribute('type', 'text/css');
|
||||||
link.setAttribute('class', 'theme-css');
|
link.setAttribute('class', 'theme-css');
|
||||||
link.setAttribute('href', '/custom-theme.css');
|
link.setAttribute('href', 'custom-theme.css');
|
||||||
|
|
||||||
expect(headSpy.appendChild).toHaveBeenCalledWith(link);
|
expect(headSpy.appendChild).toHaveBeenCalledWith(link);
|
||||||
});
|
});
|
||||||
|
@@ -182,7 +182,7 @@ export class ThemeService {
|
|||||||
link.setAttribute('rel', 'stylesheet');
|
link.setAttribute('rel', 'stylesheet');
|
||||||
link.setAttribute('type', 'text/css');
|
link.setAttribute('type', 'text/css');
|
||||||
link.setAttribute('class', 'theme-css');
|
link.setAttribute('class', 'theme-css');
|
||||||
link.setAttribute('href', `/${encodeURIComponent(themeName)}-theme.css`);
|
link.setAttribute('href', `${encodeURIComponent(themeName)}-theme.css`);
|
||||||
// wait for the new css to download before removing the old one to prevent a
|
// wait for the new css to download before removing the old one to prevent a
|
||||||
// flash of unstyled content
|
// flash of unstyled content
|
||||||
link.onload = () => {
|
link.onload = () => {
|
||||||
|
Reference in New Issue
Block a user