barbican-reset 1.3.0 → 1.3.1

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.
@@ -64,7 +64,7 @@ export default {
64
64
  }
65
65
 
66
66
  .inner {
67
- max-width: $constrained_content_width--wide;
67
+ max-width: $layout-width-wide;
68
68
  margin: 0 auto;
69
69
 
70
70
  &:not(.footer) {
@@ -78,7 +78,7 @@ export default {
78
78
  }
79
79
 
80
80
  &.thin {
81
- max-width: $constrained_content_width--thin;
81
+ max-width: $layout-width-thin;
82
82
  }
83
83
 
84
84
  &.masthead {
@@ -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>
@@ -18,7 +18,19 @@ export default {
18
18
  expired: {
19
19
  type: Boolean,
20
20
  default: false,
21
+ },
22
+ hero: {
23
+ type: Boolean,
24
+ default: false,
21
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
+ },
22
34
  }
23
35
  }
24
36
  </script>
@@ -26,7 +38,6 @@ export default {
26
38
  <style lang="scss" module>
27
39
 
28
40
  .component {
29
- border-radius: $border-radius-lg;
30
41
  padding-top: 56.25%;
31
42
  position: relative;
32
43
  overflow: hidden;
@@ -40,12 +51,16 @@ export default {
40
51
  }
41
52
 
42
53
  .title {
43
- background-color: rgba($c-grey-night, 0.8);
54
+ background-color: rgba($c-grey-midnight, 0.85);
44
55
  place-items: center;
45
56
  position: absolute;
46
57
  display: grid;
47
58
  inset: 0;
59
+ }
60
+ }
48
61
 
62
+ .component.hero {
63
+ .title {
49
64
  h4 {
50
65
  font-size: $h2-font-size;
51
66
  }
@@ -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
@@ -14,8 +14,6 @@ import RelatedCard from './components/related_card'
14
14
  import RelatedRow from './components/related_row'
15
15
  import TypeText from './components/type_text'
16
16
  import Placeholder from './components/placeholder'
17
- import Carousel from './components/carousel'
18
- import NewCarousel from './components/new_carousel'
19
17
  import CardDeck from './components/card_deck'
20
18
  import FormSection from './components/form_section'
21
19
  import FormUpdate from './components/form_update'
@@ -27,7 +25,6 @@ import FooterLower from './components/footer_lower'
27
25
  import FluidIframe from './components/fluid_iframe'
28
26
  import HelpRow from './components/help_row'
29
27
  import DisplayStream from './components/display_stream'
30
- import VideosRow from './components/videos_row'
31
28
 
32
29
  export {
33
30
  LoadingAnimation,
@@ -39,8 +36,6 @@ export {
39
36
  Container,
40
37
  Wrap,
41
38
  Card,
42
- Carousel,
43
- NewCarousel,
44
39
  Banner,
45
40
  AccountTitle,
46
41
  Placeholder,
@@ -58,5 +53,4 @@ export {
58
53
  FluidIframe,
59
54
  HelpRow,
60
55
  DisplayStream,
61
- VideosRow
62
56
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "barbican-reset",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
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": {
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
  }
@@ -3,7 +3,23 @@
3
3
  border: 1px solid $c-grey-pearl;
4
4
  overflow: hidden;
5
5
 
6
+ img {
7
+ max-width: 100%;
8
+ }
9
+
10
+ .card-title {
11
+ font-size: $font-size-lg;
12
+ }
13
+ }
14
+
15
+ .card[related][hero=true] {
16
+
6
17
  .card-title {
18
+ font-size: $h2-font-size;
19
+ }
20
+
21
+ .card-text {
7
22
  font-size: $font-size-lg;
8
23
  }
24
+
9
25
  }
@@ -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,31 +0,0 @@
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>
@@ -1,41 +0,0 @@
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>