gatsby-matrix-theme 3.0.4 → 3.0.8

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.
Files changed (20) hide show
  1. package/CHANGELOG.md +49 -0
  2. package/package.json +2 -2
  3. package/src/gatsby-core-theme/components/molecules/content/content.module.scss +34 -1
  4. package/src/gatsby-core-theme/components/molecules/content/index.js +15 -3
  5. package/src/gatsby-core-theme/components/organisms/head/index.js +2 -1
  6. package/src/gatsby-core-theme/components/organisms/navigation/index.js +9 -1
  7. package/src/gatsby-core-theme/components/pages/body/index.js +1 -4
  8. package/storybook/public/{5.58b2efe7.iframe.bundle.js → 5.6fafb5f4.iframe.bundle.js} +3 -3
  9. package/storybook/public/{5.58b2efe7.iframe.bundle.js.LICENSE.txt → 5.6fafb5f4.iframe.bundle.js.LICENSE.txt} +0 -0
  10. package/storybook/public/5.6fafb5f4.iframe.bundle.js.map +1 -0
  11. package/storybook/public/iframe.html +1 -1
  12. package/storybook/public/main.4c12afb7.iframe.bundle.js +1 -0
  13. package/storybook/public/{runtime~main.39a81a69.iframe.bundle.js → runtime~main.7b867edc.iframe.bundle.js} +1 -1
  14. package/storybook/public/vendors~main.be5d297a.iframe.bundle.js +7 -0
  15. package/storybook/public/{vendors~main.cc70e3aa.iframe.bundle.js.LICENSE.txt → vendors~main.be5d297a.iframe.bundle.js.LICENSE.txt} +0 -0
  16. package/storybook/public/vendors~main.be5d297a.iframe.bundle.js.map +1 -0
  17. package/storybook/public/5.58b2efe7.iframe.bundle.js.map +0 -1
  18. package/storybook/public/main.436e9745.iframe.bundle.js +0 -1
  19. package/storybook/public/vendors~main.cc70e3aa.iframe.bundle.js +0 -7
  20. package/storybook/public/vendors~main.cc70e3aa.iframe.bundle.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,3 +1,52 @@
1
+ ## [3.0.8](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v3.0.7...v3.0.8) (2021-12-09)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * moved footer navigation before main content ([bf923b2](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/bf923b2660f3e826668b89814890793baa37f6a9))
7
+
8
+ ## [3.0.7](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v3.0.6...v3.0.7) (2021-12-07)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * canonical url generator ([32b68cd](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/32b68cd094fb1492db12d863fc986f680e8476e8))
14
+
15
+
16
+ * Merge branch 'master' of git.ilcd.rocks:team-floyd/themes/matrix-theme ([a7d5f57](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/a7d5f5766f182b2d062a3bb277d6e8db8e5e62e1))
17
+
18
+ ## [3.0.6](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v3.0.5...v3.0.6) (2021-12-07)
19
+
20
+
21
+ ### Bug Fixes
22
+
23
+ * content read more ([6f00226](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/6f00226ebc277e02a78103e9987871200af0bb17))
24
+ * issue fix ([ac5b5e6](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/ac5b5e67e43d31d67cf0c37ecfbf0eb0c979323c))
25
+ * small style issue ([2e32e03](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/2e32e03904e809a3d2cc1ed444fc5dd1fc16cdeb))
26
+
27
+
28
+ ### Code Refactoring
29
+
30
+ * add custom styles to menu ([5fb35db](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/5fb35db8cdc8a4afdb72a768e62ff8c49661371c))
31
+
32
+
33
+ ### Config
34
+
35
+ * update core theme ([e2885b8](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/e2885b856a689cc0f2501d87d39d4f6e92b40f37))
36
+ * updated core theme ([2d2e722](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/2d2e72239cba3cf0f6239fede523adf901ee21de))
37
+ * updated core version ([6c83579](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/6c8357910c12a57d527d691afaab74f2e6debc89))
38
+
39
+
40
+ * Merge branch 'show-more-content' into 'master' ([dfbe31f](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/dfbe31fd8cf1788ab3546f8ff0663ea5e21bd1e3))
41
+ * Merge branch 'tm-navigation-sticky' into 'master' ([239e204](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/239e2044d341183d843ed06548cfa330b3358bc4))
42
+
43
+ ## [3.0.5](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v3.0.4...v3.0.5) (2021-12-02)
44
+
45
+
46
+ ### Config
47
+
48
+ * updated core version ([08a78cd](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/08a78cd4c979b78d157b8eeaeaa608880b9f9023))
49
+
1
50
  ## [3.0.4](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v3.0.3...v3.0.4) (2021-12-01)
2
51
 
3
52
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gatsby-matrix-theme",
3
- "version": "3.0.4",
3
+ "version": "3.0.8",
4
4
  "main": "index.js",
5
5
  "description": "Matrix Theme NPM Package",
6
6
  "author": "",
@@ -31,7 +31,7 @@
31
31
  "cross-env": "^7.0.2",
32
32
  "dotenv": "8.2.0",
33
33
  "gatsby": "^3.3.1",
34
- "gatsby-core-theme": "^1.6.14",
34
+ "gatsby-core-theme": "^1.6.21",
35
35
  "gatsby-image": "^3.3.0",
36
36
  "gatsby-plugin-image": "^1.3.1",
37
37
  "gatsby-plugin-postcss": "^4.3.0",
@@ -129,7 +129,7 @@
129
129
  td {
130
130
  color: white !important;
131
131
  background: var(--table-head-background);
132
-
132
+
133
133
  border-radius: 0;
134
134
 
135
135
  &:first-child {
@@ -237,6 +237,39 @@
237
237
  }
238
238
  }
239
239
  }
240
+
241
+ @include max(mobile) {
242
+ &.showMore {
243
+ max-height: 17.8rem;
244
+ overflow: hidden;
245
+ position: relative;
246
+
247
+ &::before {
248
+ content: '';
249
+ position: absolute;
250
+ transition: all .25s ease-in-out;
251
+ height: 4rem;
252
+ right: 0;
253
+ bottom: 0;
254
+ left: 0;
255
+ background-image: linear-gradient(to bottom, rgba(209, 209, 209, 0), #ffffff);
256
+ }
257
+ }
258
+ }
259
+ }
260
+
261
+ .button {
262
+ margin: 3rem 0 0 1.6rem !important;
263
+ border: 2px solid #171f49;
264
+ width: calc(100% - 3.2rem);
265
+ font-style: normal;
266
+ font-weight: bold;
267
+ font-size: 1.8rem;
268
+ line-height: 3rem;
269
+ color: #171f49;
270
+ @include min(tablet) {
271
+ display: none;
272
+ }
240
273
  }
241
274
 
242
275
  .floatLeft {
@@ -1,13 +1,16 @@
1
+ /* eslint-disable camelcase */
1
2
  /* eslint-disable import/no-extraneous-dependencies */
2
- import React from 'react';
3
+ import React, { useState } from 'react';
3
4
  import parse from 'html-react-parser';
4
5
  import PropTypes from 'prop-types';
5
-
6
6
  import LazyImage from 'gatsby-core-theme/src/hooks/lazy-image';
7
7
  import { parseCss } from 'gatsby-core-theme/src/helpers/css-parser';
8
8
  import styles from './content.module.scss';
9
9
 
10
10
  const Content = ({ module }) => {
11
+ const { show_more_label, show_more_enabled } = module || {};
12
+ const [showMore, setShowMore] = useState(show_more_enabled === '1');
13
+
11
14
  const replaceMedia = (node) => {
12
15
  if (node.name === 'img') {
13
16
  let stylesClass = null;
@@ -64,9 +67,13 @@ const Content = ({ module }) => {
64
67
  }
65
68
  };
66
69
 
70
+ const handleChange = () => {
71
+ setShowMore(!showMore);
72
+ };
73
+
67
74
  return (
68
75
  <>
69
- <div className={styles.content}>
76
+ <div className={`${styles.content} ${showMore && styles.showMore}`}>
70
77
  <div className={`${switchStyle(module.style)}`}>
71
78
  {module.value &&
72
79
  parse(module.value, {
@@ -74,6 +81,11 @@ const Content = ({ module }) => {
74
81
  })}
75
82
  </div>
76
83
  </div>
84
+ {showMore && (
85
+ <button type="button" className={styles.button} onClick={handleChange}>
86
+ {show_more_label}
87
+ </button>
88
+ )}
77
89
  </>
78
90
  );
79
91
  };
@@ -21,7 +21,8 @@ export function getCanonicalUrl(page) {
21
21
  if (page.path === '/') {
22
22
  return process.env.GATSBY_SITE_URL;
23
23
  }
24
- return `${process.env.GATSBY_SITE_URL}${page.path}`;
24
+
25
+ return `${process.env.GATSBY_SITE_URL}${page.path.replace(/^\//, '')}`;
25
26
  }
26
27
  export function getRobotOptions(options) {
27
28
  const array = [];
@@ -32,6 +32,7 @@ const Navigation = ({
32
32
  sticky = true,
33
33
  template,
34
34
  children,
35
+ customStyles,
35
36
  }) => {
36
37
  const navRef = useRef(React.createRef());
37
38
  const showMenu = template !== 'ppc';
@@ -74,7 +75,13 @@ const Navigation = ({
74
75
  </Link>
75
76
  {showMenu && (
76
77
  <>
77
- <Menu section={section} menu={menu} options={options} gtmClass="main-menu-gtm" />
78
+ <Menu
79
+ section={section}
80
+ menu={menu}
81
+ options={options}
82
+ customStyles={customStyles}
83
+ gtmClass="main-menu-gtm"
84
+ />
78
85
  {hasSearch && <SearchForm className={styles.search} searchIcon={searchIcon} />}
79
86
  </>
80
87
  )}
@@ -121,6 +128,7 @@ Navigation.propTypes = {
121
128
  }),
122
129
  }),
123
130
  sticky: PropTypes.bool,
131
+ customStyles: PropTypes.string,
124
132
  };
125
133
 
126
134
  export default Navigation;
@@ -74,6 +74,7 @@ function Body({ pageContext, children }) {
74
74
  }}
75
75
  />
76
76
  )}
77
+ {FooterNavigation && <FooterNavigation section={footerNavigationData} />}
77
78
  {ContactUs ? (
78
79
  <ContactUs page={pageContext} />
79
80
  ) : (
@@ -97,12 +98,8 @@ function Body({ pageContext, children }) {
97
98
  )}
98
99
  </>
99
100
  )}
100
-
101
101
  <ScrollToTop />
102
102
  {OpenGraph && <OpenGraph text="Del på" page={pageContext?.page} />}
103
-
104
- {FooterNavigation && <FooterNavigation section={footerNavigationData} />}
105
-
106
103
  <Footer
107
104
  footerTopCustom={FooterTop}
108
105
  footerBottomCustom={FooterBottom}