deichrakete/kirby-color-schemes 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

deichrakete/kirby-color-schemes

最新稳定版本:3.0.0

Composer 安装命令:

composer require deichrakete/kirby-color-schemes

包简介

Kirby plugin for color schemes

README 文档

README

This plugin allows you to easily customize the color schemes of your Kirby website.

The Kirby Color Schemes plugin is currently in early stages and is a work in progress.

Summary

The Kirby Color Schemes plugin provides a simple way to define and apply custom color schemes to your Kirby website. It allows you to define color variables in a configuration file and apply them to your site's CSS.

Installation

  1. Download the plugin files and place them in the site/plugins/color-schemes directory of your Kirby installation.
  2. In your Kirby configuration file (site/config/config.php), add the following line to enable the plugin:
'deichrakete.color-schemes' => [
    'class' => '[&_.button:hover]:no-underline', // add classes to all schemes
    'schemes' => [
        [ // Overwrites the default color scheme
            'name' => 'default', // also the css class
            'label' => 'Default',
            'colors' => [
                'background' => '#ffffff',
                'text' => '#000000',
                'primary' => '#00ffff', // buttons, links, ...
        ],
            'classes' => 'bg-white text-black' // Custom classes e.g. Tailwindcss
        ],
        [
            'name' => 'pastel1',
            'label' => 'Pastel 1',
            'colors' => [
                'background' => '#f2e8d9',
                'text' => '#5c5c5c',
                'primary' => '#b3cdd1',
            ],
        ],
        [
            'name' => 'pastel2',
            'label' => 'Pastel 2',
            'colors' => [
                'background' => '#e8f2d9',
                'text' => '#5c5c5c',
                'primary' => '#d1cbb3',
            ],
        ],
        [
            'name' => 'pastel3',
            'label' => 'Pastel 3',
            'colors' => [
                'background' => '#d9e8f2',
                'text' => '#5c5c5c',
                'primary' => '#b3d1cd',
            ],
        ],
        [
            'name' => 'dark1',
            'label' => 'Dark 1',
            'colors' => [
                'background' => '#1a1a1a',
                'text' => '#ffffff',
                'primary' => '#4d4d4d',
            ],
        ],
    ]
]
  1. Add a new field to your layout settings blueprint
fields:
    layout:
        type: layout
        layouts:
            - '1/1'
            - '1/2, 1/2'
            - '1/3, 1/3, 1/3'
        fieldsets:
            - heading
            - text
            - accordion
        settings:
            fields:
                scheme:
                    label: Color Scheme
                    type: colorscheme
                    default: default
  1. Add the scheme field to your layout css classes or read the settings from the config.

统计信息

  • 总下载量: 10
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-09-17