You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* sneaks in hiding vscode workspaces
* removes masthead search CSS
* removes vf-masthead support as it's no longer needed
* updates to masthead and variants
* updates yaml/nunjuck relationship with variables
* updates masthead variants
* takes this back to normal
* Refactore: vf-masthead-js
Optimastions for #1195, this:
- lints the JS
- allows use of `style=" --vf-masthead__bg-image: url(../../assets/vf-masthead/assets/group-bg_2d4155.png);`
- fixes the JS to remove escaped syntax
* Update vf-masthead.js
* updates masthead JS, image, njk variables
* cupdates theming variable for title-block--primary
* makes words break on smaller devices
* more updates to masthead, cleaner code, improved docs
* cha-cha-cha-changelog
Co-authored-by: Ken Hawkins <[email protected]>
Copy file name to clipboardexpand all lines: components/vf-masthead/README.md
+17-5
Original file line number
Diff line number
Diff line change
@@ -4,13 +4,23 @@
4
4
5
5
## About
6
6
7
+
The `vf-masthead` (masthead) is a full-width container that can take a text, theme colour, an image, and create a 'block' for the text to lay atop.
8
+
7
9
## Usage
8
10
11
+
The `vf-masthead` component can be used on the home page of group sites to help inform the visitor of the groups name, location, and additional information.
| Use this on the homepage of group sites | On every subsquent page |
16
+
| Use the title block with a theme colour | Use a title block, theme colour, and image |
17
+
18
+
9
19
### Background Colours
10
20
11
-
By Default, the `vf-masthead` is white text on a black background except if it is the title block variant where the text will be black on a white background with an overall black background.
21
+
By Default, the `vf-masthead` is black text on a light grey background except if it is the title block variant where the text will be white on a black background with an overall light grey background.
12
22
13
-
This can be effected by either having a global theme class applied to a parent (usually on `body`) where the colours determined by the theme name will cascade into this component. The other way is to apply a component specific class that effects the colours.
23
+
This can be effected by either having a component specific class that effects the colours.
14
24
15
25
Theme Variants available are:
16
26
@@ -41,22 +51,24 @@ When using a background image we have to determine the best text colour to meet
41
51
42
52
We do this using JavaScript and the background image filename.
43
53
44
-
In creating the background images for mastheads each image filename needs to have it's most dominate colour added as a hexadecimal code.
54
+
In choosing the image for masthead the image filename needs to have it's most dominate colour added as a hexadecimal code.
45
55
46
56
```bash
47
57
masthead-background-image--00EF00.png
48
58
```
49
59
<br>
50
60
51
-
The JavaScript looks for this hexidecimal colour code and mathematically works out the correct text colour to use. The CSS custom property `--local-theme-fg-color` is then applied in the style tag of the component.
61
+
To find the dominant colour in the background image you can use a colour picker in graphics software to find the hex code.
62
+
63
+
This then allows the code to look for this hexidecimal colour code and mathematically works out the correct text colour to use. The CSS custom property `--local-theme-fg-color` is then applied in the style tag of the component.
0 commit comments