Customization changes: add suffix for connect and default css files, add css only in server, add property for build date
This commit is contained in:
parent
b62551e642
commit
bbe1cbe3eb
|
@ -95,9 +95,9 @@ function buildAll(res: Response = null) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
properties.portalBuildTime = (new Date()).valueOf();
|
||||||
buildCss('connect');
|
buildCss('connect', properties.portalBuildTime);
|
||||||
buildCss('default');
|
buildCss('default', properties.portalBuildTime);
|
||||||
buildAll();
|
buildAll();
|
||||||
|
|
||||||
// The Express app is exported so that it can be used by serverless Functions.
|
// The Express app is exported so that it can be used by serverless Functions.
|
||||||
|
|
|
@ -154,9 +154,6 @@ export class AppComponent implements OnInit, OnDestroy {
|
||||||
if (this.properties.environment == "production" || this.properties.environment == "development") {
|
if (this.properties.environment == "production" || this.properties.environment == "development") {
|
||||||
this.subscriptions.push(this.route.queryParams.subscribe(data => {
|
this.subscriptions.push(this.route.queryParams.subscribe(data => {
|
||||||
this.previewLayout = (data['previewLayout'] && data['previewLayout'].length >0 ? data['previewLayout']: null);
|
this.previewLayout = (data['previewLayout'] && data['previewLayout'].length >0 ? data['previewLayout']: null);
|
||||||
if(this.previewLayout){
|
|
||||||
// this.initCss(this.previewLayout);
|
|
||||||
}
|
|
||||||
this._meta.updateTag({content: 'all', name: 'robots'});
|
this._meta.updateTag({content: 'all', name: 'robots'});
|
||||||
this.seoService.removeLinkForPrevURL();
|
this.seoService.removeLinkForPrevURL();
|
||||||
this.seoService.removeLinkForNextURL();
|
this.seoService.removeLinkForNextURL();
|
||||||
|
@ -246,10 +243,14 @@ export class AppComponent implements OnInit, OnDestroy {
|
||||||
initAdminToolCommunity(communityId) {
|
initAdminToolCommunity(communityId) {
|
||||||
if (communityId) {
|
if (communityId) {
|
||||||
this.properties.adminToolsPortalType = "community";
|
this.properties.adminToolsPortalType = "community";
|
||||||
|
if (typeof document === 'undefined') {
|
||||||
this.initLayout(communityId);
|
this.initLayout(communityId);
|
||||||
|
}
|
||||||
}else{
|
}else{
|
||||||
this.properties.adminToolsPortalType = "connect";
|
this.properties.adminToolsPortalType = "connect";
|
||||||
this.initCss("connect");
|
if (typeof document === 'undefined') {
|
||||||
|
this.initCss("connect", this.properties.portalBuildTime);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
this.configurationService.initCommunityInformation(this.properties, (communityId) ? communityId : this.properties.adminToolsPortalType);
|
this.configurationService.initCommunityInformation(this.properties, (communityId) ? communityId : this.properties.adminToolsPortalType);
|
||||||
|
|
||||||
|
@ -267,13 +268,13 @@ export class AppComponent implements OnInit, OnDestroy {
|
||||||
// this.initCss("default");
|
// this.initCss("default");
|
||||||
} else {
|
} else {
|
||||||
// this.layout.layoutOptions = new CustomizationOptions(CustomizationOptions.getIdentity(communityId).mainColor, CustomizationOptions.getIdentity(communityId).secondaryColor);
|
// this.layout.layoutOptions = new CustomizationOptions(CustomizationOptions.getIdentity(communityId).mainColor, CustomizationOptions.getIdentity(communityId).secondaryColor);
|
||||||
this.initCss("default");
|
this.initCss("default", this.properties.portalBuildTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
error => {
|
error => {
|
||||||
this.layout.layoutOptions = new CustomizationOptions(CustomizationOptions.getIdentity(communityId).mainColor, CustomizationOptions.getIdentity(communityId).secondaryColor);
|
this.layout.layoutOptions = new CustomizationOptions(CustomizationOptions.getIdentity(communityId).mainColor, CustomizationOptions.getIdentity(communityId).secondaryColor);
|
||||||
this.initCss("default");
|
this.initCss("default", this.properties.portalBuildTime);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}else if(this.previewLayout && this.previewLayout.split("-preview-")[0] == communityId){
|
}else if(this.previewLayout && this.previewLayout.split("-preview-")[0] == communityId){
|
||||||
|
|
|
@ -116,5 +116,6 @@ export let properties: EnvProperties = {
|
||||||
altMetricsAPIURL: "https://api.altmetric.com/v1/doi/",
|
altMetricsAPIURL: "https://api.altmetric.com/v1/doi/",
|
||||||
b2noteAPIURL: 'https://b2note.eudat.eu/',
|
b2noteAPIURL: 'https://b2note.eudat.eu/',
|
||||||
adminPortalURL: "https://beta.admin.connect.openaire.eu",
|
adminPortalURL: "https://beta.admin.connect.openaire.eu",
|
||||||
myOrcidLinksPage: "/my-orcid-links"
|
myOrcidLinksPage: "/my-orcid-links",
|
||||||
|
portalBuildTime: null
|
||||||
};
|
};
|
||||||
|
|
|
@ -116,5 +116,6 @@ export let properties: EnvProperties = {
|
||||||
altMetricsAPIURL: "https://api.altmetric.com/v1/doi/",
|
altMetricsAPIURL: "https://api.altmetric.com/v1/doi/",
|
||||||
b2noteAPIURL: 'https://b2note.eudat.eu/',
|
b2noteAPIURL: 'https://b2note.eudat.eu/',
|
||||||
adminPortalURL: "https://admin.connect.openaire.eu",
|
adminPortalURL: "https://admin.connect.openaire.eu",
|
||||||
myOrcidLinksPage: "/my-orcid-links"
|
myOrcidLinksPage: "/my-orcid-links",
|
||||||
|
portalBuildTime: null
|
||||||
};
|
};
|
||||||
|
|
|
@ -121,5 +121,6 @@ export let properties: EnvProperties = {
|
||||||
altMetricsAPIURL: 'https://api.altmetric.com/v1/doi/',
|
altMetricsAPIURL: 'https://api.altmetric.com/v1/doi/',
|
||||||
b2noteAPIURL: 'https://b2note.eudat.eu/',
|
b2noteAPIURL: 'https://b2note.eudat.eu/',
|
||||||
adminPortalURL: 'https://beta.admin.connect.openaire.eu',
|
adminPortalURL: 'https://beta.admin.connect.openaire.eu',
|
||||||
myOrcidLinksPage: "/my-orcid-links"
|
myOrcidLinksPage: "/my-orcid-links",
|
||||||
|
portalBuildTime: null
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue