barbican-reset 1.2.9 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10,9 +10,6 @@
10
10
  <script>
11
11
  export default {
12
12
  name: "DisplayStream",
13
- mounted() {
14
- console.log(this.$props);
15
- },
16
13
  props: {
17
14
  image: {
18
15
  type: String,
@@ -0,0 +1,31 @@
1
+ <template>
2
+ <div :class="$style.component">
3
+ <slot />
4
+ </div>
5
+ </template>
6
+
7
+ <script>
8
+
9
+ export default {
10
+ name: "NewCarousel",
11
+ };
12
+ </script>
13
+
14
+ <style lang="scss" module>
15
+
16
+ .component {
17
+ column-gap: 0.75rem;
18
+ display: grid;
19
+
20
+ @include media-breakpoint-up(sm) {
21
+ grid-template-columns: repeat(2, 1fr);
22
+ }
23
+ @include media-breakpoint-up(md) {
24
+ grid-template-columns: repeat(3, 1fr);
25
+ }
26
+ @include media-breakpoint-up(lg) {
27
+ grid-template-columns: repeat(4, 1fr);
28
+ }
29
+ }
30
+
31
+ </style>
@@ -0,0 +1,38 @@
1
+ <template>
2
+ <b-card related no-body>
3
+ <b-img v-if="content.image" :src="content.image" />
4
+ <b-card-body>
5
+ <b-link :href="content.link" target="_blank">
6
+ <b-card-title v-html="content.title" />
7
+ <b-card-sub-title v-if="content.start_date" v-html="handleDate(content.start_date)" />
8
+ <b-card-text v-html="limitLength(content.description)" />
9
+ </b-link>
10
+ </b-card-body>
11
+ </b-card>
12
+ </template>
13
+
14
+ <script>
15
+ import moment from 'moment'
16
+ import { BCard, BImg, BCardBody, BLink, BCardTitle, BCardSubTitle, BCardText } from 'bootstrap-vue'
17
+
18
+ export default {
19
+ name: "RelatedCard",
20
+ props: ['content'],
21
+ components: { BCard, BImg, BCardBody, BLink, BCardTitle, BCardSubTitle, BCardText },
22
+ methods: {
23
+ limitLength(title, limit = 140, output) {
24
+ if (title.length > limit) {
25
+ output = title.slice(0, limit);
26
+ output = output.substr(0, Math.min(output.length, output.lastIndexOf(' ')));
27
+ output += ' ...';
28
+ } else {
29
+ output = title;
30
+ }
31
+ return output;
32
+ },
33
+ handleDate(date) {
34
+ return moment(date).format("MMM Do, h:mma");
35
+ },
36
+ },
37
+ };
38
+ </script>
@@ -0,0 +1,32 @@
1
+ <template>
2
+ <div class="component">
3
+ <slot />
4
+ </div>
5
+ </template>
6
+
7
+ <script>
8
+ export default {
9
+ name: 'RelatedRow'
10
+ }
11
+ </script>
12
+
13
+ <style lang="scss" scoped>
14
+
15
+ .component {
16
+ margin-right: auto;
17
+ margin-left: auto;
18
+ max-width: 20rem;
19
+
20
+ @include media-breakpoint-up(md) {
21
+ grid-template-columns: repeat(3, 1fr);
22
+ column-gap: 1.25rem;
23
+ max-width: 60rem;
24
+ display: grid;
25
+
26
+ .card {
27
+ margin-bottom: 0;
28
+ }
29
+ }
30
+ }
31
+
32
+ </style>
@@ -2,7 +2,7 @@
2
2
  <div :class="$style.container">
3
3
  <div :class="styleTitle">
4
4
  <div :class="$style.line"></div>
5
- <div :class="$style.text">{{ title }}</div>
5
+ <div :class="$style.text"><slot /></div>
6
6
  <div :class="$style.line"></div>
7
7
  </div>
8
8
  <span v-if="tagline" :class="$style.tagline" v-html="tagline"></span>
@@ -13,9 +13,6 @@
13
13
  export default {
14
14
  name: "RelatedTitle",
15
15
  props: {
16
- title: {
17
- type: String,
18
- },
19
16
  tagline: {
20
17
  type: String,
21
18
  },
@@ -0,0 +1,41 @@
1
+ <template>
2
+ <div>
3
+ <h4 :class="$style.title">{{ title }}</h4>
4
+ <div :class="$style.slider">
5
+ <b-button @click="$emit('back')">back</b-button>
6
+ <new-carousel>
7
+ <slot />
8
+ </new-carousel>
9
+ <b-button @click="$emit('next')">next</b-button>
10
+ </div>
11
+ </div>
12
+ </template>
13
+
14
+ <script>
15
+ import { NewCarousel, Alert } from '../index'
16
+ export default {
17
+ name: "VideosRow",
18
+ components: { NewCarousel, Alert },
19
+ props: {
20
+ title: {
21
+ type: String
22
+ }
23
+ }
24
+ }
25
+ </script>
26
+
27
+ <style lang="scss" module>
28
+
29
+ .title {
30
+ border-bottom: 1px solid $c-grey-steel;
31
+ margin-bottom: 1.5rem;
32
+ padding-bottom: 1rem;
33
+ }
34
+
35
+ .slider {
36
+ align-items: center;
37
+ display: flex;
38
+ gap: 1.5rem;
39
+ }
40
+
41
+ </style>
package/index.js CHANGED
@@ -10,9 +10,12 @@ import Banner from './components/banner'
10
10
  import Alert from './components/alert'
11
11
  import LoadingAnimation from './components/loading_animation'
12
12
  import RelatedTitle from './components/related_title'
13
+ import RelatedCard from './components/related_card'
14
+ import RelatedRow from './components/related_row'
13
15
  import TypeText from './components/type_text'
14
16
  import Placeholder from './components/placeholder'
15
17
  import Carousel from './components/carousel'
18
+ import NewCarousel from './components/new_carousel'
16
19
  import CardDeck from './components/card_deck'
17
20
  import FormSection from './components/form_section'
18
21
  import FormUpdate from './components/form_update'
@@ -24,16 +27,20 @@ import FooterLower from './components/footer_lower'
24
27
  import FluidIframe from './components/fluid_iframe'
25
28
  import HelpRow from './components/help_row'
26
29
  import DisplayStream from './components/display_stream'
30
+ import VideosRow from './components/videos_row'
27
31
 
28
32
  export {
29
33
  LoadingAnimation,
30
34
  Alert,
31
35
  RelatedTitle,
36
+ RelatedCard,
37
+ RelatedRow,
32
38
  TypeText,
33
39
  Container,
34
40
  Wrap,
35
41
  Card,
36
42
  Carousel,
43
+ NewCarousel,
37
44
  Banner,
38
45
  AccountTitle,
39
46
  Placeholder,
@@ -50,5 +57,6 @@ export {
50
57
  FooterLower,
51
58
  FluidIframe,
52
59
  HelpRow,
53
- DisplayStream
60
+ DisplayStream,
61
+ VideosRow
54
62
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "barbican-reset",
3
- "version": "1.2.9",
3
+ "version": "1.3.0",
4
4
  "description": "A collection of useful scss imports and js scripts, that provide consistent styling and functionality across barbican projects.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -39,6 +39,7 @@
39
39
  "node-sass-tilde-importer": "^1.0.2",
40
40
  "placeholder-loading": "^0.4.0",
41
41
  "sass": "^1.41.0",
42
+ "vue-moment": "^4.1.0",
42
43
  "vue-slick-carousel": "^1.0.6"
43
44
  }
44
45
  }
@@ -0,0 +1,9 @@
1
+
2
+ .card[related] {
3
+ border: 1px solid $c-grey-pearl;
4
+ overflow: hidden;
5
+
6
+ .card-title {
7
+ font-size: $font-size-lg;
8
+ }
9
+ }
@@ -4,6 +4,7 @@
4
4
  @import "password.scss";
5
5
  @import "account.scss";
6
6
  @import "video-help.scss";
7
+ @import "related.scss";
7
8
 
8
9
  .card {
9
10
  border: 1px solid $c-grey-pearl;