daily pastebin goal
25%
SHARE
TWEET

Untitled

a guest Apr 25th, 2018 46 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. data() {
  2.     return {
  3.       coloredText: null,
  4.       coloredLink: null,
  5.       card: null,
  6.       cardEvent: null,
  7.       story: null
  8.     }
  9.   },  
  10.  
  11. checkForColor() {
  12.       this.$nextTick(function () {
  13.         if (typeof drupalSettings !== 'undefined' && typeof drupalSettings.pageVars !== 'undefined' &&
  14.           drupalSettings.pageVars.content_type === 'program' &&
  15.           typeof drupalSettings.pageVars.content_type !== 'undefined') {
  16.  
  17.           let pageType = drupalSettings.pageVars.program_type;
  18.  
  19.           switch (pageType) {
  20.  
  21.             case 'g-s':
  22.               {
  23.                 this.coloredText = 'colored-text--grandSolutions';
  24.                 this.coloredLink = 'colored-link--grandSolutions';
  25.                 this.card = 'card-grandSolutions';
  26.                 this.cardEvent = 'card-event-grandSolutions';
  27.  
  28.                 break;
  29.               }
  30.             case 'e-f':
  31.               {
  32.                 this.coloredText = 'colored-text--research';
  33.                 this.coloredLink = 'colored-link--research';
  34.                 this.card = 'card-research';
  35.                 this.cardEvent = 'card-event-research';
  36.                 break;
  37.               }
  38.             case 'e-s':
  39.               {
  40.                 this.coloredText = 'colored-text--eurostar';
  41.                 this.coloredLink = 'colored-link--eurostar';
  42.                 this.card = 'card-eurostar';
  43.                 this.cardEvent = 'card-event-eurostar';
  44.                 break;
  45.               }
  46.             case 'i-f':
  47.               {
  48.                 this.coloredText = 'colored-text--innoFounder';
  49.                 this.coloredLink = 'colored-link--innoFounder';
  50.                 this.card = 'card-innoFounder';
  51.                 this.cardEvent = 'card-event-innoFounder';
  52.                 break;
  53.               }
  54.             case 'i-b':
  55.               {
  56.                 this.coloredText = 'colored-text--innoBooster';
  57.                 this.coloredLink = 'colored-link--innoBooster';
  58.                 this.card = 'card-innoBooster';
  59.                 this.cardEvent = 'card-event-innoBooster';
  60.                 break;
  61.               }
  62.             case 'int-s':
  63.               {
  64.                 this.coloredText = 'colored-text--innternationColl';
  65.                 this.coloredLink = 'colored-link--innternationColl';
  66.                 this.card = 'card-innternationColl';
  67.                 this.cardEvent = 'ard-event-innternationColl';
  68.                 break;
  69.               }
  70.             default:
  71.               {
  72.                 this.coloredText = 'colored-text--generalColor';
  73.                 this.coloredLink = 'colored-link--generalColor';
  74.                 this.card = 'card-generalColor';
  75.                 this.cardEvent = 'card-event-generalColor';
  76.                 break;
  77.               }
  78.           }
  79.  
  80.         } else {
  81.           this.coloredText = 'colored-text--generalColor';
  82.           this.coloredLink = 'colored-link--generalColor';
  83.           this.card = 'card-generalColor';
  84.           this.cardEvent = 'card-event-generalColor';
  85.         }
  86.       })
  87.     },
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top