[Connect|Trunk]
Angular.json: -in prod/beta configuration add replacements for index.html, robots.txt -add sitemap.xml file Clean up index.html add css files in styles.css PRoduction: communities browse: in production show link to beta or prod based on the list of prodReadyCommunities git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-connect-portal/trunk@59029 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
b31db284e4
commit
250fd48098
22
angular.json
22
angular.json
|
@ -18,7 +18,8 @@
|
|||
"polyfills": "src/polyfills.ts",
|
||||
"assets": [
|
||||
"src/assets",
|
||||
"src/robots.txt"
|
||||
"src/robots.txt",
|
||||
"src/sitemap.xml"
|
||||
],
|
||||
"styles": [
|
||||
"src/styles.css",
|
||||
|
@ -45,6 +46,14 @@
|
|||
{
|
||||
"replace": "src/environments/environment.ts",
|
||||
"with": "src/environments/environment.prod.ts"
|
||||
},
|
||||
{
|
||||
"replace": "src/index.html",
|
||||
"with": "src/index.prod.html"
|
||||
},
|
||||
{
|
||||
"replace": "src/robots.txt",
|
||||
"with": "src/robots.prod.txt"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@ -62,6 +71,14 @@
|
|||
{
|
||||
"replace": "src/environments/environment.ts",
|
||||
"with": "src/environments/environment.beta.ts"
|
||||
},
|
||||
{
|
||||
"replace": "src/index.html",
|
||||
"with": "src/index.beta.html"
|
||||
},
|
||||
{
|
||||
"replace": "src/robots.txt",
|
||||
"with": "src/robots.beta.txt"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -105,7 +122,8 @@
|
|||
],
|
||||
"assets": [
|
||||
"src/assets",
|
||||
"src/robots.txt"
|
||||
"src/robots.txt",
|
||||
"src/sitemap.xml"
|
||||
]
|
||||
}
|
||||
},
|
||||
|
|
|
@ -23,7 +23,8 @@
|
|||
"generate:prerender": "cd dist && node prerender",
|
||||
"webpack:server": "webpack --config webpack.server.config.js --progress --colors",
|
||||
"serve:prerender": "cd dist/browser && http-server",
|
||||
"serve:ssr": "node dist/server"
|
||||
"serve:ssr": "node dist/server",
|
||||
"after-build-clean": "rm -rf src node_modules .idea/ installOpenaireLib.sh deploy;"
|
||||
},
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
|
|
|
@ -75,10 +75,12 @@
|
|||
<div>
|
||||
<div class="uk-position-small uk-position-bottom-right">
|
||||
<a *ngIf="directLink" [href]="getCommunityPageUrl()" target="_blank" class="portal-link uk-text-uppercase uk-text-bold">
|
||||
Visit {{(properties.environment == 'production'?' BETA':'')}}
|
||||
Visit {{(properties.environment == 'production'&& getProductionPrefix(community.communityId).length > 0
|
||||
?' BETA':'')}}
|
||||
</a>
|
||||
<a *ngIf="!directLink" (click)="confirmModalOpen()" class="portal-link uk-text-uppercase uk-text-bold">
|
||||
Visit {{(properties.environment == 'production'?' BETA':'')}}
|
||||
Visit {{(properties.environment == 'production' && getProductionPrefix(community.communityId).length > 0
|
||||
?' BETA':'')}}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -3,7 +3,7 @@ import {ActivatedRoute, Router} from '@angular/router';
|
|||
import {Location} from '@angular/common';
|
||||
|
||||
import {EnvProperties} from '../../openaireLibrary/utils/properties/env-properties';
|
||||
import {CommunityInfo} from '../../openaireLibrary/connect/community/communityInfo';
|
||||
import {CommunityInfo, prodReadyCommunities} from '../../openaireLibrary/connect/community/communityInfo';
|
||||
import {LocalStorageService} from "../../openaireLibrary/services/localStorage.service";
|
||||
|
||||
@Component({
|
||||
|
@ -49,9 +49,8 @@ export class BrowseCommunityComponent {
|
|||
return this.properties.environment != "development";
|
||||
}
|
||||
|
||||
getProductionPrefix(): string {
|
||||
//return (this.properties.environment == "beta") ? "beta." : ""
|
||||
return "beta.";
|
||||
getProductionPrefix(id:string): string {
|
||||
return (this.properties.environment == "production" && prodReadyCommunities.indexOf(id)!=-1) ? "" : "beta.";
|
||||
}
|
||||
|
||||
public confirmModalOpen() {
|
||||
|
@ -70,7 +69,7 @@ export class BrowseCommunityComponent {
|
|||
public getCommunityPageUrl(): string {
|
||||
let url = '';
|
||||
if (this.isProduction()) {
|
||||
url = 'https://' + this.getProductionPrefix() + this.community.communityId + '.openaire.eu';
|
||||
url = 'https://' + this.getProductionPrefix(this.community.communityId) + this.community.communityId + '.openaire.eu';
|
||||
} else {
|
||||
url = this.router.createUrlTree(['/'], {
|
||||
queryParams: {'communityId': this.community.communityId}
|
||||
|
@ -84,7 +83,7 @@ export class BrowseCommunityComponent {
|
|||
this.localStorageService.setCommunityDirectLink(data.choice);
|
||||
let url = '';
|
||||
if (this.isProduction()) {
|
||||
url = 'https://' + this.getProductionPrefix() + this.community.communityId + '.openaire.eu';
|
||||
url = 'https://' + this.getProductionPrefix(this.community.communityId) + this.community.communityId + '.openaire.eu';
|
||||
} else {
|
||||
url = this.router.createUrlTree(['/'], {
|
||||
queryParams: {'communityId': this.community.communityId}
|
||||
|
|
|
@ -18,7 +18,9 @@ export class PiwikHelper{
|
|||
"beopen": 218,
|
||||
"risis":219,
|
||||
"science-innovation-policy":253,
|
||||
"covid-19":267
|
||||
"covid-19":267,
|
||||
"desira":null,
|
||||
"enermaps":null
|
||||
};
|
||||
public static siteIDsProduction={
|
||||
"connect": 112,
|
||||
|
@ -37,12 +39,16 @@ export class PiwikHelper{
|
|||
"dariah":'',
|
||||
"epos": null,
|
||||
"beopen" :null,
|
||||
"risis":null
|
||||
"risis":null,
|
||||
"science-innovation-policy":null,
|
||||
"covid-19":null,
|
||||
"desira":null,
|
||||
"enermaps":null
|
||||
};
|
||||
public static getSiteId(communityId:string, environment:string){
|
||||
if(environment == 'production'){
|
||||
return this.siteIDsProduction[communityId];
|
||||
}
|
||||
// if(environment == 'production'){
|
||||
// return this.siteIDsProduction[communityId];
|
||||
// }
|
||||
return this.siteIDs[communityId];
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,101 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en-gb" dir="ltr" vocab="http://schema.org/">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<base href="/" />
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<meta name="description" content="OpenAIRE Connect, Connect,Community Dashboard, communities, open access, research, projects "/>
|
||||
<meta name="google-site-verification" content="rZ-58gIX8IqzBte6Qv4J5yY9aSiDP15Dfc1Yr9yezqE" />
|
||||
|
||||
<meta property="og:description" content="OpenAIRE Connect, Connect,Community Dashboard, communities, open access, research, projects"/>
|
||||
<meta property="og:title" content="OpenAIRE - Connect "/>
|
||||
|
||||
<meta property="og:type" content="website"/>
|
||||
<meta property="og:url" content="https://beta.connect.openaire.eu"/>
|
||||
<meta property="og:site_name" content="OpenAIRE - Connect"/>
|
||||
|
||||
<meta property="og:image" content="assets/common-assets/common/Symbol.png"/>
|
||||
<meta property="og:image:secure_url" content="assets/common-assets/common/Symbol.png" />
|
||||
<meta property="og:image:type" content="image/png" />
|
||||
<meta property="og:image:width" content="360" />
|
||||
<meta property="og:image:height" content="359" />
|
||||
<meta name="robots" content="noindex">
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="assets/common-assets/logo/apple-icon-57x57.png">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="assets/common-assets/logo/apple-icon-60x60.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="assets/common-assets/logo/apple-icon-72x72.png">
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="assets/common-assets/logo/apple-icon-76x76.png">
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="assets/common-assets/logo/apple-icon-114x114.png">
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="assets/common-assets/logo/apple-icon-120x120.png">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="assets/common-assets/logo/apple-icon-144x144.png">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="assets/common-assets/logo/apple-icon-152x152.png">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="assets/common-assets/logo/apple-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" sizes="192x192" href="assets/common-assets/logo/android-icon-192x192.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="assets/common-assets/logo/favicon-32x32.png">
|
||||
<link rel="icon" type="image/png" sizes="96x96" href="assets/common-assets/logo/favicon-96x96.png">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="assets/common-assets/logo/favicon-16x16.png">
|
||||
<link href="assets/common-assets/logo/favicon.ico" rel="shortcut icon" type="image/vnd.microsoft.icon" />
|
||||
<link rel="manifest" href="assets/common-assets/logo/manifest.json">
|
||||
<meta name="msapplication-TileColor" content="#ffffff">
|
||||
<meta name="msapplication-TileImage" content="/ms-icon-144x144.png">
|
||||
<meta name="theme-color" content="#ffffff">
|
||||
<script src="assets/common-assets/common/jquery.js"></script>
|
||||
<script src="assets/common-assets/common/uikit.min.js?v=1"></script>
|
||||
<script src="assets/common-assets/common/uikit-icons.min.js?v=1"></script>
|
||||
<script href="https://cdn.ckeditor.com/4.5.11/full-all/ckeditor.js"></script>
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
console.log("Is ready - load uikit ***")
|
||||
$.getScript("assets/common-assets/common/uikit.min.js?v=1");
|
||||
$.getScript("assets/common-assets/common/uikit-icons.min.js?v=1");
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<link id="customCss" rel="stylesheet" href="">
|
||||
<!-- <script src="assets/common-assets/clipboard.min.js"></script>-->
|
||||
|
||||
|
||||
</head>
|
||||
<body class="" style="">
|
||||
|
||||
<div class="uk-offcanvas-content uk-height-viewport">
|
||||
|
||||
<app-root></app-root>
|
||||
</div>
|
||||
|
||||
|
||||
<script type="text/javascript" >
|
||||
function loadAltmetrics(e,t,n){
|
||||
var d="createElement",c="getElementsByTagName",m="setAttribute",n=document.getElementById(e);
|
||||
return n&&n.parentNode&&n.parentNode.removeChild(n),n=document[d+"NS"]&&document.documentElement.namespaceURI,n=n?document[d+"NS"](n,"script"):document[d]("script"),n[m]("id",e),n[m]("src",t),(document[c]("head")[0]||document[c]("body")[0]).appendChild(n),n=new Image,void n[m]("src","https://d1uo4w7k31k5mn.cloudfront.net/donut/0.png")
|
||||
};
|
||||
|
||||
function appendCss(customData) {
|
||||
if (typeof customData != "undefined")
|
||||
$(document).ready(function () {
|
||||
/* var link = $("<style>");
|
||||
link.attr({
|
||||
type: 'text/css',
|
||||
rel: 'stylesheet',
|
||||
id: "customCss",
|
||||
});
|
||||
$("head").append(link);
|
||||
$("#customCss").append(customData);*/
|
||||
//TODO uncomment above and remove the following once customization is up to date
|
||||
var link = $("<link>");
|
||||
link.attr({
|
||||
rel: 'stylesheet',
|
||||
id: "customCss",
|
||||
href:"/assets/customization.css"
|
||||
});
|
||||
$("head").append(link);
|
||||
$("#customCss").append(customData);
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -7,8 +7,6 @@
|
|||
<base href="/" />
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<meta name="description" content="OpenAIRE Connect, Connect,Community Dashboard, communities, open access, research, projects "/>
|
||||
<meta name="google-site-verification" content="rZ-58gIX8IqzBte6Qv4J5yY9aSiDP15Dfc1Yr9yezqE" />
|
||||
|
||||
<meta property="og:description" content="OpenAIRE Connect, Connect,Community Dashboard, communities, open access, research, projects"/>
|
||||
<meta property="og:title" content="OpenAIRE - Connect "/>
|
||||
|
||||
|
@ -53,12 +51,7 @@
|
|||
|
||||
</script>
|
||||
|
||||
<link rel="stylesheet" href="assets/common-assets/common/theme.css?v=1">
|
||||
<link rel="stylesheet" href="assets/common-assets/common/custom.css?v=1">
|
||||
<link rel="stylesheet" href="assets/common-assets/library.css?v=4">
|
||||
<link rel="stylesheet" href="assets/connect-custom.css?v=7">
|
||||
<link id="customCss" rel="stylesheet" href="">
|
||||
<!-- <script src="assets/common-assets/clipboard.min.js"></script>-->
|
||||
|
||||
|
||||
</head>
|
||||
|
|
|
@ -0,0 +1,100 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en-gb" dir="ltr" vocab="http://schema.org/">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<base href="/" />
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<meta name="description" content="OpenAIRE Connect, Connect,Community Dashboard, communities, open access, research, projects "/>
|
||||
<meta name="google-site-verification" content="rZ-58gIX8IqzBte6Qv4J5yY9aSiDP15Dfc1Yr9yezqE" />
|
||||
|
||||
<meta property="og:description" content="OpenAIRE Connect, Connect,Community Dashboard, communities, open access, research, projects"/>
|
||||
<meta property="og:title" content="OpenAIRE - Connect "/>
|
||||
|
||||
<meta property="og:type" content="website"/>
|
||||
<meta property="og:url" content="https://connect.openaire.eu"/>
|
||||
<meta property="og:site_name" content="OpenAIRE - Connect"/>
|
||||
|
||||
<meta property="og:image" content="assets/common-assets/common/Symbol.png"/>
|
||||
<meta property="og:image:secure_url" content="assets/common-assets/common/Symbol.png" />
|
||||
<meta property="og:image:type" content="image/png" />
|
||||
<meta property="og:image:width" content="360" />
|
||||
<meta property="og:image:height" content="359" />
|
||||
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="assets/common-assets/logo/apple-icon-57x57.png">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="assets/common-assets/logo/apple-icon-60x60.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="assets/common-assets/logo/apple-icon-72x72.png">
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="assets/common-assets/logo/apple-icon-76x76.png">
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="assets/common-assets/logo/apple-icon-114x114.png">
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="assets/common-assets/logo/apple-icon-120x120.png">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="assets/common-assets/logo/apple-icon-144x144.png">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="assets/common-assets/logo/apple-icon-152x152.png">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="assets/common-assets/logo/apple-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" sizes="192x192" href="assets/common-assets/logo/android-icon-192x192.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="assets/common-assets/logo/favicon-32x32.png">
|
||||
<link rel="icon" type="image/png" sizes="96x96" href="assets/common-assets/logo/favicon-96x96.png">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="assets/common-assets/logo/favicon-16x16.png">
|
||||
<link href="assets/common-assets/logo/favicon.ico" rel="shortcut icon" type="image/vnd.microsoft.icon" />
|
||||
<link rel="manifest" href="assets/common-assets/logo/manifest.json">
|
||||
<meta name="msapplication-TileColor" content="#ffffff">
|
||||
<meta name="msapplication-TileImage" content="/ms-icon-144x144.png">
|
||||
<meta name="theme-color" content="#ffffff">
|
||||
<script src="assets/common-assets/common/jquery.js"></script>
|
||||
<script src="assets/common-assets/common/uikit.min.js?v=1"></script>
|
||||
<script src="assets/common-assets/common/uikit-icons.min.js?v=1"></script>
|
||||
<script href="https://cdn.ckeditor.com/4.5.11/full-all/ckeditor.js"></script>
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
console.log("Is ready - load uikit ***")
|
||||
$.getScript("assets/common-assets/common/uikit.min.js?v=1");
|
||||
$.getScript("assets/common-assets/common/uikit-icons.min.js?v=1");
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<link id="customCss" rel="stylesheet" href="">
|
||||
<!-- <script src="assets/common-assets/clipboard.min.js"></script>-->
|
||||
|
||||
|
||||
</head>
|
||||
<body class="" style="">
|
||||
|
||||
<div class="uk-offcanvas-content uk-height-viewport">
|
||||
|
||||
<app-root></app-root>
|
||||
</div>
|
||||
|
||||
|
||||
<script type="text/javascript" >
|
||||
function loadAltmetrics(e,t,n){
|
||||
var d="createElement",c="getElementsByTagName",m="setAttribute",n=document.getElementById(e);
|
||||
return n&&n.parentNode&&n.parentNode.removeChild(n),n=document[d+"NS"]&&document.documentElement.namespaceURI,n=n?document[d+"NS"](n,"script"):document[d]("script"),n[m]("id",e),n[m]("src",t),(document[c]("head")[0]||document[c]("body")[0]).appendChild(n),n=new Image,void n[m]("src","https://d1uo4w7k31k5mn.cloudfront.net/donut/0.png")
|
||||
};
|
||||
|
||||
function appendCss(customData) {
|
||||
if (typeof customData != "undefined")
|
||||
$(document).ready(function () {
|
||||
/* var link = $("<style>");
|
||||
link.attr({
|
||||
type: 'text/css',
|
||||
rel: 'stylesheet',
|
||||
id: "customCss",
|
||||
});
|
||||
$("head").append(link);
|
||||
$("#customCss").append(customData);*/
|
||||
//TODO uncomment above and remove the following once customization is up to date
|
||||
var link = $("<link>");
|
||||
link.attr({
|
||||
rel: 'stylesheet',
|
||||
id: "customCss",
|
||||
href:"/assets/customization.css"
|
||||
});
|
||||
$("head").append(link);
|
||||
$("#customCss").append(customData);
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,2 @@
|
|||
User-Agent: *
|
||||
Disallow: /
|
|
@ -0,0 +1,3 @@
|
|||
User-Agent: *
|
||||
|
||||
Sitemap: https://connect.openaire.eu/sitemap.xml
|
|
@ -1,4 +1,2 @@
|
|||
User-Agent: *
|
||||
Disallow: /cache
|
||||
Disallow: /upload
|
||||
Disallow: /
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
|
||||
<url>
|
||||
<loc><![CDATA[https://connect.openaire.eu]]></loc>
|
||||
</url>
|
||||
<url>
|
||||
<loc><![CDATA[https://connect.openaire.eu/about/learn-how]]></loc>
|
||||
</url>
|
||||
<url>
|
||||
<loc><![CDATA[https://connect.openaire.eu/about/learn-in-depth]]></loc>
|
||||
</url>
|
||||
<url>
|
||||
<loc><![CDATA[https://connect.openaire.eu/about/faq]]></loc>
|
||||
</url>
|
||||
<url>
|
||||
<loc><![CDATA[https://connect.openaire.eu/search/find/communities]]></loc>
|
||||
</url>
|
||||
<url>
|
||||
<loc><![CDATA[https://connect.openaire.eu]]></loc>
|
||||
</url>
|
||||
<url>
|
||||
<loc><![CDATA[https://connect.openaire.eu]]></loc>
|
||||
</url>
|
||||
</urlset>
|
|
@ -1,2 +1,7 @@
|
|||
/* You can add global styles to this file, and also import other style files */
|
||||
@import "~@angular/material/prebuilt-themes/indigo-pink.css";
|
||||
|
||||
@import "assets/common-assets/common/theme.css";
|
||||
@import "assets/common-assets/common/custom.css";
|
||||
@import "assets/common-assets/library.css";
|
||||
@import "assets/connect-custom.css";
|
||||
|
|
Loading…
Reference in New Issue