barbican-reset 1.2.9 → 1.3.3

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.
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div :class="$style.component">
2
+ <div :class="styleComponent">
3
3
  <img :class="$style.image" :src="image">
4
4
  <div v-if="expired" :class="$style.title">
5
5
  <h4>Expired</h4>
@@ -9,10 +9,7 @@
9
9
 
10
10
  <script>
11
11
  export default {
12
- name: "DisplayStream",
13
- mounted() {
14
- console.log(this.$props);
15
- },
12
+ name: "CardDisplay",
16
13
  props: {
17
14
  image: {
18
15
  type: String,
@@ -21,7 +18,19 @@ export default {
21
18
  expired: {
22
19
  type: Boolean,
23
20
  default: false,
21
+ },
22
+ hero: {
23
+ type: Boolean,
24
+ default: false,
24
25
  }
26
+ },
27
+ computed: {
28
+ styleComponent() {
29
+ const style = this.$style;
30
+ let output = [style.component];
31
+ if (this.hero) { output.push(style.hero); }
32
+ return output;
33
+ },
25
34
  }
26
35
  }
27
36
  </script>
@@ -29,7 +38,6 @@ export default {
29
38
  <style lang="scss" module>
30
39
 
31
40
  .component {
32
- border-radius: $border-radius-lg;
33
41
  padding-top: 56.25%;
34
42
  position: relative;
35
43
  overflow: hidden;
@@ -43,12 +51,16 @@ export default {
43
51
  }
44
52
 
45
53
  .title {
46
- background-color: rgba($c-grey-night, 0.8);
54
+ background-color: rgba($c-grey-midnight, 0.85);
47
55
  place-items: center;
48
56
  position: absolute;
49
57
  display: grid;
50
58
  inset: 0;
59
+ }
60
+ }
51
61
 
62
+ .component.hero {
63
+ .title {
52
64
  h4 {
53
65
  font-size: $h2-font-size;
54
66
  }
@@ -21,6 +21,10 @@ export default {
21
21
  type: Boolean,
22
22
  default: false
23
23
  },
24
+ header: {
25
+ type: Boolean,
26
+ default: false
27
+ },
24
28
  footer: {
25
29
  type: Boolean,
26
30
  default: false
@@ -39,6 +43,7 @@ export default {
39
43
  let output = [style.inner];
40
44
  if (this.masthead) { output.push(style.masthead); }
41
45
  if (this.thin) { output.push(style.thin); }
46
+ if (this.header) { output.push(style.header); }
42
47
  if (this.footer) { output.push(style.footer); }
43
48
  return output;
44
49
  }
@@ -64,7 +69,7 @@ export default {
64
69
  }
65
70
 
66
71
  .inner {
67
- max-width: $constrained_content_width--wide;
72
+ max-width: $layout-width-wide;
68
73
  margin: 0 auto;
69
74
 
70
75
  &:not(.footer) {
@@ -76,9 +81,14 @@ export default {
76
81
  padding-top: 2.5rem;
77
82
  }
78
83
  }
84
+
85
+ &.header {
86
+ padding-bottom: 1.875rem;
87
+ padding-top: 1.875rem;
88
+ }
79
89
 
80
90
  &.thin {
81
- max-width: $constrained_content_width--thin;
91
+ max-width: $layout-width-thin;
82
92
  }
83
93
 
84
94
  &.masthead {
@@ -13,6 +13,6 @@
13
13
 
14
14
  <script>
15
15
  export default {
16
- name: "LoadingAnimation",
16
+ name: "Loader",
17
17
  };
18
18
  </script>
@@ -7,8 +7,8 @@ export default {
7
7
  name: 'Placeholder',
8
8
  props: {
9
9
  margin: {
10
- type: Number,
11
- default: 0
10
+ type: String,
11
+ default: "0"
12
12
  },
13
13
  height: {
14
14
  type: Number,
@@ -16,7 +16,7 @@ export default {
16
16
  },
17
17
  width: {
18
18
  type: String,
19
- default: 100
19
+ default: "100"
20
20
  },
21
21
  right: {
22
22
  type: Boolean,
@@ -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
  },
@@ -14,6 +14,10 @@ export default {
14
14
  thin: {
15
15
  type: Boolean,
16
16
  default: false,
17
+ },
18
+ videos: {
19
+ type: Boolean,
20
+ default: false,
17
21
  }
18
22
  },
19
23
  computed: {
@@ -22,6 +26,7 @@ export default {
22
26
  let output = [style.container];
23
27
  if (this.title) { output.push(style.title); }
24
28
  if (this.thin) { output.push(style.thin); }
29
+ if (this.videos) { output.push(style.videos); }
25
30
  return output;
26
31
  }
27
32
  }
@@ -31,16 +36,20 @@ export default {
31
36
  <style lang="scss" module>
32
37
 
33
38
  .container {
34
- max-width: $constrained_content_width--wide;
39
+ max-width: $layout-width-wide;
35
40
  margin-right: auto;
36
41
  margin-left: auto;
37
42
 
38
43
  &.title {
39
- @include narrow-width;
44
+ max-width: $layout-width-title;
45
+ }
46
+
47
+ &.videos {
48
+ max-width: $layout-width-videos;
40
49
  }
41
50
 
42
51
  &.thin {
43
- max-width: $constrained_content_width--thin;
52
+ max-width: $layout-width-thin;
44
53
  }
45
54
  }
46
55
 
@@ -49,6 +49,10 @@
49
49
  background-color: $background;
50
50
  color: $color;
51
51
  }
52
+
53
+ &.hide {
54
+ visibility: hidden;
55
+ }
52
56
  }
53
57
 
54
58
  @mixin button-outline(
@@ -2,13 +2,13 @@
2
2
  @mixin content_masthead {
3
3
  background-color: white;
4
4
  box-shadow: 0 5px 5px rgba(black, 0.1);
5
- padding: 0 $constrained_grid_padding;
5
+ padding: 0 $layout-padding;
6
6
  // Required to ensure the box-shadow is visible when div.content-main-content uses a background-color.
7
7
  position: relative;
8
8
  }
9
9
 
10
10
  @mixin content_masthead__inner {
11
- max-width: $constrained_content_width--wide;
11
+ max-width: $layout-width-wide;
12
12
  padding: $space--large * 2 0;
13
13
  margin: 0 auto;
14
14
 
@@ -23,7 +23,7 @@
23
23
  }
24
24
 
25
25
  @mixin content-main-content__inner {
26
- max-width: $constrained_content_width--wide;
26
+ max-width: $layout-width-wide;
27
27
  padding: 1.5rem 0;
28
28
  margin: 0 auto;
29
29
 
@@ -1,7 +1,9 @@
1
1
  /// Constrained content
2
- $constrained_grid_padding: 5%;
3
- $constrained_content_width--thin: 50rem;
4
- $constrained_content_width--wide: 75rem;
2
+ $layout-padding: 5%;
3
+ $layout-width-title: 20rem;
4
+ $layout-width-thin: 50rem;
5
+ $layout-width-videos: 60rem;
6
+ $layout-width-wide: 75rem;
5
7
 
6
8
  $space: 0.625rem;
7
9
  // Default large amount of space.
package/index.js CHANGED
@@ -5,15 +5,14 @@ import Block from './components/block'
5
5
  import EventSummary from './components/event_summary'
6
6
  import AccountTitle from './components/account_title'
7
7
  import Wrap from './components/wrap'
8
- import TableRow from './components/table_row'
9
- import Banner from './components/banner'
10
8
  import Alert from './components/alert'
11
- import LoadingAnimation from './components/loading_animation'
9
+ import Loader from './components/loader'
12
10
  import RelatedTitle from './components/related_title'
11
+ import RelatedCard from './components/related_card'
12
+ import RelatedRow from './components/related_row'
13
13
  import TypeText from './components/type_text'
14
14
  import Placeholder from './components/placeholder'
15
- import Carousel from './components/carousel'
16
- import CardDeck from './components/card_deck'
15
+ import CardDisplay from './components/card_display'
17
16
  import FormSection from './components/form_section'
18
17
  import FormUpdate from './components/form_update'
19
18
  import FormGroup from './components/form_group'
@@ -23,32 +22,29 @@ import FooterLogos from './components/footer_logos'
23
22
  import FooterLower from './components/footer_lower'
24
23
  import FluidIframe from './components/fluid_iframe'
25
24
  import HelpRow from './components/help_row'
26
- import DisplayStream from './components/display_stream'
27
25
 
28
26
  export {
29
- LoadingAnimation,
27
+ Loader,
30
28
  Alert,
31
29
  RelatedTitle,
30
+ RelatedCard,
31
+ RelatedRow,
32
32
  TypeText,
33
33
  Container,
34
34
  Wrap,
35
35
  Card,
36
- Carousel,
37
- Banner,
38
36
  AccountTitle,
39
37
  Placeholder,
40
38
  FormSection,
41
39
  FormUpdate,
42
40
  FormGroup,
43
41
  RadioGroup,
44
- TableRow,
45
42
  Block,
46
43
  EventSummary,
47
- CardDeck,
48
44
  FooterUpper,
49
45
  FooterLogos,
50
46
  FooterLower,
51
47
  FluidIframe,
52
48
  HelpRow,
53
- DisplayStream
49
+ CardDisplay,
54
50
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "barbican-reset",
3
- "version": "1.2.9",
3
+ "version": "1.3.3",
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
  }
package/scss/_app.scss ADDED
@@ -0,0 +1,42 @@
1
+ #app {
2
+ flex-direction: column;
3
+ min-height: 100vh;
4
+ min-width: 100%;
5
+ display: flex;
6
+ }
7
+
8
+ #app.splash {
9
+ &.powerDashboard,
10
+ &.powerStream {
11
+ background-position: center -15rem;
12
+ background-color: $c-power-blue;
13
+ background-repeat: no-repeat;
14
+
15
+ @include media-breakpoint-up(lg) {
16
+ background-image: url("/img/power/bg.jpg");
17
+ background-size: 36rem;
18
+ }
19
+
20
+ @include media-breakpoint-up(xxl) {
21
+ background-size: 40rem;
22
+ }
23
+ }
24
+
25
+ &.videos,
26
+ &.cinemaDashboard,
27
+ &.cinemaStream,
28
+ &.concertDashboard,
29
+ &.concertStream,
30
+ &.theatreDashboard,
31
+ &.theatreStream {
32
+ background-image: url("/img/videos/splash-bg.jpg");
33
+ background-color: $c-splash-videos;
34
+ background-position: center -4rem;
35
+ background-repeat: no-repeat;
36
+ background-size: 72rem;
37
+
38
+ @include media-breakpoint-up(xxl) {
39
+ background-position: center top;
40
+ }
41
+ }
42
+ }
package/scss/_atomic.scss CHANGED
@@ -20,6 +20,10 @@ $aligns: "left", "center", "right";
20
20
  margin: 0;
21
21
  }
22
22
 
23
+ .margin-top-05 {
24
+ margin-top: 0.5rem;
25
+ }
26
+
23
27
  .width-100 {
24
28
  width: 100%;
25
29
  }
@@ -0,0 +1,25 @@
1
+
2
+ .card-deck {
3
+ justify-content: center;
4
+ display: grid;
5
+ gap: 2rem;
6
+
7
+ @include media-breakpoint-up(md) {
8
+ align-items: flex-start;
9
+ grid-auto-flow: column;
10
+ }
11
+
12
+ .card {
13
+ margin-bottom: 0;
14
+ max-width: 20rem;
15
+ }
16
+
17
+ .card-title {
18
+ font-size: $h3-font-size;
19
+ }
20
+
21
+ .card-img {
22
+ border-radius: $border-radius-lg;
23
+ margin-top: 1rem;
24
+ }
25
+ }
@@ -0,0 +1,8 @@
1
+ footer {
2
+ color: $white;
3
+
4
+ &:not(.splash) {
5
+ background-color: $c-grey-midnight;
6
+ }
7
+ }
8
+
@@ -0,0 +1,7 @@
1
+ header {
2
+ background-color: $c-page-header-bg;
3
+
4
+ &.splash {
5
+ display: none;
6
+ }
7
+ }
@@ -0,0 +1,14 @@
1
+ main {
2
+ &.splash {
3
+ padding-top: 2rem;
4
+ color: $white;
5
+
6
+ @include media-breakpoint-up(md) {
7
+ padding-top: 4rem;
8
+ }
9
+
10
+ @include media-breakpoint-up(xxl) {
11
+ padding-top: 10rem;
12
+ }
13
+ }
14
+ }
@@ -0,0 +1,29 @@
1
+
2
+ .card[related] {
3
+ border: 1px solid $c-grey-pearl;
4
+ overflow: hidden;
5
+
6
+ img {
7
+ max-width: 100%;
8
+ }
9
+
10
+ .card-title {
11
+ font-size: $font-size-lg;
12
+ }
13
+
14
+ .card-text:not(:last-child) {
15
+ margin-bottom: 0.5rem;
16
+ }
17
+ }
18
+
19
+ .card[related][hero=true] {
20
+
21
+ .card-title {
22
+ font-size: $h2-font-size;
23
+ }
24
+
25
+ .card-text {
26
+ font-size: $font-size-lg;
27
+ }
28
+
29
+ }
@@ -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;
package/scss/index.scss CHANGED
@@ -4,6 +4,10 @@
4
4
  @import "node_modules/bootstrap/scss/mixins";
5
5
  @import "../helpers/index.scss";
6
6
 
7
+ @import "app.scss";
8
+ @import "header.scss";
9
+ @import "main.scss";
10
+ @import "footer.scss";
7
11
  @import "klaro.scss";
8
12
  @import "fonts.scss";
9
13
  @import "loading-animation.scss";
@@ -13,6 +17,7 @@
13
17
  // bootstrap component styles
14
18
  @import "btn.scss";
15
19
  @import "card/index.scss";
20
+ @import "card-group.scss";
16
21
  @import "checkbox.scss";
17
22
  @import "checkbox-group.scss";
18
23
  @import "form.scss";
@@ -39,12 +44,4 @@ a, a:hover {
39
44
 
40
45
  p:last-of-type:not([class^=margin]) {
41
46
  margin-bottom: 0;
42
- }
43
-
44
- footer {
45
- color: $white;
46
-
47
- &:not(.splash) {
48
- background-color: $c-grey-midnight;
49
- }
50
47
  }
@@ -1,41 +0,0 @@
1
- <template>
2
- <b-card-group deck>
3
- <slot />
4
- </b-card-group>
5
- </template>
6
-
7
- <script>
8
- import { BCard } from 'bootstrap-vue'
9
- export default {
10
- name: 'CardDeck',
11
- components: { BCard },
12
- }
13
- </script>
14
-
15
- <style lang="scss" scoped>
16
-
17
- .card-deck {
18
- justify-content: center;
19
- display: grid;
20
- gap: 2rem;
21
-
22
- @include media-breakpoint-up(md) {
23
- align-items: flex-start;
24
- grid-auto-flow: column;
25
- }
26
- }
27
-
28
- .card-deck .card {
29
- margin-bottom: 0;
30
- max-width: 20rem;
31
- }
32
-
33
- .card-deck .card-title {
34
- font-size: $h3-font-size;
35
- }
36
-
37
- .card-deck .card-text {
38
- margin-bottom: 1rem;
39
- }
40
-
41
- </style>
@@ -1,116 +0,0 @@
1
- <template>
2
- <div class="slick-carousel__container">
3
- <VueSlickCarousel v-bind="settings">
4
- <slot />
5
- </VueSlickCarousel>
6
- </div>
7
- </template>
8
-
9
- <script>
10
- import VueSlickCarousel from 'vue-slick-carousel'
11
- import 'vue-slick-carousel/dist/vue-slick-carousel.css'
12
- import 'vue-slick-carousel/dist/vue-slick-carousel-theme.css'
13
-
14
- export default {
15
- components: { VueSlickCarousel },
16
- props: {
17
- infinite: {
18
- type: Boolean,
19
- default: true,
20
- },
21
- },
22
- data() {
23
- return {
24
- settings: {
25
- slidesToScroll: 1,
26
- slidesToShow: 4,
27
- infinite: this.infinite,
28
- arrows: true,
29
- speed: 500,
30
- responsive: [
31
- {
32
- breakpoint: 1024,
33
- settings: {
34
- slidesToShow: 3,
35
- },
36
- },
37
- {
38
- breakpoint: 768,
39
- settings: {
40
- slidesToShow: 2,
41
- },
42
- },
43
- ],
44
- },
45
- };
46
- },
47
- };
48
- </script>
49
-
50
- <style lang="scss" scoped>
51
-
52
- .slick {
53
- &-carousel {
54
- &__container:hover {
55
- .slick-arrow {
56
- opacity: 1;
57
- }
58
- }
59
- }
60
- &-arrow {
61
- margin-top: -1.25rem;
62
- border-radius: 0;
63
- height: 2.5rem;
64
- width: 2.5rem;
65
- z-index: 2;
66
- top: 28%;
67
-
68
- @media only screen and (min-width: 400px) {
69
- top: 32%;
70
- }
71
-
72
- @include media-breakpoint-up(sm) {
73
- top: 38%;
74
- }
75
-
76
- &:before {
77
- font-size: $h1-font-size;
78
- color: $c-page-footer-bg;
79
- opacity: 1;
80
- }
81
- }
82
-
83
- &-slide {
84
- .video-item {
85
- &__container {
86
- padding-right: 0.25rem;
87
- }
88
- }
89
- .video-status__wrap {
90
- opacity: 0.8;
91
- }
92
- &:hover {
93
- .video-status__wrap {
94
- @include media-breakpoint-up(md) {
95
- opacity: 1;
96
- }
97
- }
98
- }
99
- }
100
-
101
- &-prev {
102
- left: -1.25rem;
103
- @include media-breakpoint-up(lg) {
104
- left: -3.75rem;
105
- }
106
- }
107
- &-next {
108
- right: -1.25rem;
109
- @include media-breakpoint-up(lg) {
110
- right: -3.75rem;
111
- }
112
- }
113
- }
114
-
115
-
116
- </style>
@@ -1,94 +0,0 @@
1
- <template>
2
- <div :class="styleRow" :style="`grid-template-columns: ${columns};`">
3
- <slot></slot>
4
- </div>
5
- </template>
6
-
7
- <script>
8
- export default {
9
- name: 'TableRow',
10
- props: {
11
- header: {
12
- type: Boolean,
13
- default: false
14
- },
15
- columns: {
16
- type: String
17
- },
18
- mobile: {
19
- type: Boolean,
20
- default: false,
21
- }
22
- },
23
- computed: {
24
- styleRow() {
25
- if (this.header) {
26
- if (this.mobile) {
27
- return this.$style.mobile_header_row;
28
- } else {
29
- return this.$style.header_row;
30
- }
31
- } else {
32
- if (this.mobile) {
33
- return this.$style.mobile_row;
34
- } else {
35
- return this.$style.row;
36
- }
37
- }
38
- }
39
- }
40
- }
41
- </script>
42
-
43
- <style lang="scss" module>
44
-
45
- .row {
46
- border: 1px solid $input-border-color;
47
- grid-auto-flow: column;
48
- margin-top: 0.625rem;
49
- display: grid;
50
-
51
- > div {
52
- padding: 0.5rem 0.75rem;
53
-
54
- &:not(:last-of-type) {
55
- border-right: 1px solid $input-border-color;
56
- }
57
-
58
- > label {
59
- font-size: $font-size-lg;
60
- font-weight: 700;
61
- display: none;
62
- }
63
- }
64
- }
65
-
66
- .mobile_row {
67
- composes: row;
68
-
69
- @include media-breakpoint-down(md) {
70
- border-radius: $border-radius-lg;
71
- display: block;
72
-
73
- > div:not(:last-of-type) {
74
- border-right: none;
75
- }
76
- }
77
- }
78
-
79
- .header_row {
80
- composes: row;
81
- background-color: $c-grey-alpine;
82
- font-weight: 700;
83
- margin-top: 0;
84
- }
85
-
86
- .mobile_header_row {
87
- composes: header_row;
88
-
89
- @include media-breakpoint-down(md) {
90
- display: none;
91
- }
92
- }
93
-
94
- </style>