@openstack_dev/gatsby-theme-marketing-oif-core 1.0.25 → 1.0.27

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/gatsby-node.js CHANGED
@@ -15,7 +15,6 @@ const {
15
15
  MAINTENANCE_FILE_PATH,
16
16
  FONTS_SCSS_FILE_PATH,
17
17
  SPONSORED_PROJECTS_FILE_PATH,
18
- FOOTER_FILE_PATH,
19
18
  } = require("./src/utils/filePath");
20
19
  const { generateFontFile } = require("./src/utils/cssUtils");
21
20
 
@@ -88,38 +87,6 @@ exports.onPreBootstrap = async () => {
88
87
  if (sponsoredProjects) {
89
88
  writeToJson(SPONSORED_PROJECTS_FILE_PATH, sponsoredProjects);
90
89
  }
91
-
92
- // new footer structure migration
93
- // read the JSON file
94
- const rawData = fs.readFileSync(FOOTER_FILE_PATH, "utf8");
95
- let footerJSON;
96
- try {
97
- footerJSON = JSON.parse(rawData);
98
- } catch (error) {
99
- console.log("Error parsing JSON from footer file:", error);
100
- return;
101
- }
102
- // return new structure for social networks
103
- if (footerJSON.social && Array.isArray(footerJSON.social.networks)) {
104
- footerJSON.social.networks = footerJSON.social.networks.map((item) => ({
105
- display: item.display,
106
- title: item.title || item.icon,
107
- clickBehaviour: {
108
- link: item.clickBehaviour?.link || item.link,
109
- attributes: item.clickBehaviour?.attributes || [],
110
- },
111
- rendering: {
112
- icon: item.rendering?.icon || item.icon,
113
- },
114
- }));
115
- }
116
- // save updated file.
117
- try {
118
- fs.writeFileSync(FOOTER_FILE_PATH, JSON.stringify(footerJSON));
119
- console.log(`File successfully updated at ${FOOTER_FILE_PATH}`);
120
- } catch (error) {
121
- console.log("Error writing updated config file:", error);
122
- }
123
90
  };
124
91
 
125
92
  exports.createSchemaCustomization = ({ actions }) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openstack_dev/gatsby-theme-marketing-oif-core",
3
- "version": "1.0.25",
3
+ "version": "1.0.27",
4
4
  "description": "Base theme for Marketing Sites",
5
5
  "author": "smarcet",
6
6
  "keywords": [
@@ -90,6 +90,7 @@
90
90
  "image-size": "^1.0.1",
91
91
  "immutability-helper": "2.9.1",
92
92
  "immutable": "^5.0.0-beta.5",
93
+ "js-cookie": "^3.0.5",
93
94
  "js-yaml": "^4.1.0",
94
95
  "jsdom": "^16.2.2",
95
96
  "lodash": "^4.17.19",
@@ -3,10 +3,10 @@
3
3
  background: #fff;
4
4
  margin-bottom: 0;
5
5
  padding: 15px 0;
6
- border-color: #e7e7e7;
7
6
  position: relative;
8
7
  min-height: 50px;
9
8
  border: 1px solid transparent;
9
+ border-bottom: 1px solid #ddd;
10
10
  box-shadow: none;
11
11
  li {
12
12
  position: relative;
package/src/theme.js CHANGED
@@ -2,35 +2,94 @@ import { createTheme } from "@mui/material/styles";
2
2
  import darkScrollbar from "@mui/material/darkScrollbar";
3
3
 
4
4
  // create breakpoints in intermediate theme
5
- let theme = createTheme({
6
- breakpoints: {
7
- values: {
8
- xs: 0,
9
- sm: 320,
10
- md: 768,
11
- lg: 1024,
12
- xl: 1280,
13
- }
14
- }
5
+ const baseTheme = createTheme({
6
+ breakpoints: {
7
+ values: {
8
+ xs: 0,
9
+ sm: 320,
10
+ md: 768,
11
+ lg: 1024,
12
+ xl: 1280,
13
+ },
14
+ },
15
+ palette: {
16
+ primary: {
17
+ main: "#2A4E68",
18
+ light: "#286a9d",
19
+ dark: "#1565c0",
20
+ contrastText: "#FFFFFF",
21
+ },
22
+ background: {
23
+ paper: "#FFFFFF",
24
+ light: "#F9FAFC",
25
+ contrastText: "#000000DE",
26
+ },
27
+ text: {
28
+ primary: "#333333",
29
+ secondary: "#2A4E68",
30
+ },
31
+ },
15
32
  });
16
33
 
17
- // use breakpoints on theme creation
18
- theme = createTheme(theme, {
19
- components: {
20
- MuiCssBaseline: {
21
- styleOverrides: {
22
- body: {
23
- ...darkScrollbar(),
24
- margin: 0,
25
- padding: 0,
26
- border: 0,
27
- fontSize: "100%",
28
- verticalAlign: "baseline",
29
- fontFamily: "\"Open Sans\", Helvetica, Arial, sans-serif",
30
- }
31
- }
32
- }
33
- }
34
+ const theme = createTheme(baseTheme, {
35
+ typography: {
36
+ h1: {
37
+ fontSize: 34,
38
+ color: baseTheme.palette.text.secondary,
39
+ fontWeight: 300,
40
+ textAlign: "center",
41
+ margin: "40px 0",
42
+ },
43
+ h2: {
44
+ fontSize: 30,
45
+ color: baseTheme.palette.text.secondary,
46
+ fontWeight: 300,
47
+ marginTop: 20,
48
+ marginBottom: 25,
49
+ },
50
+ h3: {
51
+ fontSize: 26,
52
+ color: baseTheme.palette.text.secondary,
53
+ fontWeight: 300,
54
+ },
55
+ body1: {
56
+ fontSize: 14,
57
+ },
58
+ },
59
+ components: {
60
+ MuiTypography: {
61
+ defaultProps: {
62
+ fontFamily: "\"Open Sans\",Helvetica,Arial,sans-serif",
63
+ },
64
+ },
65
+ MuiCssBaseline: {
66
+ styleOverrides: {
67
+ body: {
68
+ ...darkScrollbar(),
69
+ margin: 0,
70
+ padding: 0,
71
+ border: 0,
72
+ fontSize: "100%",
73
+ verticalAlign: "baseline",
74
+ fontFamily: "\"Open Sans\", Helvetica, Arial, sans-serif",
75
+ "& a": {
76
+ color: "#337ab7",
77
+ textDecoration: "none",
78
+ "&:hover": {
79
+ color: "#30739C",
80
+ textDecoration: "underline",
81
+ },
82
+ },
83
+ hr: {
84
+ marginTop: 20,
85
+ marginBottom: 20,
86
+ border: 0,
87
+ borderTop: "1px solid #eee",
88
+ },
89
+ },
90
+ },
91
+ },
92
+ },
34
93
  });
35
94
 
36
95
  export default theme;
@@ -6,7 +6,7 @@ const STYLES_DIR_PATH = "src/styles";
6
6
  const DEFAULT_COLORS_FILE_PATH = `${DEFAULTS_DIR_PATH}/colors.json`;
7
7
  const COLORS_FILE_PATH = `${DATA_DIR_PATH}/colors.json`;
8
8
  const SPONSORED_PROJECTS_FILE_PATH = `${DATA_DIR_PATH}/sponsored-projects.json`;
9
- const COLORS_SASS_FILE_PATH = `${STYLES_DIR_PATH}/colors.scss`
9
+ const COLORS_SASS_FILE_PATH = `${STYLES_DIR_PATH}/colors.scss`;
10
10
  const FONTS_SCSS_FILE_PATH = `${STYLES_DIR_PATH}/fonts.scss`;
11
11
  const SITE_SETTINGS_DIR_PATH = `${STATIC_CONTENT_DIR_PATH}/site-settings`;
12
12
  const SITE_SETTINGS_FILE_PATH = `${SITE_SETTINGS_DIR_PATH}/index.json`;
@@ -21,7 +21,7 @@ const FOOTER_DIR_PATH = `${STATIC_CONTENT_DIR_PATH}/footer`;
21
21
  const FOOTER_FILE_PATH = `${FOOTER_DIR_PATH}/index.json`;
22
22
  const ANNOUNCEMENT_BANNER_FILE_PATH = `${STATIC_CONTENT_DIR_PATH}/announcement-banner/index.json`;
23
23
  const POSTER_PAGES_FILE_PATH = `${STATIC_CONTENT_DIR_PATH}/posters-pages.json`;
24
- const SUMMIT_FILE_NAME = `summit.json`
24
+ const SUMMIT_FILE_NAME = "summit.json";
25
25
  const SUMMIT_FILE_PATH = `${DATA_DIR_PATH}/${SUMMIT_FILE_NAME}`;
26
26
  const EVENTS_FILE_NAME = "events.json";
27
27
  const EVENTS_FILE_PATH = `${DATA_DIR_PATH}/${EVENTS_FILE_NAME}`;
@@ -40,21 +40,22 @@ const EXPO_HALL_PAGE_FILE_PATH = `${STATIC_CONTENT_DIR_PATH}/expo-hall-page/inde
40
40
  const INVITATIONS_REJECT_PAGE_FILE_PATH = `${STATIC_CONTENT_DIR_PATH}/invitations-reject-page/index.json`;
41
41
  const SPONSORS_FILE_NAME = "sponsors.json";
42
42
  const SPONSORS_FILE_PATH = `${STATIC_CONTENT_DIR_PATH}/${SPONSORS_FILE_NAME}`;
43
- const CMS_FONT_FILE_PATH = "/static/fonts/"
43
+ const CMS_FONT_FILE_PATH = "/static/fonts/";
44
44
  const PAYMENTS_FILE_PATH = `${STATIC_CONTENT_DIR_PATH}/payments.json`;
45
- const APPLE_PAY_DOMAIN_FILE_PATH = `/static/.well-known/`
46
- const APPLE_PAY_DOMAIN_FILE_NAME = `apple-developer-merchantid-domain-association`;
45
+ const APPLE_PAY_DOMAIN_FILE_PATH = "/static/.well-known/";
46
+ const APPLE_PAY_DOMAIN_FILE_NAME = "apple-developer-merchantid-domain-association";
47
47
 
48
48
  exports.REQUIRED_DIR_PATHS = [
49
- DATA_DIR_PATH,
50
- STATIC_CONTENT_DIR_PATH,
51
- CONTENT_PAGES_DIR_PATH,
52
- STYLES_DIR_PATH,
53
- SITE_SETTINGS_DIR_PATH,
54
- NAVBAR_DIR_PATH,
55
- FOOTER_DIR_PATH
49
+ DATA_DIR_PATH,
50
+ STATIC_CONTENT_DIR_PATH,
51
+ CONTENT_PAGES_DIR_PATH,
52
+ STYLES_DIR_PATH,
53
+ SITE_SETTINGS_DIR_PATH,
54
+ NAVBAR_DIR_PATH,
55
+ FOOTER_DIR_PATH,
56
56
  ];
57
57
 
58
+ exports.DATA_DIR_PATH = DATA_DIR_PATH;
58
59
  exports.STATIC_CONTENT_DIR_PATH = STATIC_CONTENT_DIR_PATH;
59
60
  exports.DEFAULT_COLORS_FILE_PATH = DEFAULT_COLORS_FILE_PATH;
60
61
  exports.COLORS_FILE_PATH = COLORS_FILE_PATH;