Revision 57501
Added by Konstantina Galouni over 4 years ago
home.component.ts | ||
---|---|---|
19 | 19 |
import {PiwikService} from '../openaireLibrary/utils/piwik/piwik.service'; |
20 | 20 |
import { SEOService } from '../openaireLibrary/sharedComponents/SEO/SEO.service'; |
21 | 21 |
import {SearchResearchResultsService} from "../openaireLibrary/services/searchResearchResults.service"; |
22 |
import {HelperService} from "../openaireLibrary/utils/helper/helper.service"; |
|
22 | 23 |
|
23 | 24 |
@Component({ |
24 | 25 |
selector: 'home', |
... | ... | |
140 | 141 |
public subOrp; |
141 | 142 |
trelloImg: string = 'trello.svg'; |
142 | 143 |
trelloImg2: string = 'trello.svg'; |
144 |
|
|
145 |
public pageContents = null; |
|
146 |
|
|
143 | 147 |
constructor ( |
144 | 148 |
private route: ActivatedRoute, |
145 | 149 |
private _router: Router, |
... | ... | |
149 | 153 |
private _searchOrganizationsService: SearchOrganizationsService, |
150 | 154 |
private _refineFieldResultsService:RefineFieldResultsService, |
151 | 155 |
private location: Location, private _piwikService:PiwikService, |
152 |
private config: ConfigurationService, private _meta: Meta, private _title: Title, private seoService: SEOService |
|
156 |
private config: ConfigurationService, private _meta: Meta, private _title: Title, private seoService: SEOService, |
|
157 |
private helper: HelperService |
|
153 | 158 |
) { |
154 | 159 |
|
155 | 160 |
var description = "openAIRE explore, open access, publications, research results, European commission, search"; |
... | ... | |
165 | 170 |
//this.fetchDataproviders = new FetchDataproviders(this._searchDataprovidersService); |
166 | 171 |
} |
167 | 172 |
|
173 |
private getPageContents() { |
|
174 |
this.helper.getPageHelpContents(this._router.url, this.properties, 'openaire').subscribe(contents => { |
|
175 |
this.pageContents = contents; |
|
176 |
}) |
|
177 |
} |
|
178 |
|
|
168 | 179 |
public getKeys(obj: {}) { |
169 | 180 |
return Object.keys(obj); |
170 | 181 |
} |
... | ... | |
186 | 197 |
.subscribe((data: { envSpecific: EnvProperties }) => { |
187 | 198 |
this.properties = data.envSpecific; |
188 | 199 |
this.seoService.createLinkForCanonicalURL(this.properties.baseLink+this._router.url, false); |
189 |
if(this.properties!=null){ |
|
200 |
this.getPageContents(); |
|
201 |
|
|
202 |
if(this.properties!=null){ |
|
190 | 203 |
var url = this.properties.baseLink+this._router.url; |
191 | 204 |
this._meta.updateTag({content:url},"property='og:url'"); |
192 | 205 |
if(this.properties.enablePiwikTrack && (typeof document !== 'undefined')){ |
Also available in: Unified diff
[Trunk | Explore]:
1. Folder assets/explore-assets added (svn external to admin portal).
2. assers/explore-custom.css: Add/Change classes for home page redesign.
3. home.component.ts: Get page help texts.
4. home.component.html:
Page redesign (cards section, numbers section, position of questions section)
Help texts (trello button - position: top, text in orange section - position: right, graph section & cards section - position: bottom, questions section - position: left (hack)).