Giter VIP home page Giter VIP logo

kirby-panel-checklists's Introduction

Kirby Panel Checklists

Create automatic checklists inside the panel. You can test anything you want.

Screenshot

Blueprint

To see the field add the following into your blueprint.

checklist:
  label: My checklist
  type: checklist
  list: my_checklist

Usage

Now you need to setup some tests. It's done in your config file, or in a plugin.

return [
  'jenstornell.checklists.lists' => [
    'my_checklist' => [
      function($page) {
        return [
          'text' => 'Success on ' . $page->title(),
          'color' => 'green',
          'icon' => 'check'
        ];
      },
      function($page) {
        return [
          'text' => 'It is global',
          'color' => 'blue',
          'icon' => 'globe'
        ];
      },
    ]
  ]
];

Each function represents one test and one list item.

  • The available colors are black, blue, gray, green, orange, and red.
  • The available icons are the ones that are built into the panel.

Plugin support

With many items directly in the config file, it can be messy. To clean it up, you can wrap it inside a plugin.

A full list

function checklistsMyChecklist() {
  // Return the whole checklist array
}

Just one list item

function checklistsMyitem() {
  // Return just one list item
}

Checklist ideas

You can test any anything you want. Below are a few ideas.

  • SEO (Search Engine Optimization)
  • Environment/security
  • Content quality

kirby-panel-checklists's People

Contributors

jenstornell avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

kirby-panel-checklists's Issues

Way to create own checklists

A function that returns true or false.

return [
  'checklists' => [
    [ // first list
      [ // first item
        function() {
          $array['label'] = 'We are testing',
          $array['color'] = 'green',
          return $array;
        }
      ]
    ]
  ]
];

Label support

When using this field the label is never rendered in the panel.

isHttps as possible checklist item

Migrated from Kirby Security Checklist.

function isHttps() {
	return (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') || $_SERVER['SERVER_PORT'] == 443;
}

Possible list item in lib.

Checklist ideas

Do you have an idea of a checklist? Explain it as good as you can.

Possible built in checklist items

Environment

  • Protected the content folder
  • Kirby version up to date
  • Apache version
  • PHP version

SEO

  • Seo title tag
  • Seo meta description

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.