barbican-reset 2.32.0 → 2.34.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.
- package/README.md +147 -0
- package/components/br_alert.vue +10 -9
- package/components/br_form_row.vue +4 -1
- package/components/br_skiplink.vue +17 -0
- package/helpers/mixins/_br-form-row.scss +4 -0
- package/helpers/mixins/_br-skiplink.scss +16 -0
- package/helpers/mixins/_buttons.scss +0 -7
- package/helpers/mixins/_focus.scss +2 -2
- package/helpers/mixins/index.scss +9 -7
- package/helpers/mixins/input/_generic.scss +1 -1
- package/helpers/variables/_columns.scss +0 -1
- package/helpers/variables/_typography.scss +5 -1
- package/{patterns/scss → helpers/variables}/colors/_grey.scss +3 -1
- package/{patterns/scss → helpers/variables}/colors/index.scss +1 -1
- package/helpers/variables/index.scss +2 -2
- package/index.js +34 -35
- package/package.json +7 -4
- package/patterns/components/alert.pug +8 -0
- package/patterns/components/section.pug +3 -0
- package/patterns/html/blocks.html +1 -0
- package/patterns/html/index.html +1 -0
- package/patterns/html/layouts.html +1 -0
- package/patterns/index.js +19 -7
- package/patterns/layouts/main.pug +21 -0
- package/patterns/layouts/page.pug +2 -0
- package/patterns/pages/alerts.pug +9 -0
- package/patterns/pages/colors.pug +25 -0
- package/patterns/scss/styles.scss +67 -2
- package/patterns/static/favicon.ico +0 -0
- package/patterns/static/styles.css +2206 -26
- package/patterns/views/blocks.pug +7 -0
- package/patterns/views/index.pug +5 -28
- package/patterns/views/layouts.pug +4 -0
- package/scss/_br-button.scss +159 -0
- package/scss/_br-skiplink.scss +3 -0
- package/scss/card/_confirm.scss +2 -4
- package/scss/index.scss +2 -1
- package/components/skip_link.vue +0 -38
- package/patterns/views/layout.pug +0 -8
- /package/{patterns/scss → helpers/variables}/colors/_brand.scss +0 -0
- /package/{patterns/scss → helpers/variables}/colors/_docs.scss +0 -0
- /package/{patterns/scss → helpers/variables}/colors/_llf.scss +0 -0
- /package/{patterns/scss → helpers/variables}/colors/_status.scss +0 -0
- /package/{patterns/scss → helpers/variables}/colors/_wgp.scss +0 -0
- /package/patterns/{views/mixins.pug → components/samples.pug} +0 -0
package/README.md
ADDED
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
# Barbican Reset
|
|
2
|
+
|
|
3
|
+
## Introduction
|
|
4
|
+
|
|
5
|
+
The Barbican Reset is an NPM module created to maintain consistency between the various digital projects run by the Barbican.
|
|
6
|
+
|
|
7
|
+
## Contents
|
|
8
|
+
|
|
9
|
+
1. Setup
|
|
10
|
+
2. Component library
|
|
11
|
+
3. SCSS patterns
|
|
12
|
+
4. Pattern library
|
|
13
|
+
5. Font library
|
|
14
|
+
6. SVG library
|
|
15
|
+
|
|
16
|
+
## 1. Setup
|
|
17
|
+
|
|
18
|
+
You can install the Barbican Reset into any project by running `npm i barbican-reset` inside your project root folder.
|
|
19
|
+
|
|
20
|
+
You can then manually import a component using `import { BrExample } from barbican-reset`
|
|
21
|
+
|
|
22
|
+
#### SCSS Stylesheet
|
|
23
|
+
|
|
24
|
+
Vue.js: `@import '~barbican-reset';`
|
|
25
|
+
|
|
26
|
+
> Use the ~ in Vue.js to import assets from the project root
|
|
27
|
+
|
|
28
|
+
Drupal: `@import "../node_modules/barbican-reset/scss/index";`
|
|
29
|
+
|
|
30
|
+
Spektrix iframe development: `@import "../../node_modules/barbican-reset/scss/index.scss";`
|
|
31
|
+
|
|
32
|
+
#### SCSS Mixins
|
|
33
|
+
|
|
34
|
+
Vue.js: `@import "~barbican-reset/helpers";`
|
|
35
|
+
|
|
36
|
+
> The Barbican ticketing site makes SCSS mixins globally available via the `vue.config.js` file
|
|
37
|
+
|
|
38
|
+
Drupal: `@import "../node_modules/barbican-reset/helpers/index";`
|
|
39
|
+
|
|
40
|
+
... fonts
|
|
41
|
+
|
|
42
|
+
## 2. Component library
|
|
43
|
+
|
|
44
|
+
The component library is **only available to Vue.js** apps.
|
|
45
|
+
|
|
46
|
+
> Many components are available globally within the Barbican ticketing app. Check the main.js file to see which components are currently available. These won't need an additional import statement.
|
|
47
|
+
|
|
48
|
+
> When manually importing components into Vue.js, be sure to declare the import as a Vue component as well
|
|
49
|
+
|
|
50
|
+
You can reference any of the following components:
|
|
51
|
+
|
|
52
|
+
| Component | Filename | SCSS Class | SCSS Mixin | Previously |
|
|
53
|
+
| -------------------- | -------------------- | -------------------- | ---------------- | ------------- |
|
|
54
|
+
| `<br-alert>` | br_alert.vue | .br-alert | br-alert--setup | - |
|
|
55
|
+
| `<br-anchor>` | br_anchor.vue | .btn | setup-button | - |
|
|
56
|
+
| `<br-button>` | br_button.vue | .br-checkbox | br-checkbox | - |
|
|
57
|
+
| `<br-confirm-done>` | br_confirm_done.vue | - | - | - |
|
|
58
|
+
| `<br-confirm-email>` | br_confirm_email.vue | - | - | - |
|
|
59
|
+
| `<br-container>` | br_container.vue | .br-container--outer | - | - |
|
|
60
|
+
| `<br-footer-lower>` | br_footer_lower.vue | .br-footer-lower | br-footer-lower | - |
|
|
61
|
+
| `<br-footer-upper>` | br_footer_upper.vue | .br-footer-upper | br-footer-upper | - |
|
|
62
|
+
| `<br-form-block>` | br_form_block.vue | - | - | - |
|
|
63
|
+
| `<br-form-password>` | br_form_password.vue | .br-form-password | br-form-password | - |
|
|
64
|
+
| `<br-form-row>` | br_form_row.vue | .br-form-row | br-form-row | - |
|
|
65
|
+
| `<br-form-update>` | br_form_update.vue | .br-form-update | br-form-update | - |
|
|
66
|
+
| `<br-loader>` | br_loader.vue | .br-loader | - | - |
|
|
67
|
+
| `<br-skiplink>` | br_skiplink.vue | - | - | `<skip-link>` |
|
|
68
|
+
| `<br-wrap>` | br_wrap.vue | .br-wrap | - | - |
|
|
69
|
+
|
|
70
|
+
The following component titles are deprecated. You can still use them, but they will migrate to the BR naming convention in future.
|
|
71
|
+
|
|
72
|
+
| Component | Filename | SCSS Class | SCSS Mixin |
|
|
73
|
+
| ----------------- | ----------------- | ---------- | ---------- |
|
|
74
|
+
| `<account-title>` | account_title.vue | - | - |
|
|
75
|
+
| `<card-display>` | card_display.vue | - | - |
|
|
76
|
+
| `<event-summary>` | event_summary.vue | - | - |
|
|
77
|
+
| `<fluid-iframe>` | fluid_iframe.vue | - | - |
|
|
78
|
+
| `<help-row>` | help_row.vue | - | - |
|
|
79
|
+
| `<placeholder>` | placeholder.vue | - | - |
|
|
80
|
+
| `<payment-logo>` | payment_logo.vue | - | - |
|
|
81
|
+
| `<related-card>` | related_card.vue | - | - |
|
|
82
|
+
| `<related-title>` | related_title.vue | - | - |
|
|
83
|
+
| `<related-row>` | related_row.vue | - | - |
|
|
84
|
+
| `<type-text>` | type_text.vue | - | - |
|
|
85
|
+
| `<video-content>` | video_content.vue | - | - |
|
|
86
|
+
|
|
87
|
+
```
|
|
88
|
+
The BR naming convention imitates the Bootstrap example. This format is useful for two reasons:
|
|
89
|
+
|
|
90
|
+
1. It is immediately obvious that the component is imported from the Barbican Reset and is not native to the app.
|
|
91
|
+
|
|
92
|
+
2. It forces components to use a two word syntax, which is the recommended format for custom components. For example, <br-header> instead of <header>, which avoids clashing with native HTML5 components.
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## 3. SCSS patterns
|
|
96
|
+
|
|
97
|
+
Most components have corresponding SCSS classes (and mixins) which allow us to implement consistent styling across our various frontends, irrespective of their HTML structure.
|
|
98
|
+
|
|
99
|
+
## 4. Pattern library
|
|
100
|
+
|
|
101
|
+
The Barbican Reset includes a pattern library. This provides a single source of truth for all the SCSS contained within and allows us to view a whole family of Barbican styles alongside each other.
|
|
102
|
+
|
|
103
|
+
#### Setup
|
|
104
|
+
|
|
105
|
+
> If this is your first time viewing the pattern library, navigate to the **patterns** subfolder and run `npm i`
|
|
106
|
+
|
|
107
|
+
From the root folder, run `npm run serve:patterns` and visit `https://localhost:3000` in the web browser
|
|
108
|
+
|
|
109
|
+
#### New pages
|
|
110
|
+
|
|
111
|
+
> Begin instructions from the **patterns** subfolder.
|
|
112
|
+
|
|
113
|
+
To create a new page in the pattern library, navigate to the **views** subfolder.
|
|
114
|
+
|
|
115
|
+
Duplicate the `index.pug` file and rename it.
|
|
116
|
+
|
|
117
|
+
#### Extending layouts
|
|
118
|
+
|
|
119
|
+
The first line of your new page reads `extends ../layouts/main`
|
|
120
|
+
|
|
121
|
+
If you navigate to the `layouts` subfolder you will see a `main.pug` file. Pug syntax looks like abbreviated HTML markup but also includes `block content`. Blocks describe which areas the page can use to output content.
|
|
122
|
+
|
|
123
|
+
Layouts are useful for creating page templates, allowing pages to focus on content and removing the need for repetitive scafolding code.
|
|
124
|
+
|
|
125
|
+
#### Including components (mixins)
|
|
126
|
+
|
|
127
|
+
The second line of your new page reads `include ../components/samples`
|
|
128
|
+
|
|
129
|
+
If you navigate to the `components` subfolder you will see a `samples.pug` file. Pug syntax looks like abbreviated HTML markup but also includes `mixin Samples()`. Mixins can accept parameters, which they use to print HTML markup on the page.
|
|
130
|
+
|
|
131
|
+
To call the samples mixin from your new page, you might write `+Samples('Contemporary','contemporary-music')`
|
|
132
|
+
|
|
133
|
+
Mixins are useful for printing repetitive code, such as loops to the page. The parameters they accept are quite narrow though, so if you need more flexibility, it's best to extend a layout instead.
|
|
134
|
+
|
|
135
|
+
#### Future intent
|
|
136
|
+
|
|
137
|
+
The pattern library was created as a single source of truth for Barbican styles and components. Unfortunately the components are only compatible with Vue.js currently and so the HTML markup is duplicated.
|
|
138
|
+
|
|
139
|
+
## 5. Font library
|
|
140
|
+
|
|
141
|
+
The Barbican Reset includes a SCSS mixin called `font-face` which constructs font paths...
|
|
142
|
+
|
|
143
|
+
#### Future intent
|
|
144
|
+
|
|
145
|
+
To have this available on a url for assets... ie. assets.barbican.org.uk/supreme
|
|
146
|
+
|
|
147
|
+
## 6. SVG library
|
package/components/br_alert.vue
CHANGED
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
v-if="toggle"
|
|
10
10
|
variant="exit"
|
|
11
11
|
:class="getStatus"
|
|
12
|
-
@click="$emit('close')"
|
|
12
|
+
@click="$emit('close')"
|
|
13
|
+
>
|
|
13
14
|
<close-icon :status="getStatus" />
|
|
14
15
|
</b-button>
|
|
15
16
|
</div>
|
|
@@ -17,10 +18,10 @@
|
|
|
17
18
|
</template>
|
|
18
19
|
|
|
19
20
|
<script>
|
|
20
|
-
import { BButton } from
|
|
21
|
-
import { CloseIcon } from
|
|
21
|
+
import { BButton } from "bootstrap-vue";
|
|
22
|
+
import { CloseIcon } from "barbican-reset/icons/stream";
|
|
22
23
|
export default {
|
|
23
|
-
name:
|
|
24
|
+
name: "BrAlert",
|
|
24
25
|
components: {
|
|
25
26
|
BButton,
|
|
26
27
|
CloseIcon,
|
|
@@ -28,12 +29,12 @@ export default {
|
|
|
28
29
|
computed: {
|
|
29
30
|
getStatus() {
|
|
30
31
|
if (this.error) {
|
|
31
|
-
return
|
|
32
|
+
return "error";
|
|
32
33
|
}
|
|
33
34
|
if (this.success) {
|
|
34
|
-
return
|
|
35
|
+
return "success";
|
|
35
36
|
}
|
|
36
|
-
return
|
|
37
|
+
return "neutral";
|
|
37
38
|
},
|
|
38
39
|
},
|
|
39
40
|
props: {
|
|
@@ -59,7 +60,7 @@ export default {
|
|
|
59
60
|
},
|
|
60
61
|
title: {
|
|
61
62
|
type: String,
|
|
62
|
-
default:
|
|
63
|
+
default: "",
|
|
63
64
|
},
|
|
64
65
|
flex: {
|
|
65
66
|
type: Boolean,
|
|
@@ -70,5 +71,5 @@ export default {
|
|
|
70
71
|
default: false,
|
|
71
72
|
},
|
|
72
73
|
},
|
|
73
|
-
}
|
|
74
|
+
};
|
|
74
75
|
</script>
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<label v-if="label" :for="id">
|
|
4
4
|
<strong>{{ label }}</strong> <span v-if="label && required">(required)</span><span v-if="label && optional">(optional)</span>
|
|
5
5
|
</label>
|
|
6
|
-
<div :class="[`content`,{ editable },{ label },{ submit }]">
|
|
6
|
+
<div :class="[`content`,{ editable },{ label },{ submit },{ radios }]">
|
|
7
7
|
<b-button v-if="editable" variant="input-edit" @click="$emit('edit')">
|
|
8
8
|
<edit-icon />
|
|
9
9
|
</b-button>
|
|
@@ -36,6 +36,9 @@
|
|
|
36
36
|
},
|
|
37
37
|
editable: {
|
|
38
38
|
type: Boolean
|
|
39
|
+
},
|
|
40
|
+
radios: {
|
|
41
|
+
type: Boolean
|
|
39
42
|
}
|
|
40
43
|
},
|
|
41
44
|
computed: {
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
@mixin br-skiplink {
|
|
2
|
+
border: 0.25rem solid $c-grey-l21;
|
|
3
|
+
border-radius: $border-radius-lg;
|
|
4
|
+
background-color: $white;
|
|
5
|
+
color: $c-grey-l21;
|
|
6
|
+
position: absolute;
|
|
7
|
+
padding: 0.5rem;
|
|
8
|
+
z-index: -1;
|
|
9
|
+
opacity: 0;
|
|
10
|
+
|
|
11
|
+
@include focus {
|
|
12
|
+
outline: none;
|
|
13
|
+
opacity: 1;
|
|
14
|
+
z-index: 2;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -319,13 +319,6 @@
|
|
|
319
319
|
@mixin btn-login-to-book {
|
|
320
320
|
@include btn-primary;
|
|
321
321
|
@include flex-button($gap: 0.5rem);
|
|
322
|
-
justify-content: center;
|
|
323
|
-
min-width: initial;
|
|
324
|
-
|
|
325
|
-
@include medium-down {
|
|
326
|
-
margin-top: 1rem;
|
|
327
|
-
width: 100%;
|
|
328
|
-
}
|
|
329
322
|
}
|
|
330
323
|
|
|
331
324
|
@mixin btn-sold-out {
|
|
@@ -39,14 +39,14 @@
|
|
|
39
39
|
@mixin focus-tabs {
|
|
40
40
|
@include single-box($c-grey-l21);
|
|
41
41
|
background-color: $c-grey-l21;
|
|
42
|
-
border-radius: 0;
|
|
42
|
+
// border-radius: 0;
|
|
43
43
|
color: $white;
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
@mixin focus-tabs-dark {
|
|
47
47
|
@include single-box($white);
|
|
48
48
|
background-color: $white;
|
|
49
|
-
border-radius: 0;
|
|
49
|
+
// border-radius: 0;
|
|
50
50
|
color: $black;
|
|
51
51
|
}
|
|
52
52
|
|
|
@@ -16,24 +16,26 @@
|
|
|
16
16
|
border: 0;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
+
@import "account/orders";
|
|
20
|
+
@import "drupal/index.scss";
|
|
21
|
+
|
|
22
|
+
@import "basket";
|
|
19
23
|
@import "br-alert";
|
|
20
24
|
@import "br-card";
|
|
25
|
+
@import "br-footer";
|
|
26
|
+
@import "br-form-password";
|
|
21
27
|
@import "br-form-row";
|
|
22
28
|
@import "br-form-update";
|
|
23
|
-
@import "br-
|
|
24
|
-
@import "br-footer";
|
|
25
|
-
@import "account/orders";
|
|
26
|
-
@import "basket";
|
|
29
|
+
@import "br-skiplink";
|
|
27
30
|
@import "breakpoints";
|
|
28
31
|
@import "buttons";
|
|
29
|
-
@import "content";
|
|
30
32
|
@import "city-of-london";
|
|
33
|
+
@import "content";
|
|
31
34
|
@import "core";
|
|
32
|
-
@import "drupal/index.scss";
|
|
33
35
|
@import "festival";
|
|
34
36
|
@import "focus";
|
|
35
37
|
@import "font";
|
|
36
38
|
@import "headings";
|
|
37
|
-
@import "loading";
|
|
38
39
|
@import "input";
|
|
40
|
+
@import "loading";
|
|
39
41
|
@import "table";
|
|
@@ -20,6 +20,8 @@ $h4-font-size: toRem(24);
|
|
|
20
20
|
|
|
21
21
|
$h5-font-size: toRem(20);
|
|
22
22
|
|
|
23
|
+
$font-size-sm: toRem(14); // small as it gets
|
|
24
|
+
|
|
23
25
|
$line-height-xs: 1.1;
|
|
24
26
|
|
|
25
27
|
$line-height-sm: 1.2;
|
|
@@ -32,4 +34,6 @@ $headings-line-height: $line-height-sm;
|
|
|
32
34
|
|
|
33
35
|
$headings-letter-spacing: -0.015em;
|
|
34
36
|
|
|
35
|
-
$link-decoration: underline;
|
|
37
|
+
$link-decoration: underline;
|
|
38
|
+
|
|
39
|
+
$border-width: toRem(1);
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
$black: hsl(0, 0%, 0%); // deprecate this for $c-grey-l11
|
|
2
|
+
|
|
1
3
|
$c-grey-l11: hsl(0, 0%, 10%); // midnight
|
|
2
4
|
$c-grey-l21: hsl(0, 0%, 20%); // night
|
|
3
5
|
$c-grey-l44: hsl(0, 0%, 35%); // steel
|
|
4
6
|
$c-grey-l65: hsl(0, 0%, 65%); // concrete
|
|
5
7
|
$c-grey-l87: hsl(0, 0%, 85%); // pearl
|
|
6
|
-
$c-grey-l96: hsl(0, 0%, 95%); // alpine
|
|
8
|
+
$c-grey-l96: hsl(0, 0%, 95%); // alpine
|
package/index.js
CHANGED
|
@@ -1,59 +1,58 @@
|
|
|
1
|
-
import EventSummary from "./components/event_summary";
|
|
2
|
-
import AccountTitle from "./components/account_title";
|
|
3
|
-
import RelatedTitle from "./components/related_title";
|
|
4
|
-
import RelatedCard from "./components/related_card";
|
|
5
|
-
import RelatedRow from "./components/related_row";
|
|
6
|
-
import TypeText from "./components/type_text";
|
|
7
|
-
import Placeholder from "./components/placeholder";
|
|
8
|
-
import CardDisplay from "./components/card_display";
|
|
9
|
-
import FluidIframe from "./components/fluid_iframe";
|
|
10
|
-
import HelpRow from "./components/help_row";
|
|
11
|
-
import VideoContent from "./components/video_content";
|
|
12
|
-
import PaymentLogo from "./components/payment_logo";
|
|
13
|
-
import SkipLink from "./components/skip_link";
|
|
14
|
-
|
|
15
1
|
import BrAlert from "./components/br_alert";
|
|
16
2
|
import BrAnchor from "./components/br_anchor";
|
|
17
3
|
import BrButton from "./components/br_button";
|
|
18
4
|
import BrConfirmDone from "./components/br_confirm_done";
|
|
19
5
|
import BrConfirmEmail from "./components/br_confirm_email";
|
|
20
6
|
import BrContainer from "./components/br_container";
|
|
7
|
+
import BrFooterLower from "./components/br_footer/lower";
|
|
8
|
+
import BrFooterUpper from "./components/br_footer/upper";
|
|
21
9
|
import BrFormBlock from "./components/br_form_block";
|
|
10
|
+
import BrFormPassword from "./components/br_form_password";
|
|
22
11
|
import BrFormRow from "./components/br_form_row";
|
|
23
12
|
import BrFormUpdate from "./components/br_form_update";
|
|
24
|
-
import BrFormPassword from "./components/br_form_password";
|
|
25
13
|
import BrLoader from "./components/br_loader";
|
|
14
|
+
import BrSkiplink from "./components/br_skiplink";
|
|
26
15
|
import BrWrap from "./components/br_wrap";
|
|
27
16
|
|
|
28
|
-
import
|
|
29
|
-
import
|
|
17
|
+
import AccountTitle from "./components/account_title";
|
|
18
|
+
import CardDisplay from "./components/card_display";
|
|
19
|
+
import EventSummary from "./components/event_summary";
|
|
20
|
+
import FluidIframe from "./components/fluid_iframe";
|
|
21
|
+
import HelpRow from "./components/help_row";
|
|
22
|
+
import Placeholder from "./components/placeholder";
|
|
23
|
+
import PaymentLogo from "./components/payment_logo";
|
|
24
|
+
import RelatedCard from "./components/related_card";
|
|
25
|
+
import RelatedTitle from "./components/related_title";
|
|
26
|
+
import RelatedRow from "./components/related_row";
|
|
27
|
+
import TypeText from "./components/type_text";
|
|
28
|
+
import VideoContent from "./components/video_content";
|
|
30
29
|
|
|
31
30
|
export {
|
|
32
|
-
BrLoader,
|
|
33
31
|
BrAlert,
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
32
|
+
BrAnchor,
|
|
33
|
+
BrButton,
|
|
34
|
+
BrConfirmDone,
|
|
35
|
+
BrConfirmEmail,
|
|
38
36
|
BrContainer,
|
|
39
|
-
|
|
40
|
-
|
|
37
|
+
BrFooterLower,
|
|
38
|
+
BrFooterUpper,
|
|
41
39
|
BrFormBlock,
|
|
42
|
-
BrFormUpdate,
|
|
43
40
|
BrFormPassword,
|
|
44
41
|
BrFormRow,
|
|
42
|
+
BrFormUpdate,
|
|
43
|
+
BrLoader,
|
|
44
|
+
BrSkiplink,
|
|
45
|
+
BrWrap,
|
|
46
|
+
AccountTitle,
|
|
47
|
+
CardDisplay,
|
|
45
48
|
EventSummary,
|
|
46
|
-
BrFooterLower,
|
|
47
|
-
BrFooterUpper,
|
|
48
49
|
FluidIframe,
|
|
49
50
|
HelpRow,
|
|
50
|
-
|
|
51
|
-
VideoContent,
|
|
51
|
+
Placeholder,
|
|
52
52
|
PaymentLogo,
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
BrWrap,
|
|
53
|
+
RelatedCard,
|
|
54
|
+
RelatedTitle,
|
|
55
|
+
RelatedRow,
|
|
56
|
+
TypeText,
|
|
57
|
+
VideoContent,
|
|
59
58
|
};
|
package/package.json
CHANGED
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
55
|
"bootstrap-vue": "^2.21.2",
|
|
56
|
-
"express": "^4.
|
|
56
|
+
"express": "^4.19.2",
|
|
57
57
|
"focus-visible": "^5.2.0",
|
|
58
58
|
"gsap": "^3.7.1",
|
|
59
59
|
"gulp": "^4.0.2",
|
|
@@ -66,10 +66,12 @@
|
|
|
66
66
|
"gulp-uglify": "^3.0.2",
|
|
67
67
|
"luxon": "^3.2.1",
|
|
68
68
|
"node-sass-tilde-importer": "^1.0.2",
|
|
69
|
+
"nodemon": "^3.1.0",
|
|
69
70
|
"placeholder-loading": "^0.4.0",
|
|
70
71
|
"pug": "^3.0.2",
|
|
71
72
|
"sass": "^1.41.0",
|
|
72
73
|
"save-dev": "^0.0.1-security",
|
|
74
|
+
"serve-favicon": "^2.5.0",
|
|
73
75
|
"vue-slick-carousel": "^1.0.6"
|
|
74
76
|
},
|
|
75
77
|
"devDependencies": {
|
|
@@ -98,10 +100,11 @@
|
|
|
98
100
|
},
|
|
99
101
|
"sass": "scss/index.scss",
|
|
100
102
|
"scripts": {
|
|
101
|
-
"test": "echo \"Error: no test specified\" && exit 1",
|
|
102
103
|
"serve:patterns": "cd patterns && node index",
|
|
103
|
-
"watch:patterns": "cd patterns && gulp watch"
|
|
104
|
+
"watch:patterns": "cd patterns && gulp watch",
|
|
105
|
+
"style:patterns": "cd patterns && gulp build:css",
|
|
106
|
+
"build:patterns": "cd patterns && rm -rf html && pug views --out html"
|
|
104
107
|
},
|
|
105
108
|
"style": "dist/css/barbican-reset.css",
|
|
106
|
-
"version": "2.
|
|
109
|
+
"version": "2.34.0"
|
|
107
110
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
mixin Alert(title)
|
|
2
|
+
.br-alert(class=attributes.center && 'center')
|
|
3
|
+
.wrap(class=attributes.state, class=attributes.inline && 'inline', class=attributes.toggle && 'toggle', class=attributes.flex && 'flex')
|
|
4
|
+
span(class=attributes.icon && 'icon')
|
|
5
|
+
.title= title
|
|
6
|
+
button.btn.btn-exit(class=attributes.state)
|
|
7
|
+
span Close
|
|
8
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<html><head><title>Pattern Library | Barbican Reset</title><link rel="stylesheet" href="/styles.css"/></head><body><div class="topbar"><div class="information"> </div><div class="sections"> <a href="/"> <h3>Items</h3></a><a href="/blocks"> <h3>Blocks</h3></a><a href="/layouts"> <h3>Layouts</h3></a></div><div class="search"></div></div><div class="br-container--outer"><div class="br-container--inner"><div>Blocks</div></div></div></body></html>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<html><head><title>Pattern Library | Barbican Reset</title><link rel="stylesheet" href="/styles.css"/></head><body><div class="topbar"><div class="information"> </div><div class="sections"> <a href="/"> <h3>Items</h3></a><a href="/blocks"> <h3>Blocks</h3></a><a href="/layouts"> <h3>Layouts</h3></a></div><div class="search"></div></div><div class="br-container--outer"><div class="br-container--inner"><div class="section-header"><h3>Colors</h3></div><div class="page"><h3>Grey</h3><ul class="list list-palette grey"><li class="item item-palette l11"></li><li class="item item-palette l21"></li><li class="item item-palette l44"></li><li class="item item-palette l65"></li><li class="item item-palette l87"></li><li class="item item-palette l96"></li></ul><h3 class="title title-palette">Contemporary</h3><ul class="list list-palette brand-contemporary-music"><li class="item item-palette shade-65"></li><li class="item item-palette shade-20"></li><li class="item item-palette shade-10"></li><li class="item item-palette"></li><li class="item item-palette tint-40"></li><li class="item item-palette tint-70"></li><li class="item item-palette tint-85"></li><li class="item item-palette tint-95"></li><li class="item item-palette tint-98"></li></ul><h3 class="title title-palette">Theatre</h3><ul class="list list-palette brand-theatre--dance"><li class="item item-palette shade-65"></li><li class="item item-palette shade-20"></li><li class="item item-palette shade-10"></li><li class="item item-palette"></li><li class="item item-palette tint-40"></li><li class="item item-palette tint-70"></li><li class="item item-palette tint-85"></li><li class="item item-palette tint-95"></li><li class="item item-palette tint-98"></li></ul><h3 class="title title-palette">Talks</h3><ul class="list list-palette brand-talks--events"><li class="item item-palette shade-65"></li><li class="item item-palette shade-20"></li><li class="item item-palette shade-10"></li><li class="item item-palette"></li><li class="item item-palette tint-40"></li><li class="item item-palette tint-70"></li><li class="item item-palette tint-85"></li><li class="item item-palette tint-95"></li><li class="item item-palette tint-98"></li></ul><h3 class="title title-palette">Art</h3><ul class="list list-palette brand-art--design"><li class="item item-palette shade-65"></li><li class="item item-palette shade-20"></li><li class="item item-palette shade-10"></li><li class="item item-palette"></li><li class="item item-palette tint-40"></li><li class="item item-palette tint-70"></li><li class="item item-palette tint-85"></li><li class="item item-palette tint-95"></li><li class="item item-palette tint-98"></li></ul><h3 class="title title-palette">Programme</h3><ul class="list list-palette brand-programme"><li class="item item-palette shade-65"></li><li class="item item-palette shade-20"></li><li class="item item-palette shade-10"></li><li class="item item-palette"></li><li class="item item-palette tint-40"></li><li class="item item-palette tint-70"></li><li class="item item-palette tint-85"></li><li class="item item-palette tint-95"></li><li class="item item-palette tint-98"></li></ul><h3 class="title title-palette">Cinema</h3><ul class="list list-palette brand-cinema"><li class="item item-palette shade-65"></li><li class="item item-palette shade-20"></li><li class="item item-palette shade-10"></li><li class="item item-palette"></li><li class="item item-palette tint-40"></li><li class="item item-palette tint-70"></li><li class="item item-palette tint-85"></li><li class="item item-palette tint-95"></li><li class="item item-palette tint-98"></li></ul><h3 class="title title-palette">Shop</h3><ul class="list list-palette brand-shop"><li class="item item-palette shade-65"></li><li class="item item-palette shade-20"></li><li class="item item-palette shade-10"></li><li class="item item-palette"></li><li class="item item-palette tint-40"></li><li class="item item-palette tint-70"></li><li class="item item-palette tint-85"></li><li class="item item-palette tint-95"></li><li class="item item-palette tint-98"></li></ul><h3 class="title title-palette">Generic / Library / Tours / Hire</h3><ul class="list list-palette brand-generic"><li class="item item-palette shade-65"></li><li class="item item-palette shade-20"></li><li class="item item-palette shade-10"></li><li class="item item-palette"></li><li class="item item-palette tint-40"></li><li class="item item-palette tint-70"></li><li class="item item-palette tint-85"></li><li class="item item-palette tint-95"></li><li class="item item-palette tint-98"></li></ul><h3 class="title title-palette">Classical</h3><ul class="list list-palette brand-classical-music"><li class="item item-palette shade-65"></li><li class="item item-palette shade-20"></li><li class="item item-palette shade-10"></li><li class="item item-palette"></li><li class="item item-palette tint-40"></li><li class="item item-palette tint-70"></li><li class="item item-palette tint-85"></li><li class="item item-palette tint-95"></li><li class="item item-palette tint-98"></li></ul><h3 class="title title-palette">Membership</h3><ul class="list list-palette brand-membership--support"><li class="item item-palette shade-65"></li><li class="item item-palette shade-20"></li><li class="item item-palette shade-10"></li><li class="item item-palette"></li><li class="item item-palette tint-40"></li><li class="item item-palette tint-70"></li><li class="item item-palette tint-85"></li><li class="item item-palette tint-95"></li><li class="item item-palette tint-98"></li></ul></div></div></div></body></html>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<html><head><title>Pattern Library | Barbican Reset</title><link rel="stylesheet" href="/styles.css"/></head><body><div class="topbar"><div class="information"> </div><div class="sections"> <a href="/"> <h3>Items</h3></a><a href="/blocks"> <h3>Blocks</h3></a><a href="/layouts"> <h3>Layouts</h3></a></div><div class="search"></div></div><div class="br-container--outer"><div class="br-container--inner"><div>Layouts</div></div></div></body></html>
|
package/patterns/index.js
CHANGED
|
@@ -1,13 +1,25 @@
|
|
|
1
|
-
const express = require(
|
|
2
|
-
const
|
|
3
|
-
|
|
1
|
+
const express = require("express");
|
|
2
|
+
const favicon = require("serve-favicon");
|
|
3
|
+
|
|
4
|
+
const app = express();
|
|
5
|
+
const port = 3000;
|
|
4
6
|
|
|
5
7
|
// To run server: node index
|
|
6
8
|
|
|
7
|
-
|
|
9
|
+
const routes = [
|
|
10
|
+
{ path: "/", view: "index" },
|
|
11
|
+
{ path: "/blocks", view: "blocks" },
|
|
12
|
+
{ path: "/layouts", view: "layouts" },
|
|
13
|
+
];
|
|
14
|
+
|
|
15
|
+
app.set("view engine", "pug");
|
|
16
|
+
|
|
17
|
+
app.use(express.static(__dirname + "/static"));
|
|
8
18
|
|
|
9
|
-
app.use(
|
|
19
|
+
app.use(favicon(__dirname + "/static/favicon.ico"));
|
|
10
20
|
|
|
11
|
-
app.get(
|
|
21
|
+
routes.forEach(({ path, view }) => app.get(path, (_, res) => res.render(view)));
|
|
12
22
|
|
|
13
|
-
app.listen(port, ()
|
|
23
|
+
app.listen(port, function () {
|
|
24
|
+
console.log(`Pattern library listening on port ${port}`);
|
|
25
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
include ../components/section
|
|
2
|
+
|
|
3
|
+
html
|
|
4
|
+
head
|
|
5
|
+
title Pattern Library | Barbican Reset
|
|
6
|
+
link(rel="stylesheet" href="/styles.css")
|
|
7
|
+
link(rel="icon" href="favicon.ico")
|
|
8
|
+
body
|
|
9
|
+
.topbar
|
|
10
|
+
.information
|
|
11
|
+
.sections
|
|
12
|
+
a(href="/")
|
|
13
|
+
h3 Items
|
|
14
|
+
a(href="/blocks")
|
|
15
|
+
h3 Blocks
|
|
16
|
+
a(href="/layouts")
|
|
17
|
+
h3 Layouts
|
|
18
|
+
.search
|
|
19
|
+
.br-container--outer
|
|
20
|
+
.br-container--inner
|
|
21
|
+
block content
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
extends ../layouts/page
|
|
2
|
+
|
|
3
|
+
include ../components/alert
|
|
4
|
+
|
|
5
|
+
block content
|
|
6
|
+
|
|
7
|
+
+Alert("Aenean tellus metus, bibendum sed, posuere ac, mattis non, nunc. Fusce vel dui.")(flex=true, state="neutral")
|
|
8
|
+
|
|
9
|
+
+Alert("Aenean tellus metus, bibendum sed, posuere ac, mattis non, nunc. Fusce vel dui.")(flex=true, state="error")
|