@openeventkit/event-site 2.0.99 → 2.0.101

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
@@ -337,7 +337,7 @@ exports.onPreBootstrap = async () => {
337
337
  if(siteFonts && Object.keys(siteFonts).length > 0) {
338
338
  // Generate the SCSS file
339
339
  const scssFontsFile = generateFontFile(siteFonts);
340
- if(scssFontsFile) {
340
+ if (scssFontsFile) {
341
341
  const standalone = __dirname === path.resolve();
342
342
  let fontFilePath = FONTS_SCSS_FILE_PATH;
343
343
  if (!standalone) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@openeventkit/event-site",
3
3
  "description": "Event Site",
4
- "version": "2.0.99",
4
+ "version": "2.0.101",
5
5
  "author": "Tipit LLC",
6
6
  "dependencies": {
7
7
  "@mui/base": "^5.0.0-alpha.114",
@@ -43,7 +43,7 @@
43
43
  "final-form": "4.20.7",
44
44
  "font-awesome": "^4.7.0",
45
45
  "formik": "^2.2.9",
46
- "full-schedule-widget": "3.0.3",
46
+ "full-schedule-widget": "3.0.4",
47
47
  "gatsby": "^5.8.1",
48
48
  "gatsby-alias-imports": "^1.0.6",
49
49
  "gatsby-plugin-image": "^3.8.0",
@@ -1,45 +1 @@
1
- {
2
- "widgets": {
3
- "chat": {
4
- "enabled": true,
5
- "showQA": false,
6
- "showHelp": false,
7
- "defaultScope": "page"
8
- },
9
- "schedule": {
10
- "allowClick": true
11
- }
12
- },
13
- "favicon": {
14
- "asset": "icon.png"
15
- },
16
- "identityProviderButtons": [
17
- {
18
- "buttonColor": "#082238",
19
- "providerLabel": "Continue with FNid",
20
- "providerLogo": "logo_fn.svg",
21
- "providerLogoSize": 27
22
- },
23
- {
24
- "buttonColor": "#0A66C2",
25
- "providerLabel": "Sign in with LinkedIn",
26
- "providerParam": "linkedin",
27
- "providerLogo": "logo_linkedin.svg",
28
- "providerLogoSize": 18
29
- },
30
- {
31
- "buttonColor": "#000000",
32
- "providerLabel": "Sign in with Apple",
33
- "providerParam": "apple",
34
- "providerLogoSize": 17,
35
- "providerLogo": "logo_apple.svg"
36
- },
37
- {
38
- "buttonColor": "#1877F2",
39
- "providerLabel": "Login with Facebook",
40
- "providerParam": "facebook",
41
- "providerLogo": "logo_facebook.svg",
42
- "providerLogoSize": 20
43
- }
44
- ]
45
- }
1
+ {"widgets":{"chat":{"enabled":true,"showQA":false,"showHelp":false,"defaultScope":"page"},"schedule":{"allowClick":true}},"favicon":{"asset":"icon.png"},"identityProviderButtons":[{"buttonColor":"#082238","providerLabel":"Continue with FNid","providerLogo":"logo_fn.svg","providerLogoSize":27},{"buttonColor":"#0A66C2","providerLabel":"Sign in with LinkedIn","providerParam":"linkedin","providerLogo":"logo_linkedin.svg","providerLogoSize":18},{"buttonColor":"#000000","providerLabel":"Sign in with Apple","providerParam":"apple","providerLogoSize":17,"providerLogo":"logo_apple.svg"},{"buttonColor":"#1877F2","providerLabel":"Login with Facebook","providerParam":"facebook","providerLogo":"logo_facebook.svg","providerLogoSize":20}],"staticJsonFilesBuildTime":[{"file":"src/data/summit.json","build_time":1709859431135},{"file":"src/data/events.json","build_time":1709859447545},{"file":"src/data/events.idx.json","build_time":1709859447564},{"file":"src/data/speakers.json","build_time":1709859452247},{"file":"src/data/speakers.idx.json","build_time":1709859452252},{"file":"src/content/sponsors.json","build_time":1709859452753},{"file":"src/data/voteable-presentations.json","build_time":1709859453093}],"lastBuild":1709859453093}
@@ -26,6 +26,7 @@ $color_text_input_hints_light:#7B7B7B;
26
26
  $color_text_input_hints_dark:#7B7B7B;
27
27
  $color_button_background_color:#ffffff;
28
28
  $color_button_color:#000000;
29
+ $color_alerts:#FF0000;
29
30
 
30
31
  :root {
31
32
  --color_primary: #{$color_primary};
@@ -49,6 +50,7 @@ $color_button_color:#000000;
49
50
  --color_icon_light: #{$color_icon_light};
50
51
  --color_button_background_color: #{$color_button_background_color};
51
52
  --color_button_color: #{$color_button_color};
53
+ --color_alerts: #{$color_alerts};
52
54
  }
53
55
 
54
56
  html[data-theme="DARK"] {
@@ -1,85 +1,62 @@
1
1
  const getFontFormat = (format) => {
2
- let formatString = '';
3
- switch (format) {
4
- case 'ttf':
5
- formatString = "format('truetype')";
6
- break;
7
- case 'otf':
8
- formatString = "format('opentype')";
9
- break;
10
- case 'woff':
11
- formatString = "format('woff')";
12
- break;
13
- case 'woff2':
14
- formatString = "format('woff2')";
15
- break;
16
- default:
17
- formatString = null;
18
- break;
19
- }
20
- return formatString;
21
- }
2
+ const formatMap = {
3
+ "ttf": "format(\"truetype\")",
4
+ "otf": "format(\"opentype\")",
5
+ "woff": "format(\"woff\")",
6
+ "woff2": "format(\"woff2\")",
7
+ };
8
+ return formatMap[format] || "";
9
+ };
22
10
 
23
- const getFontSrc = (fontPath) => {
24
- // get the filename from the file path
25
- const fileName = fontPath.substring(fontPath.lastIndexOf("/")+1)
26
- return `/fonts/${fileName}`;
27
- }
11
+ const getFontSrc = (fontPath) => fontPath.replace(/^\/static/, "");
12
+
13
+ const generateFontFace = (fontFamily, fontData, fontWeight) => {
14
+ if (!fontFamily || !fontData || !fontData.fontFile || !fontData.fontFormat) return "";
15
+
16
+ const { fontFile, fontFormat } = fontData;
17
+ return `@font-face {
18
+ font-family: "${fontFamily}";
19
+ src: url("${getFontSrc(fontFile)}") ${getFontFormat(fontFormat)};
20
+ font-weight: ${fontWeight};
21
+ }`;
22
+ };
28
23
 
29
- const generateFontFile = (fontData) => {
30
- // check fields
31
- if(!fontData?.fontFamily) return null;
32
- if(!fontData?.regularFont?.fontFile) return null;
33
- if(!fontData?.regularFont?.fontFormat) return null;
34
- if(!fontData?.boldFont?.fontFile) return null;
35
- if(!fontData?.boldFont?.fontFormat) return null;
24
+ const generateFontFile = (fontsData) => {
25
+ if (!fontsData || !fontsData.fontFamily || !fontsData.regularFont || !fontsData.boldFont) return null;
36
26
 
37
- const scssFonts = `
38
- $font-family: "${fontData.fontFamily}";
27
+ const { fontFamily, regularFont, boldFont } = fontsData;
39
28
 
40
- :root {
41
- --font_family: "${fontData.fontFamily}" !important;
42
- }
29
+ if (!regularFont.fontFile || !regularFont.fontFormat) return null;
30
+ if (!boldFont.fontFile || !boldFont.fontFormat) return null;
43
31
 
44
- // Adding these new fonts for this theme
45
- ${fontData.regularFont && fontData.regularFont.fontFile ?
46
- `@font-face {
47
- font-family: "${fontData.fontFamily}";
48
- src: url("${getFontSrc(fontData.regularFont?.fontFile)}") ${getFontFormat(fontData.regularFont?.fontFormat)};
49
- font-weight: normal;
50
- }`
51
- :
52
- ''
53
- }
32
+ const regularFontFace = generateFontFace(fontFamily, regularFont, "normal");
33
+ const boldFontFace = generateFontFace(fontFamily, boldFont, "bold");
54
34
 
55
- ${fontData.boldFont && fontData.boldFont.fontFile ?
56
- `@font-face {
57
- font-family: "${fontData.fontFamily}";
58
- src: url("${getFontSrc(fontData.boldFont?.fontFile)}") ${getFontFormat(fontData.boldFont?.fontFormat)};
59
- font-weight: bold;
60
- }`
61
- :
62
- ''
63
- }
35
+ return `$font-family: "${fontFamily}";
36
+
37
+ :root {
38
+ --font_family: "${fontFamily}" !important;
39
+ }
40
+
41
+ ${regularFontFace}
42
+ ${boldFontFace}
64
43
 
65
- %font-regular {
66
- font-family: "${fontData.fontFamily}";
67
- font-weight: 400;
68
- }
44
+ %font-regular {
45
+ font-family: var(--font_family);
46
+ font-weight: 400;
47
+ }
69
48
 
70
- %font-semi {
71
- font-family: "${fontData.fontFamily}";
72
- font-weight: 600;
73
- }
49
+ %font-semi {
50
+ font-family: var(--font_family);
51
+ font-weight: 600;
52
+ }
74
53
 
75
- %font-bold {
76
- font-family: "${fontData.fontFamily}";
77
- font-weight: 700;
78
- }
79
- `;
80
- return scssFonts;
54
+ %font-bold {
55
+ font-family: var(--font_family);
56
+ font-weight: 700;
57
+ }`;
81
58
  };
82
59
 
83
60
  module.exports = {
84
61
  generateFontFile
85
- }
62
+ };