Welcome to mirror list, hosted at ThFree Co, Russian Federation.

welcome.vue « components « new_namespace « vue_shared « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: e9983af5401e9abb4870e8b695811b16f173ff47 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<script>
import { GlSafeHtmlDirective as SafeHtml } from '@gitlab/ui';
import Vue from 'vue';
import Tracking from '~/tracking';

export default {
  directives: {
    SafeHtml,
  },
  props: {
    title: {
      type: String,
      required: true,
    },
    panels: {
      type: Array,
      required: true,
    },
    experiment: {
      type: String,
      required: false,
      default: null,
    },
  },
  created() {
    const trackingMixin = Tracking.mixin({ ...gon.tracking_data, experiment: this.experiment });
    const trackingInstance = new Vue({
      ...trackingMixin,
      render() {
        return null;
      },
    });
    this.track = trackingInstance.track;
  },
};
</script>
<template>
  <div class="container">
    <h2 class="gl-my-7 gl-font-size-h1 gl-text-center">
      {{ title }}
    </h2>
    <div>
      <div
        v-for="panel in panels"
        :key="panel.name"
        class="new-namespace-panel-wrapper gl-display-inline-block gl-px-3 gl-mb-5"
      >
        <a
          :href="`#${panel.name}`"
          :data-qa-selector="`${panel.name}_link`"
          class="new-namespace-panel gl-display-flex gl-flex-shrink-0 gl-flex-direction-column gl-lg-flex-direction-row gl-align-items-center gl-rounded-base gl-border-gray-100 gl-border-solid gl-border-1 gl-w-full gl-py-6 gl-px-8 gl-hover-text-decoration-none!"
          @click="track('click_tab', { label: panel.name })"
        >
          <div
            v-safe-html="panel.illustration"
            class="new-namespace-panel-illustration gl-text-white gl-display-flex gl-flex-shrink-0 gl-justify-content-center"
          ></div>
          <div class="gl-pl-4">
            <h3 class="gl-font-size-h2 gl-reset-color">
              {{ panel.title }}
            </h3>
            <p class="gl-text-gray-900">
              {{ panel.description }}
            </p>
          </div>
        </a>
      </div>
    </div>
    <slot name="footer"></slot>
  </div>
</template>