Giter Site home page Giter Site logo

frontity-chakra-ui-theme's Introduction

Frontity Chakra Theme

A Frontity theme made with the Chakra UI library.

You can try it out in codesandbox: https://githubbox.com/chakra-ui/frontity-chakra-ui-theme

Installation guide

To get start quickly with the Chakra UI theme, you can install them like other published packages in Node using npm or yarn.

To install, run this command in your terminal:

npm install frontity-chakra-theme

Then add frontity-chakra-theme to your frontity.settings.js file.

If you want to modify this package, you need to install it as a local package. You can do so by following this guide: How to install a local package in Frontity.

Theme Options

Chakra theme can be configures via the frontity.settings.js file. The theme options can be specified in the state.theme property.

Key Default Value Description
menu [] The top level navigation links for your blog
socialLinks [] The social media links to use in your theme
logo [] The text or logo image url
showBackgroundPattern true If true, will show a backgroung pattern
showSocialLinks true If true, will show the social media links
colors The primary and accent colors to use

Example Usage

// frontity.settings.js
const settings = {
  packages: [
    {
      name: "frontity-chakra-theme",
      state: {
        theme: {
          // The logo can be a text or an image url
          logo: "Frontity",
          // show background pattern
          showBackgroundPattern: true,
          // show social links
          showSocialLinks: true,
          // the top-level navigation labels and links
          menu: [
            ["Home", "/"],
            ["Portfolio", "/portfolio"],
            ["About", "/about"],
            ["Contact", "/contact"],
          ],
          // the social links
          socialLinks: [
            ["pinterest", "https://www.pinterest.com/frontity/"],
            ["facebook", "https://www.instagram.com/frontity/"],
            ["twitter", "https://www.twitter.com/frontity/"],
          ],
          // color shades to use in the blog
          colors: {
            primary: {
              50: "#e9f5f2",
              100: "#d4dcd9",
              200: "#bbc3be",
              300: "#a1aba5",
              400: "#87938b",
              500: "#6d7972",
              600: "#555f58",
              700: "#323c34",
              800: "#232924",
              900: "#272727",
            },
            accent: {
              50: "#ede4d3",
              100: "#fbe3b2",
              200: "#f6d086",
              300: "#f1be58",
              400: "#eca419",
              500: "#d49212",
              600: "#a5710b",
              700: "#775105",
              800: "#483100",
              900: "#1d0f00",
            },
          },
        },
      },
    },
  ],
};

export default settings;

🚨NOTE: Since this theme is based on Chakra, we require that the theme colors should be color values from 50 - 900. For example, here's what the default colors look like:

// value of theme.colors
{
  "primary": {
    "50": "#e9f5f2",
    "100": "#d4dcd9",
    "200": "#bbc3be",
    "300": "#a1aba5",
    "400": "#87938b",
    "500": "#6d7972",
    "600": "#555f58",
    "700": "#323c34",
    "800": "#232924",
    "900": "#272727"
  },
  "accent": {
    "50": "#ede4d3",
    "100": "#fbe3b2",
    "200": "#f6d086",
    "300": "#f1be58",
    "400": "#eca419",
    "500": "#d49212",
    "600": "#a5710b",
    "700": "#775105",
    "800": "#483100",
    "900": "#1d0f00"
  }
}

You can use tools like Smart Swatch (https://smart-swatch.netlify.com/) or Palx (https://palx.jxnblk.com/) to generate color hues based on a single color

Additional Settings

In addition to the theme options, there are a handful of items you can customize via the frontity object in your site’s frontity.settings.js

// frontity.settings.js
const settings = {
  state: {
    frontity: {
      url: "your website url",
      title: "Your website title",
      description: "Your website description",
    },
  },
};

If you ever have questions, kindly post issues here or head over to https://community.frontity.org to get more personalizes support.

Enjoy the Chakra Theme ⚡️

frontity-chakra-ui-theme's People

Contributors

bowriverstudio avatar dependabot[bot] avatar koli14 avatar luisherranz avatar segunadebayo avatar uokesita avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

frontity-chakra-ui-theme's Issues

Error: post type from endpoints "posts,pages,media" with slug "service-worker.js" not found

Love the theme but it's not working correctly.

The front page loads fine and posts are pulled but if I try to view a post, I get this dump (+ white page in browser preview):

Because you write your CSS inside a JavaScript string you actually have to do double escaping, so for example "content: '\00d7';" should become "content: '\\00d7';".
You can read more about this here:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences
Error: post type from endpoints "posts,pages,media" with slug "service-worker.js" not found
    at Object.eval (webpack-internal:///./node_modules/@frontity/wp-source/src/libraries/handlers/postType.ts:8:21)
    at process._tickCallback (internal/process/next_tick.js:68:7)
You have illegal escape sequence in your template literal, most likely
inside content's property value.
Because you write your CSS inside a JavaScript string you actually have to do double escaping, so for example "content: '\00d7';" should become "content: '\\00d7';".
You can read more about this here:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences
Error: post type from endpoints "posts,pages,media" with slug "service-worker.js" not found
    at Object.eval (webpack-internal:///./node_modules/@frontity/wp-source/src/libraries/handlers/postType.ts:8:21)
    at process._tickCallback (internal/process/next_tick.js:68:7)
You have illegal escape sequence in your template literal, most likely
inside content's property value.
Because you write your CSS inside a JavaScript string you actually have to do double escaping, so for example "content: '\00d7';" should become "content: '\\00d7';".
You can read more about this here:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences

I assume this is the problem but don't know how to fix it:

Error: post type from endpoints "posts,pages,media" with slug "service-worker.js" not found

Use the Switch component for pagination

Instead of doing the pagination with plain JavaScript logic, like this:

{
  (data.isFetching && <Loading />) ||
    (isSearch && <SearchResults />) ||
    (data.isArchive && <Archive />) ||
    (data.isPostType && <Post />) ||
    (data.is404 && <Page404 />);
}

We can now use the Switch component like we are doing in our starter themes: frontity/frontity@ecdab9f

use wordpress menu with this theme

HI,

there are detailed instructions how to get the wordpress menu on the frontity community site with a video:
https://www.youtube.com/watch?v=BMJn0RZ2I9s
I have managed to follow this with the mars theme and get it working. However, your theme is somewhat more complex with navigation.
I can get the data to store in sorce, as items as per that instruction, but I cant seem to get my head around how to impliment it with your code. I did set the theme to use the default nav.js file and that worked, but havent been able to get further than that. the usual error is not being able to read source of undefined.
help would be appreicated, thanks.

Pagination buttons are disabled

If you go to https://frontity-chakra.now.sh/page/2/ you will see that the pagination is disabled for the next and the previous page:
frontity-chakra now sh_page_2_(Pixel 2)

By a quick look at the code, it seems like the isDisabled attribute should be the opposite of what it is right now:
https://github.com/chakra-ui/frontity-chakra-ui-theme/blob/master/packages/frontity-chakra-theme/src/components/archive/pagination.js#L87-L88

<PrevLink link={nextPageLink} isDisabled={!isTherePreviousPage} />
<NextLink link={prevPageLink} isDisabled={!isThereNextPage} />

Content not displaying correctly on mobile

Observed behavior

I can't see the content correctly when I visit the Chakra theme on mobile unless I scroll horizontally.

I'm using a Xiaomi Mi A1 device and the Chrome browser on mobile.

Here are some screenshots:

Screenshot_20200127-120328-1
Screenshot_20200127-120349
Screenshot_20200127-130851

Theme breaks when posts list has just one item

If you install the frontity-chakra-ui-theme in a Frontity project, and point it to a WordPress where you just have one post, it stops working and it returns this error:

TypeError: Cannot destructure property `title` of 'undefined' or 'null'.
      at SecondaryPostPreview (webpack-internal:///./packages/frontity-chakra-theme/src/components/featured-post/featured-post.js:13:2258)
      at processChild (webpack-internal:///./node_modules/react-dom/cjs/react-dom-server.node.development.js:480:2385)
      at resolve (webpack-internal:///./node_modules/react-dom/cjs/react-dom-server.node.development.js:479:122)
      at ReactDOMServerRenderer.render (webpack-internal:///./node_modules/react-dom/cjs/react-dom-server.node.development.js:516:1153)
      at ReactDOMServerRenderer.read (webpack-internal:///./node_modules/react-dom/cjs/react-dom-server.node.development.js:516:55)
      at renderToString (webpack-internal:///./node_modules/react-dom/cjs/react-dom-server.node.development.js:555:116)
      at eval (webpack-internal:///./node_modules/@frontity/core/src/server/index.tsx:45:243)
      at processTicksAndRejections (internal/process/task_queues.js:93:5)
      at eval (webpack-internal:///./node_modules/koa-mount/index.js:16:290)

It seems that the theme is expecting to find a second post (I guess for the homepage, for the first three posts), and as it doesn't exists it returns that error.

Simplify pagination

We don't have to use libraries.source.parse and libraries.source.stringify for next and previous page anymore, so we can simplify this code: https://github.com/chakra-ui/frontity-chakra-ui-theme/blob/master/packages/frontity-chakra-theme/src/components/archive/pagination.js#L63-L78

const { totalPages } = state.source.get(state.router.link);
const { path, page, query } = libraries.source.parse(state.router.link);

const isThereNextPage = page > 1;
const isTherePreviousPage = page < totalPages;

const nextPageLink = libraries.source.stringify({
  path,
  page: page + 1,
  query,
});

const prevPageLink = libraries.source.stringify({
  path,
  page: page - 1,
  query,
});

And just use the next and previous we get from data:

const { totalPages, route, page, next, previous } = state.source.get(
  state.router.link
);

Please note that path has been renamed and is now route.

Docs: https://docs.frontity.org/api-reference-1/wordpress-source#state

Getting error while integrating @frontity/yoast and frontity-contact-form-7, in frontity-chakra-ui-theme. Can you please help me out.

./packages/frontity-chakra-theme/node_modules/@chakra-ui/core/dist/es/CloseButton/index.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
SyntaxError: D:\Andolasoft Projects\AS_Blog\packages\frontity-chakra-theme\node_modules@chakra-ui\core\dist\es\CloseButton\index.js: pragma and pragmaFrag cannot be set when runtime is automatic.

1 | import _extends from "@babel/runtime/helpers/extends";
| ^
2 | import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
3 |
4 | /* @jsx jsx /
at File.buildCodeFrameError (D:\Andolasoft Projects\AS_Blog\node_modules@babel\core\lib\transformation\file\file.js:249:12)
at NodePath.buildCodeFrameError (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\index.js:139:21)
at PluginPass.enter (D:\Andolasoft Projects\AS_Blog\node_modules@babel\plugin-transform-react-jsx\lib\create-plugin.js:164:28)
at newFn (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\visitors.js:177:21)
at NodePath._call (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\context.js:53:20)
at NodePath.call (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\context.js:40:17)
at NodePath.visit (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\context.js:90:31)
at TraversalContext.visitQueue (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\context.js:103:16)
at TraversalContext.visitSingle (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\context.js:77:19)
at TraversalContext.visit (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\context.js:131:19)
@ ./packages/frontity-chakra-theme/node_modules/@chakra-ui/core/dist/es/index.js 5:656-706 5:656-706
@ ./packages/frontity-chakra-theme/src/components/styles/processors.js
@ ./packages/frontity-chakra-theme/src/index.js
@ ./build/bundling/entry-points/chakra-react/client.ts
@ multi webpack-hot-middleware/client ./build/bundling/entry-points/chakra-react/client.ts

./packages/frontity-chakra-theme/node_modules/@chakra-ui/core/dist/es/Code/index.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
SyntaxError: D:\Andolasoft Projects\AS_Blog\packages\frontity-chakra-theme\node_modules@chakra-ui\core\dist\es\Code\index.js: pragma and pragmaFrag
cannot be set when runtime is automatic.

1 | import _extends from "@babel/runtime/helpers/extends";
| ^
2 | import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
3 |
4 | /* @jsx jsx /
at File.buildCodeFrameError (D:\Andolasoft Projects\AS_Blog\node_modules@babel\core\lib\transformation\file\file.js:249:12)
at NodePath.buildCodeFrameError (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\index.js:139:21)
at PluginPass.enter (D:\Andolasoft Projects\AS_Blog\node_modules@babel\plugin-transform-react-jsx\lib\create-plugin.js:164:28)
at newFn (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\visitors.js:177:21)
at NodePath._call (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\context.js:53:20)
at NodePath.call (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\context.js:40:17)
at NodePath.visit (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\context.js:90:31)
at TraversalContext.visitQueue (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\context.js:103:16)
at TraversalContext.visitSingle (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\context.js:77:19)
at TraversalContext.visit (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\context.js:131:19)
@ ./packages/frontity-chakra-theme/node_modules/@chakra-ui/core/dist/es/index.js 5:522-558 5:522-558
@ ./packages/frontity-chakra-theme/src/components/styles/processors.js
@ ./packages/frontity-chakra-theme/src/index.js
@ ./build/bundling/entry-points/chakra-react/client.ts
@ multi webpack-hot-middleware/client ./build/bundling/entry-points/chakra-react/client.ts

./packages/frontity-chakra-theme/node_modules/@chakra-ui/core/dist/es/Collapse/index.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
SyntaxError: D:\Andolasoft Projects\AS_Blog\packages\frontity-chakra-theme\node_modules@chakra-ui\core\dist\es\Collapse\index.js: pragma and pragmaFrag cannot be set when runtime is automatic.

1 | import _extends from "@babel/runtime/helpers/extends";
| ^
2 | import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
3 |
4 | /* @jsx jsx /
at File.buildCodeFrameError (D:\Andolasoft Projects\AS_Blog\node_modules@babel\core\lib\transformation\file\file.js:249:12)
at NodePath.buildCodeFrameError (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\index.js:139:21)
at PluginPass.enter (D:\Andolasoft Projects\AS_Blog\node_modules@babel\plugin-transform-react-jsx\lib\create-plugin.js:164:28)
at newFn (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\visitors.js:177:21)
at NodePath._call (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\context.js:53:20)
at NodePath.call (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\context.js:40:17)
at NodePath.visit (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\context.js:90:31)
at TraversalContext.visitQueue (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\context.js:103:16)
at TraversalContext.visitSingle (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\context.js:77:19)
at TraversalContext.visit (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\context.js:131:19)
@ ./packages/frontity-chakra-theme/node_modules/@chakra-ui/core/dist/es/index.js 5:706-750 5:706-750
@ ./packages/frontity-chakra-theme/src/components/styles/processors.js
@ ./packages/frontity-chakra-theme/src/index.js
@ ./build/bundling/entry-points/chakra-react/client.ts
@ multi webpack-hot-middleware/client ./build/bundling/entry-points/chakra-react/client.ts

./packages/frontity-chakra-theme/node_modules/@chakra-ui/core/dist/es/ColorModeProvider/index.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
SyntaxError: D:\Andolasoft Projects\AS_Blog\packages\frontity-chakra-theme\node_modules@chakra-ui\core\dist\es\ColorModeProvider\index.js: pragma and pragmaFrag cannot be set when runtime is automatic.

1 | import _extends from "@babel/runtime/helpers/extends";
| ^
2 |
3 | /* @jsx jsx /
4 | import { jsx } from "@emotion/core";
at File.buildCodeFrameError (D:\Andolasoft Projects\AS_Blog\node_modules@babel\core\lib\transformation\file\file.js:249:12)
at NodePath.buildCodeFrameError (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\index.js:139:21)
at PluginPass.enter (D:\Andolasoft Projects\AS_Blog\node_modules@babel\plugin-transform-react-jsx\lib\create-plugin.js:164:28)
at newFn (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\visitors.js:177:21)
at NodePath._call (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\context.js:53:20)
at NodePath.call (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\context.js:40:17)
at NodePath.visit (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\context.js:90:31)
at TraversalContext.visitQueue (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\context.js:103:16)
at TraversalContext.visitSingle (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\context.js:77:19)
at TraversalContext.visit (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\context.js:131:19)
@ ./packages/frontity-chakra-theme/node_modules/@chakra-ui/core/dist/es/index.js 5:798-860 5:798-860 5:860-893 5:860-893
@ ./packages/frontity-chakra-theme/src/components/styles/processors.js
@ ./packages/frontity-chakra-theme/src/index.js
@ ./build/bundling/entry-points/chakra-react/client.ts
@ multi webpack-hot-middleware/client ./build/bundling/entry-points/chakra-react/client.ts

./packages/frontity-chakra-theme/node_modules/@chakra-ui/core/dist/es/Divider/index.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
SyntaxError: D:\Andolasoft Projects\AS_Blog\packages\frontity-chakra-theme\node_modules@chakra-ui\core\dist\es\Divider\index.js: pragma and pragmaFrag cannot be set when runtime is automatic.

1 | import _extends from "@babel/runtime/helpers/extends";
| ^
2 | import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
3 |
4 | /* @jsx jsx /
at File.buildCodeFrameError (D:\Andolasoft Projects\AS_Blog\node_modules@babel\core\lib\transformation\file\file.js:249:12)
at NodePath.buildCodeFrameError (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\index.js:139:21)
at PluginPass.enter (D:\Andolasoft Projects\AS_Blog\node_modules@babel\plugin-transform-react-jsx\lib\create-plugin.js:164:28)
at newFn (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\visitors.js:177:21)
at NodePath._call (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\context.js:53:20)
at NodePath.call (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\context.js:40:17)
at NodePath.visit (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\context.js:90:31)
at TraversalContext.visitQueue (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\context.js:103:16)
at TraversalContext.visitSingle (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\context.js:77:19)
at TraversalContext.visit (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\context.js:131:19)
@ ./packages/frontity-chakra-theme/node_modules/@chakra-ui/core/dist/es/index.js 5:1063-1105 5:1063-1105
@ ./packages/frontity-chakra-theme/src/components/styles/processors.js
@ ./packages/frontity-chakra-theme/src/index.js
@ ./build/bundling/entry-points/chakra-react/client.ts
@ multi webpack-hot-middleware/client ./build/bundling/entry-points/chakra-react/client.ts

./packages/frontity-chakra-theme/node_modules/@chakra-ui/core/dist/es/Drawer/index.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
SyntaxError: D:\Andolasoft Projects\AS_Blog\packages\frontity-chakra-theme\node_modules@chakra-ui\core\dist\es\Drawer\index.js: pragma and pragmaFrag cannot be set when runtime is automatic.

1 | import _extends from "@babel/runtime/helpers/extends";
| ^
2 | import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
3 |
4 | /* @jsx jsx /
at File.buildCodeFrameError (D:\Andolasoft Projects\AS_Blog\node_modules@babel\core\lib\transformation\file\file.js:249:12)
at NodePath.buildCodeFrameError (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\index.js:139:21)
at PluginPass.enter (D:\Andolasoft Projects\AS_Blog\node_modules@babel\plugin-transform-react-jsx\lib\create-plugin.js:164:28)
at newFn (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\visitors.js:177:21)
at NodePath._call (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\context.js:53:20)
at NodePath.call (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\context.js:40:17)
at NodePath.visit (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\context.js:90:31)
at TraversalContext.visitQueue (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\context.js:103:16)
at TraversalContext.visitSingle (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\context.js:77:19)
at TraversalContext.visit (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\context.js:131:19)
@ ./packages/frontity-chakra-theme/node_modules/@chakra-ui/core/dist/es/index.js 5:1105-1127 5:1105-1127
@ ./packages/frontity-chakra-theme/src/components/styles/processors.js
@ ./packages/frontity-chakra-theme/src/index.js
@ ./build/bundling/entry-points/chakra-react/client.ts
@ multi webpack-hot-middleware/client ./build/bundling/entry-points/chakra-react/client.ts

./packages/frontity-chakra-theme/node_modules/@chakra-ui/core/dist/es/Editable/index.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
SyntaxError: D:\Andolasoft Projects\AS_Blog\packages\frontity-chakra-theme\node_modules@chakra-ui\core\dist\es\Editable\index.js: pragma and pragmaFrag cannot be set when runtime is automatic.

1 | import _defineProperty from "@babel/runtime/helpers/defineProperty";
| ^
2 | import _extends from "@babel/runtime/helpers/extends";
3 | import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
4 |
at File.buildCodeFrameError (D:\Andolasoft Projects\AS_Blog\node_modules@babel\core\lib\transformation\file\file.js:249:12)
at NodePath.buildCodeFrameError (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\index.js:139:21)
at PluginPass.enter (D:\Andolasoft Projects\AS_Blog\node_modules@babel\plugin-transform-react-jsx\lib\create-plugin.js:164:28)
at newFn (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\visitors.js:177:21)
at NodePath._call (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\context.js:53:20)
at NodePath.call (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\context.js:40:17)
at NodePath.visit (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\context.js:90:31)
at TraversalContext.visitQueue (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\context.js:103:16)
at TraversalContext.visitSingle (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\context.js:77:19)
at TraversalContext.visit (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\context.js:131:19)
@ ./packages/frontity-chakra-theme/node_modules/@chakra-ui/core/dist/es/index.js 5:1127-1171 5:1127-1171 5:1171-1195 5:1171-1195
@ ./packages/frontity-chakra-theme/src/components/styles/processors.js
@ ./packages/frontity-chakra-theme/src/index.js
@ ./build/bundling/entry-points/chakra-react/client.ts
@ multi webpack-hot-middleware/client ./build/bundling/entry-points/chakra-react/client.ts

./packages/frontity-chakra-theme/node_modules/@chakra-ui/core/dist/es/FormControl/index.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
SyntaxError: D:\Andolasoft Projects\AS_Blog\packages\frontity-chakra-theme\node_modules@chakra-ui\core\dist\es\FormControl\index.js: pragma and pragmaFrag cannot be set when runtime is automatic.

1 | import _extends from "@babel/runtime/helpers/extends";
| ^
2 | import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
3 |
4 | /* @jsx jsx /
at File.buildCodeFrameError (D:\Andolasoft Projects\AS_Blog\node_modules@babel\core\lib\transformation\file\file.js:249:12)
at NodePath.buildCodeFrameError (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\index.js:139:21)
at PluginPass.enter (D:\Andolasoft Projects\AS_Blog\node_modules@babel\plugin-transform-react-jsx\lib\create-plugin.js:164:28)
at newFn (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\visitors.js:177:21)
at NodePath._call (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\context.js:53:20)
at NodePath.call (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\context.js:40:17)
at NodePath.visit (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\context.js:90:31)
at TraversalContext.visitQueue (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\context.js:103:16)
at TraversalContext.visitSingle (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\context.js:77:19)
at TraversalContext.visit (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\context.js:131:19)
@ ./packages/frontity-chakra-theme/node_modules/@chakra-ui/core/dist/es/index.js 5:1231-1281 5:1231-1281 5:1281-1308 5:1281-1308
@ ./packages/frontity-chakra-theme/src/components/styles/processors.js
@ ./packages/frontity-chakra-theme/src/index.js
@ ./build/bundling/entry-points/chakra-react/client.ts
@ multi webpack-hot-middleware/client ./build/bundling/entry-points/chakra-react/client.ts

./packages/frontity-chakra-theme/node_modules/@chakra-ui/core/dist/es/FormErrorMessage/index.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
SyntaxError: D:\Andolasoft Projects\AS_Blog\packages\frontity-chakra-theme\node_modules@chakra-ui\core\dist\es\FormErrorMessage\index.js: pragma and pragmaFrag cannot be set when runtime is automatic.

1 | import _extends from "@babel/runtime/helpers/extends";
| ^
2 | import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
3 |
4 | /* @jsx jsx /
at File.buildCodeFrameError (D:\Andolasoft Projects\AS_Blog\node_modules@babel\core\lib\transformation\file\file.js:249:12)
at NodePath.buildCodeFrameError (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\index.js:139:21)
at PluginPass.enter (D:\Andolasoft Projects\AS_Blog\node_modules@babel\plugin-transform-react-jsx\lib\create-plugin.js:164:28)
at newFn (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\visitors.js:177:21)
at NodePath._call (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\context.js:53:20)
at NodePath.call (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\context.js:40:17)
at NodePath.visit (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\context.js:90:31)
at TraversalContext.visitQueue (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\context.js:103:16)
at TraversalContext.visitSingle (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\context.js:77:19)
at TraversalContext.visit (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\context.js:131:19)
@ ./packages/frontity-chakra-theme/node_modules/@chakra-ui/core/dist/es/index.js 5:1410-1470 5:1410-1470
@ ./packages/frontity-chakra-theme/src/components/styles/processors.js
@ ./packages/frontity-chakra-theme/src/index.js
@ ./build/bundling/entry-points/chakra-react/client.ts
@ multi webpack-hot-middleware/client ./build/bundling/entry-points/chakra-react/client.ts

./packages/frontity-chakra-theme/node_modules/@chakra-ui/core/dist/es/FormHelperText/index.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
SyntaxError: D:\Andolasoft Projects\AS_Blog\packages\frontity-chakra-theme\node_modules@chakra-ui\core\dist\es\FormHelperText\index.js: pragma and pragmaFrag cannot be set when runtime is automatic.

1 | import _extends from "@babel/runtime/helpers/extends";
| ^
2 |
3 | /* @jsx jsx /
4 | import { jsx } from "@emotion/core";
at File.buildCodeFrameError (D:\Andolasoft Projects\AS_Blog\node_modules@babel\core\lib\transformation\file\file.js:249:12)
at NodePath.buildCodeFrameError (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\index.js:139:21)
at PluginPass.enter (D:\Andolasoft Projects\AS_Blog\node_modules@babel\plugin-transform-react-jsx\lib\create-plugin.js:164:28)
at newFn (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\visitors.js:177:21)
at NodePath._call (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\context.js:53:20)
at NodePath.call (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\context.js:40:17)
at NodePath.visit (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\context.js:90:31)
at TraversalContext.visitQueue (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\context.js:103:16)
at TraversalContext.visitSingle (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\context.js:77:19)
at TraversalContext.visit (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\context.js:131:19)
@ ./packages/frontity-chakra-theme/node_modules/@chakra-ui/core/dist/es/index.js 5:1308-1364 5:1308-1364
@ ./packages/frontity-chakra-theme/src/components/styles/processors.js
@ ./packages/frontity-chakra-theme/src/index.js
@ ./build/bundling/entry-points/chakra-react/client.ts
@ multi webpack-hot-middleware/client ./build/bundling/entry-points/chakra-react/client.ts

./packages/frontity-chakra-theme/node_modules/@chakra-ui/core/dist/es/FormLabel/index.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
SyntaxError: D:\Andolasoft Projects\AS_Blog\packages\frontity-chakra-theme\node_modules@chakra-ui\core\dist\es\FormLabel\index.js: pragma and pragmaFrag cannot be set when runtime is automatic.

1 | import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
| ^
2 | import _extends from "@babel/runtime/helpers/extends";
3 |
4 | /* @jsx jsx /
at File.buildCodeFrameError (D:\Andolasoft Projects\AS_Blog\node_modules@babel\core\lib\transformation\file\file.js:249:12)
at NodePath.buildCodeFrameError (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\index.js:139:21)
at PluginPass.enter (D:\Andolasoft Projects\AS_Blog\node_modules@babel\plugin-transform-react-jsx\lib\create-plugin.js:164:28)
at newFn (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\visitors.js:177:21)
at NodePath._call (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\context.js:53:20)
at NodePath.call (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\context.js:40:17)
at NodePath.visit (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\context.js:90:31)
at TraversalContext.visitQueue (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\context.js:103:16)
at TraversalContext.visitSingle (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\context.js:77:19)
at TraversalContext.visit (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\context.js:131:19)
@ ./packages/frontity-chakra-theme/node_modules/@chakra-ui/core/dist/es/index.js 5:1364-1410 5:1364-1410
@ ./packages/frontity-chakra-theme/src/components/styles/processors.js
@ ./packages/frontity-chakra-theme/src/index.js
@ ./build/bundling/entry-points/chakra-react/client.ts
@ multi webpack-hot-middleware/client ./build/bundling/entry-points/chakra-react/client.ts

./packages/frontity-chakra-theme/node_modules/@chakra-ui/core/dist/es/Heading/index.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
SyntaxError: D:\Andolasoft Projects\AS_Blog\packages\frontity-chakra-theme\node_modules@chakra-ui\core\dist\es\Heading\index.js: pragma and pragmaFrag cannot be set when runtime is automatic.

1 | import _extends from "@babel/runtime/helpers/extends";
| ^
2 | import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
3 |
4 | /* @jsx jsx /
at File.buildCodeFrameError (D:\Andolasoft Projects\AS_Blog\node_modules@babel\core\lib\transformation\file\file.js:249:12)
at NodePath.buildCodeFrameError (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\index.js:139:21)
at PluginPass.enter (D:\Andolasoft Projects\AS_Blog\node_modules@babel\plugin-transform-react-jsx\lib\create-plugin.js:164:28)
at newFn (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\visitors.js:177:21)
at NodePath._call (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\context.js:53:20)
at NodePath.call (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\context.js:40:17)
at NodePath.visit (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\context.js:90:31)
at TraversalContext.visitQueue (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\context.js:103:16)
at TraversalContext.visitSingle (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\context.js:77:19)
at TraversalContext.visit (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\context.js:131:19)
@ ./packages/frontity-chakra-theme/node_modules/@chakra-ui/core/dist/es/index.js 5:1506-1548 5:1506-1548
@ ./packages/frontity-chakra-theme/src/components/styles/processors.js
@ ./packages/frontity-chakra-theme/src/index.js
@ ./build/bundling/entry-points/chakra

ppacage.json file

{
"name": "my-frontity-project",
"version": "1.0.0",
"private": true,
"description": "Frontity project",
"keywords": [
"frontity"
],
"scripts": {
"dev": "frontity dev",
"build": "frontity build",
"serve": "npx frontity serve"
},
"repository": {
"type": "git",
"url": "git+https://github.com/chakra-ui/frontity-chakra-ui-theme.git"
},
"author": "Segun Adebayo [email protected]",
"license": "MIT",
"bugs": {
"url": "https://github.com/chakra-ui/frontity-chakra-ui-theme/issues"
},
"homepage": "https://github.com/chakra-ui/frontity-chakra-ui-theme#readme",
"prettier": {},
"dependencies": {
"@chakra-ui/core": "^0.8.0",
"@emotion/core": "^11.0.0",
"@fontsource/work-sans": "^4.5.1",
"@frontity/core": "^1.14.3",
"@frontity/html2react": "^1.7.0",
"@frontity/tiny-router": "^1.4.4",
"@frontity/wp-comments": "^1.0.0",
"@frontity/wp-source": "^1.11.5",
"@frontity/yoast": "^2.1.1",
"frontity": "^1.17.0",
"frontity-chakra-theme": "./packages/frontity-chakra-theme",
"frontity-contact-form-7": "^0.1.7"
},
"devDependencies": {
"@babel/core": "^7.15.4",
"@babel/preset-env": "^7.15.4",
"@changesets/changelog-github": "^0.4.1",
"@changesets/cli": "2.17.0",
"babel-loader": "^8.2.2",
"eslint": "7.32.0",
"eslint-plugin-react": "7.25.1",
"webpack": "^5.51.2"
}
}

Illegal escape sequence ? & <a> cannot appear as a descendant of <a> ??

I ran the frontity chakra theme I just installed from this Github repo and once I ran it I got following errors in the Devtools console:

  • 5 errors had the same text:
You have illegal escape sequence in your template literal, most likely inside content's property value.
Because you write your CSS inside a JavaScript string you actually have to do double escaping, so for example "content: '\00d7';" should become "content: '\\00d7';".
You can read more about this here:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences

2 of them were from the path eval @ webpack-internal:///…e.browser.esm.js:14 and
3 of them were from the path serializeStyles @ webpack-internal:///…e.browser.esm.js:12

  • and 2 errors that were as follows:
Warning: validateDOMNesting(...): <a> cannot appear as a descendant of <a>.
    in a (created by Context.Consumer)
    in PseudoBox
    in Unknown (created by PostCategories)
    in div (created by Context.Consumer)
    in PseudoBox (created by PostCategory)
    in PostCategory (created by PostCategories)
    in div (created by Context.Consumer)
    in Box (created by Flex)
    in Flex (created by PostCategories)
    in PostCategories (created by PrimaryPostPreview)
    in div (created by Context.Consumer)
    in Box (created by PostContent)
    in PostContent (created by PrimaryPostPreview)
    in article (created by Context.Consumer)
    in Box (created by PrimaryPostArticle)
    in PrimaryPostArticle (created by PrimaryPostPreview)
    in a (created by Context.Consumer)
    in PseudoBox
    in Unknown (created by PrimaryPostPreview)
    in PrimaryPostPreview (created by FeaturedPostSection)
    in div (created by Context.Consumer)
    in Box (created by FeaturedPostSection)
    in section (created by Context.Consumer)
    in Box (created by Flex)
    in Flex (created by FeaturedPostSection)
    in FeaturedPostSection
    in section (created by Context.Consumer)
    in Box
    in Unknown
    in Unknown (created by InnerLoadable)
    in InnerLoadable (created by Context.Consumer)
    in Unknown (created by ForwardRef)
    in ForwardRef
    in main (created by Context.Consumer)
    in Box
    in ThemeProvider (created by ThemeProvider)
    in ThemeProvider
    in Unknown (created by App)
    in HelmetProvider (created by App)
    in App

both of them were from the path warningWithoutStack @ webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:179

PS: my OS is windows 10

search not working (on default settings)

HI,

it appears the search feature does not work on a default install. have tried a few things, just throwing undefined errors.

please can you look at this issue?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.