@openstack_dev/gatsby-theme-marketing-oif-core 1.0.27 → 1.0.29
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/.prettierrc +10 -0
- package/netlify-config.yaml +2 -0
- package/netlify.toml +7 -0
- package/package.json +5 -2
- package/redirection-rules.js +3 -2
- package/src/components/AnnouncementBanner/index.module.scss +48 -25
package/.prettierrc
ADDED
package/netlify-config.yaml
CHANGED
package/netlify.toml
CHANGED
|
@@ -256,3 +256,10 @@
|
|
|
256
256
|
status = 200
|
|
257
257
|
force = true
|
|
258
258
|
headers = {Authorization = "Basic undefined", X-From = "netlify", X-Forwarded-Host = "undefined"}
|
|
259
|
+
|
|
260
|
+
[[redirects]]
|
|
261
|
+
from = "/community"
|
|
262
|
+
to = "undefined/community"
|
|
263
|
+
status = 200
|
|
264
|
+
force = true
|
|
265
|
+
headers = {Authorization = "Basic undefined", X-From = "netlify", X-Forwarded-Host = "undefined"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openstack_dev/gatsby-theme-marketing-oif-core",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.29",
|
|
4
4
|
"description": "Base theme for Marketing Sites",
|
|
5
5
|
"author": "smarcet",
|
|
6
6
|
"keywords": [
|
|
@@ -15,7 +15,8 @@
|
|
|
15
15
|
"format": "prettier --trailing-comma es5 --no-semi --single-quote --write \"{gatsby-*.js,src/**/*.js}\"",
|
|
16
16
|
"prepare": "husky",
|
|
17
17
|
"lint": "eslint src",
|
|
18
|
-
"precommit": "npx lint-staged --diff=origin/main --verbose"
|
|
18
|
+
"precommit": "npx lint-staged --diff=origin/main --verbose",
|
|
19
|
+
"rewrite_rules": "NODE_ENV=development node redirection-rules.js"
|
|
19
20
|
},
|
|
20
21
|
"lint-staged": {
|
|
21
22
|
"*.{js,jsx}": "eslint --fix",
|
|
@@ -153,11 +154,13 @@
|
|
|
153
154
|
"devDependencies": {
|
|
154
155
|
"eslint": "^7.32.0 || ^8.2.0",
|
|
155
156
|
"eslint-config-airbnb": "^19.0.4",
|
|
157
|
+
"eslint-config-prettier": "^9.1.0",
|
|
156
158
|
"eslint-plugin-import": "^2.25.3",
|
|
157
159
|
"eslint-plugin-jsx-a11y": "^6.5.1",
|
|
158
160
|
"eslint-plugin-only-warn": "^1.1.0",
|
|
159
161
|
"eslint-plugin-react": "^7.28.0",
|
|
160
162
|
"eslint-plugin-react-hooks": "^4.3.0",
|
|
163
|
+
"eslint-plugin-unused-imports": "^4.1.4",
|
|
161
164
|
"husky": "^9.0.11",
|
|
162
165
|
"lint-staged": "^15.1.0",
|
|
163
166
|
"prettier": "^2.0.5"
|
package/redirection-rules.js
CHANGED
|
@@ -52,13 +52,14 @@ const buildRedirectionRules = () => {
|
|
|
52
52
|
|
|
53
53
|
for (let i = 0; i < netlifyConfig.redirects.length; i++) {
|
|
54
54
|
const redirect = netlifyConfig.redirects[i];
|
|
55
|
-
|
|
55
|
+
// see https://docs.netlify.com/routing/redirects/redirect-options/#splats
|
|
56
|
+
const hasSplat = redirect.from.endsWith("*");
|
|
56
57
|
if (formerToml && tomlNodeExists(formerToml, NodeType.Route, redirect.from)) continue;
|
|
57
58
|
|
|
58
59
|
netlifyToml += `
|
|
59
60
|
[[redirects]]
|
|
60
61
|
from = "${redirect.from}"
|
|
61
|
-
to = "${redirectionHost}${redirect.to}:splat"
|
|
62
|
+
to = "${redirectionHost}${redirect.to}${hasSplat ? ":splat" : ""}"
|
|
62
63
|
status = 200
|
|
63
64
|
force = true
|
|
64
65
|
headers = {Authorization = "Basic ${authToken}", X-From = "netlify", X-Forwarded-Host = "${forwardedHost}"}\n`;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
color: #ffffff;
|
|
4
4
|
font-size: 12px;
|
|
5
5
|
font-family: "Open Sans", Helvetica, Arial, sans-serif !important;
|
|
6
|
-
padding: 30px
|
|
6
|
+
padding: 30px;
|
|
7
7
|
max-width: 1500px;
|
|
8
8
|
border-radius: 4px;
|
|
9
9
|
justify-content: space-evenly;
|
|
@@ -20,42 +20,46 @@
|
|
|
20
20
|
|
|
21
21
|
.header {
|
|
22
22
|
text-align: center;
|
|
23
|
+
display: flex;
|
|
24
|
+
align-items: center;
|
|
25
|
+
justify-content: center;
|
|
26
|
+
margin-bottom: 10px;
|
|
23
27
|
|
|
24
28
|
@media (min-width: 900px) {
|
|
25
29
|
text-align: left;
|
|
30
|
+
justify-content: flex-start;
|
|
26
31
|
}
|
|
27
32
|
|
|
28
33
|
.title {
|
|
29
|
-
font-size:
|
|
30
|
-
|
|
31
|
-
bottom: 6px;
|
|
32
|
-
position: relative;
|
|
34
|
+
font-size: 18px;
|
|
35
|
+
line-height: 1.3;
|
|
33
36
|
font-family: "Jura", "Helvetica", sans-serif;
|
|
34
37
|
font-weight: 700;
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
+
margin: 0;
|
|
39
|
+
display: flex;
|
|
40
|
+
align-items: center;
|
|
41
|
+
@media (max-width: 900px) {
|
|
42
|
+
text-align: left;
|
|
43
|
+
justify-content: flex-start;
|
|
44
|
+
}
|
|
38
45
|
}
|
|
39
46
|
|
|
40
47
|
.logo {
|
|
41
|
-
position: relative;
|
|
42
48
|
height: 50px;
|
|
43
49
|
width: 50px;
|
|
50
|
+
margin: 0 20px 0 0;
|
|
44
51
|
display: block;
|
|
45
|
-
margin: 0 auto 10px;
|
|
46
52
|
|
|
47
53
|
@media (min-width: 1024px) {
|
|
48
|
-
top:
|
|
49
|
-
margin: 0 20px 0 0;
|
|
50
|
-
display: inline;
|
|
54
|
+
top: 0;
|
|
51
55
|
}
|
|
52
56
|
}
|
|
53
57
|
}
|
|
54
58
|
|
|
55
59
|
.text {
|
|
56
60
|
padding-top: 15px;
|
|
57
|
-
font-size:
|
|
58
|
-
line-height:
|
|
61
|
+
font-size: 15px;
|
|
62
|
+
line-height: normal;
|
|
59
63
|
font-family: "Roboto", "Helvetica", sans-serif;
|
|
60
64
|
font-style: normal;
|
|
61
65
|
font-weight: normal;
|
|
@@ -65,29 +69,45 @@
|
|
|
65
69
|
.ctaTitle {
|
|
66
70
|
font-family: "Roboto", "Helvetica", sans-serif;
|
|
67
71
|
font-style: normal;
|
|
68
|
-
font-size:
|
|
69
|
-
line-height:
|
|
72
|
+
font-size: 15px;
|
|
73
|
+
line-height: normal;
|
|
70
74
|
text-align: center;
|
|
71
|
-
margin-bottom:
|
|
75
|
+
margin-bottom: 5px;
|
|
72
76
|
font-weight: bold;
|
|
73
77
|
margin-top: 10%;
|
|
78
|
+
|
|
79
|
+
// if ctaTitle is empty, hide the element completely
|
|
80
|
+
&:empty {
|
|
81
|
+
display: none;
|
|
82
|
+
margin: 0;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
:global(.MuiGrid-root) {
|
|
87
|
+
&:has(.cta) {
|
|
88
|
+
display: flex;
|
|
89
|
+
align-items: center;
|
|
90
|
+
height: 100%;
|
|
91
|
+
}
|
|
74
92
|
}
|
|
75
93
|
|
|
76
94
|
.cta {
|
|
77
95
|
background-color: #39ae4a;
|
|
78
|
-
width:
|
|
79
|
-
font-size:
|
|
80
|
-
min-width:
|
|
81
|
-
padding:
|
|
96
|
+
width: 215px;
|
|
97
|
+
font-size: 15px;
|
|
98
|
+
min-width: 150px;
|
|
99
|
+
padding: 10px;
|
|
82
100
|
border-radius: 50px;
|
|
83
|
-
margin
|
|
84
|
-
margin-right: auto;
|
|
101
|
+
margin: auto;
|
|
85
102
|
text-align: center;
|
|
86
103
|
white-space: nowrap;
|
|
87
104
|
display: block;
|
|
88
105
|
color: white;
|
|
89
106
|
text-decoration: none;
|
|
90
|
-
|
|
107
|
+
// when ctaTitle is empty, adjust margin
|
|
108
|
+
.ctaTitle:empty + & {
|
|
109
|
+
margin: auto;
|
|
110
|
+
}
|
|
91
111
|
&:hover {
|
|
92
112
|
background-color: white;
|
|
93
113
|
color: black;
|
|
@@ -102,6 +122,9 @@
|
|
|
102
122
|
.img {
|
|
103
123
|
margin-left: 10px;
|
|
104
124
|
}
|
|
125
|
+
@media (max-width: 900px) {
|
|
126
|
+
margin-top: 10px;
|
|
127
|
+
}
|
|
105
128
|
}
|
|
106
129
|
|
|
107
130
|
.bottomBar {
|