Giter Club home page Giter Club logo

Comments (2)

sylvainjule avatar sylvainjule commented on May 31, 2024 1

Both default and required work fine for me with Kirby 3.5. It seems that default value are handled differently when added to already existing pages, maybe that's what was at fault.

I'm closing this, please don't hesitate to reopen if it still happens.

from kirby-color-palette.

herrajon avatar herrajon commented on May 31, 2024 1

Howdy Sylvain

Revisited this simple but useful plugin again. Really like the simplicity of it.

After few rounds of T&E I got the default option to work and not display an error page (error if the user selects no colour option):

In section 3.5 on the README.md for the plugin it states:

# structured colours
palette:
  type: color-palette
  default: blue
  options:
    blue:
      background: '#135fdc'
      border: '#0438c7'
    orange:
      background: '#f6917e'
      border: '#ef6a57'

This displays an Error page for me in various Kirby versions. Currently running 3.5.7.1.

But the following combination does work:

# structured colors
palette:
  type: color-palette
  default: 
    background: '#135fdc'
    border: '#0438c7'
    key: blue
  options:
    blue:
      background: '#135fdc'
      border: '#0438c7'
    orange:
      background: '#f6917e'
      border: '#ef6a57'

So in my case at least the background and border (and others if in question) attributes need to be defined with the Default along with a key value of the configured color optionn (key: blue in this case) and with one indent.

Hope this is useful.

Best,
Jรณn

from kirby-color-palette.

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.