Skip to content

Commit

Permalink
Custom config colors
Browse files Browse the repository at this point in the history
  • Loading branch information
Bobee committed Sep 5, 2021
1 parent d5ba72e commit 6cd8f09
Show file tree
Hide file tree
Showing 8 changed files with 4,273 additions and 42,294 deletions.
40 changes: 29 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,37 @@

# Statamic Bard Text Color Extension

![alt text](https://github.com/xndbogdan/statamic-bard-text-color/blob/main/preview_v2.0.png "Preview")
![Statamic 3.0+](https://img.shields.io/badge/Statamic-3.0+-FF269E?style=for-the-badge&link=https://statamic.com)
[![Total Downloads](https://img.shields.io/packagist/dt/xndbogdan/statamic-bard-text-color.svg)](https://packagist.org/packages/xndbogdan/statamic-bard-text-color)

A statamic bard plugin that lets you change text color!
It allows you to use the default tailwind colors.
At the moment it's still under development. Please report any bugs that you have with it.
## Introduction

## Installation guide
![alt text](https://github.com/xndbogdan/statamic-bard-text-color/blob/main/preview_v2.0.png "Preview")

- composer require xndbogdan/statamic-bard-text-color
This is a statamic bard plugin that lets you change text color!
It allows you to use the default tailwind palette, but you can also add your own.
At the moment it's still under development, so please report any bugs that you encounter.
New feature suggestions are welcomed too.

![Statamic 3.0+](https://img.shields.io/badge/Statamic-3.0+-FF269E?style=for-the-badge&link=https://statamic.com)
[![Total Downloads](https://img.shields.io/packagist/dt/xndbogdan/statamic-bard-text-color.svg)](https://packagist.org/packages/xndbogdan/statamic-bard-text-color)
## Getting started

If you only wish to use the default tailwind palette, then it's as easy as running the composer require command.

` composer require xndbogdan/statamic-bard-text-color `

## Custom colors

### Using a config file
The simplest way of adding new colors to this plugin is by creating a `bard-custom-colors.php` config file to your project.
Please check [this](https://github.com/xndbogdan/statamic-bard-text-color/blob/main/config/bard-custom-colors.php) file if you need an example.

### Pulling colors from tailwind.config.js automatically
This part is still under development.
I'm planning to release a package that automatically exports your config when building/rebuilding the assets.

## New additions
## Credits

- color menu is now scrollable, instead of filling the whole screen
- custom theme colors are now available
Big thanks to:
- [Hesesses](https://github.com/Hesesses) for suggesting a custom color implementation.
- [ncla](https://github.com/ncla) for showing a working example in a project implementation.
- [Jelle Roorda](https://github.com/jelleroorda) from the Statamic discord, for providing resources & advice on how to sucessfuly implement the feature.
16 changes: 16 additions & 0 deletions config/bard-custom-colors.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php
/*
* An array of custom colors.
* Declare them like this:
* 'drunken-pinguin' => '#F5F3EF'
* You can also have colors declared like this
* 'red' => [
* '100' => '#fff5f5',
* '200' => '#fed7d7',
* ...
* '900' => '#7b341e',
* ]
*/
return [
];
?>
Loading

0 comments on commit 6cd8f09

Please sign in to comment.