soames-gatsby-theme 0.1.0

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 (73) hide show
  1. package/LICENSE +29 -0
  2. package/README.md +24 -0
  3. package/dist/gatsby-config.js +47 -0
  4. package/dist/gatsby-node.js +7 -0
  5. package/dist/src/components/Bio.js +23 -0
  6. package/dist/src/components/BlogSidebar.js +30 -0
  7. package/dist/src/components/Footer.js +11 -0
  8. package/dist/src/components/FooterMenu.js +26 -0
  9. package/dist/src/components/Header.js +12 -0
  10. package/dist/src/components/HeaderMenu.js +34 -0
  11. package/dist/src/components/HeroHeader.js +39 -0
  12. package/dist/src/components/Layout.js +24 -0
  13. package/dist/src/components/Logo.js +17 -0
  14. package/dist/src/components/Seo.js +59 -0
  15. package/dist/src/components/shortcodes/RemoveContentAreaPadding.js +12 -0
  16. package/dist/src/components/shortcodes/SoamesFeature.js +9 -0
  17. package/dist/src/components/shortcodes/SoamesGalleryMenu.js +15 -0
  18. package/dist/src/components/shortcodes/SoamesIconList.js +15 -0
  19. package/dist/src/components/shortcodes/SoamesSoundCloud.js +18 -0
  20. package/dist/src/components/shortcodes/SoamesTextBlock.js +8 -0
  21. package/dist/src/components/shortcodes/SoamesTextList.js +8 -0
  22. package/dist/src/components/shortcodes/SoamesTitle.js +7 -0
  23. package/dist/src/components/shortcodes/SoamesTitleBar.js +7 -0
  24. package/dist/src/components/shortcodes/SoamesTitleBarLg.js +25 -0
  25. package/dist/src/components/shortcodes/SoamesVideo.js +8 -0
  26. package/dist/src/pages/index.js +9 -0
  27. package/dist/src/templates/blog-post-archive.js +59 -0
  28. package/dist/src/templates/blog-post.js +67 -0
  29. package/dist/src/templates/page.js +33 -0
  30. package/dist/src/utils/shortcodes/Shortcodes.js +105 -0
  31. package/dist/src/utils/shortcodes/getAttributes.js +18 -0
  32. package/dist/src/utils/shortcodes/getContent.js +7 -0
  33. package/gatsby-browser.js +11 -0
  34. package/gatsby-node.js +138 -0
  35. package/gatsby-ssr.js +12 -0
  36. package/package.json +76 -0
  37. package/src/components/Bio.tsx +63 -0
  38. package/src/components/BlogSidebar.tsx +86 -0
  39. package/src/components/Footer.tsx +53 -0
  40. package/src/components/FooterMenu.tsx +66 -0
  41. package/src/components/Header.tsx +37 -0
  42. package/src/components/HeaderMenu.tsx +123 -0
  43. package/src/components/HeroHeader.tsx +75 -0
  44. package/src/components/Layout.tsx +60 -0
  45. package/src/components/Logo.tsx +49 -0
  46. package/src/components/Seo.tsx +84 -0
  47. package/src/components/shortcodes/RemoveContentAreaPadding.tsx +13 -0
  48. package/src/components/shortcodes/SoamesFeature.tsx +54 -0
  49. package/src/components/shortcodes/SoamesGalleryMenu.tsx +63 -0
  50. package/src/components/shortcodes/SoamesIconList.tsx +57 -0
  51. package/src/components/shortcodes/SoamesSoundCloud.tsx +71 -0
  52. package/src/components/shortcodes/SoamesTextBlock.tsx +27 -0
  53. package/src/components/shortcodes/SoamesTextList.tsx +27 -0
  54. package/src/components/shortcodes/SoamesTitle.tsx +23 -0
  55. package/src/components/shortcodes/SoamesTitleBar.tsx +21 -0
  56. package/src/components/shortcodes/SoamesTitleBarLg.tsx +56 -0
  57. package/src/components/shortcodes/SoamesVideo.tsx +34 -0
  58. package/src/styles/soames/base.css +592 -0
  59. package/src/styles/soames/components.css +1551 -0
  60. package/src/styles/soames/layout.css +209 -0
  61. package/src/styles/soames/overrides.css +1779 -0
  62. package/src/styles/soames/typography.css +23 -0
  63. package/src/styles/theme.css +8 -0
  64. package/src/styles/vendor/normalize.css +343 -0
  65. package/src/styles/vendor/wordpress-blocks.css +3451 -0
  66. package/src/templates/blog-post-archive.tsx +167 -0
  67. package/src/templates/blog-post.tsx +183 -0
  68. package/src/templates/page.tsx +65 -0
  69. package/src/utils/shortcodes/Shortcodes.tsx +119 -0
  70. package/src/utils/shortcodes/getAttributes.ts +19 -0
  71. package/src/utils/shortcodes/getContent.ts +5 -0
  72. package/static/js/soames-nav-dropdown.js +646 -0
  73. package/static/js/soames-navbar-dropdown.js +127 -0
@@ -0,0 +1,54 @@
1
+ import React from "react";
2
+
3
+ interface SoamesFeatureProps {
4
+ content: string;
5
+ attributes: {
6
+ image?: string;
7
+ title?: string;
8
+ css?: string;
9
+ };
10
+ }
11
+
12
+ const SoamesFeature: React.FC<SoamesFeatureProps> = ({ content, attributes }) => {
13
+ const { image, title, css } = attributes;
14
+ const paragraphs = content.split('__SOAMES_P__');
15
+
16
+ return (
17
+ <section className="soames-features">
18
+ <div className="container">
19
+ <div className="col-md-12">
20
+ <div className="media-container-row">
21
+ <div className="align-left aside-content">
22
+ {title && (
23
+ <h2 className="mbr-title pt-2 mbr-fonts-style display-2">
24
+ <div>{title}</div>
25
+ </h2>
26
+ )}
27
+ <div className="block-content">
28
+ <div className={`card ${css ?? ""}`}>
29
+ <div className="media">
30
+ <div className="media-body"></div>
31
+ </div>
32
+ <div className="card-box">
33
+ {paragraphs.map((paragraph, key) => (
34
+ <p key={key} className="block-text mbr-fonts-style display-7">
35
+ {paragraph}
36
+ </p>
37
+ ))}
38
+ </div>
39
+ </div>
40
+ </div>
41
+ </div>
42
+ {image && (
43
+ <div className="soames-figure" style={{ width: "50%" }}>
44
+ <img src={image} alt={title ?? "Feature"} title={title ?? "Feature"} />
45
+ </div>
46
+ )}
47
+ </div>
48
+ </div>
49
+ </div>
50
+ </section>
51
+ );
52
+ };
53
+
54
+ export default SoamesFeature;
@@ -0,0 +1,63 @@
1
+ import React from "react";
2
+
3
+ interface GalleryMenuAttributes {
4
+ images: string[];
5
+ links?: string[];
6
+ labels?: string[];
7
+ css?: string[];
8
+ }
9
+
10
+ interface GalleryMenuItem {
11
+ id: string;
12
+ imageUrl: string;
13
+ label?: string;
14
+ link?: string;
15
+ css?: string;
16
+ }
17
+
18
+ interface SoamesGalleryMenuProps {
19
+ attributes: GalleryMenuAttributes;
20
+ }
21
+
22
+ const SoamesGalleryMenu: React.FC<SoamesGalleryMenuProps> = ({ attributes }) => {
23
+ const { images, links, labels, css } = attributes;
24
+
25
+ const menuItems: GalleryMenuItem[] = images.map((image, i) => ({
26
+ id: `icon_${i}`,
27
+ imageUrl: image.replace(/['""]+/g, '"'),
28
+ label: labels?.[i],
29
+ link: links?.[i],
30
+ css: css?.[i],
31
+ }));
32
+
33
+ return (
34
+ <section className="features1 soames-gallery-menu">
35
+ <div className="container-fluid">
36
+ <div className="media-container-row">
37
+ {menuItems.map(menuItem => (
38
+ <div key={menuItem.id} className="card p-3 col-md-12 col-lg-3">
39
+ <div className="card-wrapper">
40
+ <div className="card-img">
41
+ <a href={menuItem.link}>
42
+ <img
43
+ src={menuItem.imageUrl}
44
+ alt={menuItem.label ?? ""}
45
+ title={menuItem.label ?? ""}
46
+ />
47
+ </a>
48
+ </div>
49
+ <div className="card-box">
50
+ <h4 className="card-title pb-3 mbr-fonts-style display-7">
51
+ {menuItem.label}
52
+ </h4>
53
+ </div>
54
+ </div>
55
+ </div>
56
+ ))}
57
+ </div>
58
+ </div>
59
+ </section>
60
+ );
61
+ };
62
+
63
+ export default SoamesGalleryMenu;
@@ -0,0 +1,57 @@
1
+ import React from "react";
2
+
3
+ interface IconListAttributes {
4
+ images: string[];
5
+ links?: string[];
6
+ labels?: string[];
7
+ css?: string[];
8
+ }
9
+
10
+ interface Icon {
11
+ id: string;
12
+ imageUrl: string;
13
+ label?: string | null;
14
+ link?: string | null;
15
+ css?: string | null;
16
+ }
17
+
18
+ const SoamesIconList: React.FC<{ attributes: IconListAttributes }> = ({ attributes }) => {
19
+ const { images, links, labels, css } = attributes;
20
+
21
+ const icons: Icon[] = images.map((image, i) => ({
22
+ id: `icon_${i}`,
23
+ imageUrl: image.replace(/['""]+/g, '"'),
24
+ label: labels?.[i] ?? null,
25
+ link: links?.[i] ?? null,
26
+ css: css?.[i] ?? null,
27
+ }));
28
+
29
+ return (
30
+ <section className="soames-section">
31
+ <div className="container">
32
+ <div className="d-flex flex-wrap align-items-center justify-content-center">
33
+ {icons.map((icon) => (
34
+ <a
35
+ key={icon.id}
36
+ className={`d-flex flex-column align-items-center text-decoration-none p-2 ${icon.css ?? ''}`}
37
+ href={icon.link ?? "#"}
38
+ target="_blank"
39
+ rel="noreferrer"
40
+ >
41
+ <img
42
+ className="d-block mb-2"
43
+ src={icon.imageUrl}
44
+ alt={icon.label ?? ""}
45
+ height="116"
46
+ loading="lazy"
47
+ />
48
+ <span className="text-muted">{icon.label}</span>
49
+ </a>
50
+ ))}
51
+ </div>
52
+ </div>
53
+ </section>
54
+ );
55
+ };
56
+
57
+ export default SoamesIconList;
@@ -0,0 +1,71 @@
1
+ import React from "react";
2
+
3
+ interface SoamesSoundCloudProps {
4
+ attributes: {
5
+ bandName: string;
6
+ siteLink: string;
7
+ playlistId: string;
8
+ albumLink: string;
9
+ albumName: string;
10
+ };
11
+ }
12
+
13
+ const SoamesSoundCloud: React.FC<SoamesSoundCloudProps> = ({ attributes }) => {
14
+ const { bandName, siteLink, playlistId, albumLink, albumName } = attributes;
15
+
16
+ return (
17
+ <section className="soames-section article soames-list">
18
+ <div className="container">
19
+ <div className="media-container-row">
20
+ <div className="soames-text counter-container col-12 col-md-10 pt-2 mbr-fonts-style display-7">
21
+ <iframe
22
+ title={albumName}
23
+ width="100%"
24
+ height="300"
25
+ scrolling="no"
26
+ frameBorder="no"
27
+ allow="autoplay"
28
+ src={`https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/playlists/${playlistId}&color=%23ff5500&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&show_teaser=true&visual=true`}
29
+ ></iframe>
30
+ <div
31
+ style={{
32
+ fontSize: '10px',
33
+ color: '#cccccc',
34
+ lineBreak: 'anywhere',
35
+ wordBreak: 'normal',
36
+ overflow: 'hidden',
37
+ whiteSpace: 'nowrap',
38
+ textOverflow: 'ellipsis',
39
+ fontFamily:
40
+ 'Interstate,Lucida Grande,Lucida Sans Unicode,Lucida Sans,Garuda,Verdana,Tahoma,sans-serif',
41
+ fontWeight: 100,
42
+ }}
43
+ >
44
+ <a
45
+ href={siteLink}
46
+ title={bandName}
47
+ target="_blank"
48
+ style={{ color: '#cccccc', textDecoration: 'none' }}
49
+ rel="noreferrer"
50
+ >
51
+ {bandName}
52
+ </a>{' '}
53
+ ·{' '}
54
+ <a
55
+ href={albumLink}
56
+ title={albumName}
57
+ target="_blank"
58
+ style={{ color: '#cccccc', textDecoration: 'none' }}
59
+ rel="noreferrer"
60
+ >
61
+ {albumName}
62
+ </a>
63
+ </div>
64
+ </div>
65
+ </div>
66
+ </div>
67
+ </section>
68
+ );
69
+ };
70
+
71
+ export default SoamesSoundCloud;
@@ -0,0 +1,27 @@
1
+ import React from "react";
2
+
3
+ interface SoamesTextBlockProps {
4
+ content: string;
5
+ }
6
+
7
+ const SoamesTextBlock: React.FC<SoamesTextBlockProps> = ({ content }) => {
8
+ const paragraphs = content?.split('__SOAMES_P__') ?? [];
9
+
10
+ return (
11
+ <section className="soames-section article soames-article">
12
+ <div className="container col-md-10">
13
+ <div className="inner-container" style={{ width: "100%" }}>
14
+ <div className="section-text align-center mbr-fonts-style display-7 pb-2">
15
+ {paragraphs.map((paragraph, key) => (
16
+ <p key={key} className="block-text mbr-fonts-style display-7">
17
+ {paragraph}
18
+ </p>
19
+ ))}
20
+ </div>
21
+ </div>
22
+ </div>
23
+ </section>
24
+ );
25
+ };
26
+
27
+ export default SoamesTextBlock;
@@ -0,0 +1,27 @@
1
+ import React from "react";
2
+
3
+ interface SoamesTextListProps {
4
+ content: string;
5
+ }
6
+
7
+ const SoamesTextList: React.FC<SoamesTextListProps> = ({ content }) => {
8
+ const lineItems = content?.split('__SOAMES_LI__') ?? [];
9
+
10
+ return (
11
+ <section className="soames-section article soames-list pb-0">
12
+ <div className="container">
13
+ <div className="media-container-row">
14
+ <div className="soames-text counter-container col-12 col-md-10 mbr-fonts-style pt-0 display-7">
15
+ <ul>
16
+ {lineItems.map((lineItem, key) => (
17
+ <li key={key}>{lineItem}</li>
18
+ ))}
19
+ </ul>
20
+ </div>
21
+ </div>
22
+ </div>
23
+ </section>
24
+ );
25
+ };
26
+
27
+ export default SoamesTextList;
@@ -0,0 +1,23 @@
1
+ import React from "react";
2
+
3
+ interface SoamesTitleProps {
4
+ title: React.ReactNode;
5
+ }
6
+
7
+ const SoamesTitle: React.FC<SoamesTitleProps> = ({ title }) => {
8
+ return (
9
+ <section className="soames-section soames-title">
10
+ <div className="container">
11
+ <div className="media-container-row">
12
+ <div className="title col-12 col-md-8">
13
+ <h2 className="align-center mbr-fonts-style display-2">
14
+ {title}
15
+ </h2>
16
+ </div>
17
+ </div>
18
+ </div>
19
+ </section>
20
+ );
21
+ };
22
+
23
+ export default SoamesTitle;
@@ -0,0 +1,21 @@
1
+ import React from "react";
2
+
3
+ interface SoamesTitleBarProps {
4
+ title: React.ReactNode;
5
+ }
6
+
7
+ const SoamesTitleBar: React.FC<SoamesTitleBarProps> = ({ title }) => {
8
+ return (
9
+ <section className="soames-section soames-title-bar mt-5 mb-3">
10
+ <div className="container">
11
+ <div className="media-container-row">
12
+ <div className="title col-12 col-md-8">
13
+ <h2 className="align-center mbr-fonts-style display-2">{title}</h2>
14
+ </div>
15
+ </div>
16
+ </div>
17
+ </section>
18
+ );
19
+ };
20
+
21
+ export default SoamesTitleBar;
@@ -0,0 +1,56 @@
1
+ import React from "react";
2
+
3
+ interface SoamesTitleBarLgProps {
4
+ title: React.ReactNode;
5
+ attributes: {
6
+ subtitle?: string[];
7
+ background?: string[];
8
+ };
9
+ }
10
+
11
+ const SoamesTitleBarLg: React.FC<SoamesTitleBarLgProps> = ({ title, attributes }) => {
12
+ const subtitle = attributes?.subtitle?.[0];
13
+ const background = attributes?.background?.[0];
14
+ const defaultBackground = 'https://picsum.photos/1080/720';
15
+
16
+ const css = `
17
+ .soames-background-title-bar-lg::after {
18
+ background: url(${background || defaultBackground});
19
+ background-position: 50% 50%;
20
+ background-size: cover;
21
+ background-attachment: fixed;
22
+ background-repeat: no-repeat;
23
+ left: 0px;
24
+ height: 176px;
25
+ overflow: hidden;
26
+ pointer-events: none;
27
+ margin-top: 0px;
28
+ transform: translate3d(0px, 0px, 0px);
29
+ }
30
+ `;
31
+
32
+ return (
33
+ <>
34
+ <style>{css}</style>
35
+ <section className="soames-header-sm soames-parallax soames-background-title-bar-lg mt-5 mb-3">
36
+ <div className="soames-overlay" style={{ opacity: 0.6, backgroundColor: 'rgb(46, 46, 46)' }}></div>
37
+ <div className="container">
38
+ <div className="row justify-content-md-center">
39
+ <div className="soames-white col-md-10">
40
+ <h1 className="soames-section-title align-center soames-bold mbr-fonts-style display-1">
41
+ {title}
42
+ </h1>
43
+ {subtitle && (
44
+ <h3 className="soames-section-subtitle align-center soames-light soames-white mbr-fonts-style display-5">
45
+ {subtitle}
46
+ </h3>
47
+ )}
48
+ </div>
49
+ </div>
50
+ </div>
51
+ </section>
52
+ </>
53
+ );
54
+ };
55
+
56
+ export default SoamesTitleBarLg;
@@ -0,0 +1,34 @@
1
+ import React from "react";
2
+
3
+ interface SoamesVideoProps {
4
+ attributes: {
5
+ link: string;
6
+ title?: string;
7
+ };
8
+ }
9
+
10
+ const SoamesVideo: React.FC<SoamesVideoProps> = ({ attributes }) => {
11
+ const { link, title } = attributes;
12
+
13
+ return (
14
+ <section className="soames-video-container">
15
+ <figure className="soames-figure align-center container">
16
+ <div className="video-block">
17
+ <div className="video-wrapper">
18
+ <iframe
19
+ height="580"
20
+ width="360"
21
+ src={link}
22
+ title={title ?? "Embedded video"}
23
+ frameBorder="0"
24
+ allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
25
+ allowFullScreen
26
+ ></iframe>
27
+ </div>
28
+ </div>
29
+ </figure>
30
+ </section>
31
+ );
32
+ };
33
+
34
+ export default SoamesVideo;