GithubHelp home page GithubHelp logo

Comments (6)

trevorblades avatar trevorblades commented on May 21, 2024 2

Hey @SvenAlHamad! You sure can change the color palette in this theme. You'll want to shadow gatsby-theme-apollo-core/utils/colors.

You can check out all of the available keys in the linked file. If you want to keep most of the colors intact but only change a few of them, you can shadow the file like so:

// src/gatsby-theme-apollo-core/utils/colors.js
const {colors} = require('gatsby-theme-apollo-core/src/utils/colors');

exports.colors = {
  ...colors, // spread in default color values
  primary: '#ff0000' // change the primary color to red
};

Here's what the result of this change looks like:

Screen Shot 2019-09-24 at 1 19 48 PM

from gatsby-theme-apollo.

wrod7 avatar wrod7 commented on May 21, 2024 2

that was it it! gonna play with it some more. Thanks again for this package!

from gatsby-theme-apollo.

wrod7 avatar wrod7 commented on May 21, 2024

@trevorblades thanks for this. whats the next step after adding that colors.js file? do I need to edit something in the gatsby-config?

from gatsby-theme-apollo.

trevorblades avatar trevorblades commented on May 21, 2024

@wrod7 you shouldn't need to edit anything in your Gatsby config once you set up your custom colors.js file. Just restart your build and you should see the new colors 👍

Let me know if you're seeing something different!

from gatsby-theme-apollo.

wrod7 avatar wrod7 commented on May 21, 2024

@trevorblades took a few restarts also had something wrong in the gatsby-config but its good now. thanks!

im having trouble setting up component shadowing. is there something in the config i need to change to make it shadowing work?

here is my tree:

|-- source
    |-- index.mdx
|-- src
    |-- assets
         |-- custom-logo.svg
    |-- gatsby-theme-apollo
        |-- components
            |-- logo.js
    |-- gatsby-theme-apollo-core
        |-- utils
            |-- colors.js
|-- gatsby-config.js

here is my config:

const themeOptions = require('gatsby-theme-apollo-docs/theme-options');

module.exports = {
  pathPrefix: '/docs',
  plugins: [
    {
      resolve: 'gatsby-theme-apollo-docs',
      options: {
        ...themeOptions,
        root: __dirname,
        siteName: 'Docs',
        subtitle: 'Platform',
        description: 'Description',
        githubRepo: '...',
        spectrumPath: '...',
        sidebarCategories: {
          null: ['index'],
        },
      },
    },
  ],
};

from gatsby-theme-apollo.

trevorblades avatar trevorblades commented on May 21, 2024

@wrod7 you've almost got it! If you want to shadow the logo, you'll want to do that in your src/gatsby-theme-apollo-core directory rather than the gatsby-theme-apollo one. I realized that the core theme docs were still telling users to shadow the logo in the way that you are, so I updated that section: https://github.com/apollographql/gatsby-theme-apollo/tree/master/packages/gatsby-theme-apollo-core#logotitle

Your directory structure should look like this when you're done:

|-- source
    |-- index.mdx
|-- src
    |-- assets
         |-- custom-logo.svg
    |-- gatsby-theme-apollo-core
        |-- components
            |-- logo.js
        |-- utils
            |-- colors.js
|-- gatsby-config.js

And your logo.js file could look like this:

export {ReactComponent as default} from '../assets/custom-logo.svg';

from gatsby-theme-apollo.

Related Issues (20)

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.