Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- data() {
- return {
- coloredText: null,
- coloredLink: null,
- card: null,
- cardEvent: null,
- story: null
- }
- },
- checkForColor() {
- this.$nextTick(function () {
- if (typeof drupalSettings !== 'undefined' && typeof drupalSettings.pageVars !== 'undefined' &&
- drupalSettings.pageVars.content_type === 'program' &&
- typeof drupalSettings.pageVars.content_type !== 'undefined') {
- let pageType = drupalSettings.pageVars.program_type;
- switch (pageType) {
- case 'g-s':
- {
- this.coloredText = 'colored-text--grandSolutions';
- this.coloredLink = 'colored-link--grandSolutions';
- this.card = 'card-grandSolutions';
- this.cardEvent = 'card-event-grandSolutions';
- break;
- }
- case 'e-f':
- {
- this.coloredText = 'colored-text--research';
- this.coloredLink = 'colored-link--research';
- this.card = 'card-research';
- this.cardEvent = 'card-event-research';
- break;
- }
- case 'e-s':
- {
- this.coloredText = 'colored-text--eurostar';
- this.coloredLink = 'colored-link--eurostar';
- this.card = 'card-eurostar';
- this.cardEvent = 'card-event-eurostar';
- break;
- }
- case 'i-f':
- {
- this.coloredText = 'colored-text--innoFounder';
- this.coloredLink = 'colored-link--innoFounder';
- this.card = 'card-innoFounder';
- this.cardEvent = 'card-event-innoFounder';
- break;
- }
- case 'i-b':
- {
- this.coloredText = 'colored-text--innoBooster';
- this.coloredLink = 'colored-link--innoBooster';
- this.card = 'card-innoBooster';
- this.cardEvent = 'card-event-innoBooster';
- break;
- }
- case 'int-s':
- {
- this.coloredText = 'colored-text--innternationColl';
- this.coloredLink = 'colored-link--innternationColl';
- this.card = 'card-innternationColl';
- this.cardEvent = 'ard-event-innternationColl';
- break;
- }
- default:
- {
- this.coloredText = 'colored-text--generalColor';
- this.coloredLink = 'colored-link--generalColor';
- this.card = 'card-generalColor';
- this.cardEvent = 'card-event-generalColor';
- break;
- }
- }
- } else {
- this.coloredText = 'colored-text--generalColor';
- this.coloredLink = 'colored-link--generalColor';
- this.card = 'card-generalColor';
- this.cardEvent = 'card-event-generalColor';
- }
- })
- },
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement